Created
July 10, 2022 13:51
-
-
Save JohanAR/5446b9043619456f46f82ad3a2831061 to your computer and use it in GitHub Desktop.
Play multiple files synchronised in VLC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
VLC='/usr/bin/vlc --sout-all --sout #display' | |
joinargs () { | |
local IFS="#" | |
echo "$*" | |
} | |
multivlc () { | |
FIRST="$1" | |
shift | |
OTHERS=$(joinargs "$@") | |
$VLC "$FIRST" :input-slave="$OTHERS" :file-caching=500 | |
} | |
if [[ $# -le 1 ]]; then | |
$VLC "$@" | |
else | |
multivlc "$@" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment