From da0d15348c5cbfc2ec9e434b56801ba54b94cadc Mon Sep 17 00:00:00 2001 From: Hyperling Date: Tue, 15 Sep 2026 18:11:21 -0700 Subject: [PATCH] Add vcompare, a shortcut for having two videos play side by side in mpv. --- rc_shared.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/rc_shared.sh b/rc_shared.sh index 1a7790d..51e6752 100644 --- a/rc_shared.sh +++ b/rc_shared.sh @@ -1189,6 +1189,28 @@ function pv3 { echo -e "\n * Success! *" } +# 20260915 - Stack 2 videos for comparing quality. +function vcompare { + vid1="$1" + vid2="$2" + if [[ -z $vid1 || -z $vid2 ]]; then + echo "ERROR: Missing vid1 ('$vid1') or vid2 ('$vid2'). " + return 1 + fi + + orientation="$3" + if [[ -z $orientation || ($orientation != "h" && $orientation != "v") ]]; then + echo -n "NOTICE: Received '$orientation' for orientation, using vertical instead. " + orientation="v" + echo "'$orientation'" + fi + + mpv --lavfi-complex="[vid1][vid2]${orientation}stack[vo];[aid1][aid2]amix[ao]" \ + "$vid1" \ + --external-file="$vid2" +} +alias vcomp="vcompare " + ### Web ###