Saturday, 7 January 2017

How to install and use mpv to watch streaming video in Ubuntu 16.04 or Linux Mint 18.x

mpv is an open source cross platform media player for Linux, Mac OS X, Windows, and BSD. It is excellent for watching streaming video when coupled with another piece of software youtube-dl. mpv is a nice alternative to watching videos in the browser, as you don't have to use flash or a buggy ad-ridden website.

This tutorial will show you how to install and use an up to date version of mpv and youtube-dl on Ubuntu 16.04 and Linux Mint 18.x (18, 18.1, and whatever point release comes after that)

Installing mpv


mpv is already in the Ubuntu 16.04 repository, but I will show you how to install an updated version.

Please follow my instructions carefully, also, if you have added any other updated media library PPAs, please purge them with ppa-purge before adding these ones. This tutorial is meant for people who have the default media libraries that came with Ubuntu 16.04 or Linux Mint 18.

If you have messed with your system, purge any other media lib PPAs with:

$ sudo ppa-purge -d xenial ppa:some/ppa

The dollar sign is not part of the command, it's only to represent that this is a terminal command. Change some/ppa to the ppa you want to purge.

Ok, now to get on with the tutorial.

Step 1. Type this in the terminal (or copy and paste)

$ sudo add-apt-repository ppa:mc3man/mpv-tests -y && sudo add-apt-repository ppa:mc3man/xerus-media -y && sudo apt update && sudo apt install mpv && sudo apt dist-upgrade

Make sure to look at the programs and libraries that will be updated, and press 'y' once you're confident.

Once you're all updated and mpv is installed, install youtube-dl.

$ sudo apt install python-pip

$ sudo pip install youtube-dl

To upgrade youtube-dl if it ever gets outdated, do this:

$ sudo pip install youtube-dl --upgrade

Now we'll continue to the next part.

Using mpv & youtube-dl


To use mpv, simply paste a video URL such as a youtube video, or any other supported site after the 'mpv' command.

So, for example:

$ mpv

That will play a popular YouTube video in an mpv video.

To use  youtube-dl (to download a video)

$ youtube-dl

To find a list of options youtube-dl has, type:

$ youtube-dl --help

mpv supports all the video sites youtube-dl does.

The list of supported sites can be found at:

mpv has a barebones user interface, it has keyboard shortcuts you can use to play and pause the video (spacebar), and to fast forward and rewind you can use the arrow keys. For more shortcuts, look up the documentation on mpv with:

$ man mpv (to view the manual)

To install a fully featured GUI for mpv (like VLC has), type this:

$ sudo apt install baka-mplayer

(assuming you added those two PPAs)

It will show up in the menus as "Baka-MPlayer"

I hope you found this tutorial useful.


  1. Nice blog. You explained every point very well. Thanks for sharing with us.
    server clear

    1. The development of artificial intelligence (AI) has propelled more programming architects, information scientists, and different experts to investigate the plausibility of a vocation in machine learning. Notwithstanding, a few newcomers will in general spotlight a lot on hypothesis and insufficient on commonsense application. machine learning projects for final year In case you will succeed, you have to begin building machine learning projects in the near future.

      Projects assist you with improving your applied ML skills rapidly while allowing you to investigate an intriguing point. Furthermore, you can include projects into your portfolio, making it simpler to get a vocation, discover cool profession openings, and Final Year Project Centers in Chennai even arrange a more significant compensation.

      Data analytics is the study of dissecting crude data so as to make decisions about that data. Data analytics advances and procedures are generally utilized in business ventures to empower associations to settle on progressively Python Training in Chennai educated business choices. In the present worldwide commercial center, it isn't sufficient to assemble data and do the math; you should realize how to apply that data to genuine situations such that will affect conduct. In the program you will initially gain proficiency with the specialized skills, including R and Python dialects most usually utilized in data analytics programming and usage; Python Training in Chennai at that point center around the commonsense application, in view of genuine business issues in a scope of industry segments, for example, wellbeing, promoting and account.

      The Nodejs Projects Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training

  2. By understanding that streaming is not a medium, we are able to think more concretely about who uses streaming video and how they are able to do so.moviebox for pc