How to Scale mpv UI on High-DPI Screens?
Configuring the mpv media player to scale its user interface
automatically on high-DPI displays ensures that text, menus, and the
On-Screen Controller (OSC) remain legible and proportional. Because mpv
relies heavily on configuration files rather than traditional graphical
menus, enabling high-DPI scaling requires adding specific commands to
your configuration file or adjusting environment variables depending on
your operating system. This guide covers how to set up automatic scaling
for mpv using the mpv.conf file, adjust the On-Screen
Controller size, and troubleshoot common cross-platform scaling issues
on Windows, macOS, and Linux.
Step 1: Enable High-DPI Scaling in the Configuration File
By default, mpv attempts to respect system scaling settings, but you
can explicitly force it to scale the user interface and video output
correctly by editing your mpv.conf file.
- Locate or create your
mpv.conffile:
- Windows:
%APPDATA%\mpv\mpv.conf - Linux/macOS:
~/.config/mpv/mpv.conf
- Open the file in a text editor and add the following line to ensure the window interacts correctly with high-res displays:
hidpi-window-scale=yes
This option tells mpv to scale the window size according to the backing scale factor of your high-DPI monitor, preventing the player from looking microscopic on 4K or 8K screens.
Step 2: Scale the On-Screen Controller (OSC)
Even with window scaling enabled, the On-Screen Controller (the play/pause timeline overlay) might still appear too small. You can independently scale the interface elements using OSC script options.
Add these lines to your mpv.conf to scale the control
bar:
script-opts-append=osc-scalewindow=yes
script-opts-append=osc-vidscale=no
osc-scalewindow=yes: Scales the OSC together with the window size, which is ideal for high-DPI setups.osc-vidscale=no: Prevents the OSC from changing size drastically when you resize the window manually, keeping the interface consistent.
Alternatively, if you want to force a specific, static size
multiplier for the interface overlay, you can use the
osc-scale parameter:
script-opts-append=osc-scale=1.5
Step 3: Platform-Specific Adjustments
If the configuration file tweaks do not fully resolve the scaling issue, your operating system’s display server might be overriding mpv.
Linux (Wayland and X11)
On Linux desktop environments like GNOME or KDE Plasma, mpv scales best natively under Wayland. If you are using X11 or experiencing scaling friction, you can force the GUI backend scale by launching mpv with specific environment variables.
For Qt-based wrappers or front-ends of mpv, or to force GDK scaling, use:
export GDK_SCALE=2
export QT_SCALE_FACTOR=2Windows
Windows sometimes applies generic application stretching which can blur the text inside mpv. To fix this behavior:
- Right-click the
mpv.exeexecutable and select Properties. - Navigate to the Compatibility tab.
- Click Change high DPI settings.
- Check Override high DPI scaling behavior and set the drop-down menu to Application.