Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable Decoding of Detect Stream #6793

Closed
lanerussell opened this issue Jun 14, 2023 · 1 comment
Closed

Disable Decoding of Detect Stream #6793

lanerussell opened this issue Jun 14, 2023 · 1 comment
Labels
duplicate This issue or pull request already exists enhancement New feature or request

Comments

@lanerussell
Copy link

lanerussell commented Jun 14, 2023

Describe what you are trying to accomplish and why in non technical terms
Ideally, users should be able to completely disable any decoding in Frigate to save CPU cycles on record-only NVRs. In my case, I'm using Frigate to simply constantly record several cameras with no other features. If possible it'd be nice if Frigate could show the streams directly from the cameras in birdseye without doing any decoding itself (relying on client browser to do this) with detect fully disabled.

Looking at this pinned issue and another similar issue, it seems that all cameras must have the detect role, even if detect is disabled? Per @blakeblackshear:

Many features of frigate require an input to be decoded. You can turn off detection in the config, but one input must be assigned the detect role.

It seems wasteful for Frigate to be decoding anything if not using features such as detect, especially during the 98% of the time no one is looking at the web UI (in my case).

Describe the solution you'd like
Setting:

detect:
    enabled: False

should ideally disable any ffmpeg processing of streams by Frigate to prevent unnecessary CPU usage, perhaps in conjunction with gortc to enable clients to view streams in the browser. Perhaps there could be separate role, something like live_view for viewing the cameras in the UI when detect is disabled? It sounds like the detect stream is used for more than just detection, perhaps breaking things out could be helpful here.

Describe alternatives you've considered
For now, I've been using the low-quality streams available on my cameras to minimize CPU usage. My detect config (width, height, and fps) matches the streams. This is a workable solution for me, but it would be nice to have an option for users with more cameras.

Additional context

Click here to see config mqtt: enabled: False

birdseye:
enabled: True
width: 1920
height: 1080
quality: 1
mode: continuous

record:
enabled: True
retain:
days: 90
mode: all

detect:
enabled: False
width: 640
height: 360
fps: 10

cameras:
cam01:
ffmpeg:
inputs:
- path: rtsp://user:{FRIGATE_RTSP_PASSWORD}@10.1.50.25:554/s0
roles:
- record
- path: rtsp://user:{FRIGATE_RTSP_PASSWORD}@10.1.50.25:554/s1
roles:
- detect
output_args:
record: preset-record-generic-audio-copy
cam02:
ffmpeg:
inputs:
- path: rtsp://user:{FRIGATE_RTSP_PASSWORD}@10.1.50.26:554/s0
roles:
- record
- path: rtsp://user:{FRIGATE_RTSP_PASSWORD}@10.1.50.26:554/s1
roles:
- detect
output_args:
record: preset-record-generic-audio-copy
cam03:
ffmpeg:
inputs:
- path: rtsp://user:{FRIGATE_RTSP_PASSWORD}@10.1.50.27:554/s0
roles:
- record
- path: rtsp://user:{FRIGATE_RTSP_PASSWORD}@10.1.50.27:554/s1
roles:
- detect
output_args:
record: preset-record-generic-audio-copy

@lanerussell lanerussell added the enhancement New feature or request label Jun 14, 2023
@blakeblackshear
Copy link
Owner

This is a duplicate of #1911

@blakeblackshear blakeblackshear added the duplicate This issue or pull request already exists label Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants