mpv-player / mpv

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

New MPV version stutters like crazy with video-sync now #14744

Closed deama closed 2 months ago

deama commented 2 months ago

mpv Information

Command line options: '--player-operation-mode=pseudo-gui'
mpv v0.38.0-720-gcb4fdb53 Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
 built on Aug 25 2024 00:05:10
libplacebo version: v7.349.0 (v7.349.0-5-g82bf46a-dirty)
FFmpeg version: N-116759-g40dda881d
FFmpeg library versions:
   libavcodec      61.11.100
   libavdevice     61.2.100
   libavfilter     10.2.102
   libavformat     61.5.101
   libavutil       59.34.100
   libswresample   5.2.100
   libswscale      8.2.100

Other Information

- Windows version: 10 22h2 (pro)
- GPU model, driver and version: rtx 4080 551.86
- Source of mpv: https://sourceforge.net/projects/mpv-player-windows/

Also tried with mpv versions from a few weeks ago as well, same issue.

Reproduction Steps

Enable video-sync=display-resample

Expected Behavior

No frames dropped when video-sync=display-resample is enabled.

Actual Behavior

When not using video-sync=display-resample It works fine, however when setting: video-sync=display-resample lots of frames start being dropped. Worked fine in old version "0.35.0-511-gab300285"

Log File

output-no-sync.txt output-sync.txt

Sample Files

Happens with any/all video files, whether av1, or x265, 1080p, or 4k.

I carefully read all instruction and confirm that I did the following:

Andarwinux commented 2 months ago

Maybe try gpu-next?

deama commented 2 months ago

Maybe try gpu-next?

No change.

kasper93 commented 2 months ago

New MPV version stutters like crazy with video-sync now lots of frames start being dropped

Which one is it?

Does it also happen with --osc=no?

video-sync=display-resample means that event loop will update at the rate of your display, which in case of slow scripts may cause issues on low-end machines. Generally the biggest offender in my experience is libass when displaying overlay, so test with OSC disabled and without any subtitles or stats on screen.

0.35.0-511-gab300285

Are you able to narrow down the regression range? Have you tried --profile=fast --hwdec to offload some load from your GPU / CPU cores.

deama commented 2 months ago

New MPV version stutters like crazy with video-sync now lots of frames start being dropped

Which one is it?

  • The stuttering implies, duplicated frame, not fluid motion, some sync issues, vsync estimation issues and so on.
  • Frame drops implies that your PC does not keep up with the playback/presentation and it is nothing related to first point.

Does it also happen with --osc=no?

video-sync=display-resample means that event loop will update at the rate of your display, which in case of slow scripts may cause issues on low-end machines. Generally the biggest offender in my experience is libass when displaying overlay, so test with OSC disabled and without any subtitles or stats on screen.

0.35.0-511-gab300285

Are you able to narrow down the regression range? Have you tried --profile=fast --hwdec to offload some load from your GPU / CPU cores.

I just mentioned stutters cause that's what it looks like, but looking at the UI info, it's dropping and delaying frames a lot.

I tried with osc=no, but same issue.

Tried with --profile=fast and --hwdec set to nvdec or auto.

What's interesting is that if I don't bring up the info panel with SHIFT+I, then it's sped up and desyncs with the audio. But if I bring the info panel up it doesn't speed up the footage and runs fine,but just is dropping a lot of frames and doesn't look smooth at all.

I can try and narrow down the version when it started happening.

Andarwinux commented 2 months ago

Make sure disable GSYNC for mpv and lock VSYNC to on.

deama commented 2 months ago

I managed to fix it. Not sure how though, but it seems that if I move the new version over to my normal mpv folder, it works. If I use the files from my old version and put it in a different folder, it doesn't work anymore.

I donno why this is, they're both on the desktop, there's no whitelisting going on either.

Well anyway, thanks for the help, sorry to bother you!

Andarwinux commented 2 months ago

It seems that you have a problematic NVCP global profile but a correct mpv profile

llyyr commented 2 months ago

Not sure how though, but it seems that if I move the new version over to my normal mpv folder, it works. If I use the files from my old version and put it in a different folder, it doesn't work anymore.

Just for science, can you tell us what happens if you move mpv to a new location and rename the executable to League of Legends.exe?

deama commented 2 months ago

Not sure how though, but it seems that if I move the new version over to my normal mpv folder, it works. If I use the files from my old version and put it in a different folder, it doesn't work anymore.

Just for science, can you tell us what happens if you move mpv to a new location and rename the executable to League of Legends.exe?

Same issue.

It seems that you have a problematic NVCP global profile but a correct mpv profile

I don't have a profile specific to mpv on my nvidia control panel.

Andarwinux commented 2 months ago

I don't have a profile specific to mpv on my nvidia control panel.

NVCP has some builtin default profiles, but they usually only work for “registered” programs by default, I guess you have run mpv-install.bat for old installation.

deama commented 2 months ago

I don't have a profile specific to mpv on my nvidia control panel.

NVCP has some builtin default profiles, but they usually only work for “registered” programs by default, I guess you have run mpv-install.bat for old installation.

Oh, maybe, I've had that one for a while so don't remember if I ran the install.bat or not. I don't think I did? Maybe though.