Use Livestreamer to play streaming videos in your favorite video player
A lot can go wrong if you are using web browsers to watch streaming videos on sites such as Twitch, Dailymotion, UStream, Livestream or the thousands of other sites that offer them.
First, you need to use a browser or plugin that is supported. If a site requires Flash or Silverlight for example, you cannot do anything about it but to install the plugin to watch the streams in your browser. You may also notice heavy resource use while streaming, lags or even pauses, and don't get me started on the security implications of running those plugins in the browser.
The rise of HTML5 has made Flash and Silverlight obsolete, however so that it is less of an issue on today's Internet than it was five or ten years ago.
HTML5 is supported by all modern browsers and while it was the final nail in the plugin coffin, it too may cause high resource usage and other issues on sites.
Livestreamer is a cross-platform solution that you can use to play streaming videos in your favorite video player on your local system.
There are two main reasons and many smaller ones why you may want to do so.
- You don't need plugins or even a browser at all to watch the streams in your local player.
- The resource use is much better usually.
Good news is that it is not overly complicated to setup, bad news that it requires that you use the command line to run videos which may feel awkward to many Windows users.
You can download the latest Livestreamer release on this page. Linux and Mac users can run simple commands on their system to do so while binaries are provided for Windows.
Windows users can select a portable version or a setup file. The main advantage of the setup is that it adds Livestreamer to the system path so that you can run it from any location and not just its directory.
First thing you do after installation or extraction is to edit the configuration file. Don't worry, it is not difficult at all. You need to specify the path to the player that you want to use.
The config file lists several player examples; use the format player="C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" to specify the player. You can add parameters like --file-caching=5000 afterwards if you want to use them.
Once that is out of the way open the command prompt. Tap on the Windows-key, type cmd.exe and hit enter, this should do it.
The first thing you may want to do is test if you can run livestreamer from the current location. Just enter livestreamer there and hit enter. It works if you see parameters and help information.
To load a stream, use the command livestreamer url parameter, e.g. livestreamer twitch.tv/dotastarladder_en best to load the channel StarLadder EU in the best quality in the selected media player.
The application supports a wide variety of parameters that you can display by running it without any. This includes authentication options to watch streams that require it and many, many technical parameters that modify connection parameters and such.
There are other solutions when it comes to watching streams on desktop PCs without browsers. YouTube can be played on the desktop using SMPlayer and other solutions, and VLC supports some Internet streams also.
Livestreamer is a wonderful program for users who prefer to watch live streaming video in a local player instead of a browser. It can help users who experience slowdowns and other resource related issues while playing videos in a web browser, and also users who run into other troubles related to plugins and browsers.
I think it’s important to note the list of sites that LiveStreamer supports:
I’m not a big consumer of any of those sites so I probably won’t be using it myself :)
If you download the zip file, I see no such config file…
And when I tried the example url I get:
livestreamer.exe twitch.tv/dotastarladder_en best
[cli][info] Found matching plugin twitch for URL twitch.tv/dotastarladder_en
error: No streams found on this URL: twitch.tv/dotastarladder_en
Update: URL in your screenshot works though. :)
livestreamer.exe twitch.tv/sololineabuse best
[cli][info] Found matching plugin twitch for URL twitch.tv/sololineabuse
[cli][info] Available streams: audio, high, low, medium, mobile (worst), source (best)
[cli][info] Opening stream: source (hls)
[cli][info] Starting player: ‘C:\Program Files (x86)\VideoLAN\VLC\vlc.exe’
[cli][info] Player closed
[cli][info] Stream ended
So without even creating a config file it automatically runs VLC as you can see above.
OK, easy enough to switch to using MPC-HC:
livestreamer.exe –config config.txt twitch.tv/sololineabuse source
# Player options
player=C:\Program Files (x86)\MPC-HC\mpc-hc.exe
Using nircmd you can now have a simple shortcut to your fav. video feeds and not get the cmd window in the background. :)
Can grab nircmd @ http://www.nirsoft.net/utils/nircmd2.html
Example of shortcut using nircmd to hide livestreamer cmd window:
C:\Windows\nircmd.exe exec hide D:\666\Appz\livestreamer-v1.11.1\livestreamer.exe –config D:\666\Appz\livestreamer-v1.11.1\config.txt twitch.tv/sololineabuse source
Yeah that is without doubt a great idea if you watch a channel regularly.
This was the first thing I though about when I seen the command prompt, really nice to see PowerUsers and not those big colorful buttons that clams to do everything with a click… I mean tap of a button. :rolleyes:
Thanks for the Tutorial Martin
I use livestreamer and have a simple bat file for streams I tend to watch often:
START cmd.exe /C “C:\Program Files (x86)\Livestreamer\livestreamer.exe” twitch.tv/dota2ti best
Thanks Martin. I think I’ll watch more Dota match or at least listen. :D
Now to get it working so I can watch via XBMC on my Samsung 4k TV. :)
Unfortunately I can’t play (listen) youtube playlists. Do you know something similar solution for that, Martin?
I forgot to mention I prefer Media Player Classic.