Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video stuttering on Windows 11 #15196

Open
6 tasks done
steo86 opened this issue Oct 28, 2024 · 12 comments
Open
6 tasks done

Video stuttering on Windows 11 #15196

steo86 opened this issue Oct 28, 2024 · 12 comments
Labels

Comments

@steo86
Copy link

steo86 commented Oct 28, 2024

mpv Information

Hello,

I have the issue that video on Windows 11 is stuttering. Display refreshrate is set to match the video (23,976hz) and also when checking with "I" there are no framedrops. It´s just stuttering. 

This happens:

- When switchen between windows. Means swtichen between mpv and other windows with "alt+tab".
- Video is running fine for about 20-60 minutes fine without stutter in fullscreen and then begin to sutter suddenly.

To fix it I need to:
- Pause the video
- Jump to another Windows with "alt+tab"
- Jump back to mpv with atl+tab
- Unpause video

Then video is running fine again for a few minutes and starts stuttering again.
I have this with my customized config-file but also with a plank downloaded MPV without any config.
So it seems to be independent form the config ander shaders etc. In logfile no error is visible.
Someone haveing similar issues?

Other Information

- Windows 11 24H2
- Latest mvp build form git
- Nvidia RTX 4070 + I5-14400F

Reproduction Steps

see description

Expected Behavior

Video should not stutter.

Actual Behavior

begins stuttering after a few minutes or when switching window.

Log File

outlog.log

Sample Files

No response

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

  • I tested with the latest mpv version to validate that the issue is not already fixed.
  • I provided all required information including system and mpv version.
  • I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of --log-file=output.txt.
  • I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
  • I attached the full, untruncated log file.
  • I attached the backtrace in the case of a crash.
@steo86 steo86 added the os:win label Oct 28, 2024
@steo86
Copy link
Author

steo86 commented Oct 31, 2024

outlog.zip
Attached a logfile with logging options set to maximum (--msg-level=all=trace)
Video was running fine first minute and then began stuttering.
Then I pressed pause
--> see line [ 105.444][v][cplayer] Set property: pause -> 1
So stuttering began a few seconds before that line. Maybe someone is seeing whats going wrong?

@the-database
Copy link

I have the same issue, stuttering on Windows 11 running the latest NVIDIA driver, no frame drops reported by mpv but the video is clearly dropping frames sometimes.

The only way I was able to work around the issue is to downgrade NVIDIA driver to 551.86. Not sure if there's any way to avoid the issue while running the latest driver.

@steo86
Copy link
Author

steo86 commented Nov 8, 2024

it has something to mpv is synchronizing Video and Audio.

If I set "video-sync=desync" suttering goes away but then A/V is getting out of sync.

With "video-sync=display-resample" it often runs fine for about half an hour and then begins stuttering (no framedrops).
By pressing pause in some cases it´s then working again.

All other values for this setting like "video-sync=audio" are even worse and stuttering begins earlier.

So with A/V-Sync activated the "display-resample" is the best one but as said begins stuttering as well. Sometimes after 10 mintues, sometimes after 30 minutes, sometimes after 1 hour.

I am using wasapi output and passing though DTS/ATMOS via HDMI. So no decoding in MPV.
Anyone has an idea how to get it working with "display-resample" or where to start troubleshooting.
Maybe with this information someone can seee something in the big log above?

@nissel
Copy link

nissel commented Nov 8, 2024

I'm seeing the same thing with a similar configuration. 24H2, nvidia, video-sync=display-resample and pass through audio.

I force vsync on in the nvidia control panel and things mostly play smoothly, but after some time I do occasionally get some output frame drops.

Edit: I'm actually using video-sync=audio now. With vsync forced and full screen optimizations disabled, so far so good. And I'm also using autospeedwin to match my refresh rate to file.

@kasper93
Copy link
Contributor

kasper93 commented Nov 8, 2024

Could you try using video-sync=display-vdrop? display-resample relies on being able to resample audio to compensate for A/V drift. Apparently, things go wrong when it cannot do that, as is the case with audio passthrough.

EDIT: When using audio passthrough video-sync is set always to audio. So any other mode is not doing anything.

@steo86
Copy link
Author

steo86 commented Nov 10, 2024

there is definitely an difference when choosing for example display-vdrop/audio and display-resample. Stuttering begins directly when using display-vdrop/audio instead of display-resample where stuttering starts after a few minutes.
Als there are different additional settings (vsync-ratio/vsync-jitter) when pressin "I" compared to display-resample. So I think the different settings are working also with paththrough audio. As said best setting is display-resample where stuttering starts after 20/30 minutes. or using desync where no stuttering appears but then A/V getting out of sync which you can see by pressing "I".

Here are my audio settings:
volume-max=100
volume=100
ao=wasapi
audio-exclusive=yes
audio-spdif=ac3,eac3,dts-hd,truehd,dts
audio-channels=7.1,5.1,stereo

@llyyr
Copy link
Contributor

llyyr commented Nov 10, 2024

Can you provide a log with video-sync=display-resample and display-vdrop?

@steo86
Copy link
Author

steo86 commented Nov 10, 2024

for "display-resample" there is already a logfile 6 posts above:
link
For display-vdrop I will generate one...

@llyyr
Copy link
Contributor

llyyr commented Nov 10, 2024

for "display-resample" there is already a logfile 6 posts above:

Well that one is completely useless because 99% of the log lines are about mkv decoding, which we don't care about here. --log-file sets a lower verbosity than trace for a reason

@steo86
Copy link
Author

steo86 commented Nov 12, 2024

outlog_display_resample.log
outlog_display_vdrop.log
attached the logfiles for display-resample and display-vdrop with loglevel debug.
with display-vdrop it directly stuttered from the beginning and I can see "[vo/gpu-next] Render queue underrun." messages in logfile. With Display-Resample it went fine for about 20 minutes and then began stuttering. But there was nothing special coming up in the logfile when begin stuttering compared to the 20 minutes before where it was fine. Maybe something happening in a sub-moduel like ffmpeg which will not be reported here?

@kasper93
Copy link
Contributor

Please test with minimal set of options to reproduce the problem.

'd3d11-sync-interval' = '0'

things like that are breaking display sync.

@steo86
Copy link
Author

steo86 commented Nov 13, 2024

outlog_syncInterval0.log
outlog_normal.log

I have now reduced my config to the following (see below and removed all shaders/scripts as well).
Attached the logfiles one with "d3d11-sync-inverval=0" and one without.
In both cases it started suttering after a while. Then I paused the video and closed it.

# audio
volume-max=100 
volume=100
ao=wasapi
audio-exclusive=yes
audio-spdif=ac3,eac3,dts-hd,truehd,dts
audio-channels=7.1,5.1,stereo

# a/v sync
video-sync=display-resample
# on first logfile enabled. On second logfile commented out.
#d3d11-sync-interval=0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants