Buffering 4K HDR content using Direct Play

So I have this issue with a few shows/movies. All are 4K HDR MKV files.

They all Direct Play. My Synology is old and crappy so couldn’t transcode :slight_smile:

This issue only just started even with some movies that a few months ago played fine without any buffering issues.

I have included server logs captured just after the issue happened. A quick search for “buffering” brings up some stuff but tbh I don’t know enough about it all to properly understand it.

I also included an xml output for the current problem episode which is WandaVision as you can see :slight_smile:

Yes I am using subtitles, srt built into the mkv file however testing with subtitles disabled also buffers so I don’t think the subtitles are to blame?

What other information can I provide to help get to the bottom of this?

Just so you know I am using the native LG webOS Plex app from the LG Content Store. The TV is using a 5Ghz wifi connection that speed tests to ~300Mbps and the NAS is obviously connected via gigabit ethernet and speed tests internally with iperf gets me over 930Mbps so network speeds shouldn’t be the issue! I have also tried with the TV connected via ethernet but as the LAN port on the TV is limited to 100Mbit it is “better” to use wifi as sad as that is in 2021. Ah well!

Hopefully someone can help me get to the bottom of this. Thanks in advance! Also included is a screenshot of the dashboard that tells me it is using direct play but I don’t know how honest that information really is, perhaps it is having to do some kind of stream mangling or something??

Screenshot 2021-02-06 at 22.58.29

Server Version#: 1.18.5.2309
Player Version#: LG OLED55C8PLA 5.8.1, Plex for LG, webOS 4.3.0
Plex Media Server Logs_2021-02-06_22-40-02.zip (5.1 MB)

