Wrong resolutions with multiple monitors
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 37k
- Forks
- 3.5k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 22
Description
- mpv version: tested release 0.34 and master mpv-x86_64-20220717 (both same bug)
- Windows Version: Windows 11 (latest updates until 22020708)
- Source of the mpv binary: sourceforce
- If known which version of mpv introduced the problem: Not known
- Possible screenshot or video of visual glitches: NA
Reproduction steps
The problem is following:
- I open a random 4k video from Windows command prompt (https://www.youtube.com/watch?v=13ak62OpE7k):
(I have downloaded this video in 4k mp4 format and renamed the local copy as testi.mp4)
Monitor 1: LG OLED (4096x2160)
mpv --no-config --screen=1 testi.mp4 --geometry=400 --no-hidpi-window-scale -> real resolution in pixel is about 480
mpv --no-config --screen=1 testi.mp4 --geometry=600 --no-hidpi-window-scale -> real resolution in pixel is 720 x 405
mpv --no-config --screen=1 testi.mp4 --geometry=800 --no-hidpi-window-scale -> real resolution in pixel is 960 x 540
mpv --no-config --screen=1 testi.mp4 --geometry=900 --no-hidpi-window-scale -> real resolution in pixel is 1080 x 608
mpv --no-config --screen=1 testi.mp4 --geometry=1000 --no-hidpi-window-scale -> real resolution in pixel is 1200 x 675
mpv --no-config --screen=1 testi.mp4 --geometry=1100 --no-hidpi-window-scale -> real resolution in pixel is 1319 x 742
mpv --no-config --screen=1 testi.mp4 --geometry=1200 --no-hidpi-window-scale -> real resolution in pixel is 1440 x 810
mpv --no-config --screen=1 testi.mp4 --geometry=1300 --no-hidpi-window-scale -> real resolution in pixel is 1560 x 878
the results are the same with or without --no-hidpi-window-scale
Monitor 2: FullHD monitor (res. 1080x1920 -> portrait mode)
mpv --no-config --screen=2 testi.mp4 --geometry=400 --no-hidpi-window-scale -> real resolution in pixel is about 370
mpv --no-config --screen=2 testi.mp4 --geometry=600 --no-hidpi-window-scale -> real resolution in pixel is 476 x 268
mpv --no-config --screen=2 testi.mp4 --geometry=800 --no-hidpi-window-scale -> real resolution in pixel is 638 x 359
mpv --no-config --screen=2 testi.mp4 --geometry=900 --no-hidpi-window-scale -> real resolution in pixel is 716 x 703
mpv --no-config --screen=2 testi.mp4 --geometry=1000 --no-hidpi-window-scale -> real resolution in pixel is 796 x 448
mpv --no-config --screen=2 testi.mp4 --geometry=1100 --no-hidpi-window-scale -> real resolution in pixel is 844 x 475
mpv --no-config --screen=2 testi.mp4 --geometry=1200 --no-hidpi-window-scale -> real resolution in pixel is 846 x 476
mpv --no-config --screen=2 testi.mp4 --geometry=1300 --no-hidpi-window-scale -> real resolution in pixel is 846 x 476
the results are the same with or without --no-hidpi-window-scale
Monitor 3: 4k monitor (res. 3840x2160)
mpv --no-config --screen=3 testi.mp4 --geometry=400 --no-hidpi-window-scale -> real resolution in pixel is about 400
mpv --no-config --screen=3 testi.mp4 --geometry=600 --no-hidpi-window-scale -> real resolution in pixel is 599 x 337
mpv --no-config --screen=3 testi.mp4 --geometry=800 --no-hidpi-window-scale -> real resolution in pixel is 800 x 450
mpv --no-config --screen=3 testi.mp4 --geometry=900 --no-hidpi-window-scale -> real resolution in pixel is 899 x 506
mpv --no-config --screen=3 testi.mp4 --geometry=1000 --no-hidpi-window-scale -> real resolution in pixel is 999 x 562
mpv --no-config --screen=3 testi.mp4 --geometry=1100 --no-hidpi-window-scale -> real resolution in pixel is 1098 x 618
mpv --no-config --screen=3 testi.mp4 --geometry=1200 --no-hidpi-window-scale -> real resolution in pixel is 1200 x 675
mpv --no-config --screen=3 testi.mp4 --geometry=1300 --no-hidpi-window-scale -> real resolution in pixel is 1299 x 731
the results are the same with or without --no-hidpi-window-scale
The resolutions on screens are not the right ones in monitor 1 and 2. A bug in the software.
The result is the same in all videos in every resolution (at least with mp4 which I tested).
And in the monitor 2 the max resolution is 850 even thou it should be 1080.
Resolutions above have got using 'i' of the MPV window.
And here comes the funny part: When I open the video with monitor 1 and drag the window to monitor 2 the resolution change!
--geometry=1000 / Monitor1: 1200x675 -> only drag to Monitor2: 796x448 (same as directly to monitor2)
--geometry=1100 / Monitor1: 1319x472 -> only drag to Monitor2: 876x493 (direcly to Monitor2: 844x475) !
--geometry=1200 / Monitor1: 1440x810 -> only drag to MOnitor2: 958x539 (direcly to Monitor2: 846x476) !
--geometry=1300 / Monitor1: 1560x878 -> only drag to MOnitor2: 1036x583 (direcly to Monitor2: 846x476) !
I can reproduce this anytime.
We discussed about the issue in the #MPV IRC-channel and based on the discussions report this obvious bug.
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
Start by reproducing the listed --screen and --geometry commands on the three monitors, then inspect mpv.log and the window-size reporting behavior. Done means geometry produces correct video dimensions on each monitor and dragging the window between monitors updates those dimensions consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100