woman in black shirt taking selfie

I am a devoted anime fan and usually spend most of my free time picking up a new season and binge-watching it in its entirety. Since most anime seasons cap out at 1080p, the viewing experience leaves much to be desired at higher resolutions, such as 2K and above. Colors and lines get banded and distorted during the native upscaling performed by your system or monitor.

MPV is an open-source video player, just like VLC, PotPlayer, etc. It has a huge amount of customization options allowing you to finetune your multimedia experience.

In this short guide, we’ll set up a custom MPV configuration to drastically enhance your anime experience. Let’s get started!


Installing MPV

MPV can be downloaded from this link:

Most windows users will need to click on the link following Windows builds by shinchiro. Other platform users can check the installation details on the link above. If you use Chocolatey Package Manager on Windows (like me), you can fire up a Powershell Terminal with administrative privileges and run the following command:

choco install mpv

Once installation completes, try playing a video to verify everything works fine.

Locating your MPV configuration directory

The location of your configuration directory depends on the platform (or operating system) you’re using. Check out this link to see what directory you need to use.

  • On Windows, the directory is C:Users<Username>AppDataRoamingmpv.
  • On Linux/macOS, the directory is ~/.config/mpv.

Create an empty mpv.conf file inside the configuration directory. If such a file already exists, back it up and delete it.

It’s finally time to create our own custom configuration.

The basic pieces

We’ll start by enabling a high-quality rendering profile. This improves the quality of all follow-up configurations we’ll apply. This requires a pretty modern GPU. Anything with a minimum performance above or equal to Intel Iris, AMD VEGA 8, or NVIDIA MX150 will work fine. Add the following line to the top of the configuration file:

profile=gpu-hq

Next, we’ll override default language selection to always prefer Japanese for audio and English for subtitles. Feel free to adjust this to your preference.

alang = 'jpn,jp,eng,en'
slang = 'eng,en,enUS'

Just some more cosmetic changes! The following configuration sets the default screen size, fonts used in OSD, and timeout.

autofit-larger=1920x1080 # Set max window size.
autofit-smaller=858x480 # Set min window size.

no-osd-bar # Hide OSD bar when seeking.
osd-duration=500 # Hide OSD text after x ms.
osd-font='Trebuchet MS'

Tackling Banding

Banding is a very common video artifact. To understand it, take the following image as an example:

https://www.youtube.com/watch?v=rWAp7E6OLok

The image on the right shows a smooth transition of colors from purple to pink. Applying a compression algorithm introduces a band of colors that no longer represents the source image. Such algorithms basically quantize a large range of colors into smaller bins to save space at the expense of image quality.

Add the following configuration to apply a deband filter.  You might need to adjust them a little, such as increase iterations, threshold, and grain for web sources such as Crunchyroll or extremely poor encodes.

deband=yes # Default values are 1:64:16:48
deband-iterations=4 # Range 1-16. Higher = better quality but more GPU usage. >5 is redundant.
deband-threshold=50 # Range 0-4096. Deband strength.
deband-range=20 # Range 1-64. Range of deband. Too high may destroy details.
deband-grain=5 # Range 0-4096. Inject grain to cover up bad banding, higher value needed for poor sources.

Lastly, we’ll apply a dithering filter. Dithering adds color depth to a picture to minimize noise and quantization errors, such as from banding. This setting is a must for anime!

dither-depth=auto

Upscaling Video Resolution

MPV comes built-in with default upscalers and downscalers such as spline, bilinear, mitchell, etc. These get automatically enabled with the GPU profile setting and should be more than enough for most users on laptops. However, there are plenty of third-party algorithms specialized for anime. While it is impossible to cover all of them, I’ll cover my favorite one; Anime4K.

A short disclaimer; Anime 4K uses a lot of GPU and is destructive in some scenes. It’s more of a personal preference than being a defacto standard for all anime.

Visit this link and grab the latest release available. At the time of this post, the latest stable release was v3.2.

Extract the downloaded archive inside the MPV configuration directory. I’ll assume that your folder structure is anime4k/*.glsl.

Now, add the following configuration inside the mpv.conf file. This will enable:

  • Clamp Highlights: To reduce noise and prevent ringing
  • Restore CNN: To improve the perceptual quality
  • Darker/Thin: To improve lines
  • Upscale: To upscale source to a maximum of 4K resolution
glsl-shaders="~~/anime4k/Anime4K_Clamp_Highlights.glsl;~~/anime4k/Anime4K_Restore_CNN_Moderate_L.glsl;~~/anime4k/Anime4K_Darken_HQ.glsl;~~/anime4k/Anime4K_Thin_HQ.glsl;~~/anime4k/Anime4K_Upscale_Denoise_CNN_x2_L.glsl;~~/anime4k/Anime4K_Restore_CNN_Moderate_L.glsl"

It is now time to save the configuration file and check the results!

Side-by-side Comparisons

The images might take some time to load since they are high-quality PNG files.

Conclusion

There is so much more we can customize, for example adding a chroma upsampler, adding hotkeys, etc. However, for this post, I hope that applying these changes made your anime experience more enjoyable and exciting.

Have a great day!

Leave a Reply

Your email address will not be published. Required fields are marked *