Mpv

mpv is a free, open source, and cross-platform media player. It is based on mplayer2, which in turn is based on the original MPlayer. Many changes have been made, a large part of which is incompatible or completely changes how the player behaves. Although there are still many similarities to its ancestors, mpv should generally be treated as a completely different program.

USE flags
Default USE configuration provides the following core features: CLI player, X11 support, audio and video playback, On-Screen Display (OSD) and On-Screen Controller (OSC), and Lua scripting support.

Hardware decoding is often desired. mpv supports both VAAPI and VDPAU hardware decoding APIs via  and   USE flags respectively. You need to manually enable the API supported by your hardware.

For a complete set of supported features please refer to the list of available USE flags below.

Additional software
Install to directly play URLs from YouTube and other popular streaming websites:

Install to get a GUI frontend:

Configuration
mpv doesn't require any configuration after installation. However, almost all aspects of the default behaviour can be changed. Two most important parts of the configuration are player settings and key bindings. Both are briefly discussed below.

Player settings
Player settings should be put into file using the INI syntax, i.e. option=value. Everything after a # is considered a comment.

Most command line options can be player settings. The equivalent of --option=value command line argument is option=value setting, where value can contain suboptions or be a quoted string. Options that work without values can be enabled by setting them to yes and disabled by setting them to no.

To ease working with different configurations, profiles can be defined in the configuration file. A profile starts with its name in square brackets, e.g. [my-profile]. All following options will be part of this profile. To end the profile, start another one or use the profile name default</tt> to continue with normal options.

For a complete list of available options please refer to [//mpv.io/manual/stable/#options the manual].

Key bindings
Key bindings should be put into file. The syntax is  </tt>. Everything after a #</tt> is considered a comment. To bind commands to the #</tt> key use SHARP</tt>.

For a complete list of available commands please refer to [//mpv.io/manual/stable/#list-of-input-commands the manual].

Examples
Advanced real-world configurations from mpv contributors: [//github.com/pigoz/dotfiles/tree/master/mpv], [//github.com/Argon-/mpv-config].

Lua scripts
Core mpv functionality can be extended with Lua scripts. All scripts from directory are loaded automatically. Alternatively you can load a script manually using command line, e.g. --script=/path/to/your/script.lua</tt>.

Several Lua scripts are shipped with mpv and installed into directory. Upstream wiki also has an extensive list of 3rd party scripts: [//github.com/mpv-player/mpv/wiki/User-Scripts].

Troubleshooting
If you ran into any problems, make sure you've enabled verbose logging via  command line option.

Broken playback/crashes after updating FFmpeg/Libav/libass/etc.
TLDR: report a Gentoo bug, then rebuild mpv.

FFmpeg/Libav/libass are all known to introduce from time to time incompatible, ABI-breaking changes between minor releases. More often than not SLOTs of these libraries remain the same between minor releases, i.e. an automatic mpv rebuild isn't triggered. This causes problems with mpv compiled against previous versions of these libraries. These problems vary from features becoming broken to sudden crashes.

Upstream's answer in such cases is similar to it's not our problem that other people can't maintain proper ABI-compatibility, rebuild mpv. Please first report a Gentoo bug to notify maintainers about the existing breakage, then rebuild mpv.

'mpv was compiled against a different version of FFmpeg/Libav...' message
If you don't have any problems with mpv, you can safely ignore this message. Otherwise, please follow these instructions.

Broken hardware decoding/high CPU usage
Unfortunately, sometimes mpv fails to enable hardware decoding. Usually it says so in the log. First of all check the log to see if there are any messages regarding broken hardware acceleration.

There are several things you can try to solve this problem:
 * Install the latest available mpv version in tree or even live ebuild.
 * Enable copy-back for your hardware decoder via  (not available on some GPUs).
 * Intel GPUs only: use modesetting</tt> driver from.
 * Intel GPUs only: use vaapi</tt> output via.
 * Use xv</tt> output via.

If none of the above helped, please report a Gentoo bug.