Skip to content

Instantly share code, notes, and snippets.

@JohanAR
Created July 10, 2022 13:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JohanAR/5446b9043619456f46f82ad3a2831061 to your computer and use it in GitHub Desktop.
Save JohanAR/5446b9043619456f46f82ad3a2831061 to your computer and use it in GitHub Desktop.
Play multiple files synchronised in VLC
#!/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