Skip to content

Instantly share code, notes, and snippets.

@Alcesmire
Last active April 8, 2017 20:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save Alcesmire/8338340 to your computer and use it in GitHub Desktop.
Save Alcesmire/8338340 to your computer and use it in GitHub Desktop.
A short livestreamer tutorial, written mainly to help some people during AGDQ 2014.

First, check out this livestreamer page.

That page should hold more or less all information you should need. But for your ease I'll compile what you need in a condensed format.

What is livestreamer?

Livestreamer is a program that allows you to view streams (twitch.tv, justin.tv and a LOT more) in a regular media player such as VLC, Mplayer or likely your preferred player.

This means no flash dependencies, which means better performance and in the case of Linux no flash overheating issues. You won't get the chat, but that might be more of a blessing than anything.

For AGDQ I recommend livestreamer and a IRC client. Personally I use livestreamer with cvlc and irssi.

Getting livestreamer

Linux/Unix users, I'll trust you can do this for yourself. Check here for the relevant info.

Windows users, download and install this

Using livestreamer

The syntax for using livestreamer is quite easy. The command you need to use is basically: livestreamer <stream url> <quality> --player <player command/path to player>

Under Linux/Unix you can omit the --player flag entirely and it will use vlc. If you omit the quality you'll get a list of available quality settings.

Linux/Unix users might type (in a terminal): livestreamer twitch.tv/speeddemosarchivesda medium --player vlc

Windows users might type (in the command prompt, cmd.exe): livestreamer twitch.tv/speeddemosarchivesda medium --player "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" (make sure the path to your media player is correct!)

There are more flags you can use, for more info run: livestreamer --help

(more info)

Writing a configuration file

If you don't want to write the flags over and over, you might want to write a config file.

Under Linux/Unix the file is either ~/.config/livestreamer/config or ~/.livestreamerrc

Under Windows the file is %APPDATA%\livestreamer\livestreamerrc

Syntax

The syntax of the config file is really simple. It's basically lines of OPTION=VALUE.

You want to have the line player=<your preferred player> in there.

So, under Linux/Unix you might have the line player=vlc and under Windows player=C:\Program Files (x86)\VideoLAN\VLC\vlc.exe

(more info)


If there is any trouble, send a mail or comment on the gist and I'll try to help (and update the tutorial).

@7ylxr9
Copy link

7ylxr9 commented Jul 6, 2016

I put a config.text with twitch-oauth-token=[token] in both spots and it's not authenticating/logging into twitch. Any clue what I'm doing wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment