summary refs log tree commit diff
path: root/pkgs/development/libraries/ffmpeg-full
diff options
context:
space:
mode:
authorVladimír Čunát <v@cunat.cz>2019-08-24 08:19:05 +0200
committerVladimír Čunát <v@cunat.cz>2019-08-24 08:55:37 +0200
commit2e6bf42a2207d5ecfe6e67de2def6e004a0eb1f1 (patch)
tree36de0660dc2c9f3731bd8b60ec852ca0c452efce /pkgs/development/libraries/ffmpeg-full
parent84a91208a948be5eca97ea182c4256d9d6ecf171 (diff)
parent8943fb5f24b9e1aa1d577be4e214d166643269fd (diff)
downloadnixpkgs-2e6bf42a2207d5ecfe6e67de2def6e004a0eb1f1.tar
nixpkgs-2e6bf42a2207d5ecfe6e67de2def6e004a0eb1f1.tar.gz
nixpkgs-2e6bf42a2207d5ecfe6e67de2def6e004a0eb1f1.tar.bz2
nixpkgs-2e6bf42a2207d5ecfe6e67de2def6e004a0eb1f1.tar.lz
nixpkgs-2e6bf42a2207d5ecfe6e67de2def6e004a0eb1f1.tar.xz
nixpkgs-2e6bf42a2207d5ecfe6e67de2def6e004a0eb1f1.tar.zst
nixpkgs-2e6bf42a2207d5ecfe6e67de2def6e004a0eb1f1.zip
Merge branch 'master' into staging-next
There ver very many conflicts, basically all due to
name -> pname+version.  Fortunately, almost everything was auto-resolved
by kdiff3, and for now I just fixed up a couple evaluation problems,
as verified by the tarball job.  There might be some fallback to these
conflicts, but I believe it should be minimal.

Hydra nixpkgs: ?compare=1538299
Diffstat (limited to 'pkgs/development/libraries/ffmpeg-full')
-rw-r--r--pkgs/development/libraries/ffmpeg-full/default.nix26
-rw-r--r--pkgs/development/libraries/ffmpeg-full/prefer-libdav1d-over-libaom.patch19
2 files changed, 33 insertions, 12 deletions
diff --git a/pkgs/development/libraries/ffmpeg-full/default.nix b/pkgs/development/libraries/ffmpeg-full/default.nix
index 00131688f09..3b1aeeebaab 100644
--- a/pkgs/development/libraries/ffmpeg-full/default.nix
+++ b/pkgs/development/libraries/ffmpeg-full/default.nix
@@ -52,6 +52,7 @@
 , bzip2 ? null
 , celt ? null # CELT decoder
 #, crystalhd ? null # Broadcom CrystalHD hardware acceleration
+, dav1d ? null # AV1 decoder (focused on speed and correctness)
 #, decklinkExtlib ? false, blackmagic-design-desktop-video ? null # Blackmagic Design DeckLink I/O support
 , fdkaacExtlib ? false, fdk_aac ? null # Fraunhofer FDK AAC de/encoder
 #, flite ? null # Flite (voice synthesis) support
@@ -97,7 +98,7 @@
 , libXv ? null # Xlib support
 , libXext ? null # Xlib support
 , lzma ? null # xz-utils
-, nvenc ? !stdenv.isDarwin, nv-codec-headers ? null # NVIDIA NVENC support
+, nvenc ? !stdenv.isDarwin && !stdenv.isAarch64, nv-codec-headers ? null # NVIDIA NVENC support
 , openal ? null # OpenAL 1.1 capture support
 #, opencl ? null # OpenCL code
 , opencore-amr ? null # AMR-NB de/encoder & AMR-WB decoder
@@ -163,6 +164,9 @@
  *   libvpx(stable 1.3.0) openal openjpeg pulseaudio rtmpdump samba vid-stab
  *   wavpack x265 xavs
  *
+ * Need fixes to support AArch64:
+ *   libmfx(intel-media-sdk) nvenc
+ *
  * Not supported:
  *   stagefright-h264(android only)
  *
@@ -175,7 +179,7 @@
  */
 
 let
-  inherit (stdenv) isCygwin isDarwin isFreeBSD isLinux;
+  inherit (stdenv) isCygwin isDarwin isFreeBSD isLinux isAarch64;
   inherit (stdenv.lib) optional optionals optionalString enableFeature;
 in
 
