How to Setup Mpv Video Player
Why MPV and not VLC?
VLC is almost trash because, it:
- Uses the wrong matrix for RGB conversion (colors shown are wrong)
- Introduces strong banding
- Wrong chroma location
- Deinterlacing is broken
- Subtitle render is pretty old and breaks in heavy typesetting situations (in short, it shits when it comes to good anime subs)
- Stops to build font cache at the start of each file with new fonts (we’ve seen it, right?).
- It corrupts the video decoding if it takes too long to decode a single frame. Other players just skip the frame.
Comparison:
Alright, now that VLC is out of the scene. Let’s see how to set up MPV.
If it’s your first time, MPV might seem a bit complex. It has a minimalistic GUI (it isn’t a GUI, technically).
It is mainly controlled with a keyboard. But good people have made some modified versions of MPV, which can be beginner-friendly, giving a “VLC” like interface.
Because I will be talking about the OG one, I won’t go into much details about the other MPV mods, but here are the links to a few good ones you can try if you don’t want to go ahead with a bit of effort setting it up. But trust me, it’s worth it.
- Mpv.net - https://github.com/stax76/mpv.net
- Mpv easy player - https://github.com/422658476/MPV-EASY-Player
- Mpc-qt - https://github.com/mpc-qt/mpc-qt
Getting started with our MPV
Instructions here are for the Windows platform. For Mac or Linux, they shouldn’t be too different.
- First of all, go to mpv.io to download mpv.
- In the Windows section, there are many builds given - third parties make them.
- I use Shinchiro’s build from Sourceforge. It’s easier to update, and I haven’t tried others.
- Download the latest zip file according to your architecture (32-bit or 64-bit).
- Extract the zip file (you’ll need 7zip for that).
- We’ll call this folder just extracted as
mpv-root
.
Now, you can run your video files with mpv.exe.
There is no “installation” here. However, to make life easier, there’s a script inside the mpv-root >> installer >> install.bat / mpv-install.bat
.
Run this file with admin privileges, and it will associate the file types with mpv. And you’re done. Right-click on any video file and open it with mpv.
Controlling MPV
MPV is majorly controlled with the keyboard bindings, which you can change as per your needs.
A map of default key bindings can be found in mpv-root >> doc >> mpbindings.png
.
I suggest keeping this image handy on your desktop; it’ll be much easier to find the key bindings whenever needed, and you’ll learn them quickly.
Configuring MPV
You can configure your mpv with two config files:
- Mpv.conf (configures the core mpv)
- Input.conf (configures the custom keybindings)
I haven’t used input.conf much, because default bindings are fine for me.
To use them, create a sub-directory named _ “portable_config”_ (exact name) in the mpv-root
directory. Inside _ “portable_config”_ create two files - mpv.conf
and input.conf
.
Now, there are many options you can set in your mpv.conf
to tailor it to your needs; even I don’t know all of them, I’ll just paste my conf file with comments and link to a few good confs so you can set the options as you want them.
My config:
|
|
Links to some other good configs:
- https://github.com/DeadNews/mpv-config/blob/main/mpv.conf
- https://github.com/LightArrowsEXE/dotfiles/blob/master/mpv/.config/mpv/mpv.conf
Extending functionality with scripts
You can extend the functionality of mpv with scripts that are written in .lua
.
To use a script, there might be some specific instructions on the developer’s page. But if it’s not mentioned, get the .lua
file and place it in the mpv-root >> portable_config >> scripts
directory and reopen your mpv.
I’ll share the two scripts I use myself and what they do. A comprehensive list can be found easily by googling “mpv player scripts” and going to the GitHub pages.
- Autoload.lua – It loads all the files in your current playing video directory into mpv like a playlist.
- History-bookmark.lua - This script helps you to create a history file
.mpv.history
in the video folder. The next time you want to continue to watch it, you can open any videos in the folder. The script will lead you to the video played last time. It is like the continue-watching feature. Take a look at the mpv-scripts GitHub repo for details.
Updating mpv
To update your mpv player, run the file mpv-root >> updater.bat
with administrative privileges. It’ll fetch the latest package from github and update it.
Other guides:
- https://kokomins.wordpress.com/2019/10/14/mpv-config-guide/
- https://iamscum.wordpress.com/guides/videoplayback-guide/
Handy Resources
- MPV keybindings image path:
mpv-root/doc/mpbindings.png
- MPV manual:
mpv-root/doc/manual.pdf
- Online version of manual: https://mpv.io/manual/stable/