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 ###