Streaming without pain using mpv and youtube-dl

Watching streams in the browser is usually very annoying. In the worst case, there is only a flashplayer available which won't load because your last update of the flash plugin was already 10 minutes ago and in the meantime it was deactivated again due to newly discovered vulnerabilities. If it works, at least one of your cores will have a load close to 70%, your are bothered by layer-ads and also fast-forwarding and searching in the stream is cumbersome, unstable or not even possible using the flashplayer's controls.

A very nice alternative is to stream using a full-scale media player like mpv, which can be directly called with the command-line providing the url as parameter:

For some streaming sites the url is unfortunately in the code somewhere, such that some RegEx Script (using Greasemonkey for example) is needed. Fortunatetly, mpv also provides an interface to the python package youtube-dl  which includes link extractors for a broad range of streaming websites. A list can be found here and of course the project can be extended by writing an extractor for your favourite website yourself.

For starting the stream one just has to add the --ytdl option and the url of the streaming website



This entry was posted in Linux and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *