Jahhein
10/24/2017 - 10:48 AM

Twitch.tv Livestreams via VLC Media Player

Twitch.tv Livestreams via VLC Media Player

Watch Twitch.tv livestreams with VLC

All-in-one

For those that just want to get to the point and start watching.

brew install streamlink && brew cask install vlc &&
  git clone https://gist.github.com/Jahhein/f96574f45b24aa797af13ce4c6812076 twitch-streamlink &&
  cd twitch-streamlink &&
  chmod 755 twitch.sh  &&
  ./twitch.sh

UPDATE!

The package Livestreamer was depcricated when I first authored this. A new fork of Livestream was created named Streamlink therefore I have updated all information to get up and running with Streamlink and a GUI if the command line makes your uneasy/confused.


Requirements

Installation with Homebrew for macOS

brew install streamlink && brew cask install vlc

Streamlink GUI

The GUI is just like any application, but requires streamlink package to still be installed.

OPTIONAL: brew cask install streamlink-twitch-gui for the GUI.

Shell Script Parameters

  • $1 is the stream name on twitch.tv
  • $2 is the stream quality - audio, low, medium, high, best, or specific like I mention below.

Examples usages

twitch.sh twitchpresents best # best video quality available
  
twitch.sh lirik 900p60        # 900p60 quality
  
twitch.sh monstercat audio    # only stream audio

twitch.sh kitboga 480p        # 480p quality

Please report any issues you come across! Thank you!

#!/usr/bin/env bash
# -----
# Author: Jacob Hein (Jahhein)
#         https://github.com/Jahhein
#
# Description:
#   Streamlink script to watch Twitch.tv streams with VLC Media player
#


cat << EOF
  usage: twitch.sh $1 $2 (stream name) (quality)
  
  # Examples!
  # ---------
  twitch.sh twitchpresents best # best video quality available
  twitch.sh lirik 900p60        # 900p60 quality
  twitch.sh monstercat audio    # only stream audiot
  twitch.sh kitboga 480p        # 480p quality

EOF


# option with twitch OAUTH token
#streamlink --twitch-oauth-token $TWITCH_TOKEN https://www.twitch.tv/"$1" "$2" > /dev/null 2>&1 &

streamlink https://www.twitch.tv/"$1" "$2" > /dev/null 2>&1 &

exit 0