How to Install mpv Media Player on Rocky Linux 9


MPV is a free, open-source, highly versatile media player that supports various video and audio codecs. It has comprehensive playback, audio, and video control options, as well as support for different input URL types for reading input from a variety of sources other than disk files. MPV’s comprehensive control options allow users to customize their watching experience extensively, and the input URL support means that users can watch content from various sources. MPV is an excellent media player for those who want a high degree of control over their playback experience.

The following tutorial will teach you how to install mpv Media Player on Rocky Linux 9 using the EPEL 9 repository or the natively installed Flatpak third-party package manager.

Update Rocky Linux

First, update your system to ensure all existing packages are up to date to avoid conflicts.

sudo dnf upgrade --refresh

Install mpv Media Player – RPM Fusion Method

The first installation option is to use RPM Fusion to install the media player. Desktop users with RHEL clones would know this repository well, along with Fedora users, for containing packages that distributions cannot ship by default.

First, enable the CRB repository required for both EPEL and RPM Fusion.


sudo dnf config-manager --set-enabled crb

Next, install EPEL using the following (dnf) terminal command.

sudo dnf install \ \

Next, install the following repositories.


Install/Enable the Free Repository (Required)

sudo dnf install$(rpm -E %rhel).noarch.rpm -y

Install/Enable the Non-Free Repository (Optional – Not Required)

sudo dnf install$(rpm -E %rhel).noarch.rpm -y

Now, install the application.

sudo dnf install mpv mpv-libs -y

For users that encounter issues, you likely forgot to import EPEL or possibly did not enable the CRB repository.

Alternatively, you can confirm the version and installation installed by RPM Fusion by using the following command.

mpv --version

Example output:


mpv 0.34.1 Copyright © 2000-2021 mpv/MPlayer/mplayer2 projects
 built on UNKNOWN
FFmpeg library versions:
   libavutil       57.28.100
   libavcodec      59.37.100
   libavformat     59.27.100
   libswscale      6.7.100
   libavfilter     8.44.100
   libswresample   4.7.100
FFmpeg version: 5.1.1

Install mpv Media Player – Flatpak Method

The second option is to use the Flatpak package manager. Flatpak is installed natively on Rocky Linux, so the installation should be straightforward.

First, re-install the Flatpak manager if it was removed previously.

sudo dnf install flatpak -y

For users re-installing Flatpak, it is often recommended to reboot your system. Failure to do this can occur with odd issues, such as paths not being generated for icons.

sudo reboot



Next, you need to enable Flatpack using the following command in your terminal.

sudo flatpak remote-add --if-not-exists flathub

Now install the software using the following flatpak command.


flatpak install flathub io.mpv.Mpv -y

How to Launch mpv Media Player

Launching can be done in a few ways now that you have the software installed.

First, in your terminal, you can use the media player using the cli commands; the primary function is the following command.

mpv [options] [url|path/]filename

For more information, use the following command.

mpv --list-options

Alternatively, Flatpak users will need to launch using the command below from a terminal instance.

flatpak run io.mpv.Mpv

However, this is not practical, and you would use the following path on your desktop.

Activities (Top-left hand corner) > Show Applications > mpv Media Player.



How to Install mpv Media Player on Rocky Linux 9

You can open or drag/copy URLs such as Youtube directly into the mpv Media Player window for desktop users.


How to Install mpv Media Player on Rocky Linux 9

Once done, your selection can play.


How to Install mpv Media Player on Rocky Linux 9

For more information, visit the mpv manual.


How to Update/Upgrade mpv Media Player

Depending on the method of installation used, the following commands can be used to update.

DNF Update Method

sudo dnf update --refresh

Flatpak Update Method

flatpak update

I highly recommend using your terminal to run updates for newer users; even if you have set up auto-notifications/auto-updates using desktop GUI methods, the command line terminal is an excellent way to audit to ensure your system is up-to-date.


How to Remove (Uninstall) mpv Media Player

Use one of the following commands to suit the original installation method for users who no longer require the application.

DNF Remove Method

sudo dnf autoremove mpv libmpv1 -y

For users that installed the other repositories from Rob Savory, I would suggest keeping them as he constantly maintains them if you are using any other installations from his PPAs.

Flatpak Remove Method

flatpak uninstall --delete-data io.mpv.Mpv

Next, run the following command for any leftover clean-up.

flatpak remove --unused

Comments and Conclusion

MPV is an impressive video player that can play various codecs and input types. It offers excellent playback control options, making it easy to get the most out of your videos. If you’re looking for a versatile media player that can handle just about anything you throw at it, MPV is well worth checking out.


Share on: