How to install mpv Media Player on Ubuntu 20.04

mpv is a free(License: GPLv2+) and Open-Source media player application for the command line. It’s based on MPlayer, mplayer2, FFmpeg and supports a wide variety of media file formats, audio and video codecs, and subtitle types. When you are looking for an alternative to your usual video player, this app is worth trying.

It’s an cross platform application available for Microsoft Windows, Linux, macOS, FreeBSD and Android.

mpv has an OpenGL, Vulkan, and D3D11 based video output that is capable of many features loved by videophiles, such as video scaling with popular high quality algorithms, color management, frame timing, interpolation, HDR, and more. It leverages the FFmpeg hwaccel APIs to support VDPAU, VAAPI, DXVA2, VDA and VideoToolbox video decoding acceleration.

Powerful scripting capabilities can make the player do almost anything. By using youtube-dl, mpv natively supports playback of high-definition video (HD) content and audio on YouTube and over 1000+ other supported sites. This allows mpv to replace site-specific video players based on HTML5 or Adobe Flash.

When you think of a video player, surely VLC player will cross your mind. This app is not only completely free to use and open-source, but it is also enormously powerful and plays near everything you plays with it. MPV can give you what VLC Media Player has to offer.

Key Features of mpv Media Player

  • Free and Open-Source
  • Cross-Platform application: Microsoft Windows, Linux, macOS, FreeBSD and Android
  • High quality video output
  • Minimalist GUI with only the necessary controls
  • GPU video decoding
  • Can play YouTube and other streaming videos through the command line
  • Supports a extensive variety of media file formats, video and audio codecs, and subtitle types.
  • You can use this media player in the command line
  • CLI version of MPV can be embedded in web and other applications

This article explains three methods of installing mpv Media Player on Ubuntu 20.04. Choose the installation method that is most appropriate for your environment.

Method 1: Installing mpv Media Player as a Snap Package

The easiest way to install mpv on Ubuntu 20.04 is by using the snap packaging system.

A snap package is a type of universal Linux package that you can enjoy irrespective of the distro. Its an self-contained software packages that include the binary all dependencies needed to run the application.

All you need is the snap service pre-configured, In the case of Ubuntu 20.04, it comes with snap pre-installed.

If snapd package is not already installed then you can install it by running following command.

$ sudo apt install snapd

Note: Snap packages can be installed from either the command-line or via the Ubuntu Software application.

This is actually the Snap version of the mpv Media Player. It can be used on any Linux distribution that has Snap support.

Open your terminal (Ctrl+Alt+T) and type the following command to install the mpv package.

$ sudo snap install mpv --beta

At this step, you have successfully installed mpv Media Player on Ubuntu 20.04 system.

Type the following command to update mpv package.

$ sudo snap refresh --list

Method 2: Installing mpv from Ubuntu apt repository

The mpv media player is included in Ubuntu 20.04. Follow the step by step guide to install the application.

Step #1

Type the following command to update the apt sources.

$ sudo apt update

Step #2

Now execute this command to install the mpv media player package.

$ sudo apt install mpv

With the help of && you can write both the commands in a single line. Something like this:

$ sudo apt update && sudo apt install mpv

That’s It.

Method 3: Installing mpv Media Player via PPA Repository

If you want to install the most recent version of mpv Player, you can use the PPA repository.

Personal Package Archives (PPA) are software repositories designed for Ubuntu users and are easier to install than other third-party repositories. PPAs are often used to distribute pre-release software so that it can be tested.

Step #1

First of all open the terminal from system application launcher and type the following command to add the mpv PPA to your system.

$ sudo add-apt-repository ppa:mc3man/mpv-tests

Step #2

Then, execute the following commands to install mpv Media Player package on your Ubuntu system.

$ sudo apt update && sudo apt install mpv

Once installed, launch it from your system application menu.

Starting mpv Media Player

In the Activities search bar type “mpv” and click on the icon to launch the application.

mpv User Interface:

How to Uninstall mpv Media Player from Ubuntu 20.04

For some reason, If you want to uninstall mpv application, refer following methods.

Method #1

If you have installed mpv Player via Snap type the following command:

$ sudo snap remove mpv

Method #2

If you have installed the appication from default ubuntu apt respository then uninstall by running the below command:

$ sudo apt remove mpv

Method #3

If you have installed the appication via PPA then uninstall by running the below commands.

Step #1

It’s most likely that you added the PPA using add-apt-repository command. You can use the same command to remove the PPA as well. Just give it --remove option in the command.

$ sudo add-apt-repository --remove ppa:mc3man/mpv-tests

Step #2

As of now we removed the PPA. What about the applications installed using these PPAs? Will they be removed as a result of removing the PPA? The answer is NO.

So this is when ppa-purge comes in picture. It not only disables the PPA but also uninstalls all the programs installed by the PPA or revert them to original version provided by your distribution.

So type the following command to install the ppa-purge package and uninstall the mpv Media Player package.

$ sudo apt install ppa-purge && sudo ppa-purge ppa:mc3man/mpv-tests

Conclusion

I hope that now you have a good understanding of How to install mpv Media Player on Ubuntu 20.04 LTS Focal Fossa.

If anyone does have any questions about what we covered in this guide then feel free to ask in the comment section below and I will do my best to answer those.

If you like our content, please consider buying us a coffee.

Buy Me A Coffee

We are thankful for your never ending support.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.