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 option to fall back to CPU when timelapse encode fails #9106
Comments
looks like there are too many decode processes running so the GPU is refusing to run another |
Is there anything I can do about it? I have 24 cameras connected to Frigate in this setup. (Only included the one I'm trying to export from in the config.) |
I believe there are some driver patches that remove limitations like these https://github.com/keylase/nvidia-patch |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Not stale. However, the question is, should this be considered an issue of Frigate's or Nvidia's drivers'? I haven't been able to test the patch suggested by @NickM-27 and won't until I'm back on site in July. I don't want to live-patch hardware drivers while on another continent in case something breaks and the machine won't come back online. Ideally, it would be possible to do a timelapse export without hardware acceleration if it isn't available. |
If you remove the global hwaccel args and apply to each camera then software will be used. I don't think it's necessarily straightforward what the proper solution is when ffmpeg fails while using hwaccel. Some users may prefer it use software while others may prefer it put an error in the logs and not increase cpu usage. |
Yeah, fair. Related, why would 32 decode processes be running for 24 cameras? (Nothing besides Frigate is using the GPU in this machine AFAIK.) The graphics card in this machine is a PNY NVIDIA RTX A2000, which isn't exactly a consumer device, but perhaps the drivers are limited anyway. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Not stale. |
But then hardware acceleration would never be used, right? I guess one would want it to be used if available with a fallback to software when unavailable? |
Thinking about this some more, that may be because there are also substreams to decode. (But then there should already have been more than 32 decode processes and I would have expected some of them to fail, which I haven't seen. 🤔) |
Not sure why you are hitting the 32 limit, but you will still have hwaccel if you move it down and define it for each camera instead of globally. Removing it globally will just prevent it from being used for timelapse exports. |
Yeah, that makes sense. But if it is available, it would be nice to use it. Is there any way to make the choice dynamic? |
we could have some sort of config option that enables trying to use cpu when gpu fails, would probably need to be optional because using a CPU for that could cause issues for users |
Would the problem of falling back on the CPU be worse than not working at all? |
Well it depends, if a user doesn't have an adequate CPU for that type of load then it could do the export at the expense of causing issues for other services. So I think an option would be good |
It's also possible that the new preview video (low res low fps) feature coming in 0.14 will suffice and timelapse reendodes will not need to be done as often |
Describe the problem you are having
I'm trying to export a timelapse from 0:00:00 to 12:00:00, but it doesn't work.
Version
0.13.0-C35C7DA
Frigate config file
Relevant log output
FFprobe output from your camera
Frigate stats
No response
Operating system
Other Linux
Install method
Docker Compose
Coral version
PCIe
Network connection
Wired
Camera make and model
Hanwha QNV-8080R
Any other information that may be helpful
No response
The text was updated successfully, but these errors were encountered: