summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PKGBUILD15
-rw-r--r--vmaf-model-path.patch13
2 files changed, 26 insertions, 2 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 59af8e8f3a8f..863e498e1167 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -90,9 +90,20 @@ provides=('libavcodec.so=58' 'libavdevice.so=58' 'libavfilter.so=7'
'libavformat.so=58' 'libavutil.so=56'
'libpostproc.so=55' 'libswresample.so=3' 'libswscale.so=5')
-source=("http://ffmpeg.org/releases/ffmpeg-${pkgver}.tar.xz")
+source=(
+ http://ffmpeg.org/releases/ffmpeg-${pkgver}.tar.xz
+ vmaf-model-path.patch
+)
+
+sha256sums=(
+'06b10a183ce5371f915c6bb15b7b1fffbe046e8275099c96affc29e17645d909'
+'8dff51f84a5f7460f8893f0514812f5d2bd668c3276ef7ab7713c99b71d7bd8d'
+)
-sha256sums=('06b10a183ce5371f915c6bb15b7b1fffbe046e8275099c96affc29e17645d909')
+prepare() {
+ cd ffmpeg-4.4
+ patch -Np1 -i "${srcdir}"/vmaf-model-path.patch
+}
build() {
cd ffmpeg-${pkgver}
diff --git a/vmaf-model-path.patch b/vmaf-model-path.patch
new file mode 100644
index 000000000000..abd65cdf730a
--- /dev/null
+++ b/vmaf-model-path.patch
@@ -0,0 +1,13 @@
+diff --git a/libavfilter/vf_libvmaf.c b/libavfilter/vf_libvmaf.c
+index 249e50c720..9b791e19b1 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},