How to Install Latest MPV video player 0.35 in Debian 11, Ubuntu 22.04 | 20.04

This simple tutorial shows how to install the latest version of MPV media player in Debian 11, which also works on Ubuntu 22.04, Ubuntu 20.04.

MPV is a fork of MPlayer/MPlayer 2. It’s a free and open-source media player works on Linux, Windows, macOS, and BSD. And some popular media players, e.g., SMPlayer and Celluloid (aks Gnome MPV), use MPV as backend.

Though it’s a command-line application, MPV has app shortcut and can open video from files’ context (right-click) menu. And it provides basic mouse actions to control video playback. As well, there are many keyboard shortcuts, you can find them via man mpv command.

How to Install MPV in Debian & Ubuntu:

Option 1: Install MPV via official Debian repository:

The Debian 11 bullseye repository includes MPV 0.32 and provides only security updates for the package.

Open terminal from your system start menu.

Then you can install it via single command:

sudo apt update && sudo apt install mpv

Option 2: Install the Latest MPV and keep up-to-date:

For those prefer the latest features as well as bug-fixes, MPV refers to the apt repository for both Debian and Ubuntu LTS.

The repository provides up-to-date MPV packages, v0.35 at the moment, for Debian 11 on 64-bit modern PC, arm64/armhf machines (e.g., Apple Silicon and Raspberry Pi), old 32-bit PC and mips64el / ppc64el / s390x CPU architectures. Though only 64-bit & 32-bit for Ubuntu LTS.

1.) Install the repository key:

To make your system trust the packages from the repository, you have to first download & install keyring.

To get the key, copy and paste the command below into terminal and hit Enter:

curl https://non-gnu.uvt.nl/debian/uvt_key.gpg --output uvt_key.gpg

For Ubuntu, curl is not available out-of-the-box, install it via sudo apt install curl if you don’t have it.

And to install the key, just move the key to ‘/etc/apt/trusted.gpg.d‘ directory since apt-key command is deprecated. To do so, run command:

sudo mv uvt_key.gpg /etc/apt/trusted.gpg.d

2.) Enable https support for apt package manager.

This can be done easily by installing the “apt-transport-https” package via command:

sudo apt install apt-transport-https

3.) Add the apt repository for MPV:

You can now create a source file under “/etc/apt/sources.list.d” directory, and insert the line below to add the apt repository:

deb https://non-gnu.uvt.nl/debian CODE_NAME uvt

And this can be done by running a single command in terminal (copy & paste, then hit Enter):

sudo sh -c 'echo "deb https://non-gnu.uvt.nl/debian $(lsb_release -sc) uvt" >> /etc/apt/sources.list.d/non-gnu-uvt.list'
NOTE: The command works for current Debian stable & Ubuntu LTS (Ubuntu 20.04, Ubuntu 22.04), since "$(lsb_release -sc)" outputs system code name automatically. Other systems (e.g., elementary OS, Deepin, Zorin OS) have to replace it with "bullseye", "focal", or "bionic" depends on which one your system based on.

And update system package cache by running command:

sudo apt update

4.) Finally, install / upgrade MPV:

You can finally install or upgrade mpv media player via apt command:

sudo apt install -t "o=UvT" mpv

Here -t "o=UvT"is required to tell to install mpv from that repository.

Uninstall MPV & apt repository:

For Gnome Desktop, there’s a ‘Software & Updates‘ utility. You can open it and navigate to “Other Software” tab to manage third-party apt repositories.

Or, just remove the source file by running command in terminal:

sudo rm /etc/apt/sources.list.d/non-gnu-uvt.list

Also, remove the repository key via command:

sudo rm /etc/apt/trusted.gpg.d/uvt_key.gpg

And to remove the mpv media player, use command:

sudo apt remove --autoremove mpv
Exit mobile version