From 9236978d80a5f6ce96b7271476fad824ead7b93d Mon Sep 17 00:00:00 2001 From: Zane van Iperen Date: Tue, 25 Jan 2022 23:10:09 +1000 Subject: [PATCH 1/2] ffmpeg: switch to ffmpeg_5 * Keep opencv{2,3,4} on ffmpeg_4 as upstream hasn't updated yet. See [1]. * Remove libavresample from ffmpeg-full, as it was removed in 5.0. [1]: https://github.com/opencv/opencv/issues/21455 --- pkgs/development/libraries/ffmpeg-full/default.nix | 5 +---- pkgs/top-level/all-packages.nix | 5 ++++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/ffmpeg-full/default.nix b/pkgs/development/libraries/ffmpeg-full/default.nix index e4a5d908d263..fdb0bed1e6db 100644 --- a/pkgs/development/libraries/ffmpeg-full/default.nix +++ b/pkgs/development/libraries/ffmpeg-full/default.nix @@ -32,7 +32,6 @@ , avdeviceLibrary ? true # Build avdevice library , avfilterLibrary ? true # Build avfilter library , avformatLibrary ? true # Build avformat library -, avresampleLibrary ? true # Build avresample library , avutilLibrary ? true # Build avutil library , postprocLibrary ? true # Build postproc library , swresampleLibrary ? true # Build swresample library @@ -225,7 +224,6 @@ assert avdeviceLibrary -> avformatLibrary && avcodecLibrary && avutilLibrary; # configure flag since 0.6 assert avformatLibrary -> avcodecLibrary && avutilLibrary; # configure flag since 0.6 -assert avresampleLibrary -> avutilLibrary; assert postprocLibrary -> avutilLibrary; assert swresampleLibrary -> soxr != null; assert swscaleLibrary -> avutilLibrary; @@ -304,7 +302,6 @@ stdenv.mkDerivation rec { (enableFeature avdeviceLibrary "avdevice") (enableFeature avfilterLibrary "avfilter") (enableFeature avformatLibrary "avformat") - (enableFeature avresampleLibrary "avresample") (enableFeature avutilLibrary "avutil") (enableFeature (postprocLibrary && gplLicensing) "postproc") (enableFeature swresampleLibrary "swresample") @@ -453,7 +450,7 @@ stdenv.mkDerivation rec { checkPhase = let ldLibraryPathEnv = if stdenv.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH"; in '' - ${ldLibraryPathEnv}="libavcodec:libavdevice:libavfilter:libavformat:libavresample:libavutil:libpostproc:libswresample:libswscale:''${${ldLibraryPathEnv}}" \ + ${ldLibraryPathEnv}="libavcodec:libavdevice:libavfilter:libavformat:libavutil:libpostproc:libswresample:libswscale:''${${ldLibraryPathEnv}}" \ make check -j$NIX_BUILD_CORES ''; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b6905c893e6a..6921f62fd14e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16421,7 +16421,7 @@ with pkgs; ffmpeg_3 = ffmpeg_3_4; # Please make sure this is updated to the latest version on the next major # update to ffmpeg - ffmpeg = ffmpeg_4; + ffmpeg = ffmpeg_5; ffmpeg-full = callPackage ../development/libraries/ffmpeg-full { svt-av1 = if stdenv.isAarch64 then null else svt-av1; @@ -19216,10 +19216,12 @@ with pkgs; opencv2 = callPackage ../development/libraries/opencv { inherit (darwin.apple_sdk.frameworks) Cocoa QTKit; + ffmpeg = ffmpeg_4; }; opencv3 = callPackage ../development/libraries/opencv/3.x.nix { inherit (darwin.apple_sdk.frameworks) AVFoundation Cocoa VideoDecodeAcceleration; + ffmpeg = ffmpeg_4; }; opencv3WithoutCuda = opencv3.override { @@ -19229,6 +19231,7 @@ with pkgs; opencv4 = callPackage ../development/libraries/opencv/4.x.nix { inherit (darwin.apple_sdk.frameworks) AVFoundation Cocoa VideoDecodeAcceleration CoreMedia MediaToolbox; pythonPackages = python3Packages; + ffmpeg = ffmpeg_4; }; opencv = opencv4; From 64efca591e58b56cbdf630c7d1510abd41a7ce36 Mon Sep 17 00:00:00 2001 From: Zane van Iperen Date: Tue, 25 Jan 2022 23:00:20 +1000 Subject: [PATCH 2/2] ffmpeg-full: add libxml2 dependency For the DASH and IMF demuxers. --- pkgs/development/libraries/ffmpeg-full/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/ffmpeg-full/default.nix b/pkgs/development/libraries/ffmpeg-full/default.nix index fdb0bed1e6db..1753c6e3f24d 100644 --- a/pkgs/development/libraries/ffmpeg-full/default.nix +++ b/pkgs/development/libraries/ffmpeg-full/default.nix @@ -99,6 +99,7 @@ , libxcbshapeExtlib ? true # X11 grabbing shape rendering , libXv ? null # Xlib support , libXext ? null # Xlib support +, libxml2 ? null # libxml2 support, for IMF and DASH demuxers , xz ? null # xz-utils , nvenc ? !stdenv.isDarwin && !stdenv.isAarch64, nv-codec-headers ? null # NVIDIA NVENC support , openal ? null # OpenAL 1.1 capture support @@ -372,6 +373,7 @@ stdenv.mkDerivation rec { (enableFeature libxcbshmExtlib "libxcb-shm") (enableFeature libxcbxfixesExtlib "libxcb-xfixes") (enableFeature libxcbshapeExtlib "libxcb-shape") + (enableFeature (libxml2 != null) "libxml2") (enableFeature (xz != null) "lzma") (enableFeature nvenc "nvenc") (enableFeature (openal != null) "openal") @@ -428,7 +430,7 @@ stdenv.mkDerivation rec { 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 librsvg libssh libtheora libvdpau libvorbis libvpx libwebp libX11 - libxcb libXv libXext xz openal openjpeg libpulseaudio rav1e svt-av1 rtmpdump opencore-amr + libxcb libXv libXext libxml2 xz openal openjpeg libpulseaudio rav1e svt-av1 rtmpdump opencore-amr samba SDL2 soxr speex srt vid-stab vo-amrwbenc x264 x265 xavs xvidcore zeromq4 zimg zlib ] ++ optionals openglExtlib [ libGL libGLU ]