Mpv

mpv is a free and open source command-line 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 video 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 normally 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 can contain suboptions or be a quoted string. Options that work without values can be enabled by setting them to and disabled by setting them to.

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. . All following options will be part of this profile. To end the profile, start another one or use the profile name 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. Everything after a is considered a comment. To bind commands to the key use.

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.

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].

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. Usually 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 broken pieces of functionality to sudden crashes.

Upstream's answer in such cases is similar to it's not our problem that others 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...' message
If you don't have any problems with mpv, you can safely ignore this message. Otherwise, please follow these instructions.

Broken hardware video decoding/high CPU usage
Sometimes mpv fails to enable hardware video decoding due to various reasons. Always consult mpv log for any problems regarding hardware decoding.

Firstly, make sure that your hardware supports the required video codec. The list of codecs supported by your GPU is available via  and   commands for VAAPI and VDPAU decoding APIs respectively. The codec used in your video is available in mpv log.

Secondly, make sure that you have the latest non-live (not 9999) mpv version available in tree. If update to the latest version solves your problem, please report a Gentoo bug.

Now there are several things you can try to solve this problem:
 * Enable copy-back for your hardware decoder via  (not available on some GPUs).
 * Intel GPUs only: use output via   with   or.
 * Intel GPUs only: use Xorg driver from.
 * Enable dumb-mode for output via.
 * Use output via.

Tearing
[//en.wikipedia.org/wiki/Screen_tearing Tearing] is a video playback defect when displayed objects aren't properly lined up horizontally. Please refer to [//github.com/mpv-player/mpv/wiki/FAQ#Tearing the upstream FAQ].

Feature X is broken/not available with Libav
Quote from upstream: Libav is basically unsupported by mpv, except it still sort of compiles and many things work [//github.com/mpv-player/mpv/issues/3923#issuecomment-268120303]. Patches are welcome for any issues regarding Libav.