Skip to content

Commit

Permalink
Add ffmpeg to Nix dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
matthid committed Mar 10, 2024
1 parent ae5d9c4 commit 70ff74d
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
1 change: 1 addition & 0 deletions nix/dependencies.nix
@@ -1,6 +1,7 @@
{ pkgs ? import <nixpkgs> {
overlays = [
(import ./overlay/replace-torch.nix { })
(import ./overlay/ffmpeg.nix)
];
config = {
allowUnfree = true;
Expand Down
35 changes: 35 additions & 0 deletions 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;
};
}
1 change: 1 addition & 0 deletions nix/shell.nix
Expand Up @@ -11,6 +11,7 @@ pkgs.mkShell {
pkgs.curl
pkgs.linuxPackages.nvidia_x11
pkgs.ncurses5
pkgs.ffmpeg
];
shellHook = ''
export CUDA_PATH=${dependencies.cudatoolkit}
Expand Down

0 comments on commit 70ff74d

Please sign in to comment.