<MediaContainer size="1" allowSync="1" identifier="com.plexapp.plugins.library" librarySectionID="3" librarySectionTitle="TV" librarySectionUUID="bff24d4b-3c1f-48a1-a1d5-97118611a961" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1579823912">
<Video ratingKey="1558" key="/library/metadata/1558" parentRatingKey="1444" grandparentRatingKey="1443" guid="com.plexapp.agents.thetvdb://362392/1/5?lang=en" parentGuid="com.plexapp.agents.thetvdb://362392/1?lang=en" grandparentGuid="com.plexapp.agents.thetvdb://362392?lang=en" type="episode" title="TBA" grandparentKey="/library/metadata/1443" parentKey="/library/metadata/1444" librarySectionTitle="TV" librarySectionID="3" librarySectionKey="/library/sections/3" grandparentTitle="WandaVision" parentTitle="Season 1" contentRating="TV-PG" summary="" index="5" parentIndex="1" viewOffset="525067" lastViewedAt="1612647727" year="2021" thumb="/library/metadata/1558/thumb/1612525474" art="/library/metadata/1443/art/1612525474" parentThumb="/library/metadata/1444/thumb/1612525474" grandparentThumb="/library/metadata/1443/thumb/1612525474" grandparentArt="/library/metadata/1443/art/1612525474" duration="2292864" originallyAvailableAt="2021-02-05" addedAt="1612525459" updatedAt="1612525474">
<Media id="2997" duration="2292864" bitrate="22146" width="3840" height="2160" aspectRatio="1.78" audioChannels="6" audioCodec="eac3" videoCodec="hevc" videoResolution="4k" container="mkv" videoFrameRate="24p" videoProfile="main 10">
<Part accessible="1" exists="1" id="2997" key="/library/parts/2997/1612525386/file.mkv" duration="2292864" file="/volume1/Media/TV/WandaVision/WandaVision.S01E05.HDR.2160p.WEB.h265-KOGi.mkv" size="6348124090" container="mkv" deepAnalysisVersion="4" requiredBandwidths="25288,24759,23612,23371,23371,23371,23371,23371" videoProfile="main 10">
<Stream id="7958" streamType="1" default="1" codec="hevc" index="0" bitrate="21377" language="English" languageCode="eng" bitDepth="10" chromaSubsampling="4:2:0" codedHeight="2160" codedWidth="3840" colorPrimaries="bt2020" colorRange="tv" colorSpace="bt2020nc" colorTrc="smpte2084" frameRate="23.976" height="2160" level="150" profile="main 10" refFrames="1" requiredBandwidths="24520,23990,22842,22604,22604,22604,22604,22604" width="3840" displayTitle="4K (HEVC Main 10 HDR)"/>
<Stream id="7959" streamType="2" selected="1" default="1" codec="eac3" index="1" channels="6" bitrate="768" language="English" languageCode="eng" audioChannelLayout="5.1(side)" requiredBandwidths="767,767,767,767,767,767,767,767" samplingRate="48000" displayTitle="English (EAC3 5.1)"/>
<Stream id="7960" streamType="3" selected="1" codec="srt" index="2" bitrate="0" language="English" languageCode="eng" requiredBandwidths="1,1,1,1,1,1,1,1" title="English (SDH)" displayTitle="English (SRT)"/>
<Stream id="7961" streamType="3" codec="srt" index="3" bitrate="0" language="Dansk" languageCode="dan" requiredBandwidths="1,1,1,1,1,1,1,1" title="Dansk" displayTitle="Dansk (SRT)"/>
<Stream id="7962" streamType="3" codec="srt" index="4" bitrate="0" language="Deutsch" languageCode="ger" requiredBandwidths="1,1,1,1,1,1,1,1" title="Deutsch" displayTitle="Deutsch (SRT)"/>
<Stream id="7963" streamType="3" codec="srt" index="5" bitrate="0" language="Español" languageCode="spa" requiredBandwidths="1,1,1,1,1,1,1,1" title="Español (Latinoamericano)" displayTitle="Español (SRT)"/>
<Stream id="7964" streamType="3" codec="srt" index="6" bitrate="0" language="Español" languageCode="spa" requiredBandwidths="1,1,1,1,1,1,1,1" title="Español" displayTitle="Español (SRT)"/>
<Stream id="7965" streamType="3" codec="srt" index="7" bitrate="0" language="Suomi" languageCode="fin" requiredBandwidths="1,1,1,1,1,1,1,1" title="Suomi" displayTitle="Suomi (SRT)"/>
<Stream id="7966" streamType="3" codec="srt" index="8" bitrate="0" language="Français" languageCode="fre" requiredBandwidths="1,1,1,1,1,1,1,1" title="Français (Canadien)" displayTitle="Français (SRT)"/>
<Stream id="7967" streamType="3" codec="srt" index="9" bitrate="0" language="Français" languageCode="fre" requiredBandwidths="1,1,1,1,1,1,1,1" title="Français" displayTitle="Français (SRT)"/>
<Stream id="7968" streamType="3" codec="srt" index="10" bitrate="0" language="Bahasa Indonesia" languageCode="ind" requiredBandwidths="1,1,1,1,1,1,1,1" title="Indonesian" displayTitle="Bahasa Indonesia (SRT)"/>
<Stream id="7969" streamType="3" codec="srt" index="11" bitrate="0" language="Italiano" languageCode="ita" requiredBandwidths="1,1,1,1,1,1,1,1" title="Italiano" displayTitle="Italiano (SRT)"/>
<Stream id="7970" streamType="3" codec="srt" index="12" bitrate="0" language="Nederlands" languageCode="dut" requiredBandwidths="1,1,1,1,1,1,1,1" title="Nederlands" displayTitle="Nederlands (SRT)"/>
<Stream id="7971" streamType="3" codec="srt" index="13" bitrate="0" language="Norsk" languageCode="nor" requiredBandwidths="1,1,1,1,1,1,1,1" title="Norsk" displayTitle="Norsk (SRT)"/>
<Stream id="7972" streamType="3" codec="srt" index="14" bitrate="0" language="Português" languageCode="por" requiredBandwidths="1,1,1,1,1,1,1,1" title="Português (Brasil)" displayTitle="Português (SRT)"/>
<Stream id="7973" streamType="3" codec="srt" index="15" bitrate="0" language="Português" languageCode="por" requiredBandwidths="1,1,1,1,1,1,1,1" title="Português" displayTitle="Português (SRT)"/>
<Stream id="7974" streamType="3" codec="srt" index="16" bitrate="0" language="Svenska" languageCode="swe" requiredBandwidths="1,1,1,1,1,1,1,1" title="Svenska" displayTitle="Svenska (SRT)"/>
</Part>
</Media>
<Extras size="0"> </Extras>
</Video>
</MediaContainer>```

Hi trumpy81 and thanks for the reply.

Apologies for Verbose logging. Is now disabled :slight_smile:

The problem is even on ethernet and with subtitles disabled the buffering still happens and I cannot figure out why.

I understand HEVC is a ‘heavy’ codec but I’ve had no issues until just now. Playback, even with subtitles, for 4K HDR HEVC content, even 90+GB REMUX MKVs has been perfect. Now I am getting buffering on a 6.3GB file? Just doesn’t make sense to me.

I just noticed there is a PMS update available so I will install that and retry tomorrow using ethernet and with subtitles disabled to see if I can capture a (non verbose!) a new log file for you. Just to check all I needed to do was uncheck the verbose logging option in General and save the changes correct? (screenshot attached). PMS will stop verbose logging from now?

Screenshot 2021-02-07 at 00.03.05

Not sure if Plex is the same (I’m using the native LG Plex app) but according to the LG manual for my TV srt is supported for both embedded mkv and external subtitles.

One other thing to check is your hard drive. If it is failing it requires more reads to get the data off of the disk which can cause buffering. Try playing the movie from another drive to see if it plays fine, if so then you probably have a drive issue or use drive testing software to check it.

So this morning I sat down to test this some more and WandaVision played perfectly. Subtitles enabled. Not a single hiccup!

I don’t want to declare it “solved” just yet so will try some other more demanding titles tonight as well as upgrade PMS to the latest version (1.21.3.4014-58bd20c02) and see how it goes.

@Alucard1 Thanks for the tip. The volume is at 78% used and reports no errors however I am wondering if fragmentation could be an issue? Seems unlikely but I will look into it. It is just so puzzling as it sometimes works and sometimes doesn’t. With the same files on the same devices!

Hello again all. Been a while and I have done a fair amount of investigating to get to the bottom of this.

Basically the TV seems to struggle at times. I guess the ageing SoC in the C8 can’t handle 4K HDR at times. It isn’t the network or the NAS/Plex server so the only thing left is the TV just struggling to process the file quick enough.

Unfortunately as I can’t debug the TV to see what the CPU load is or what other processes are running in the background I am kind of stuck but even using a different Plex server sitting literally next to the TV with >300Mbps wifi (or 100Mbit ethernet) it still buffers at random times. I can’t reproduce it consistently although srt subtitles tend to trigger it more often.

I have watched a 90GB 4K HDR REMUX with subtitles and it playback perfectly then watch it again another day and it buffers constantly but then sometimes I also get buffering with a 5GB 4K Disney+ show such as WandaVision which isn’t anywhere near the peak bitrate as the 90GB REMUX so it is all so inconsistent.

Why does it struggle with a 5GB file when it can do a 90GB file just fine? Only thing I can think of is something on the TV can’t handle it while doing some other task in the background and it chokes up.

Not an ideal ‘answer’ obviously but I have spent too long it now making no further progress that I am going to call it quits. I might grab some kind of streaming box like an Nvidia Shield Pro to see if that does any better but with how hit and miss streaming boxes can be in terms of codec support I need to make sure I buy the right thing.

If anyone has anything to add to this please do so as I am happy to try any suggestions I have just ran out of ideas of my own to try right now.

Ciao!

So someone online suggested to me to try extracting the srt file and then selecting it as an external srt file rather than using the same srt file embedded in the mkv.

I just tried with a 60GB REMUX MKV…

With embedded srt subs enabled: buffering
With subtitles disabled: no buffering
With srt subs enabled via external srt file: no buffering

Very interesting! I wonder if the TV Plex app has a bug with accessing the srt file as an embedded stream (if that is the right word?) within the MKV but does not have with that same srt file externally??

Do you have a BestBuy (or your prefered retailer) near by ?
I’d suggest swinging by and pick up an Nvidia Shield, preferably not the Tube.

Test playback with that, if it streams smoothly than that conforms, once again, that the built-in TV apps struggle with 4K

If that doesn’t fix it return the item to BestBuy

Best option here in France would be Amazon. I have been tempted to pick up a Shield Pro but have been hoping to find a workable solution with the TV as it never used to be a problem and I would rather not pay €200 for Shield if I can fix the TV.

I have what looks like the exact same issue: some content (mainly HEVC main 10, 1080p or lower) stutters and buffers badly when played on the LG TV Plex app (5.14.1), but works perfectly fine in the LG builtin player. I wanted to take the TV out of the equation and tried the Plex client on a Firestick 4K and a Chromecast with Android TV, both connected via 5Ghz wireless to a Ubiquity AP set between 0.5m and 5m away. They all behave the same and buffer a lot. Any other method of playing the content via WiFi works just fine.

The fact that the LG builtin player works perfectly suggests the TV is perfectly able to decode the content. Shouldn’t the Plex app just allow the TV to do the heavy lifting? The issue actually started a few weeks ago and I can’t seem to figure out what setting broke it.

I will play around with the subtitle option as you suggest and come back.

Let me know how your testing goes.

I am convinced this is a Plex issue (either client or server) and not a server hardware or tv hardware issue. Why? Because I have tried 3 other Plex server on varying hardware and the issue still happens however from time to time the same files will play back flawlessly so the tv clearly can handle the files it just randomly seems to have trouble. The other night I watched a 90GB mkv remux over WiFi with subtitles enabled and it didn’t buffer once. I’ve tried that same file today and after 5 minutes it buffered. Same tv. Same plex server. Just me on the WiFi as nobody else was home.

It is so frustrating! I haven’t been able to test with an nvidia shield tv pro as I can’t bring myself to spend over €200 on it.

The other reason I’m convinced it’s a Plex issue is that a year+ ago I never had a single buffering issue with such large files yet today the files that played back fine in 2019 will buffer.

So, when using the included ASS subtitles I get:

Video 1080p (HEVC Main 10) > 1080P (H264)—Transcode
Audio English (AAC Stereo) > Direct Stream
Subtitles English (ASS)

With external subtitles:

Video 1080p (HEVC Main 10) > Direct Play
Audio English (AAC Stereo) > Direct Play
Subtitles English (SRT External)

Obviously the stutters are gone when direct play is enabled. The builtin LG app has no issues with either type of subtitles and plays just fine. It explains why I had to use that one streaming from PMS especially for some HDR content which never seemed to play as HDR via the Plex client. They may have had the subtitles in the container and needed transcoding also.

Otherwise playing 4K HDR HEVC seems to be no issue even with the Plex client. Will keep the subtitle topic in mind for the future and do further testing to see how the sound stream can affect this too.

Incidentally I also just received a WebOS update (mostly related to how LG can collect more data and share it with 3rd parties as far as I can tell, not with improving any compatibility as far as media goes) but it came after I did the testing.

I am just having the same issue on webos4. The TV has both Plex and Xplay installed. Plex server haven’t been updated to the last update until a few hours ago. Same HDR movie yesterday could directplay in HDR. After server update HDR is transcoded to SDR and got the info to buy Plex pass for colour mapping.

Xplay continues to play the movie normally.

Small update. With ASS subtitles transcoding seems to be a given now. Used to think it’s just HEVC but it does this from h.264 to h.264 Just updated today to the latest PMS version and noticed this afterwards, too bad I didn’t investigate it a bit deeper in advance.

Video 720p (H.264) > 720P (H264)—Transcode
Audio English (AAC Stereo) > Direct Stream
Subtitles English (ASS)

Edit. Gets worse on Chromecast with AndroidTV. That’s some useful transcoding right there:

Video 720p (H.264) > 720P (H264)—Transcode
Audio English (AAC Stereo) > AAC—Transcode
Subtitles English (ASS)

I expect the Firestick 4K to behave pretty much the same. This seems to be more a Plex issue than an OS/device issue.

This is how the Plex LG app behaves with subtitles:

  1. Enabling image based subtitles, PGS or VOBSUB, results in a video transcode.
  2. If audio is transcoding, enabling any subtitle results in a video transcode.
  3. If audio is direct playing, text subtitles, SRT & VTT, direct play.
  4. For ASS/SSA subtitles:
    1. If Burn Subtitles = Automatic in the Plex LG app, enabling ASS/SSA subtitles results in a video transcode.
    2. If Burn Subtitles = Only Image Formats, ASS/SSA subtitles, direct play, but formatting information (color, location, etc) may be lost.

You’re right, initially I assumed HEVC is the issue but it was actually the subtitles. Recently I just noticed that on the Chromecast the same video file that used to only have video transcoded with ASS subtitles 2 weeks ago now also gets the audio transcoded in the exact same conditions. LG doesn’t seem to have this issue.

For this kind of videos I am now using Kodi with Plex addon which doesn’t need to do any transcoding.

Hello everyone! So this bank holiday weekend I sat down to investigate this a little more as I wanted to test out a new 4K REMUX of Raya and the Last Dragon for my kid. As expected I hit buffering so I decided to do some testing.

I loaded up the Synology Resource Monitor next to me while playing back the movie and noticed something… odd.

First let me confirm that the movie is playing back via Direct Play as confirmed in the Plex web ui and on the TV. Both with and without subtitles it reports Direct Play on the web ui and if I enable playback information on the Plex TV client. Not even audio container shifting. The HEVC video and both AC3 and DTS-HD Master Audio playback via Direct Play.

Edit: Just to clarify this while everything reports it is playing back via Direct Play I cannot prove this, I am just going by what the web app and TV are telling me. I have found this post on reddit that seems to indicate while it says it is using Direct Play it may infact be doing some kind of transcoding. Clearly not video transcoding as my little Synology couldn’t transcode 720 let alone a 60GB HEVC file :slight_smile:

So what odd thing did I notice? If I used the embedded srt subtitles in the mkv file my disk utilisation rocketed up to 95+% instantly. Once it hit 100% for a few seconds the playback would buffer.

If I disable subtitles disk utilisation during playback is around 10% with the odd spike to 30% from time to time (inline with higher bitrate parts of the movie) and there is no buffering.

However if I extract the srt file from the mkv and add it to the folder so Plex detects it as an external srt file then select it disk utilisation remains around 10% and there is no buffering! The same is true if I select to search for a subtitle using the built-in Plex search function. The extremely high disk utilisation only happens when using the embedded srt. The exact same srt file loaded external does not cause such high disk utilisation.

So my question is - what is Plex doing when using an embedded srt subtitle that causes the disk utilisation to shoot up to 95+%??? Is this a bug?

Is there anything extra I can do to perhaps capture what Plex (either client or server) is doing? Is this enough detail for an engineer at Plex to try and reproduce?

If there is anything I can do I would be more than happy to help in any way I can to try and get to the bottom of this.

Cheers!

Forgot to add - I also tested the same mkv file stored on a USB drive plugged into the TV and using the LG Media Player for playback and it was perfect with both AC3 and DTS-HD MA audio with subtitles enabled so the TV is able to playback the file with the embedded subtitles directly without issue therefore I would expect Plex to be able to do so also.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.