How to Setup Custom mpv Shader Directory Windows?
Setting up a custom user shader directory for mpv on Windows allows
you to organize high-quality video scalers, shaders, and post-processing
scripts without cluttering your main configuration folder. By default,
mpv looks for shaders in its home directory, but you can explicitly
define a dedicated folder using the sub-shaders or file
path configurations within your mpv.conf file. This guide
covers how to locate your mpv configuration directory, create a
dedicated shaders folder, place your custom shader files (like Ravu,
FSRCNNX, or Anime4K), and correctly reference them so they load
automatically or via keyboard shortcuts.
Step 1: Locate Your mpv Configuration Directory
Before adding shaders, you need to find where mpv stores its settings on Windows. This depends on how you installed the player:
- Portable Installation (Recommended): If you
extracted mpv into a custom folder (e.g.,
C:\mpv), look for a subfolder namedportable_config. If it does not exist, create it. - Standard Installation: If you used an installer,
your configuration directory is located in your user profile. You can
access it by pressing
Win + R, typing%APPDATA%\mpv\, and hitting Enter.
Step 2: Create the Custom Shaders Folder
To keep your setup organized, create a dedicated folder specifically for your shader files.
- Navigate inside your
portable_configor%APPDATA%\mpv\directory. - Create a new folder and name it
shaders. - Download your desired user shaders (usually ending in
.glsl) and place them directly into this newshadersfolder.
Step 3: Configure mpv to Load the Shaders
To make mpv recognize and apply these shaders, you must update your configuration files. You can choose to load them automatically on startup or map them to a key toggle.
Option A: Load
Shaders Automatically via mpv.conf
Open the mpv.conf file located in your configuration
directory with a text editor like Notepad. Add the path to the shader
using the glsl-shaders property.
For a portable setup, use a relative path:
glsl-shaders="~~/shaders/your_shader_file.glsl"
(Note: The ~~/ macro tells mpv to look inside its
own configuration directory, making the path portable.)
For a standard AppData setup, you can use the absolute path:
glsl-shaders="C:\Users\YourUsername\AppData\Roaming\mpv\shaders\your_shader_file.glsl"
To load multiple shaders at once, separate them with colons (or semicolons on Windows if colons conflict with drive letters):
glsl-shaders="~~/shaders/shader1.glsl;~~/shaders/shader2.glsl"
Option B:
Bind Shaders to a Shortcut via input.conf
If you prefer to toggle shaders on and off while watching a video,
open or create an input.conf file in your configuration
directory and assign a key combination:
CTRL+1 change-list glsl-shaders toggle "~~/shaders/your_shader_file.glsl"
Pressing Ctrl + 1 during playback will now instantly
enable or disable that specific shader.
Step 4: Verify the Setup
To ensure mpv is successfully loading your custom shader directory,
open a video file with mpv and press the i key on your
keyboard to bring up the statistics overlay. Press 2 to
navigate to the active filters and shaders page. If configured
correctly, the names of your custom GLSL shaders will appear listed
under the video filters section.