ff wrapper scripts: vmaf and rename moov

This commit is contained in:
yosh 2023-10-24 00:21:48 -04:00
parent 7d37a8300d
commit 5d9fc46e4d
2 changed files with 19 additions and 0 deletions

19
ffvmaf Executable file
View File

@ -0,0 +1,19 @@
#!/bin/sh
set -ef
while getopts :s:t:T: OPT; do
case "$OPT" in
s) start="$OPTARG" ;;
t) time="$OPTARG" ;;
T) to="$OPTARG" ;;
*) : ;
esac
done
shift $((OPTIND - 1))
exec ffmpeg ${start:+-ss "$start"} ${to:+-to "$to"} \
-i "$1" -i "$2" ${time:+-t "$time"} \
-lavfi "[0:v] setpts=PTS-STARTPTS [ref]; \
[1:v] setpts=PTS-STARTPTS [dis]; \
[dis][ref] libvmaf=log_fmt=xml:log_path=/dev/stdout:n_threads=$(nproc)" \
-f null - \