Skip to content

Instantly share code, notes, and snippets.

@mperlet
Created February 11, 2018 09:49
Show Gist options
  • Save mperlet/1af4be70aaaef7f4ca354f3c151d7e0a to your computer and use it in GitHub Desktop.
Save mperlet/1af4be70aaaef7f4ca354f3c151d7e0a to your computer and use it in GitHub Desktop.
vlc player chromecast youttube-dl
#!/bin/bash
# v - VLC Player
# c - chromecast
# y - youttube-dl
CHROMECASTIP="192.168.178.39"
STREAMURI="$1"
CERTDIR="$HOME/.vcy"
mkdir -p "$CERTDIR"
which gnutls-cli >/dev/null 2>&1 || { echo "gnutls-cli is not installed." >&2; exit 1; }
which cvlc >/dev/null 2>&1 || { echo "cvlc is not installed." >&2; exit 1; }
which youtube-dl >/dev/null 2>&1 || { echo "youtube-dl is not installed." >&2; exit 1; }
gnutls-cli --save-cert="$CERTDIR/chromecast.pem" "$CHROMECASTIP:8009"
cvlc --gnutls-dir-trust="$CERTDIR" -vv --sout="#chromecast{ip=$CHROMECASTIP}" <(youtube-dl -o - "$STREAMURI")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment