20 lines
441 B
Bash
Executable File
20 lines
441 B
Bash
Executable File
#!/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 - \
|