Language: EN

reproductor-mpv-en-raspberry-pi

How to Use the MPV Player on Raspberry Pi

MPV is an open-source media player that allows you to play a wide variety of audio and video formats, and is specifically designed to run from the command line.

Based on the old MPlayer and mplayer2, MPV offers a wide range of features, support for multiple formats and a very simple interface, just an overlay that shows information.

It is known for its ability to handle streams, its support for subtitles, and its advanced configuration that makes it ideal for users looking for detailed control over media playback.

mpv-screenshot

Some of its main features are,

  • Command-line interface: Allows precise control through commands and configurable options.
  • Support for multiple formats: Plays audio and video file formats without the need for additional codecs.
  • Subtitle support: Handles various subtitle formats and allows synchronization and adjustment.
  • Advanced configuration: Offers extensive options to adjust video quality, audio, and other parameters.

Installing MPV on Raspberry Pi

To start using MPV on our Raspberry Pi, we first need to install it. MPV is available in the official Raspberry Pi OS repositories, so the installation is quite straightforward.

First, we open a terminal and update the system packages to ensure we have the latest version of MPV available:

sudo apt update

Then, we install MPV using the following command:

sudo apt install mpv

Once installed, we check the MPV version to ensure the installation was successful:

mpv --version

Basic Usage of MPV

MPV is primarily controlled through the command line. To play a video or audio file, use the following command:

mpv file_name.ext

For example, to play a video named video.mp4, you would use:

mpv video.mp4

MPV can also play videos directly from a URL. For example:

mpv http://example.com/video.mp4

Controlling Playback

MPV offers several control options that you can use while a file is playing. Here are some examples of basic controls:

ActionCommand/Shortcut
Play/PauseSpace
Stopq or Esc
Increase volume+ or Up (up arrow)
Mute/Unmutem
Decrease volume- or Down (down arrow)
Skip forward 10 seconds (right arrow)
Rewind 10 seconds (left arrow)
Go to a specific timet (then enter the time)
Full screenf
Window modeShift+f
Show/Hide control bart
Show/Hide track informationi
Capture an image (screenshot)s

These are just a few of the basic commands, but MPV has many additional options and settings that you can explore.

You can consult the official documentation for more details on all available commands and configurations.

Quality and Aspect Settings

You can adjust video quality and other parameters using options in the command line. Here are some examples:

Adjust video quality:

mpv --vf=scale=1280:720 video.mp4

This scales the video to a resolution of 1280x720.

Set a network bandwidth limit:

mpv --limit-rate=1M http://example.com/stream.mp4

This limits the bandwidth of the stream to 1 MB/s.