diff options
Diffstat (limited to '')
| -rwxr-xr-x | bin/mpvdiff | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/bin/mpvdiff b/bin/mpvdiff new file mode 100755 index 0000000..a218709 --- /dev/null +++ b/bin/mpvdiff @@ -0,0 +1,24 @@ +#!/bin/sh +set -e +[ -n "$DEBUG" ] && set -x + +args="--title=mpvdiff --hwdec=v4l2m2m-copy" + +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 |