Repository navigation
Replies: 1 comment
That should be unchecked for this one, as while I wish this was a quick fix, this is deeply embedded upstream Frigate behavior. Because the detection stream always exists for every camera in Frigate, even if detection is disabled, Frigate is built assuming the detection stream always exists. Just off the top of my head, things that would break in Frigate if we added an option to completely disable the detection stream:
This isn't impossible to solve, most of the above could be moved to the main stream if the detection stream wasn't available, but it would likely take a lot of work in Frigate's core. So, this should be a feature request for upstream Frigate https://github.com/blakeblackshear/frigate/discussions
In a quick test on an M4, this is not reproducible. A 2650x720 dummy camera uses only 6% of a single efficiency core, for both record and detect, and scaling that down to 1280×360 actually uses more CPU due to the scaling. Could you send us a diagnostic bundle to make sure nothing else is wrong here? It almost sounds like your higher res stream is using software decoding for some reason. |
Uh oh!
There was an error while loading. Please reload this page.
What problem does this solve?
When a camera has
detect.enabled: false(object detection disabled), the ffmpeg detect pipeline still runs, wasting CPU resources.Example: A
sidewalk_180camera with a 2560×720 stitched 180° feed:The runtime ffmpeg command still includes the detect pipeline:
This consumes ~17% CPU on an M2 Mac Mini for a pipeline whose output is never used — no inference runs, no trackers initialize, no snapshots or review items are generated from it.
After reducing the detect resolution to 1280×360 (the only workaround), CPU dropped to ~3% — an 82% reduction.
Proposed solution
In
frigate/config/camera/camera.py(or wherevercreate_ffmpeg_cmdsis called), skip generating the detect pipeline output whendetect.enabledis false for that camera.The
detectrole should still be required (for Fregata validation), but the actual ffmpeg output for the detect role should only be created when detection is enabled.Impact:
detectrole requirement for validation can remainAlternatives considered
No response
Pre-flight checks
All reactions