diff --git a/nix/dependencies.nix b/nix/dependencies.nix index b03ebfd..e8f9b31 100644 --- a/nix/dependencies.nix +++ b/nix/dependencies.nix @@ -1,6 +1,7 @@ { pkgs ? import { overlays = [ (import ./overlay/replace-torch.nix { }) + (import ./overlay/ffmpeg.nix) ]; config = { allowUnfree = true; diff --git a/nix/overlay/ffmpeg.nix b/nix/overlay/ffmpeg.nix new file mode 100644 index 0000000..07407f0 --- /dev/null +++ b/nix/overlay/ffmpeg.nix @@ -0,0 +1,35 @@ +# https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/ffmpeg/generic.nix +self: super: { + ffmpeg = super.ffmpeg.override { + withDebug = false; + buildFfplay = false; + withHeadlessDeps = true; + withCuda = true; + withNvdec = true; + withFontconfig = true; + withGPL = true; + withAom = true; + withAss = true; + withBluray = true; + withFdkAac =true; + withFreetype = true; + withMp3lame = true; + withOpencoreAmrnb = true; + withOpenjpeg = true; + withOpus = true; + withSrt = true; + withTheora = true; + withVidStab = true; + withVorbis = true; + withVpx = true; + withWebp = true; + withX264 = true; + withX265 = true; + withXvid = true; + withZmq = true; + withUnfree = true; + withNvenc = true; + buildPostproc = true; + withSmallDeps = true; + }; +} diff --git a/nix/shell.nix b/nix/shell.nix index 70a21ed..4728e2b 100644 --- a/nix/shell.nix +++ b/nix/shell.nix @@ -11,6 +11,7 @@ pkgs.mkShell { pkgs.curl pkgs.linuxPackages.nvidia_x11 pkgs.ncurses5 + pkgs.ffmpeg ]; shellHook = '' export CUDA_PATH=${dependencies.cudatoolkit}