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 22, 2024
1 parent 4abc3df commit 7e33e47
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion nixos/modules/services/video/frigate.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ let
attrValues
hasPrefix
makeLibraryPath
match
mkDefault
mkEnableOption
mkPackageOption
Expand Down Expand Up @@ -104,6 +105,10 @@ let
withCoralUSB = any (d: d.type == "edgetpu" && hasPrefix "usb" d.device or "") detectors;
withCoralPCI = any (d: d.type == "edgetpu" && 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 match "/nvidia/" ffmpegArgs != null then pkgs.ffmpeg-full else pkgs.ffmpeg-headless;
in

{
Expand Down Expand Up @@ -540,7 +545,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 7e33e47

Please sign in to comment.