How to Watch Live Streams on Ubuntu via Your Favorite Video Player

Last updated: September 8, 2013

youtube ustream livestreamWant to watch live streams on Ubuntu via your favorite video player? Well, here’s how to do it using Livestreamer which supports most of the big streaming services such as Dailymotion, Livestream, Twitch/Justin.tv, YouTube Live, UStream.

Livestreamer is a Command Line Interface that pipes video streams from various services into a video player, such as VLC, Mplayer. The main purpose of Livestreamer is to allow the user to avoid buggy and CPU heavy flash plugins but still be able to enjoy various streamed content.

There is also an API available for developers who want access to the video stream data.

It’s very easy to use this tool. Let’s say you want to watch the stream located on http://twitch.tv/day9tv, just run below command in terminal (press Ctrl+Alt+T to open it).

livestreamer twitch.tv/day9tv

[cli][info] Found matching plugin justintv for URL twitch.tv/day9tv
Found streams: 240p, 360p, 480p, 720p (best), mobile_high, mobile_low (worst)

It will find out what streams are available and print them out for you to choose from. Simply give livestreamer the stream as the second argument and playback will start in your video player of choice.

In this case the best stream is a reference to the stream that is considered to be of highest quality, e.g 720p. The –player argument will specify the video player (It will open VLC as the default player if not specified).

livestreamer twitch.tv/day9tv best --player mplayer

live streams ubuntu

Install Livestreamer in Ubuntu, Linux Mint

Press Ctrl+Alt+T on your keyboard to open terminal. When it opens run below commands to install pip installer:

sudo apt-get install python-pip

Then install Livestreamer via pip:

sudo pip install livestreamer

This will work on all current supported Ubuntu releases, include Ubuntu 13.10, Ubuntu 13.04, Ubuntu 12.10, Ubuntu 12.04, Ubuntu 10.04 and their derivatives such as Linux Mint and Elementary OS.

Twitter

I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to let me know if the tutorial is outdated! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via [email protected] Buy me a coffee: https://ko-fi.com/ubuntuhandbook1 |

16 responses to How to Watch Live Streams on Ubuntu via Your Favorite Video Player

  1. Thanks a lot it works!!
    but how do i watch new “Source thing(on twitch)” ?
    but still thanks

  2. When I use the command

    livestreamer twitch.tv/*

    I get

    livestreamer: command not found

    Does it need to be compiled or something?

    • Sounds like livestreamer’s not installed properly. Is there any error out when you run below commands to install it on your system:

      sudo apt-get install python-pip; sudo pip install livestreamer

      You can also install the development version if above command not work for you. Run below commands one by one to get it from github:

      git clone git://github.com/chrippa/livestreamer.git
      cd livestreamer
      python setup.py install
  3. Can I do that installation as well on Python windows with VLC?

  4. It’s working for me on Fedora 19 with VLC. VERY NICE!

  5. Thank you very much – it works sooo good

  6. When i do:

    livestreamer twitch.tv/day9tv best --player mplayer

    I get:

    [cli][info] Found matching plugin twitch for URL twitch.tv/day9tv
    error: Unable to open URL: https://api.twitch.tv/api/channels/day9tv/access_token.json (HTTPSConnectionPool(host='api.twitch.tv', port=443): Max retries exceeded with url: /api/channels/day9tv/access_token.json?as3=t (Caused by : [Errno 113] No route to host))

    Same with other streamers

    • NaturalHarmonia October 9, 2016 at 5:45 pm

      I’m having this same problem.

      • Need to run streamer with parameter twitch-oauth-authenticate. After that copy the token from opened page after authentication and run streamer with parameter –twitch-oauth-token TOKEN

  7. getting

    [cli][info] Found matching plugin twitch for URL twitch.tv/cohhcarnage
    [cli][info] Available streams: audio, high, low, medium, mobile (worst), source (best)
    [cli][info] Opening stream: source (hls)
    [cli][info] Starting player: mplayer
    error: Failed to start player: mplayer ([Errno 2] No such file or directory)

  8. i have a easy-cap video capturing device connected to usb port and it is listed in /dev/ folder as /dev/video0 . Can i play videos through livestreamer from /dev/video0.

  9. Thanks! It works just fine.
    And i laughed at “let’s say you want to watch day9”
    Able to watch GSL thanks to you. GG

  10. Can I to do the same thing using the Totem Player 3.10?

  11. sorpresa@Sorpresa2:~$ livestreamer twitch.tv/forsenlol best –player mplayer
    [cli][info] Found matching plugin twitch for URL twitch.tv/forsenlol
    [cli][info] Available streams: audio, high, low, medium, mobile (worst), source (best)
    [cli][info] Opening stream: source (hls)
    [cli][info] Starting player: mplayer
    error: Failed to start player: mplayer ([Errno 2] No such file or directory)
    sorpresa@Sorpresa2:~$ livestreamer twitch.tv/forsenlol best –player mplayer