Wrong scaling with different monitor dpi settings on Windows
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 37k
- Forks
- 3.5k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 22
Description
Important Information
- mpv version - mpv-x86_64-v3-20221030-git-f594482
- Windows Version - Microsoft Windows 10 Pro Version 10.0.19045 Build 19045
- Source of the mpv binary - Windows builds by shinchiro @ https://sourceforge.net/projects/mpv-player-windows/files
Reproduction steps
Setup:
- screen 0 (default) = dpi 125% (120)
- screen 1 = dpi 100% (96)
Screen 0 is the internal laptop screen (resolution 2256x1504 px) and screen 1 is an external 4k TV (3840x2160 px).
The goal is to play a video on screen 1 via batch with a window-scaling of 1 (100%). Test picture (3840x1080px) is attached.
mpv --log-file=log.txt --no-config --screen=1 --loop-playlist --no-osc --no-osd-bar --no-border "Test.png"
Expected behavior
Test picture is shown on screen 1 with a resolution of 3840x1080px and scaling of 1 (100%).
Actual behavior
Test picture is shown on screen 1 with a resolution of 3072:864px and scaling of 0.8 (80%).
Note 1: If the laptop screen 0 is closed, the same script runs OK with a resolution of 3840x1080px and scaling of 1 (100%).
Note 2: If the laptop screen 0 DPI is set to 100% (96) the same script runs OK as well.
Note 3: I have tried "--no-hidpi-window-scale" but the symptom doesn't change.
Per the log, it looks like mpv starts with the DPI setting of screen 0 (120) with the intended resolution and then changes to the DPI of screen 1 (96) with a downscale to 80%.
Log file
log_NOK.txt
This log was produced with both screens active and the command being started from screen 0. The DPI changes from 120 to 96 and the final video scale is 0.8.
log_OK.txt
This log was produced with screen 0 inactive (laptop lid closed) and the command being started from screen 1. The DPI stays at 96 and the final video scale is 1.
Sample files

Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the Windows setup with the supplied mpv command, comparing log_NOK.txt and log_OK.txt and checking the effect of --no-hidpi-window-scale. Trace the Windows DPI and window-scaling path until the monitor-specific scale is identified; done means the external 100% DPI screen displays the 3840x1080 image at 100% scaling while both monitors are active.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100