commit cee8b537784209ca32f34614e7b65c5503563851
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Sat May 23 12:39:22 2020 +0100
fix vmaf model path
ffmpeg.spec | 6 +++---
fix-vmaf-model-path.patch | 25 +++++++++++++++++++++++++
2 files changed, 28 insertions(+), 3 deletions(-)
---
diff --git a/ffmpeg.spec b/ffmpeg.spec
index bf6510a..174c8c4 100644
--- a/ffmpeg.spec
+++ b/ffmpeg.spec
@@ -93,6 +93,7 @@ Source0: ffmpeg-%{?branch}%{date}.tar.bz2
Source0:
http://ffmpeg.org/releases/ffmpeg-%{version}.tar.xz
%endif
Patch0: fix_ppc_build.patch
+Patch1: fix-vmaf-model-path.patch
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%{?_with_cuda:BuildRequires: cuda-minimal-build-%{_cuda_version_rpm} cuda-drivers-devel}
%{?_with_libnpp:BuildRequires: pkgconfig(nppc-%{_cuda_version})}
@@ -318,12 +319,11 @@ This package contains development files for %{name}
%prep
%if 0%{?date}
-%setup -q -n ffmpeg-%{?branch}%{date}
+%autosetup -p1 -n ffmpeg-%{?branch}%{date}
echo "git-snapshot-%{?branch}%{date}-rpmfusion" > VERSION
%else
-%setup -q -n ffmpeg-%{version}
+%autosetup -p1 -n ffmpeg-%{version}
%endif
-%patch0 -p1
# fix -O3 -g in host_cflags
sed -i "s|check_host_cflags -O3|check_host_cflags %{optflags}|" configure
mkdir -p _doc/examples
diff --git a/fix-vmaf-model-path.patch b/fix-vmaf-model-path.patch
new file mode 100644
index 0000000..88a949b
--- /dev/null
+++ b/fix-vmaf-model-path.patch
@@ -0,0 +1,25 @@
+From 37b8f54578ac1bcb7a63dc9038a5238fd6a58793 Mon Sep 17 00:00:00 2001
+From: Leigh Scott <leigh123linux(a)gmail.com>
+Date: Sat, 23 May 2020 12:32:44 +0100
+Subject: [PATCH] fix vmaf model path
+
+---
+ libavfilter/vf_libvmaf.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libavfilter/vf_libvmaf.c b/libavfilter/vf_libvmaf.c
+index 14c3216b3a..e7273b6d1d 100644
+--- a/libavfilter/vf_libvmaf.c
++++ b/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},
+--
+2.26.2
+