-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add hardware accelerated scaling when using ffmpeg hwaccel presets #4804
Add hardware accelerated scaling when using ffmpeg hwaccel presets #4804
Conversation
✅ Deploy Preview for frigate-docs canceled.
|
fa1bd4d
to
bc427f2
Compare
bc427f2
to
6a4c23b
Compare
Do I have to change the config files for this? When I test the image I get the following type of errors for all cams:
|
What does your config look like? |
|
In general I'd highly suggest using an ffmpeg preset instead of manual args. But I'll check that out and see what's going on with a config like that |
Will do... Can I find a list of presets in the docs or do in the sources (assuming that this feature is a new one)? |
https://github.com/blakeblackshear/frigate/blob/dev/frigate/ffmpeg_presets.py |
Hi @NickM-27 - I think I have found an issue with this PR but just wanted to check with you first before I submit a fix: In the following snippet "detect_args" are never added to "ffmpeg_output_args" and so a lot of my bespoke options under self.ffmpeg.output_args.detect are just thrown away.
The relevant snippet from my config.yaml:
My fix would simply to just change :
to
This works for me, but I am not sure if you didn't include detect_args for a good reason? I also appreciate my usecase is a little advanced. I set Frigate to just save just recordings with events and then I use these detect_args to permanently record everything in 15min length files elsewhere. I do this for good reasons (at least for me). |
@mattthewclayton yes your detect args are very odd as you are trying to record with detect. not including the detect args is on purpose because the detect args should not be used in conjunction with the ffmpeg presets given that the output is different depending on the hwaccel type |
@NickM-27 - yes good point about using detect to record, it's because I only wanted to keep long term recordings using the lower quality sub stream but when there is an event I want frigate to capture the high quality stream. I am not sure there is currently a way to achieve this using standard configuration (happy to be told I'm wrong). I also wanted to limit parallel connections to the camera. I guess I could try and use the new restream functionality and run this long term low quality capture stuff completely separately to frigate. I won't look at "fixing" this issue - as it's more of a side effect of my odd config. Thanks for your input. |
@mattthewclayton I did some tests and I have found that it doesn't actually matter if the default detect output args are included in those cases. I am going to put up a PR but just wanted to comment 👍 |
In my testing, using hardware accelerated scaling brought CPU usage down considerably when using the non-native resolution for detect.