Closed hs82h closed 1 year ago
Frigate will always run the detection stream, even if you disable object detection it still decodes the stream and that is what is using CPU, not recording.
This means that your config is currently taking the 1080p stream from your camera and resizing it down to 720p all on the CPU, which will naturally use a lot of CPU.
I would definitely suggest using preset-vaapi for hwaccel_args instead of manual args which will reduce the CPU usage considerably.
Wow, you are fast! :)
Thanks, I will take a look into it and let know the result.
I changed my config.yml:
ffmpeg:
hwaccel_args: preset-vaapi
Unfortunately all my cams give a green screen. I also tried changing my docker compose file with the i965 var, but no luck either.
environment:
LIBVA_DRIVER_NAME: "i965"
my host vainfo:
error: XDG_RUNTIME_DIR not set in the environment.
error: can't connect to X server!
libva info: VA-API version 1.14.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_14
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.14 (libva 2.12.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 22.3.1 ()
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSliceLP
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSliceLP
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointEncPicture
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
VAProfileVP8Version0_3 : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD
I can't run vainfo in my container...
docker exec -it frigate vainfo
OCI runtime exec failed: exec failed: unable to start container process: exec: "vainfo": executable file not found in $PATH: unknown
Not sure what this means...
Sorry I just realized you are running 0.11 which is also an outdated version of frigate, I'd suggest using that config after updating to 0.12
I upgraded to 0.12. I didn't notice the repository changed...
All is working now and cpu is about 4% per cam, so I happy this is solved.
Thanks very much!
Describe the problem you are having
I have Frigate running for some time and it runs fine. Now I got time I want to finetune it some more.
I noticed it uses quite a lot of cpu for an i7 processor. To test some things I disabled all except recording, because that's my highest prio. Still, the cpu didn't lower. I got 3 Foscam camera's with video resolution 1920x1080.
Is this cpu usage normal for just recording or can I change some config settings?
Version
0.11.1-2eada21
Frigate config file
Relevant log output
Frigate stats
Operating system
Other Linux
Install method
Docker Compose
Coral version
M.2
Any other information that may be helpful
No response