-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
frigate requires ffmpeg-full #344114
Comments
ffmpeg-full should not be used by default due to its closure size. It's something users should opt in to use if they need niche or advanced features that you wouldn't typically need from ffmpeg. Adding an option to the module would be the best course of action if needing to customise ffmpeg is a common requirement here. (Please note that I don't know this module, I only maintain ffmpeg.) Which feature flag provides this functionality you need? We could also look into enabling that feature in regular ffmpeg if you can make a case for it. What we would need to know is whether this is something you'd expect a "normal" ffmpeg package to have and whether it technologically feasible to enable (i.e. no unfree deps and no dramatic closure size). |
CUDA is non‐free, so we can’t enable it by default. We could condition it on I agree that a module option is the best solution here. |
|
I tested |
Could you figure out which flag it needs then? |
Ah, |
Hm, that might be a bit larger in terms of closure because I believe it pulls in clang/llvm into the runtime closure but I'm not sure. |
Thinking about this some more, I don't think frigate should depend on ffmpeg-full by default. ffmpeg-headless shouldn't have CUDA support either if it means pulling in LLVM. NVIDIA doesn't play nice with the rest of the industry and requires users to user their own bloated proprietary crap. If Nvidia can't offer a bearable solution here, that's their problem. If people really want to buy GPUs from such a company, they should be expected to feel the pain of configuring their environment accordingly. For that to be viable, there should be an option which controls the ffmpeg package used in fragate where the user could then pass ffmpeg-full or a more minimal custom override. |
I can think of lots of reasons why users may not have a choice of graphics card, or people may already have NVIDIAs for various reasons. Anyway, an option to choose the ffmpeg package is a pragmatic solution. The example in the doc could be with |
This pulls in clang as a build input but as it turns out this actually _reduces_ closure size slightly: /nix/store/0km9wmmxs4aasna3jvx6ksigbi5qlas8-ffmpeg-headless-7.1-bin 296508848 /nix/store/d0dl773klln23daxy1f24xcpbgch184a-ffmpeg-headless-7.1-bin 296402944 Fixes NixOS#344114
As it turns out, cuda-llvm doesn't pull in LLVM into the runtime closure. Fixed by #354952. |
Describe the bug
The frigate module adds
ffmpeg-headless
to the systemd service path, but ffmpeg from that package does not compile some filters, such asscale_cuda
. As a result,ffmpeg
crashes when executed by frigate (on my machine with Nvidia GPU). Replacingffmpeg-headless
withffmpeg-full
fixes the problem.Steps To Reproduce
Steps to reproduce the behavior:
hwaccel_args = "preset-nvidia-h264"
on a system with Nvidia GPU, and add a camera configuration.scale_cuda
is missing. (ERROR : [AVFilterGraph @ 0x10e3a040] No such filter: 'scale_cuda'
)Expected behavior
frigate show the camera, and ffmpeg does not crash.
Additional context
The output of
nix-shell -p ffmpeg-headless "ffmpeg -filters"
does not containscale_cuda
. But the output ofnix-shell -p ffmpeg-full --run "ffmpeg -filters"
does.Also, a simple workaround is
If there is a good reason to not use
ffmpeg-full
by default, maybe there could be a module option, where users can choose their ffmpeg package?Notify maintainers
@NickCao
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: