mpv icon indicating copy to clipboard operation
mpv copied to clipboard

--video-sync=display-* modes have inconsistent heuristics

Open norinoriko opened this issue 10 months ago • 3 comments

Important Information

  • mpv version: v0.38.0-52-ge5d683e1
  • Windows Version: Windows 11
  • Source of the mpv binary: shinchiro repo
  • If known which version of mpv introduced the problem: N/A
  • AMD 24.3.1

Reproduction steps

--no-config --vo=gpu-next --video-sync=display-vdrop <file>

Let file run for about 10-20 mins, observe estimated refresh rate and A/V clock deviation. (chosen display-* mode doesn't matter)

Expected behavior

Estimated refresh rate remains consistent throughout mpv's runtime.

Actual behavior

Initial refresh rate when opening a file. mpv-shot0001

After 5-10 minutes, there's a sudden and unusual drop in the estimated refresh rate. mpv-shot0002

Estimated refresh rate slowly increases after this drop-off point, but never reaches the original value and gets stuck at this refresh rate unless fullscreen is toggled off and on again. mpv-shot0003

Compare this to MPC-HC using madVR, which also uses some form of display synchronization according to https://github.com/mpv-player/mpv/issues/7674#issuecomment-623031655. The estimated refresh rate of the display agrees with the initial file start-up refresh rate in the first mpv screenshot. This value remains consistent with maybe only a deviation of +/- 0.00005 unlike mpv's +/- 0.0059 deviation (118x). Also of note here is that MPC-HC has much lower A/V clock deviation than mpv, where I've seen mpv hit clock deviations as high as +/- 0.02, but MPC-HC will consistently only have a clock deviation at the 4th or 5th decimal place during most of its runtime (but perhaps I'm misreading mpv's A/V stat here, and the clock deviation isn't actually this high). madvr

Log file

mpv.log

norinoriko avatar Apr 20 '24 23:04 norinoriko

Is your monitor vrr (g-sync, free-sync turned on? i believe vrr and display-* doesn't work very well together

ixxbxxx avatar Apr 21 '24 16:04 ixxbxxx

If I disable it from the monitor directly, it doesn't seem to make a difference, I get the same behavior with the stats screen. I also tried some other refresh rates, but that also doesn't really make a difference.

norinoriko avatar Apr 21 '24 16:04 norinoriko

I will work on this when I got a minute. I have better way in mind, but need to test it in practice.

kasper93 avatar Apr 21 '24 22:04 kasper93

Closing because it doesn't make a visible difference during playback, and if it does then it must be fairly small... with more jittery apis like vulkan the framerate estimation is all over the place anyways, so I don't think this matters outside of nitpicking

norinoriko avatar May 14 '24 04:05 norinoriko