Ubuntu

3 Methods to Install MPV Media Player on Ubuntu 22.04 and Linux Mint 20

The media players are used to play the videos of different formats and the MPV media player is one of the command line media players which is free to download as well as supports many formats of video, audio, and subtitles type.

Since MPV is a command-line-based media player, it does not contain the GUI but a small menu bar that contains all the options to control the media file.

The MPV media player can be installed on different operating systems like Windows, macOS, and the Linux distributions, but in this write-up, we specifically discussed the installation methods of the MPV media player on the Ubuntu 22.04 and Linux Mint 20.

How can we install the MPV Media Player on Ubuntu 22.04 and Linux Mint 20

We can install the MPV media player on both distributions of Linux, Ubuntu 22.04 and Linux Mint 20, by the below-mentioned methods:

Installation with all these methods is explained in detail.

Method 1: Installation of MPV media player using the default repository

The MPV media player package comes in the default repository packages of the Ubuntu 22.04 and Linux Mint 20, so we can install it using the apt package manager:

$ sudo apt install mpv -y

When the installation of the MPV is completed, we will check the installed version of MPV:

$ mpv --version

Method 2: Installation of MPV media player using the Snap

We can use the snap command to download the package of MPV media player, if you do not have a pre-installed snapd utility, you can use the command:

$ sudo apt install snapd -y

Now, we will use the snapd utility to download and install the MPV media player package:

$ sudo snap install mpv-nilsboy

Similarly, we can remove the MPV media player package using the snap utility:

$ sudo snap uninstall mpv-nilsboy

Note: In the Linux Mint, the package of the snapd utility is disabled by default, so to make it enable, we will execute the command:

$ sudo rm /etc/apt/preferences.d/nosnap.pref

And then update the Linux Mint 20 using the command:

$ sudo apt update

And don’t forget to install “snapd”.

Method 3: Installation of MPV media player using the flatpak

The last method to install the MPV media player on the Ubuntu 22.04 and Linux Mint 20 is by using the flatpak utility if it is not installed, use the below-mentioned command to install it:

$ sudo apt install flatpak -y

To install the mpv media player using the flatpak, run the command:

$ flatpak install flathub io.mpv.Mpv

When the installation is complete, we can launch it using the command:

$ flatpak run io.mpv.Mpv

How to use MPV Player

As we told you it’s a command-line media player, so there will no GUI open, the general syntax of using the MPV is:

$ mpv [options] [url|path/]filename

We will use the mpv command with any option to play the video or audio of the file by providing its path or URL, for example, we want to play a video from youtube using the mpv:

$ mpv --fs https://youtu.be/cDwWmCbVPkk

The video is being played and displayed on full screen because we have used the “fs” option which is full screen.

Conclusion

Though a lot of features are discussed in this write-up, the MPV Media player is still under development and the team is focussing on adding more features as well as working on its code refactoring. In this write-up, we have explored all the possible methods by which we can install the MPV media player on Ubuntu 22.04 and Linux Mint 20.

About the author

Hammad Zahid

I'm an Engineering graduate and my passion for IT has brought me to Linux. Now here I'm learning and sharing my knowledge with the world.