MPV, elite video player

If MPV is a modern and fast video player, it’s not really accessible at first. That’s why here I want to share my tips on how to approach de the beast.

MPV

MPV is a fast, hardware accelerated video player, just check the scrub speed to be convinced.

website : https://mpv.io/

Installation

On linux, sudo apt install mpv in terminal should do the trick.

On Windows/Mac get install on this page: https://mpv.io/installation/

Not so user friendly

First opening you’ll see that it’s minimalist, a bit too much when not familiar.
Example, by default the player close when video reach the end. That usually throw off users.

We’re gonna change that, and more

Configuration

Details can be found in official doc

Here is a quick command line fix for aformentioned auto close:

Open a terminal and enter the following

linux Config

1
2
mkdir ~/.config/mpv
echo keep-open=yes >> ~/.config/mpv/mpv.conf

If you prefer it to loop

1
echo loop=yes >> ~/.config/mpv/mpv.conf

Windows Config

Same on Windows

mkdir %APPDATA%\mpv
echo loop=yes >> %APPDATA%\mpv\mpv.conf
echo keep-open=yes >> %APPDATA%\mpv\mpv.conf

Windows Note: if you create a portable_config aside mpv.exe, this config will be loaded.

an example of config file exists in doc folder (C:\Program Files\MPV\doc\mpv.conf) You can copy it to create or replace %APPDATA%\mpv\mpv.conf and uncomment line that are of interest to you

Here are some config lines I have added for myself

# don't allow a new window to have a size larger than 90% of the screen size
autofit-larger=90%x90%

# Display prefered subtitles if available. (Here english then fallback to fr)
slang=eng,English,en,en-US,US,French,fr,fre

# change scale of subtitle
sub-scale=0.8

# high quality video preset
profile=gpu-hq

Shortcuts

I find native shortcuts not so intuitive, but we can get use to it Here is a list of those I find most usefull

  • ← / → : backward/forward 5 seconds

  • Shift + ← / → : backward/forward 1 second

  • < / > (qwerty) : frame before / after

  • S : Screenshot

  • L : Loop, set a A-B with cyclic pushes (A > B > cancel loop)

  • Shift + L : Loop on whole video.

  • Shift + Q: exit with resume at current time on next open.

Subtitles

  • J / Shift+ J : Change subs

  • R / T : Gu Up / Down

  • Z / X : time offset

Other shortcuts here

Shortcuts configuration

They can be changed with input.conf
Same as mpv.conf, a prefilled template is available in doc.

Edit and place in you configuration file

Example, some user prefer to have frame by frame on arrows instead of 5 second move

To invert here is the input.conf

# invert frame step and seek
RIGHT frame-step     # advance one frame and pause
LEFT frame-back-step # back one frame and pause

. seek  5            # five second forward
,  seek -5           # five second backward

For my fellow French users that kept their azerty (not too late to change) you can map b/n, not used by anything by default.

n frame-step      # advance one frame and pause
b frame-back-step # back one frame and pause

Advanced use: Scripts

MPV use LUA as scripting language.

Here are two scripts I customised for my use to extract fragment of video while watching:

You just have to create a scritps folder in your configuration folder and place donwloaded .lua files.

User jonniek has good scripts in store
Example the one that load prev/next file in video directory

You’re free to personalise the experience