@@ -234,17 +238,14 @@ assert opensslExtlib -> gnutls == null && openssl != null && nonfreeLicensing;
 
 stdenv.mkDerivation rec {
   pname = "ffmpeg-full";
-  version = "4.1.4";
+  version = "4.2";
 
   src = fetchurl {
     url = "https://www.ffmpeg.org/releases/ffmpeg-${version}.tar.xz";
-    sha256 = "1qd7a10gs12ifcp31gramcgqjl77swskjfp7cijibgyg5yl4kw7i";
+    sha256 = "1mgcxm7sqkajx35px05szsmn9mawwm03cfpmk3br7bcp3a1i0gq2";
   };
-  patches = [(fetchpatch { # remove on update
-    name = "fix-hardcoded-tables.diff";
-    url = "http://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff_plain/c8232e50074f";
-    sha256 = "0jlksks4fjajby8fjk7rfp414gxfdgd6q9khq26i52xvf4kg2dw6";
-  })];
+
+  patches = [ ./prefer-libdav1d-over-libaom.patch ];
 
   prePatch = ''
     patchShebangs .
@@ -327,6 +328,7 @@ stdenv.mkDerivation rec {
     (enableFeature (bzip2 != null) "bzlib")
     (enableFeature (celt != null) "libcelt")
     #(enableFeature crystalhd "crystalhd")
+    (enableFeature (dav1d != null) "libdav1d")
     #(enableFeature decklinkExtlib "decklink")
     (enableFeature (fdkaacExtlib && gplLicensing) "libfdk-aac")
     #(enableFeature (flite != null) "libflite")
@@ -351,7 +353,7 @@ stdenv.mkDerivation rec {
     (enableFeature (if isLinux then libdc1394 != null && libraw1394 != null else false) "libdc1394")
     (enableFeature (libiconv != null) "iconv")
     #(enableFeature (if isLinux then libiec61883 != null && libavc1394 != null && libraw1394 != null else false) "libiec61883")
-    (enableFeature (if isLinux then libmfx != null else false) "libmfx")
+    (enableFeature (if isLinux && !isAarch64 then libmfx != null else false) "libmfx")
     (enableFeature (libmodplug != null) "libmodplug")
     (enableFeature (libmysofa != null) "libmysofa")
     #(enableFeature (libnut != null) "libnut")
@@ -414,7 +416,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ perl pkgconfig texinfo yasm ];
 
   buildInputs = [
-    bzip2 celt fontconfig freetype frei0r fribidi game-music-emu gnutls gsm
+    bzip2 celt dav1d fontconfig freetype frei0r fribidi game-music-emu gnutls gsm
     libjack2 ladspaH lame libaom libass libbluray libbs2b libcaca libdc1394 libmodplug libmysofa
     libogg libopus libssh libtheora libvdpau libvorbis libvpx libwebp libX11
     libxcb libXv libXext lzma openal openjpeg libpulseaudio rtmpdump opencore-amr
@@ -424,7 +426,7 @@ stdenv.mkDerivation rec {
     ++ optionals nonfreeLicensing [ fdk_aac openssl ]
     ++ optional ((isLinux || isFreeBSD) && libva != null) libva
     ++ optionals isLinux [ alsaLib libraw1394 libv4l ]
-    ++ optional (isLinux && libmfx != null) libmfx
+    ++ optional (isLinux && !isAarch64 && libmfx != null) libmfx
     ++ optional nvenc nv-codec-headers
     ++ optionals stdenv.isDarwin [ Cocoa CoreServices CoreAudio AVFoundation
                                    MediaToolbox VideoDecodeAcceleration
diff --git a/pkgs/development/libraries/ffmpeg-full/prefer-libdav1d-over-libaom.patch b/pkgs/development/libraries/ffmpeg-full/prefer-libdav1d-over-libaom.patch
new file mode 100644
index 00000000000..789bfc2674f
--- /dev/null
+++ b/pkgs/development/libraries/ffmpeg-full/prefer-libdav1d-over-libaom.patch
@@ -0,0 +1,19 @@
+diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
+index d2f9a39ce5..2342399a8e 100644
+--- a/libavcodec/allcodecs.c
++++ b/libavcodec/allcodecs.c
+@@ -679,13 +679,13 @@ extern AVCodec ff_pcm_mulaw_at_encoder;
+ extern AVCodec ff_pcm_mulaw_at_decoder;
+ extern AVCodec ff_qdmc_at_decoder;
+ extern AVCodec ff_qdm2_at_decoder;
++extern AVCodec ff_libdav1d_decoder;
+ extern AVCodec ff_libaom_av1_decoder;
+ extern AVCodec ff_libaom_av1_encoder;
+ extern AVCodec ff_libaribb24_decoder;
+ extern AVCodec ff_libcelt_decoder;
+ extern AVCodec ff_libcodec2_encoder;
+ extern AVCodec ff_libcodec2_decoder;
+-extern AVCodec ff_libdav1d_decoder;
+ extern AVCodec ff_libdavs2_decoder;
+ extern AVCodec ff_libfdk_aac_encoder;
+ extern AVCodec ff_libfdk_aac_decoder;