summary refs log tree commit diff
path: root/pkgs/development/libraries/ffmpeg
diff options
context:
space:
mode:
authorMichael Weiss <dev.primeos@gmail.com>2019-08-10 14:31:47 +0200
committerMichael Weiss <dev.primeos@gmail.com>2019-08-25 21:40:10 +0200
commitaed96948292120b5a380f64ccdef430c50cca483 (patch)
tree1b7949286babf33512a74e0d70c17506579229a5 /pkgs/development/libraries/ffmpeg
parentc45a990a5d772bd87e40f999f74b1c8faf9bd07b (diff)
downloadnixpkgs-aed96948292120b5a380f64ccdef430c50cca483.tar
nixpkgs-aed96948292120b5a380f64ccdef430c50cca483.tar.gz
nixpkgs-aed96948292120b5a380f64ccdef430c50cca483.tar.bz2
nixpkgs-aed96948292120b5a380f64ccdef430c50cca483.tar.lz
nixpkgs-aed96948292120b5a380f64ccdef430c50cca483.tar.xz
nixpkgs-aed96948292120b5a380f64ccdef430c50cca483.tar.zst
nixpkgs-aed96948292120b5a380f64ccdef430c50cca483.zip
ffmpeg_4: Enable support for AV1 decoding via dav1d by default
This is e.g. required for mpv (depends on ffmpeg_4) to play AV1 videos.
Fixes #54990.

But since dav1d is only a AV1 decoder this doesn't support AV1 encoding
as well (that would require an additional dependency on libaom).
The dependency on dav1d can be disabled by overriding it to null.
Diffstat (limited to 'pkgs/development/libraries/ffmpeg')
-rw-r--r--pkgs/development/libraries/ffmpeg/generic.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix
index 84260f3f57c..cf2dc56b90a 100644
--- a/pkgs/development/libraries/ffmpeg/generic.nix
+++ b/pkgs/development/libraries/ffmpeg/generic.nix
@@ -1,7 +1,7 @@
 { stdenv, fetchurl, pkgconfig, perl, texinfo, yasm
 , alsaLib, bzip2, fontconfig, freetype, gnutls, libiconv, lame, libass, libogg
 , libssh, libtheora, libva, libdrm, libvorbis, libvpx, lzma, libpulseaudio, soxr
-, x264, x265, xvidcore, zlib, libopus, speex, nv-codec-headers
+, x264, x265, xvidcore, zlib, libopus, speex, nv-codec-headers, dav1d
 , openglSupport ? false, libGLU_combined ? null
 # Build options
 , runtimeCpuDetectBuild ? true # Detect CPU capabilities at runtime
@@ -145,6 +145,7 @@ stdenv.mkDerivation rec {
       (ifMinVer "2.8" "--enable-libopus")
       "--enable-libspeex"
       (ifMinVer "2.8" "--enable-libx265")
+      (ifMinVer "4.2" (enableFeature (dav1d != null) "libdav1d"))
     # Developer flags
       (enableFeature debugDeveloper "debug")
       (enableFeature optimizationsDeveloper "optimizations")
@@ -170,7 +171,8 @@ stdenv.mkDerivation rec {
     ++ optional isLinux alsaLib
     ++ optionals isDarwin darwinFrameworks
     ++ optional vdpauSupport libvdpau
-    ++ optional sdlSupport (if reqMin "3.2" then SDL2 else SDL);
+    ++ optional sdlSupport (if reqMin "3.2" then SDL2 else SDL)
+    ++ optional (reqMin "4.2") dav1d;
 
   enableParallelBuilding = true;