git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #70797 from cfsmp3/master

Added libvmaf + support for it in ffmpeg-full

commit77a5bf5bfbacafbafbe2fc7657246ba8557f65ca authorMario Rodas <marsam@users.noreply.github.com> dateFri 25 Oct 2019, 09:11 (7 years ago) parent253de2c03e5553
4 files changed+46−1
maintainers/maintainer-list.nix+6 pkgs/development/libraries/ffmpeg-full/default.nix+4−1 pkgs/development/libraries/libvmaf/default.nix+33 pkgs/top-level/all-packages.nix+3
maintainers/maintainer-list.nix+6
@@ -1142,6 +1142,12 @@
11421142 githubId = 5771456;
11431143 name = "Chaddaï Fouché";
11441144 };
1145+ cfsmp3 = {
1146+ email = "carlos@sanz.dev";
1147+ github = "cfsmp3";
1148+ githubId = 5949913;
1149+ name = "Carlos Fernandez Sanz";
1150+ };
11451151 chaduffy = {
11461152 email = "charles@dyfis.net";
11471153 github = "charles-dyfis-net";
pkgs/development/libraries/ffmpeg-full/default.nix+4−1
@@ -3,7 +3,7 @@
33 * Licensing options (yes some are listed twice, filters and such are not listed)
44 */
55, gplLicensing ? true # GPL: fdkaac,openssl,frei0r,cdio,samba,utvideo,vidstab,x265,x265,xavs,avid,zvbi,x11grab
6−, version3Licensing ? true # (L)GPL3: opencore-amrnb,opencore-amrwb,samba,vo-aacenc,vo-amrwbenc
6+, version3Licensing ? true # (L)GPL3: libvmaf,opencore-amrnb,opencore-amrwb,samba,vo-aacenc,vo-amrwbenc
77, nonfreeLicensing ? false # NONFREE: openssl,fdkaac,blackmagic-design-desktop-video
88/*
99 * Build options
@@ -87,6 +87,7 @@
8787, libv4l ? null # Video 4 Linux support
8888, libva ? null # Vaapi hardware acceleration
8989, libvdpau ? null # Vdpau hardware acceleration
90+, libvmaf ? null # Netflix's VMAF (Video Multi-Method Assessment Fusion)
9091, libvorbis ? null # Vorbis de/encoding, native encoder exists
9192, libvpx ? null # VP8 & VP9 de/encoding
9293, libwebp ? null # WebP encoder
@@ -364,6 +365,7 @@ stdenv.mkDerivation rec {
364365 (enableFeature ((isLinux || isFreeBSD) && libva != null) "vaapi")
365366 (enableFeature (libvdpau != null) "vdpau")
366367 (enableFeature (libvorbis != null) "libvorbis")
368+ (enableFeature (!isAarch64 && libvmaf != null && version3Licensing) "libvmaf")
367369 (enableFeature (libvpx != null) "libvpx")
368370 (enableFeature (libwebp != null) "libwebp")
369371 (enableFeature (libX11 != null && libXv != null && libXext != null) "xlib")
@@ -425,6 +427,7 @@ stdenv.mkDerivation rec {
425427 ] ++ optional openglExtlib libGLU_combined
426428 ++ optionals nonfreeLicensing [ fdk_aac openssl ]
427429 ++ optional ((isLinux || isFreeBSD) && libva != null) libva
430+ ++ optional (!isAarch64 && libvmaf != null && version3Licensing) libvmaf
428431 ++ optionals isLinux [ alsaLib libraw1394 libv4l ]
429432 ++ optional (isLinux && !isAarch64 && libmfx != null) libmfx
430433 ++ optional nvenc nv-codec-headers
pkgs/development/libraries/libvmaf/default.nixnew file+33
@@ -0,0 +1,33 @@
1+{ stdenv, fetchFromGitHub, autoconf, automake, intltool, libtool, pkgconfig }:
2+
3+stdenv.mkDerivation rec {
4+ pname = "libvmaf";
5+ version = "1.3.15";
6+
7+ src = fetchFromGitHub {
8+ owner = "netflix";
9+ repo = "vmaf";
10+ rev = "v${version}";
11+ sha256="10kgcdf06hzhbl5r7zsllq88bxbyn282hfqx5i3hkp66fpq896d2";
12+ };
13+
14+ nativeBuildInputs = [ autoconf automake intltool libtool pkgconfig ];
15+ outputs = [ "out" "dev" ];
16+ doCheck = true;
17+
18+ postFixup = ''
19+ substituteInPlace "$dev/lib/pkgconfig/libvmaf.pc" \
20+ --replace "includedir=/usr/local/include" "includedir=$dev"
21+ '';
22+
23+ makeFlags = [ "INSTALL_PREFIX=${placeholder "out"}" ];
24+
25+ meta = with stdenv.lib; {
26+ homepage = "https://github.com/Netflix/vmaf";
27+ description = "Perceptual video quality assessment based on multi-method fusion (VMAF)";
28+ platforms = platforms.linux;
29+ license = licenses.asl20;
30+ maintainers = [ maintainers.cfsmp3 ];
31+ };
32+
33+}
pkgs/top-level/all-packages.nix+3
@@ -10880,6 +10880,7 @@ in
1088010880 frei0r = if stdenv.isDarwin then null else frei0r;
1088110881 game-music-emu = if stdenv.isDarwin then null else game-music-emu;
1088210882 libjack2 = if stdenv.isDarwin then null else libjack2;
10883+ libvmaf = if stdenv.isDarwin then null else libvmaf;
1088310884 libmodplug = if stdenv.isDarwin then null else libmodplug;
1088410885 openal = if stdenv.isDarwin then null else openal;
1088510886 libmfx = if stdenv.isDarwin then null else intel-media-sdk;
@@ -12645,6 +12646,8 @@ in
1264512646
1264612647 libvisual = callPackage ../development/libraries/libvisual { };
1264712648
12649+ libvmaf = callPackage ../development/libraries/libvmaf { };
12650+
1264812651 libvncserver = callPackage ../development/libraries/libvncserver {};
1264912652
1265012653 libviper = callPackage ../development/libraries/libviper { };