Skip to content

Commit

Permalink
nixos/frigate: provide ffmpeg-full for nvidia hw accel
Browse files Browse the repository at this point in the history
Closes: NixOS#344114
  • Loading branch information
mweinelt committed Nov 21, 2024
1 parent 7d959fb commit 5967901
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion nixos/modules/services/video/frigate.nix
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ let
withCoralUSB = any (d: d.type == "edgetpu" && lib.hasPrefix "usb" d.device or "") detectors;
withCoralPCI = any (d: d.type == "edgetpu" && lib.hasPrefix "pci" d.device or "") detectors;
withCoral = withCoralPCI || withCoralUSB;

# Provide ffmpeg-full for NVIDIA hardware acceleration
ffmpegArgs = cfg.settings.ffmpeg.hwaccel_args or "";
ffmpeg' = if lib.match "/nvidia/" ffmpegArgs != null then pkgs.ffmpeg-full else pkgs.ffmpeg-headless;
in

{
Expand Down Expand Up @@ -536,7 +540,7 @@ in
path = with pkgs; [
# unfree:
# config.boot.kernelPackages.nvidiaPackages.latest.bin
ffmpeg-headless
ffmpeg'
libva-utils
procps
radeontop
Expand Down

0 comments on commit 5967901

Please sign in to comment.