January 26, 2022
How to install MPV Media player on Debian 11

How To Install MPV Media Player on Debian 11

On this article we will learn how to install MPV media player on Debian 11.

Introduction

MPV is a free, open source, and cross-platform media player for the command line that can play almost any video format without having to install codecs separately. In addition to good video quality, MPV Player’s loading speed is also very impressive faster than MPC-HC. 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. On this article we will learn how to install MPV on Debian 11.

MPV Installation On Debian 11

We will install MPV on Debian 11 using APT repository.

  1. Add MPV Media Player Repository
  2. Update System
  3. Install MVP Media Player
  4. Launching MPV Media Player

A detailed description of the MPV installation will be discussed in the sub-chapters below.

Adding MPV Media Player Repository

We start this installation process by adding the MVP repository. Here are the steps.

Adding GPG signing key for the repository on Debian 11

ramansah@otodiginet:~$ curl https://non-gnu.uvt.nl/debian/uvt_key.gpg --output uvt_key.gpg
sudo mv uvt_key.gpg /etc/apt/trusted.gpg.d
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   609  100   609    0     0    422      0  0:00:01  0:00:01 --:--:--   422

Adding the MPV APT repository on Debian 11

ramansah@otodiginet:~$ sudo sh -c 'echo "deb [arch=amd64] https://non-gnu.uvt.nl/debian $(lsb_release -sc) uvt" >> /etc/apt/sources.list.d/non-gnu-uvt.list'

Update Debian 11 System

By updating Debian 11 system, it will refresh the local list of available packages software to the newer stable version. To update Debian 11 repositories, we will use the command line.

$ sudo apt update
ramansah@otodiginet:~$ sudo apt update
Hit:1 https://packages.grafana.com/oss/deb stable InRelease                                         
Get:2 https://non-gnu.uvt.nl/debian bullseye InRelease [25.2 kB]       
Hit:3 https://packages.grafana.com/oss/deb beta InRelease
Get:4 https://non-gnu.uvt.nl/debian bullseye/uvt amd64 Packages [10.9 kB]
Hit:5 https://deb.nodesource.com/node_16.x bullseye InRelease                                       
Get:6 https://dl.yarnpkg.com/debian stable InRelease [17.1 kB]                                      
Adding MPV Media Player Repository
Adding MPV Media Player Repository

Installing MPV Media Player On Debian 11

On this step, we will install MPV Media player by submitting command line :

$ sudo apt install -t "o=UvT" mpv

The output will be as follow :

ramansah@otodiginet:~$ sudo apt install -t "o=UvT" mpv
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libgnutls-dane0 libunbound8
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libssh-4
The following NEW packages will be installed:
  libssh-4 mpv
0 upgraded, 2 newly installed, 0 to remove and 53 not upgraded.
Need to get 8,579 kB of archives.
After this operation, 25.0 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 https://non-gnu.uvt.nl/debian bullseye/uvt amd64 mpv amd64 0.34.0+fruit.1 [8,393 kB]
Get:2 http://deb.debian.org/debian bullseye/main amd64 libssh-4 amd64 0.9.5-1+deb11u1 [186 kB]
Fetched 8,579 kB in 7s (1,287 kB/s)                                                                              
Selecting previously unselected package libssh-4:amd64.
(Reading database ... 207617 files and directories currently installed.)
Preparing to unpack .../libssh-4_0.9.5-1+deb11u1_amd64.deb ...
Unpacking libssh-4:amd64 (0.9.5-1+deb11u1) ...
Selecting previously unselected package mpv.
Preparing to unpack .../mpv_0.34.0+fruit.1_amd64.deb ...
Unpacking mpv (0.34.0+fruit.1) ...
Setting up libssh-4:amd64 (0.9.5-1+deb11u1) ...
Setting up mpv (0.34.0+fruit.1) ...
Processing triggers for desktop-file-utils (0.26-1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1) ...
Processing triggers for libc-bin (2.31-13+deb11u2) ...
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for mailcap (3.69) ...
Install MPV Media Player on Debian 11
Install MPV Media Player on Debian 11

After installation was completed done, then we will verify it by querying its version by submitting command line :

$ mpv --version

The output will be as follow :

ramansah@otodiginet:~$ mpv --version
mpv 0.34.0 Copyright © 2000-2021 mpv/MPlayer/mplayer2 projects
 built on Sun Nov 14 21:20:11 UTC 2021
FFmpeg library versions:
   libavutil       56.70.100
   libavcodec      58.134.100
   libavformat     58.76.100
   libswscale      5.9.100
   libavfilter     7.110.100
   libswresample   3.9.100
FFmpeg version: 4.4.1
MPV Media Player Version
MPV Media Player Version

Launching MPV Media Player

Now, the MPV media player has been installed on our Debian 11 system and ready to be launched. It is a simple task to launch MPV Media player. There are several option to launch MPV media player : via command line on the console and App Menu.

Launching MPV Media player via App Menu

Launching MPV Media Player from App Menu
Launching MPV Media Player from App Menu

We can add media files to be played on MPV media player by drag and drop. Almost every media file can be played by this application.

Command Line on The Console

If we are running Debian 11 server version, we also could play a media files by using MPV Media player by submitting command line on the console. We can explore any features of MPV media player CLI, by using mpv command line.

$ mpv -help

The output will be as follow :

ramansah@otodiginet:~$ mpv -help
Usage:   mpv [options] [url|path/]filename

Basic options:
 --start=<time>    seek to given (percent, seconds, or hh:mm:ss) position
 --no-audio        do not play sound
 --no-video        do not play video
 --fs              fullscreen playback
 --sub-file=<file> specify subtitle file to use
 --playlist=<file> specify playlist file

 --list-options    list all mpv options
 --h=<string>      print options which contain the given string in their name
mpv -help command line
mpv -help command line

Playing a media file using MPV Command Line

On this section, we will play a media file by using mpv command line. For this example, we will download a mp4 file from file-examples-com.github.io called as file_example_MP4_480_1_5MG.mp4.

ramansah@otodiginet:~$ wget https://file-examples-com.github.io/uploads/2017/04/file_example_MP4_480_1_5MG.mp4
--2021-12-25 22:55:22--  https://file-examples-com.github.io/uploads/2017/04/file_example_MP4_480_1_5MG.mp4
Resolving file-examples-com.github.io (file-examples-com.github.io)... 185.199.109.153, 185.199.110.153, 185.199.108.153, ...
Connecting to file-examples-com.github.io (file-examples-com.github.io)|185.199.109.153|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1570024 (1.5M) 
Saving to: ‘file_example_MP4_480_1_5MG.mp4’

file_example_MP4_480_1 100%[=========================>]   1.50M   618KB/s    in 2.5s    

2021-12-25 22:55:26 (618 KB/s) - ‘file_example_MP4_480_1_5MG.mp4’ saved [1570024/1570024]

then we play it by using mpv command line as shown below :

ramansah@otodiginet:~$ mpv file_example_MP4_480_1_5MG.mp4
 (+) Video --vid=1 (*) (h264 480x270 30.000fps)
 (+) Audio --aid=1 (*) (aac 2ch 48000Hz)
[vo/gpu/opengl] Suspected software renderer or indirect context.
[vo/gpu] VT_GETMODE failed: Inappropriate ioctl for device
MVP media player plays a media file using command line
MVP media player plays a media file using command line

Conclusion

On this article we have learnt how to install and launch MPV media player on Debian 11 operating system. I hope this article will be helpful. For more detailed information about MPV media player can be found on official MPV Media Player website..

Share this article via :

Leave a Reply

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