Detect stream resolution and CPU usage #5984
Replies: 5 comments 14 replies
-
This is what I do as well when my camera does not provide a suitable resolution. You can have your GPU do the scaling so you will have reduced CPU usage (because motion detection does not run on as high of a resolution) but not use CPU for scaling. I do this in go2rtc so the substream is available for general streaming as well as an example: go2rtc:
streams:
backyard_cam:
- rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_BACKYARD_PW}@192.168.50.155/Preview_01_main
backyard_cam_sub:
- "ffmpeg:backyard_cam#video=h264#width=1280#height=960#raw=-fpsmax 10#hardware=cuda" |
Beta Was this translation helpful? Give feedback.
-
This was very helpful for me as well, thank you. Just want to add that if you want it to pass through the audio at the same time it would look like this:
I plan to use only the 720p stream for now at least. Then its nice to have the audio as well. |
Beta Was this translation helpful? Give feedback.
-
Fine tuning the setup. What about motion detection is there any benefit for detecting motion when using high resolution stream? I already tried few recommendations how to improve motion detection but now from the stream resolution perspective was wondering what is better high res with 4fps or maybe low res with 10 fps to detect motion? I am on Frigate 13 rc1 version |
Beta Was this translation helpful? Give feedback.
-
thanks for feedback! could you elaborate a little more on the 1st option. here is one camera config example:
so if I specify resolution parameters as:
that would detect motion based on original resolution 2560x1440 then motion area would be cropped to 1280x720 and only then rescaled to 300x300 (edgetpu default model res)??? |
Beta Was this translation helpful? Give feedback.
-
Hello, I have two Reolink E1 Outdoor cameras and the POE Doorbell. If I change the substream on both cameras as described here, the Doorbell is shown as offline and the message "no frames have been received" appears. This does not happen with the E1 Outdoor camera. If you switch back to the "normal" substream configuration on the Doorbell, it is displayed normally again. `go2rtc:
cameras: |
Beta Was this translation helpful? Give feedback.
-
Hi
I use frigate with three Reolink cameras.
Reolink cameras have 3 streaming resolutions:
main: 2560x1920
ext: 896x672
sub: 640x480
The issue is that the the two lower resolution streams are not enough for "detect".
My question is how to best set up the detect stream. Should I use the large (main) stream also for "detect" and reduce the detect with and height to something like 1920x1440 in frigate config? Will that help in any way the CPU usage? Or better use the native 2560x1920 since it would not require any resizing?
Also, since frigate 12 has go2rtc, is there a better way of setting this up through go2rtc?
Trying to have the lowest CPU usage and have a more capable object detection.
thanks
Beta Was this translation helpful? Give feedback.
All reactions