Audio sync issues with plex media player

plex-media-player

#1

While playing a movie with plex media player, the audio starts synced, and then slowly drifted behind the video.
Exiting the video and restarting it where I left off can fix the sync, but it continues to drift.

I gave up using the media player and used the web player, which seems to have no issues on the same windows 10 computer.
(*I don't see this problem on my windows 8.1 PC (media player or web player)

Info about the media: Using direct play or 2Mbps transcode
No lag/delay while playing, but the audio was stuttering a bit on my second attempt.

Media
~~~~~
Video Resolution SD
Duration 1:33:44
Bitrate 2644 kbps
Width 720
Height 328
Aspect Ratio 1.78
Container MKV
Video Frame Rate NTSC
Video Profile simple

Part
~~~~~
Duration 1:33:44
Size 1.73 GB
Container MKV
Indexes sd
Video Profile simple

Codec MPEG4
Bitrate 2452 kbps
Anamorphic 1
Bit Depth 8
Chroma Subsampling 4:2:0
Frame Rate 30 fps
Height 328
Level 0.3
Pixel Aspect Ratio 115:142
Profile simple
Ref Frames 1
Width 720

Codec AC3
Channels Stereo
Bitrate 192 kbps
Audio Channel Layout stereo
Sampling Rate 44100 Hz

Any ideas? Is this common?


#2

I have the same issue with the newer app although in Plex Home Theater I had the option to adjust my audio sync which I used regularly.


#3

I've noticed that I only get this issue if I attempt to watch it locally via the Plex interface and it only occurs under Windows. If I boot into Linux, it works just fine. This is either through the web browser or the Plex app on Windows. Under Linux, via Chrome or the Chrome app, no audio lag what-so-ever.


#4

Please also say whether you get a static A/V delay, or a drift.

Static A/V delays can not always be fixed, but can be adjusted with Alt+a and Alt+shift+a (can also be mapped to remote buttons, I'm hoping we can streamline this later).

A drift would be a rather bad bug. We've received some reports of this, but I've never been able to pin it down to a component. Does making a small seek also fix the drift temporarily, or is exiting the video always required?

@ibolski do I get this right wrt. audio sync:

  • On Windows:
    • PMP: bad
    • Plex Windows store app (not sure if you were talking about this): bad
    • Web browser (with plex.tv in it): bad
    • Other software: good
  • On Linux
    • everything good

#5

Hi, I am suffering the same using the PMP on a Windows 10 PC. The audio drifts, clicking pause / unpause immediately syncs the audio back.


#6

Maybe time for some experiments. Try one of the following:

  • Switch PMP to native GL in the PMP fullscreen settings and restart/retry (may cause other weird behavior in fullscreen)
  • Try these files: https://www.sendspace.com/file/ct9ej6 Copy the files into the PMP installation dir. They should replace the existing files there. Disable native GL in the PMP fullscreen settings and restart PMP. (sha1sum of the entire zip file: 0d11faa03d5e6f8d7182e0f03fa77bc7131456d2. Use on your own risk.)

#7

Hi, I tried both, first PMP to native GL which made no difference, then updated the DLL's and that appears to be working! :smile: Will keep you updated to see if it drifts again! Thanks for the very quick response and hopefully resolution!!


#8

Sad to report that although there is definitely less drift than previously it did go out of sync after about 35 minutes as opposed to every 10 / 15 minutes before.


#9

Hi Guys, has there been any more progress with this issue?

Thanks


#10

I also had this problem. I uninstalled and went back to 1.35 and it worked fine again. Something changed in the update that is causing this...


#11

Under Windows, I switched to the latest Firefox (55.0.3) and the issue has gone away. It appears it's an issue with Chrome. There was no issue with Chrome under Linux.


#12

I could never reproduce such issues. Also this forum is for "Plex Media Player", not any other plex client like through the web browser.

That doesn't mean I deny these issues are happening. I'd be more than glad to reproduce and fix it, if it's really a PMP bug.


#13

How do I get older versions to see if they fix the Audio sync drift issue. I have PMP 2.1.1. It only occurs with PMP on Win 10, the same media works fine on plex via Roku, Web, Android and iOS ? PMP is my favourite ( as long as I can get the audio sync issue resolved)


#14

I’m afraid it’s hard to make older builds accessible since most of them have probably deleted, and there are other… reasons. But I’ve also heard about audio sync problems from the beginning, so older builds would not help with this. (I could never reproduce any of them myself.)

Here are some more questions:

  • does it happen with any audio/video output, or only e.g. if connected via HDMI?
  • does it matter whether compressed passthrough is enabled or not? (check debug overlay via i key in TV UI mode)
  • which platform and OS version (Windows/Mac/Embedded)
  • does the debug overlay (i key in TV UI mode) show anything non-0 in the A/V field?
  • does seeking fix it? (generally the answer seems to be “yes”)
  • does it matter whether refresh rate switching is enabled? at which rates?
  • with direct play or transcode? playing from a local or a remote server?

If anyone is particularly patient we could do special test runs to produce better logs. Let me know.

Also reminder that this forum is about PMP only - not with using Plex though any other client. The only cases which would affect both PMP and other clients are problems with transcoding, or with broken files.


#15
  • does it happen with any audio/video output, or only e.g. if connected via HDMI?
    Using S/PDIF
  • which platform and OS version (Windows/Mac/Embedded)
    Windows 10
  • does the debug overlay (i key in TV UI mode) show anything non-0 in the A/V field?
    Don’t know - what do I do?
  • does seeking fix it? (generally the answer seems to be “yes”)
    Yes, for me simple ‘Pause’ / ‘Unpause’ will fix it
  • with direct play or transcode? playing from a local or a remote server?
    I think on both but will need to test again - playing from local server
    If anyone is particularly patient we could do special test runs to produce better logs. Let me know.
    **Very happy to assist with this as it is the only thing that really lets it down on what is otherwise the greatest solution! **

#16

@Paul-A said:

  • does it happen with any audio/video output, or only e.g. if connected via HDMI?
    Using S/PDIF
  • which platform and OS version (Windows/Mac/Embedded)
    Windows 10
  • does the debug overlay (i key in TV UI mode) show anything non-0 in the A/V field?
    Don’t know - what do I do?
  • does seeking fix it? (generally the answer seems to be “yes”)
    Yes, for me simple ‘Pause’ / ‘Unpause’ will fix it
  • with direct play or transcode? playing from a local or a remote server?
    I think on both but will need to test again - playing from local server
    If anyone is particularly patient we could do special test runs to produce better logs. Let me know.
    **Very happy to assist with this as it is the only thing that really lets it down on what is otherwise the greatest solution! **
    Are you using PMP to decode the audio or passthrough to an AVR?
    What is the the refresh rate your system is using?

#17

I was having this problem as well, it persisted from the 1.2.x and 1.3.x versions to the new 2.1.1. My resolve, after hours of painstaking troubleshooting, including new video cards, cables, reinstalling Windows 10 pro, was to Sync display to content or I think it’s called Allow Display mode switching.

I also found that it may have been partially due to a HDMI cable that wasn’t apparently the 18Gbps spec that the rest of my system was (I pass my audio through to an AVR). I found that by using the ‘i’ key and seeing that while I had synced the display to content, that the GPU and Display both said something like 23…976fps (60),which indicated to me that something was off. I pulled a cable from my 4K panasonic player in place of the one from my HTPC to the AVR and that seemed to display correctly, everything saying 23.976 and no (60). Even PAL content (Planet Earth II) would display correctly at 25fps and no more judder on my 4K tv while it dropped frames or whatever it does to keep the 23.976 fps.

Considering the OP is using S/PDIF I’m not sure how the cable part pertains to him.


#18

@Warmongerx said:
I was having this problem as well, it persisted from the 1.2.x and 1.3.x versions to the new 2.1.1. My resolve, after hours of painstaking troubleshooting, including new video cards, cables, reinstalling Windows 10 pro, was to Sync display to content or I think it’s called Allow Display mode switching.

I also found that it may have been partially due to a HDMI cable that wasn’t apparently the 18Gbps spec that the rest of my system was (I pass my audio through to an AVR). I found that by using the ‘i’ key and seeing that while I had synced the display to content, that the GPU and Display both said something like 23…976fps (60),which indicated to me that something was off. I pulled a cable from my 4K panasonic player in place of the one from my HTPC to the AVR and that seemed to display correctly, everything saying 23.976 and no (60). Even PAL content (Planet Earth II) would display correctly at 25fps and no more judder on my 4K tv while it dropped frames or whatever it does to keep the 23.976 fps.

Considering the OP is using S/PDIF I’m not sure how the cable part pertains to him.
When passthrough audio is used the refresh rates matter greatly:

23.976fps content needs to be displayed at 23.976Hz or 59.94Hz and not 24Hz or 60Hz. Otherwise you will see audio lip sync drift, as every 41.7s or 16.7s respectively, frame duplication occurs.

24fps content (very little content exists with this framerate) needs to be displayed at 24Hz or 60Hz and not 23.976Hz or 59.94Hz. Otherwise you will see audio lip sync drift, as every 41.7s or 16.7s respectively, frame drops occurs.

29.97p/59.94i/59.94p content needs to be displayed at 59.94Hz and not 60Hz. Otherwise you will see audio lip sync drift, as every 16.7s, frame duplication occurs

30fps and 60fps content needs to be displayed at 60Hz and not 59.94Hz. Otherwise you will see audio lip sync drift, as every 16.7s, frame drops occurs.

EDIT per @Warmongerx suggestion:
PMP has two mechanisms to counter this issue.

You can enable Allow Display Mode Switching under Settings | Video to have it change the refresh rate of the display output to match that of the content. This is the best way. However it is not always possible since either the video card or the display does not have 23.976 or 59.94Hz as an option. This is seen on Macs and other computing oriented displays.

The other method is to use Sync Mode: Display (resample audio) also under Settings | Video. This does come with some caveats:

  1. You can no longer effectively passthrough audio. Audio has to be decoded in order to be resampled to match the display refresh.
  2. Dolby TrueHD audio tracks decoded by PMP instead of passthrough will retain 100% audio fidelity. With DTS-HD Master Audio, PMP will only decode the DTS lossy core up to 5.1 channels. It will no longer be lossless audio.
  3. Dolby Atmos and DTS:X sound positional metadata will be lost when PMP decodes the audio.

#19

@Achilles said:
PMP has two mechanisms to counter this issue.

You can enable refresh rate switching to have it change the refresh rate of the display output to match that of the content. This is the best way. However it is not always possible since either the video card or the display does not have 23.976 or 59.94Hz as an option. This is seen on Macs and other computing oriented displays.

The other method is to use display sync and resample the audio. This does come with some caveats.

  1. You can no longer effectively passthrough audio. Audio has to be decoded in order to be resampled to match the display refresh.

  2. Dolby TrueHD audio tracks decoded by PMP instead of passthrough will retain 100% audio fidelity. With DTS-HD Master Audio, PMP will only decode the DTS lossy core up to 5.1 channels. It will no longer be lossless audio.

There is only one option in the GUI in PMP and that’s Allow Display Mode Switching. The other one you mention is Sync Mode. It’d help other users that visit this thread if you could use the terms as they appear in PMP so as not to confuse folks. I had to read your reply several times and compare to PMP GUI before I figured out what you were trying to convey.


#20

@Warmongerx said:

@Achilles said:
PMP has two mechanisms to counter this issue.

You can enable refresh rate switching to have it change the refresh rate of the display output to match that of the content. This is the best way. However it is not always possible since either the video card or the display does not have 23.976 or 59.94Hz as an option. This is seen on Macs and other computing oriented displays.

The other method is to use display sync and resample the audio. This does come with some caveats.

  1. You can no longer effectively passthrough audio. Audio has to be decoded in order to be resampled to match the display refresh.

  2. Dolby TrueHD audio tracks decoded by PMP instead of passthrough will retain 100% audio fidelity. With DTS-HD Master Audio, PMP will only decode the DTS lossy core up to 5.1 channels. It will no longer be lossless audio.

There is only one option in the GUI in PMP and that’s Allow Display Mode Switching. The other one you mention is Sync Mode. It’d help other users that visit this thread if you could use the terms as they appear in PMP so as not to confuse folks. I had to read your reply several times and compare to PMP GUI before I figured out what you were trying to convey.
I was replying on my iPhone at work to get you a response quickly and didn’t have PMP in front of me to use the exact wording of the menus. Next time I will wait until I have free time at home. I volunteer to help here and not paid by Plex.