Home

Awesome

This repo contains user shaders for prescaling in mpv.

For the scripts generating these user shaders, check the source branch.

Shaders in gather/ directory and compute/ directory are generally faster, and are thus recommended to try and use first.

If you are using an old graphics card (or somehow broken GPU driver), and shaders in none of above directories works. Shaders in root folder are safe fallback option with minimal requirement for GPU driver or OpenGL version.

If you are using --vo=gpu along with --gpu-api=d3d11 and encountered the following error:

[vo/gpu] Unrecognized/unavailable FORMAT name: 'rgba16f'!

You can either switch to --vo=gpu-next (libplacebo required) or find shaders with rgba16hf format here.

Usage

You only need to download shaders you actually use. Shaders should be downloaded in raw text format, just click the "Raw" (or "Download raw file") button on the upper right corner for each shader. The following part of this section assumes that they are in shaders directory in the mpv configure folder (usually ~/.config/mpv/shaders on Linux).

Use --glsl-shader option to load those shaders.

glsl-shader="~~/shaders/ravu-lite-ar-r3.hook"

For nnedi3 prescaler, neurons and window settings are indicated in the filename.

For ravu prescaler, radius setting is indicated in the filename.

About RAVU

RAVU (Rapid and Accurate Video Upscaling) is a set of prescalers inspired by RAISR (Rapid and Accurate Image Super Resolution). It comes with different variants to fit different scenarios.

ravu and ravu-lite upscale only luma plane (of a YUV video), which means chroma planes will be handled by --cscale later. ravu-lite is faster and sharper. It also introduces no half pixel offset.

ravu-yuv and ravu-rgb upscale video after all planes are merged. This happens after --cscale (or other chroma prescaler) is applied. ravu-yuv assumes YUV video and will fail on others (for example, PNG picture).

ravu-zoom is another variant which is able to upscale video to arbitrary ratio directly (i.e. a drop-in replacement of --scale). Its sharpness is close to ravu-lite. But it renders at target resolution, so expect it to be much slower than ravu and ravu-lite for perfect 2x upscaling.

ravu-lite-ar and ravu-zoom-ar uses anti-ringing filter (of EWA scalers) from libplacebo to reduce ringing artifacts. The default anti-ringing strength in master branch is set to 0.8. These shaders are the recommended ones to use, especially for footages with sharp edge and details.

License

Shaders in this repo are licensed under terms of LGPLv3. Check the header of each file for details.