summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandre Demers2020-05-12 11:08:56 -0400
committerAlexandre Demers2020-05-12 11:08:56 -0400
commitb5052ee001dbf8c1522b8b6a1dd8b0725c3c79b9 (patch)
treed4729480c470d54b4b809c658e4b21bce7ac65a6
parenteee9550550fa9fb2862f465e0ceac7343e6800b9 (diff)
downloadaur-b5052ee001dbf8c1522b8b6a1dd8b0725c3c79b9.tar.gz
Add VMAF support and Change default vmaf model path to Arch defaults
Signed-off-by: Alexandre Demers <alexandre.f.demers@gmail.com>
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD16
-rw-r--r--vmaf-model-path.patch13
3 files changed, 30 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 69ec21da52e..d440c547233 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = lib32-ffmpeg
pkgdesc = Complete solution to record, convert and stream audio and video (32 bit)
pkgver = 4.2.2
- pkgrel = 5
+ pkgrel = 6
epoch = 1
url = http://ffmpeg.org/
arch = x86_64
@@ -54,6 +54,7 @@ pkgbase = lib32-ffmpeg
depends = lib32-speex
depends = lib32-srt
depends = lib32-v4l-utils
+ depends = lib32-vmaf
depends = lib32-xz
depends = lib32-zlib
optdepends = lib32-ladspa: LADSPA filters
@@ -67,8 +68,10 @@ pkgbase = lib32-ffmpeg
provides = libswresample.so
provides = libswscale.so
source = git+https://git.ffmpeg.org/ffmpeg.git#tag=n4.2.2
+ source = vmaf-model-path.patch
validpgpkeys = FCF986EA15E6E293A5644F10B4322F04D67658D8
sha256sums = SKIP
+ sha256sums = 8dff51f84a5f7460f8893f0514812f5d2bd668c3276ef7ab7713c99b71d7bd8d
pkgname = lib32-ffmpeg
diff --git a/PKGBUILD b/PKGBUILD
index 1569a3455c3..e08d7635e31 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,7 +7,7 @@
_pkgbasename=ffmpeg
pkgname=lib32-$_pkgbasename
pkgver=4.2.2
-pkgrel=5
+pkgrel=6
epoch=1
pkgdesc="Complete solution to record, convert and stream audio and video (32 bit)"
arch=('x86_64')
@@ -62,6 +62,7 @@ depends=(
'lib32-speex'
'lib32-srt'
'lib32-v4l-utils'
+ 'lib32-vmaf'
'lib32-xz'
'lib32-zlib'
)
@@ -86,15 +87,23 @@ provides=(
'libswresample.so'
'libswscale.so'
)
-source=("git+https://git.ffmpeg.org/ffmpeg.git#tag=n${pkgver}")
+source=(
+ "git+https://git.ffmpeg.org/ffmpeg.git#tag=n${pkgver}"
+ "vmaf-model-path.patch"
+ )
validpgpkeys=('FCF986EA15E6E293A5644F10B4322F04D67658D8')
-sha256sums=('SKIP')
+sha256sums=(
+ 'SKIP'
+ '8dff51f84a5f7460f8893f0514812f5d2bd668c3276ef7ab7713c99b71d7bd8d'
+ )
prepare() {
cd ${_pkgbasename}
# Patching if needed
git cherry-pick -n dc0806dd25882f41f6085c8356712f95fded56c7
+
+ patch -Np1 -i "${srcdir}/vmaf-model-path.patch"
}
build() {
@@ -136,6 +145,7 @@ build() {
--enable-libsrt \
--enable-libtheora \
--enable-libv4l2 \
+ --enable-libvmaf \
--enable-libvorbis \
--enable-libvpx \
--enable-libwebp \
diff --git a/vmaf-model-path.patch b/vmaf-model-path.patch
new file mode 100644
index 00000000000..abd65cdf730
--- /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},