- Home
- Packages
- Forums
- Wiki
- Bugs
- AUR
- Download

# Mpv

From ArchWiki

From the development page:

  Movie player based on MPlayer and mplayer2. It supports a wide variety of video file formats, audio and video codecs, and subtitle types. If you are wondering what's different from mplayer2 and MPlayer you can read more about the changes.

## Installation

Install mpv from the official repositories or mpv-git from the AUR. Alternatively install cmplayer or cmplayer-git Qt5 frontend which provides its own mpv.

## Configuration

System-wide configuration is located in `/etc/mpv/mpv.conf`, whereas the user-local settings are stored in `~/.mpv/config`. The complete list of options is located here.

Tip: If you prefer a custom location for configurations, set the `MPV_HOME` variable as you like in your shell configuration file. A predictable choice is `MPV_HOME=$XDG_CONFIG_HOME/mpv`.

An example configuration:

    # default configuration that applies to every file
    [default]

    # use X11 for video output, use a wayland and framebuffer as fallbacks
    vo=xv,wayland,directfb

    # use alsa for audio output, choose oss4 as fallback
    ao=alsa,oss

    # multithreaded decoding of H264/MPEG-1/2 (valid: 0-16)
    vd-lavc-threads=2

    # prefer using six channels audio
    channels=6

    # scale the subtitles to the 3% of the screen size
    sub-scale=3

    # set the window title using the media filename, when not set with --title.
    title="${filename}"

    # add black borders so the movies have the same aspect ratio of the monitor
    # for wide screen monitors
    vf=expand=::::1:16/9:16

    # for non wide screen traditional monitors, alternative to the above item
    #vf=expand=::::1:4/3:16

    # disable screensaver
    stop-screensaver="yes"

    # execute a command every 30 seconds
    # useful to disable a non-standard-compliant screensavers and to work around buggy behaviours
    # BE WARNED: to avoid dangerous commands is your responsibility
    #heartbeat-cmd="xscreensaver-command -deactivate &" # stop xscreensaver

    # custom heartbeat frequency in seconds
    #heartbeat-interval=600

    # correct pitch when speed is faster or slower than 1.0
    af=scaletempo

    # allow to seek in a file which is still downloading whilst watching it
    idx=yes

    # allow to increase the maximal volume to 600%
    #softvol-max=600

    # skip displaying some frames to maintain A/V sync on slow systems
    framedrop=yes

    # more intense frame dropping (breaks decoding)
    #framedrop=hard

    # profile for up-mixing two channels audio to six channels
    # use -profile 2chto6ch to activate
    [2chto6ch]
    af-add=pan=6:1:0:.4:0:.6:2:0:1:0:.4:.6:2

    # profile to down-mixing six channels audio to two channels
    # use -profile 6chto2ch to activate
    [6chto2ch]
    af-add=pan=2:0.7:0:0:0.7:0.5:0:0:0.5:0.6:0.6:0:0

See another example at https://github.com/mpv-player/mpv/blob/master/etc/example.conf.

## Enable VDPAU

You can speed up the player using the GPU VDPAU API. The procedure is the same of MPlayer.

## Key bindings

System key bindings are configured via `/etc/mpv/input.conf`. Personal key bindings are stored in `~/.mpv/input.conf`. Available keybinds and configuration are explained in the manual pages.

### Automatic resuming from where you left off

The default key to quit saving the video advance state is `Q`. This behaviour is controlled by the `quit_watch_later` string in the key bindings configuration file.

### Quick aspect ratio change

Append to your `input.conf`:

    F1 set aspect 1.3333
    F2 set aspect 1.6
    F3 set aspect 1.7777
    F4 set aspect 1.85
    F5 set aspect 0

Now you are able to change the aspect ratio with `F1` to `F5`.

Retrieved from "https://wiki.archlinux.org/index.php?title=Mpv&oldid=280084"
Category:

- Player

## Navigation menu