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.

  1. Locate or create your mpv.conf file:
  1. 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

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=2

Windows

Windows sometimes applies generic application stretching which can blur the text inside mpv. To fix this behavior:

  1. Right-click the mpv.exe executable and select Properties.
  2. Navigate to the Compatibility tab.
  3. Click Change high DPI settings.
  4. Check Override high DPI scaling behavior and set the drop-down menu to Application.