From 3fe3fe93b6c3855d3eb7717bc8cbe71e8f8f59a7 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 21 Nov 2024 16:15:59 +0100 Subject: [PATCH] nixos/frigate: provide ffmpeg-full for nvidia hw accel Closes: #344114 --- nixos/modules/services/video/frigate.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/video/frigate.nix b/nixos/modules/services/video/frigate.nix index a20e0d8bb0821..afe00f70c7433 100644 --- a/nixos/modules/services/video/frigate.nix +++ b/nixos/modules/services/video/frigate.nix @@ -99,6 +99,10 @@ let # Discover configured detectors for acceleration support detectors = map (detector: toLower detector.type) (attrValues cfg.settings.detectors or {}); withEdgeTPU = elem "edgetpu" detectors; + + # 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 { @@ -532,7 +536,7 @@ in path = with pkgs; [ # unfree: # config.boot.kernelPackages.nvidiaPackages.latest.bin - ffmpeg-headless + ffmpeg' libva-utils procps radeontop