diff --git a/README.md b/README.md index 6853108a..341fe6f1 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ Currently FFmpeg 8.1.2 is built with the following packages enabled for all plat - vpx 1.16.0 - png 1.6.58 - webp 1.6.0 +- libvmaf 3.2.0 - opencore-amr 0.1.6 - x264 32c3b801191522961102d4bea292cdb61068d0dd (except armv7l) - x265 4.2 (except armv7l) @@ -27,5 +28,5 @@ Currently FFmpeg 8.1.2 is built with the following packages enabled for all plat The following additional packages are also enabled on Linux: - gnutls 3.8.13 -- nettle 3.10.2 +- nettle 4.0 - unistring 1.4.2 diff --git a/scripts/build-ffmpeg.py b/scripts/build-ffmpeg.py index 0c5535a5..9e99f918 100644 --- a/scripts/build-ffmpeg.py +++ b/scripts/build-ffmpeg.py @@ -132,6 +132,22 @@ def main(): for tool in tools: run(["where", tool]) + if plat == "Linux" and (is_musllinux or shutil.which("xxd") is None): + with log_group("install system packages"): + # libvmaf uses xxd to embed its built-in models. BusyBox xxd, + # provided by musllinux images, cannot write C output to a file. + if is_musllinux: + run(["apk", "add", "--no-cache", "xxd"]) + elif shutil.which("dnf"): + run(["dnf", "-y", "install", "vim-common"]) + elif shutil.which("yum"): + run(["yum", "-y", "install", "vim-common"]) + elif shutil.which("apt-get"): + run(["apt-get", "update"]) + run(["apt-get", "install", "-y", "xxd"]) + else: + raise RuntimeError("Unable to install xxd") + with log_group("install python packages"): run(["pip", "install", "cmake", "meson", "ninja"]) @@ -159,6 +175,7 @@ def main(): "--enable-libopencore-amrwb", "--enable-libopus", "--enable-libsvtav1", + "--enable-libvmaf", "--enable-libvpx", "--enable-libwebp", "--enable-libxcb" if plat == "Linux" else "--disable-libxcb", diff --git a/scripts/pkg.py b/scripts/pkg.py index 957dc558..74b285f8 100644 --- a/scripts/pkg.py +++ b/scripts/pkg.py @@ -35,8 +35,8 @@ def __lt__(self, other): ), Package( name="nettle", - source_url="https://ftp.gnu.org/gnu/nettle/nettle-3.10.2.tar.gz", - sha256="fe9ff51cb1f2abb5e65a6b8c10a92da0ab5ab6eaf26e7fc2b675c45f1fb519b5", + source_url="https://ftp.gnu.org/gnu/nettle/nettle-4.0.tar.gz", + sha256="3addbc00da01846b232fb3bc453538ea5468da43033f21bb345cb1e9073f5094", requires=["gmp"], build_arguments=["--disable-documentation"], ), @@ -125,6 +125,20 @@ def __lt__(self, other): "-DWEBP_BUILD_BUILD_EXTRAS=OFF", ], ), + Package( + name="libvmaf", + source_url="https://github.com/Netflix/vmaf/archive/refs/tags/v3.2.0.tar.gz", + source_filename="vmaf-3.2.0.tar.gz", + sha256="a28f93f3b4fa65601be324587072e32a6a704a304ba7b1aec9b70b3f709bc1dc", + build_system="meson", + source_dir="libvmaf", + requires=["nasm"], + build_arguments=[ + "-Denable_tests=false", + "-Denable_docs=false", + "-Denable_tools=false", + ], + ), Package( name="opencore-amr", source_url="https://downloads.sourceforge.net/project/opencore-amr/opencore-amr/opencore-amr-0.1.6.tar.gz",