mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-25 01:28:22 +03:00
Some checks are pending
CI / AMD64 Build (push) Waiting to run
CI / ARM Build (push) Waiting to run
CI / Jetson Jetpack 6 (push) Waiting to run
CI / AMD64 Extra Build (push) Blocked by required conditions
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
CI / Assemble and push default build (push) Blocked by required conditions
* fix coral docs * add note about sub label object classification with person * Catch OSError for deleting classification image * add docs for dummy camera debugging * add to sidebar * fix formatting * fix * avx instructions are required for classification * break text on classification card to prevent button overflow * Ensure there is no NameError when processing * Don't use region for state classification models * fix spelling * Handle attribute based models * Catch case of non-trained model that doesn't add infinite number of classification images * Actually train object classification models automatically --------- Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
3.5 KiB
3.5 KiB
| id | title |
|---|---|
| dummy-camera | Troubleshooting Detection |
When investigating object detection or tracking problems, it can be helpful to replay an exported video as a temporary "dummy" camera. This lets you reproduce issues locally, iterate on configuration (detections, zones, enrichment settings), and capture logs and clips for analysis.
When to use
- Replaying an exported clip to reproduce incorrect detections
- Testing configuration changes (model settings, trackers, filters) against a known clip
- Gathering deterministic logs and recordings for debugging or issue reports
Example Config
Place the clip you want to replay in a location accessible to Frigate (for example /media/frigate/ or the repository debug/ folder when developing). Then add a temporary camera to your config/config.yml like this:
cameras:
test:
ffmpeg:
inputs:
- path: /media/frigate/car-stopping.mp4
input_args: -re -stream_loop -1 -fflags +genpts
roles:
- detect
detect:
enabled: true
record:
enabled: false
snapshots:
enabled: false
-re -stream_loop -1tellsffmpegto play the file in realtime and loop indefinitely, which is useful for long debugging sessions.-fflags +genptshelps generate presentation timestamps when they are missing in the file.
Steps
- Export or copy the clip you want to replay to the Frigate host (e.g.,
/media/frigate/ordebug/clips/). - Add the temporary camera to
config/config.yml(example above). Use a unique name such astestorreplay_cameraso it's easy to remove later.- If you're debugging a specific camera, copy the settings from that camera (frame rate, model/enrichment settings, zones, etc.) into the temporary camera so the replay closely matches the original environment. Leave
recordandsnapshotsdisabled unless you are specifically debugging recording or snapshot behavior.
- If you're debugging a specific camera, copy the settings from that camera (frame rate, model/enrichment settings, zones, etc.) into the temporary camera so the replay closely matches the original environment. Leave
- Restart Frigate.
- Observe the Debug view in the UI and logs as the clip is replayed. Watch detections, zones, or any feature you're looking to debug, and note any errors in the logs to reproduce the issue.
- Iterate on camera or enrichment settings (model, fps, zones, filters) and re-check the replay until the behavior is resolved.
- Remove the temporary camera from your config after debugging to avoid spurious telemetry or recordings.
Variables to consider in object tracking
- The exported video will not always line up exactly with how it originally ran through Frigate (or even with the last loop). Different frames may be used on replay, which can change detections and tracking.
- Motion detection depends on the frames used; small frame shifts can change motion regions and therefore what gets passed to the detector.
- Object detection is not deterministic: models and post-processing can yield different results across runs, so you may not get identical detections or track IDs every time.
When debugging, treat the replay as a close approximation rather than a byte-for-byte replay. Capture multiple runs, enable recording if helpful, and examine logs and saved event clips to understand variability.
Troubleshooting
- No video: verify the path is correct and accessible from the Frigate process/container.
- FFmpeg errors: check the log output for ffmpeg-specific flags and adjust
input_argsaccordingly for your file/container. You may also need to disable hardware acceleration (hwaccel_args: "") for the dummy camera. - No detections: confirm the camera
rolesincludedetect, and model/detector configuration is enabled.