How to Change Upsampling Scaling in mpv?
Choosing the right upsampling scaling algorithm in mpv is crucial for maximizing video playback quality, especially when watching lower-resolution content on a high-resolution display. This article provides a quick overview of how mpv handles video scaling, identifies the specific configuration settings responsible for upsampling, and explains how to customize them for optimal performance. You will learn the differences between the core scaling options and how to apply them directly to your configuration file.
The Core Scaling Settings in mpv
In mpv, video scaling is divided into three distinct stages:
upsampling the video frames, downsampling the video frames, and
processing color (chroma) information. To control the scaling algorithm
specifically for upsampling, you need to use the
scale configuration setting.
Here are the three primary options you can configure in your
mpv.conf file:
scale: Controls the upscale (upsampling) algorithm. This is used when the video resolution is lower than your screen resolution.dscale: Controls the downscale (downsampling) algorithm, used when the video resolution is higher than your screen resolution.cscale: Controls the chroma (color information) upscale algorithm, which affects how color planes are resized.
How to Configure the Upsampling Algorithm
To change the upsampling algorithm, you must add the
scale option followed by your desired filter into your
mpv.conf file.
For example, to set the upsampling algorithm to Lanczos, you would add the following line:
scale=lanczos
Popular Upsampling Filters in mpv
Depending on your hardware capabilities and visual preferences, mpv offers several built-in scaling filters.
bilinear: Extremely lightweight and fast, but offers the lowest visual quality. It can result in a blurry image.spline36: A great, well-rounded default option. It provides mid-to-high quality scaling with relatively low performance cost.lanczos: A popular high-quality filter that offers sharp details, though it can occasionally introduce slight ringing artifacts around sharp edges.ewan_lanzcos: A modified version of Lanczos that reduces ringing, often preferred by videophiles using high-end hardware.
If you are using the high-quality playback profile
(profile=high-quality), mpv defaults to
spline36 for its upsampling algorithm, strikes an excellent
balance between performance and sharpness.