mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
28.56k stars 2.92k forks source link

Constant jitter spikes causing mistimed and delayed frame using display-resample #11791

Open BluTree opened 1 year ago

BluTree commented 1 year ago

Important Information

Provide following Information:

Reproduction steps

launch mpv with the following arguments

mpv --no-config --video-sync=display-resample

The jitter is repetitive, causing sometimes mistimed frames or delayed frames or even dropped frames from the output. http://0x0.st/HTs8.mp4

Expected behavior

Having no mistimed nor delayed frames.

Actual behavior

Constant jitter spikes that cause mistimed and delayed frames.

Log file

output.txt

Sample files

https://www.libde265.org/downloads-videos/

Dudemanguy commented 1 year ago

Do you have gsync or freesync enabled by any chance?

BluTree commented 1 year ago

No, it is disabled on my monitor directly, so Nvidia doesn't even recognize my monitor as a gsync compatible monitor.

I also saw a similar issue talking about high frame time (#11863), and tried changing the hwdec as well as gpu-api. I am currently with hwdec=d3d11va-copy and gpu-api=vulkan, and I never encountered this kind of jitter again. Still, this is a very strange behaviour.

Dudemanguy commented 1 year ago

It has to be a NVIDIA driver issue in that case. There's no reason why syncing to vblank should jump around so much like that.

mia-0 commented 12 months ago

I’ve observed behavior like this on Linux years ago. In my case, the GPU load caused by mpv hovered around a power management threshold so NVIDIA’s driver was constantly switching between power states, which looked very similar to what we can see in the video. If forcing performance mode in the driver settings resolves this issue, it’s most likely the same problem. And if so, that’s probably not fixable on our side.

BluTree commented 12 months ago

I already tried this, as well as setting mpv as "High Performance" in the W11 settings, but the problem still appears.