Severe stutter when refresh rate is set to 23.97Hz

Server Version#: 1.29.1.6316
Player Version#: 1.27.1.3311-94cb0aa3

W11 22H2
RTX 2070Ti 522.25
i7 9700k
Samsung QE65Q9FNA

Issue Description:

  • severe playback stutter (looks like dropped frames) with ‘Plex HTPC’ running at 23.976Hz (either through enabled RefreshRate switching or when set manually)
  • skipping forwards or backwards a couple of times FIXES the issue and the playback gets smooth
  • skip again (or pause/unpause) and it stutters again
  • when refresh rate switching is disabled, and ‘Plex HTPC’ runs at 2160p60, then there is no severe stutter - only expected minor hiccups due to the 24FPS->60Hz mismatch

Plex HTPC.log (455.2 KB)

Additional Information:

  • Kodi does not show that behaviour with refresh rate switching enabled or when RR is set to 23.976Hz
  • MediaPortal does not show that behaviour with refresh rate switching enabled or when RR is set to 23.976Hz
  • mpv does not show that behaviour when RR is set to 23.976Hz (edit: the standalone build I download came with an mpv.conf and custom settings, this is why it did not show the issue, plain mpv has the stutter issue too)
  • MPC-HC with MadVR does not show that behaviour with refresh rate switching enabled or when RR is set to 23.976Hz
  • on my AppleTV 4k movie playback in the Plex App is smooth with refresh rate switching enabled
  • when I forcefully disable v-sync for Plex HTPC inside NVCPL then this fixes the stutter, but obviously leads to tearing (v-sync might be connected to this stutter though)

My conclusion based on that data: something is wrong with the Plex HTPC application when the refresh rate is set to a matching 23.97Hz
Is this be caused by Plex HTPC not running the player in exclusive fullscreen mode?

1 Like

Went through the hassle of testing this on a 2nd PC, with the exact same outcome.
No one else using the Plex HTPC application with refresh rate switching / 23.976Hz?

I noticed something similar, also with the same workaround to disable v-sync… However, I could also see that same behavior in mpv. I used Gravity at minute 8 or so (earth panning shot) to verify “perfect” or “broken” playback. I tried it with d3d11 and vulkan backends and it seems only the d3d11 backend is broken.

On my end, this happened after updating to the newest nvidia driver (RTX 3050)… Reinstalling one specific version fixed it for me. Version 512.96 Studio to be precise. Restarting from scratch by reinstalling windows or reinstalling a newer version with an earlier DDU uninstall did not fix this. I also filled out the nvidia driver bug form but no response there (yet).

Maybe you can also try using the Vulkan backend and/or the mentioned driver (DDU first)?

(Vulkan backend => mpv.conf in the Appdata/PlexHTPC dir with the following line gpu-context=winvk added)

1 Like

While that did reduce the issue significantly, HDR10 content has messed up brightness values using the Vulkan renderer.

edit
using the following values in my mpv.conf HDR content plays correctly!

target-colorspace-hint=yes
gpu-context=winvk
vo=gpu-next

Only issue with the above settings is that the system does not switch HDR off once you stop the playback.
only when you play a SDR video or close PLEX HTPC it will turn off HDR.

great find! installing that driver has indeed fixed the issue!

Great to hear that driver version 512.96 also fixes this for you!

No idea where we could also report this issue. Don´t know if the mpv github repo is the right place or if nvidia just screwed it up…


Exactly, this was also discussed in this thread => [HDR Metadata Passthrough] - Plex HTPC for Windows

The refresh rate build found here => [HTPC] Testing Windows HDR Switching also has a workaround for the vulkan stuck in hdr bug.

FWIW, these two values (I elided the one that I’m not speaking to) will be set by an option in the GUI in a future version which allows HDR metadata passthrough to the display. Do note that this is experimental so expect that it may have some issues.

As will the next version.

1 Like

@Mitzsch I think I just found a different solution.

Can you please try to only add the following line to your mvp.conf ?

swapchain-depth=1

The default value of mpv is 3. I tested this 4 times now and setting it for “1” fixes the severe stutter for me with the current nvidia driver. :smiley:

2 Likes

So finally had time to test this and wow! Indeed adding swapchain-depth=1 to the mpv.conf file with a new driver (i tested 522.30, still affected but not as immense as versions before) has fixed the stuttering on my setup, also without introducing more dropped frames. Awesome! Thanks for the tip!

1 Like

Glad to hear that this works for you too!
@gbooker02 is this worth to be considered to be added to the default config? or could that option cause problems?
For us it fixed the severe stutter. :slight_smile:

I was waiting to see what the results here were before considering it. The question is what does it do on non-NVIDIA systems? Is it detrimental to Intel or AMD setups for instance?

Sadly I cannot answer that as I only have nvidia gpu’s here. :frowning:

I can try it on an AMD RX 580 setup, but unfortunately only in about a month or so (during the Christmas holidays).

I don’t know where to add swapchain-depth=1 (found the file, don’t know exactly where to add it.) I installed 512.96 driver and fixed the stuttering. I read that in future updates adding the line will be gone so I will stay with this one that works.

If I had to guess, you didn’t find the file but instead found the mpv.conf.md file because the actual file doesn’t exist until you create it. You just create the file, add this one line to it, and that’s all. If you want to confirm that it works, it will show up in the application logs as it reads your mpv.conf.

Where did you read this?

Yes it’s md, I thought as notepad opened it that is a system file that would change with an update. So I just create a txt file with this line in the folder?

Essentially yes, but the text file needs to have the .conf extension instead of .txt.

mpv.conf.txt (17 Bytes)

Ok got it, thank you. Can you please check if i did it right?If it’s ok I will change txt to conf

Yes, its correct.

1 Like

As promised I now had some time to test the swapchain-depth setting on my AMD RX580 system as well. It works fine with the setting set inside the mpv.conf. I have not seen any weird behavior, playback was smooth as expected.

Unfortunately the setting is good for the 23,97 movies but not for the others. I had to reinstall the old nvidia driver as above to play everything smoothly. Forgot to remove the setting with the old driver and stuttering was more than obvious. I think plex was experimenting with this driver and the changes after that killed it. Now I play everything with the old driver without the swapchain-depth setting and play perfect.