Skip to content

Instantly share code, notes, and snippets.

@indeedwatson
Last active March 10, 2016 17:21
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 indeedwatson/e469c1d60912bc47adca to your computer and use it in GitHub Desktop.
Save indeedwatson/e469c1d60912bc47adca to your computer and use it in GitHub Desktop.
#!/bin/bash
# shortcuts for livestreamer channels and quality
twitch=http://www.twitch.tv/
mpv=--player=mpv
# get channel from list of most watched channels
case "$1" in
santzo) channel=santzo84;;
ohn) channel=outerheaven;;
prec) channel=previouslyrecorded_live;;
tftv) channel=teamfortresstv;;
esac
# get quality, best by default
case "${2:-b}" in
b*) quality=best;;
l*) quality=low;;
m*) quality=medium;;
*)
printf '%s: unkown quality option: %s (one of [l]ow,
[m]edium, [b]est)'"$0" "$2" >&2
exit 1
;;
esac
# exec livestreamer
livestreamer $twitch$channel $quality $mpv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment