From 1be008346fb15aed2aeefce0e46f9b3d75b9ab5531bf3e35d413de68907b2af0 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 19 Oct 2020 11:58:05 +0000 Subject: [PATCH] - Enable VMAF. This can be used to compute VMAF/PSNR/SSIM. OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-4?expand=0&rev=144 --- ffmpeg-4.changes | 6 ++++++ ffmpeg-4.spec | 4 ++++ vmaf-trim-usr-local.patch | 17 +++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 vmaf-trim-usr-local.patch diff --git a/ffmpeg-4.changes b/ffmpeg-4.changes index 02c62ac..345e78f 100644 --- a/ffmpeg-4.changes +++ b/ffmpeg-4.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Oct 19 06:42:32 UTC 2020 - Jan Engelhardt + +- Enable VMAF. This can be used to compute VMAF/PSNR/SSIM. +- Add vmaf-trim-usr-local.patch . + ------------------------------------------------------------------- Wed Oct 14 09:45:07 UTC 2020 - Jan Engelhardt diff --git a/ffmpeg-4.spec b/ffmpeg-4.spec index b7df3f8..d4dda3f 100644 --- a/ffmpeg-4.spec +++ b/ffmpeg-4.spec @@ -116,6 +116,7 @@ Patch4: ffmpeg-4.2-dlopen-fdk_aac.patch Patch5: soversion.patch Patch6: ffmpeg.git-ba3e771a42c29ee02c34e7769cfc1b2dbc5c760a.patch Patch7: 0001-lavf-srt-fix-build-fail-when-used-the-libsrt-1.4.1.patch +Patch8: vmaf-trim-usr-local.patch BuildRequires: ladspa-devel BuildRequires: libgsm-devel BuildRequires: libmp3lame-devel @@ -163,6 +164,7 @@ BuildRequires: pkgconfig(libv4l2) BuildRequires: pkgconfig(libva) >= 0.35.0 BuildRequires: pkgconfig(libva-drm) BuildRequires: pkgconfig(libva-x11) +BuildRequires: pkgconfig(libvmaf) >= 1.3.9 BuildRequires: pkgconfig(libwebp) >= 0.4 BuildRequires: pkgconfig(libxml-2.0) %if %{with zmq} @@ -668,6 +670,7 @@ LDFLAGS="%_lto_cflags" \ %if %{with vidstab} --enable-libvidstab \ %endif + --enable-libvmaf \ --enable-libvorbis \ --enable-libv4l2 \ --enable-libvpx \ @@ -696,6 +699,7 @@ LDFLAGS="%_lto_cflags" \ %endif --enable-vaapi \ --enable-vdpau \ + --enable-version3 \ %if %{with fdk_aac_dlopen} --enable-libfdk-aac-dlopen \ --enable-nonfree \ diff --git a/vmaf-trim-usr-local.patch b/vmaf-trim-usr-local.patch new file mode 100644 index 0000000..9a27b93 --- /dev/null +++ b/vmaf-trim-usr-local.patch @@ -0,0 +1,17 @@ +--- + libavfilter/vf_libvmaf.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: ffmpeg-4.3.1/libavfilter/vf_libvmaf.c +=================================================================== +--- ffmpeg-4.3.1.orig/libavfilter/vf_libvmaf.c ++++ ffmpeg-4.3.1/libavfilter/vf_libvmaf.c +@@ -72,7 +72,7 @@ typedef struct LIBVMAFContext { + #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM + + static const AVOption libvmaf_options[] = { +- {"model_path", "Set the model to be used for computing vmaf.", OFFSET(model_path), AV_OPT_TYPE_STRING, {.str="/usr/local/share/model/vmaf_v0.6.1.pkl"}, 0, 1, FLAGS}, ++ {"model_path", "Set the model to be used for computing vmaf.", OFFSET(model_path), AV_OPT_TYPE_STRING, {.str="/usr/share/model/vmaf_v0.6.1.pkl"}, 0, 1, FLAGS}, + {"log_path", "Set the file path to be used to store logs.", OFFSET(log_path), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 1, FLAGS}, + {"log_fmt", "Set the format of the log (xml or json).", OFFSET(log_fmt), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 1, FLAGS}, + {"enable_transform", "Enables transform for computing vmaf.", OFFSET(enable_transform), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS},