summary refs log tree commit diff
path: root/bin/mpvdiff
blob: 9d5ce4ab2d75a314517b6366d54e7fa3c12d8218 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
set -e
[ -n "$DEBUG" ] && set -x

# args="--title=mpvdiff --script=~~/scripts/diff"
args="--title=mpvdiff"

if [ "$1" = "-h" ]; then
	printf "usage: %s [-2|-4] VIDEO..." "$(basename "$0")"
	exit 2

elif [ "$1" = "-4" ]; then
	shift
	mpv "$1" \
		--external-file="$2" \
		--external-file="$3" \
		--external-file="$4" \
		--lavfi-complex='[vid1][vid2]scale2ref[1][2];[1][2]hstack[t1] ; [vid3][vid4]scale2ref[3][4];[3][4]hstack[t2] ; [t1][t2]scale2ref[5][6];[5][6]vstack[vo]' \
		"$args"
else
	mpv "$1" \
		--external-file="$2" \
		--lavfi-complex='[vid1][vid2]scale2ref[1][2];[1][2]hstack[vo]' \
		"$args"
fi