[BUG] Intermittent transcoding on LG WebOS when direct playing

Server Version#: 1.15.8.1198
Player Version#:Latest LG webos app
Plex Media Server Logs_2019-06-14_21-45-59.zip (1.7 MB)
movie.zip (7.4 KB)
Hi!
When direct playing the afformentioned movie (see movie.zip for xml) on my LG C8 everything works like a charm and direct plays for about 5-10mins - then, out of the blue, PMS decides to start transcoding. (doesn`t matter if I enable external subs or not) - As seen in the logs PMS starts to use hls instead of https for the stream and therefore starts transcoding…
The TV is connected via ARC to a Bose Soundtouch 300.
Cheers.

@ChuckPa (sry for tagging you;))

1 Like

Would you do that again, from the beginning,

  1. Verbose OFF (I see you turned it off near the end but we missed the data already)
  2. Restart PMS
  3. Recreate
  4. Stop
  5. Attach that log set pleasae

Hey,
sorry I thought I catched that error with the verbose log turned off - my mistake. Please find attached the newly generated log file.
Cheers:)Plex Media Server Logs_2019-06-14_22-40-57.zip (368.0 KB)

transcoding starts around the 22:39:40 time mark

1 Like

Hi, I Noticed the same issue on this PMS Version 1.15.8.1198 / Player Version#:Latest LG webos app.
Have played all my movies on LG B7 just fine until updated PMS last Friday or Saturday. 4K HDR worked fine and now after 5 or 10 min, starts to buffer and transcoding on the Server with no HDR.
If I stop and play again it plays fine for another period of 5 to 10 min and starts Buffering transcoding again. Very Annoying.
If I move the movie to a Hard Drive it play fine through the LG internal TV Player.

The TV is connected via ARC to a Onkyo TX-NR696
Regards

I’m having the same issue on PMS version 1.16.0.1226 streaming to an LG C6. The movie loads up fine with HDR, then after a few minutes it will switch to a transcode stream. Going into the video settings and flipping the audio or subtitles to a different option and back again will start it direct playing again for a while. I’m not sure which version of PMS it first started, but I don’t believe it was occurring in 1.15.5.994.

@ChuckPa I can supply logs, but would rather not post them in a public way. Is it ok to PM them to you?

Please understand:

  1. PMS doesn’t ā€œstart transcodingā€ part way through a playback unless the playback settings are changed at the player. It knows the metadata (what the file contains) before you play it and it knows what the player requests when playback starts.
  2. It is possible, and does happen, ā€œNow Playingā€ is slow to report the current playback state. This could be part of the reason you see a delayed change.

I must remind, I do not know the players. I am primary support for Linux (NAS and desktop)

I can tell you that any playback will start to transcode when:

  1. Forced subtitles are present in the file to be played
  2. When PGS / VOBSUB (image based) subtitles are selected by the player
  3. When playback resolution or quality is changed to anything less than Original.
  4. When streaming remote and bandwidth limitations apply

may I see the XML of one of the files which 'will start to transcode after 5-10 minutes" ?
What I am seeing here looks like an app bug and there’s nothing I can do because I can’t access that code to look nor would I understand it (wrong computer language for me).

With the XML, I can take an initial look and then get one of the devs to look.

I hear what you’re saying, but it doesn’t fit with what is happening.

I can start playing a movie through the plex app on my TV and it’ll switch to HDR (which it will only ever do if it’s direct playing). If I go to Plex Web on a browser it will report it’s direct playing, tautulli also reports it’s direct playing. The logs show that the MDE has decided that direct playing is possible and that the movie is direct playing. Then with no user intervention it will switch to a transcoding session after a period of time (which doesn’t appear to be consistent between plays). Using the in-player controls at that point to switch subtitles off and back on, or switch from one audio track to another and then back, will kick it back into direct playing. So I can only surmise there’s either a bug in PMS (I’m running version 1.16.0.1226 in a docker container on Ubuntu) or in the LG player app.

I’ve attached an XML file and have a server log showing the file playing with the inital MDE decision, a change to transcoding, and then a change back to direct playing if that’s of assistance.

32077.xml.zip (7.1 KB)

I also hear what you’re saying. Here’s what I know. Let’s see where this is going sideways.

Using your metadata.

<Stream id="264471" streamType="1" codec="hevc" index="0" bitrate="40144" language="English" languageCode="eng" bitDepth="10" chromaSubsampling="4:2:0" colorPrimaries="bt2020" colorRange="tv" colorSpace="bt2020nc" colorTrc="smpte2084" frameRate="23.976" height="2160" level="153" profile="main 10" refFrames="1" requiredBandwidths="110709,91085,80861,69763,65205,60891,52826,42321" width="3840" displayTitle="4K (HEVC Main 10 HDR)" />
<Stream id="264472" streamType="2" default="1" codec="truehd" index="1" channels="8" language="English" languageCode="eng" audioChannelLayout="7.1" bitDepth="24" requiredBandwidths="7604,7451,7008,6377,6377,6377,6377,6377" samplingRate="48000" title="Surround 7.1" displayTitle="English (TRUEHD 7.1)" />
<Stream id="264473" streamType="2" selected="1" codec="ac3" index="2" channels="6" bitrate="640" language="English" languageCode="eng" audioChannelLayout="5.1(side)" requiredBandwidths="640,640,640,640,640,640,640,640" samplingRate="48000" title="Surround 5.1" displayTitle="English (AC3 5.1)" />
<Stream id="305132" key="/library/streams/305132" streamType="3" selected="1" codec="srt" language="English" languageCode="eng" format="srt" displayTitle="English (SRT External)" />
</Part>

HEVC HDR on a Television - Direct Play - Normal.
HEVC HDR on a web browser - Direct Play - No. Transcoding required. Browsers are not HDR-capable. Only select tablet/phone devices are HDR capable with the Vendor apps.

TrueHD on a television with a AVR or Internal 7.1 TrueHD support - Possible.
TrueHD on a web browser - Not possible. It will be transcoded by the EAE to stereo.

The metadata alone also tells me your version of this file is a re-encode / has been reprocessed in some form. I ripped 2160p HEVC SDR (8 bit) myself, and, with subtitles stripped, is much larger. (51 GB).

  1. 2160p HDR requires more file size than SDR
  2. TrueHD and AC3 require more file size than DTS-HD 7.1
  3. Subtitles add to the file size. I have no subtitles

This particular film is itself problematic because it was mastered in pieces. 2K, 3K, and 5K then released in 2K and 4K formats. Depending on region and how the original rip/remux was done, anything can happen.

I do not dispute with you there might be an LG bug but based on this particular video file, the information does not support the claim.

As verification, to ensure it’s not PMS making a mistake (which IS possible), do you have an older version of PMS you can install and try?

You’re right, the file has been remuxed to remove everything apart from the video file, english audio in TrueHD and AC3 formats, and a single SRT subtitle file. The video file has not been touched or re-encoded. I have also watched it from end to end on more than one occasion in Plex without having any issues.

I think I might have an older version of PMS on the server, maybe 15.5 or thereabouts. I’ll check and install if I do. However, I’m confident it’s not an issue with the file as the ā€˜bug’ is occuring with multiple 4K HDR files and I know they used to work without an issue as I’ve watched them.

@Krazeh yup can second this - happenes on all of my 4k remux linux isos;) Is your TV hooked up to a Soundbar/AV Receiver via ARC? Might be worth a shot to remove the TRUEHD audio track and see if the issue persists when only an AC3 track is available…

@ChuckPa Sorry for dragging you into that :see_no_evil: Who would be the right support rep for smart-tv related issues?
Cheers

My TV is connected to a soundbar, but my optical input rather than ARC. And I’ve been manually selecting the AC3 track so it shouldn’t be using the TrueHD track.

@ChuckPa I’ve just tried PMS v1.15.5.994 and the same issue crops up. I’m now playing the same file on a SHIELD and it seems to be fine so far, will report back later as to whether the issue cropped up on the SHIELD.

So the SHIELD worked fine.

Interestingly the movie seemed to work fine on my LG when I played it from the beginning, rather than starting part way into the film as I have previously. It lasted 40 minutes in direct play, then I skipped forward about 10 seconds and within 3 minutes it had switched to transcoding. I did notice that when I started the movie from the beginning Tautulli was showing it as direct playing but with a transcoding progress bar that was fixed at 56% (which is approximately how far through the movie the subtitles are). When I skipped forward that bar disappeared and only reappeared once it switched to transcoding.

I’ll do some more testing tomorrow and try leaving the film to play all the way through from start to finish to see if it’ll direct play all the way through…

I just talked with the devs.

Here’s what was said:

Could be an error during playback. At least on Samsung, if an error happens, it’ll silently fall back to transcoding (usually pretty seamlessly). Turning on logging to PMS (if it’s not on already) would tell us more

How about we follow this procedure they outline above to see if it;s actually just falling back as it should be.

@ChuckPa thank you for the quick support:) I updated PMS to version 1.16.0.1226 - the issue still persists - please find the newly generated log files (including logging from the LG TV to PMS).

PS: thats where it starts…Plex Media Server Logs_2019-06-18_14-55-47.zip (227.2 KB)
Jun 18, 2019 14:54:00.823 [8328] WARN - [ui-chrome-webos] [Subtitles] Request failed. statusCode:0 state:4 errorCount:4

EDIT: seems to be a problem with the external subs - could not reproduce it when playing without subs…

This looks like a Windows/PMS problem (based on what little I know of Windows):

  1. MDE made a decision:
Jun 18, 2019 14:54:01.105 [11776] INFO - [ui-chrome-webos] [MDE] Finished analysis of 4k (mkv, hevc, truehd, 153, main 10)
Jun 18, 2019 14:54:01.105 [11776] WARN - [ui-chrome-webos] [MDE] Direct play failed; asked to always burn subtitles
Jun 18, 2019 14:54:01.106 [11776] INFO - [ui-chrome-webos] [Player] Can direct stream? true (isAllowed: true)
Jun 18, 2019 14:54:01.107 [11776] INFO - [ui-chrome-webos] [MDE] Starting analysis of 4k (mkv, hevc, truehd, 153, main 10)
Jun 18, 2019 14:54:01.110 [11776] INFO - [ui-chrome-webos] [MDE] Augmented profile: { "directPlay": { "mp4": { "mimeType": "video/mp4", "video": { "codecs": { "h264": { "maxWidth": 3840, "maxHeight": 2160, "maxBitDepth": 8, "maxLevel": 52 }, "hevc": { "maxWidth": 3840, "maxHeight": 2160, "maxBitDepth": 10 } } }, "audio": { "codecs": { "aac": {}, "mp3": {}, "ac3": {}, "eac3": {}, "dca": {} } } }, "mpegts": { "video": { "codecs": { "h264": { "maxWidth": 3840, "maxHeight": 2160, "maxBitDepth": 8, "maxLevel": 52 }, "mpeg2video": { "maxWidth": 1920, "maxHeight": 1080, "maxBitDepth": 8 }, "hevc": { "maxWidth": 3840, "maxHeight": 2160, "maxBitDepth": 10 } } }, "audio": { "codecs": { "aac": {}, "mp2": {}, "mp3": {}, "ac3": {}, "eac3": {}, "dca": {} } } }, "mov": { "video": { "codecs": { "h264": { "maxWidth": 3840, "maxHeight": 2160, "maxBitDepth": 8, "maxLevel": 52 }, "mpeg4": { "maxWidth": 1920, "maxHeight": 1080, "maxBitDepth": 8 } } }, "audio": { "codecs": { "aac": {}, "ac3": {}, "eac3": {}, "dca": {} } } }, "asf": { "video": { "codecs": { "vc1": { "maxWidth": 1920, "maxHeight": 1080, "maxBitDepth": 8 }, "wmv3": { "maxWidth": 1920, "maxHeight": 1080, "maxBitDepth": 8 } } }, "audio": { "codecs": { "wmav2": {}, "wmapro": {}, "ac3": {}, "eac3": {}, "dca": {} } } }, "mkv": { "video": { "codecs": { "h264": { "maxWidth": 3840, "maxHeight": 2160, "maxBitDepth": 8, "maxLevel": 52 }, "vc1": { "maxWidth": 1920, "maxHeight": 1080, "maxBitDepth": 8 }, "vp9": { "maxWidth": 3840, "maxHeight": 2160, "maxBitDepth": 8 }, "mpeg4": { "maxWidth": 1920, "maxHeight": 1080, "maxBitDepth": 8 }, "mpeg2video": { "maxWidth": 1920, "maxHeight": 1080, "maxBitDepth": 8 }, "hevc": { "maxWidth": 3840, "maxHeight": 2160, "maxBitDepth": 10 } } }, "audio": { "codecs": { "aac": {}, "mp3": {}, "vorbis": {}, "ac3": {}, "eac3": {}, "dca": {} } } }, "avi": { "video": { "codecs": { "mpeg4": { "maxWidth": 1920, "maxHeight": 1080, "maxBitDepth": 8 }, "mjpeg": { "maxWidth": 1920, "maxHeight": 1080, "maxBitDepth": 8 } } }, "audio": { "codecs": { "aac": {}, "mp3": {}, "pcm": {}, "ac3": {}, "eac3": {}, "dca": {} } } } }, "directStream": { "video": { "codecs": { "h264": { "maxWidth": 3840, "maxHeight": 2160, "maxBitDepth": 8, "maxLevel": 52 }, "hevc": { "maxWidth": 3840, "maxHeight": 2160, "maxBitDepth": 10 } } }, "audio": { "codecs": { "aac": {} } } } }
Jun 18, 2019 14:54:01.111 [11776] INFO - [ui-chrome-webos] [Player] Can play HLS? true
Jun 18, 2019 14:54:01.111 [11776] INFO - [ui-chrome-webos] [Player] Can play DASH? true
Jun 18, 2019 14:54:01.111 [11776] INFO - [ui-chrome-webos] [Player] Can force direct play? false
Jun 18, 2019 14:54:01.111 [11776] INFO - [ui-chrome-webos] [Player] Selected transcode protocol: hls
Jun 18, 2019 14:54:01.111 [11776] INFO - [ui-chrome-webos] [Player] Can play AUTOMATIC? true
  1. Added Webos playback player info:
Jun 18, 2019 14:54:01.135 [11776] DEBUG - Request: [192.168.178.23:37298 (Subnet)] POST /log (10 live) GZIP Signed-in Token (alexmannsbart@gmail.com)
Jun 18, 2019 14:54:01.136 [11776] INFO - [ui-chrome-webos]   X-Plex-Client-Profile-Extra: add-limitation(scope=videoCodec&scopeName=hevc&type=upperBound&name=video.width&value=3840&replace=true)+add-limitation(scope=videoCodec&scopeName=hevc&type=upperBound&name=video.height&value=2160&replace=true)+add-limitation(scope=videoCodec&scopeName=hevc&type=upperBound&name=video.bitDepth&value=10&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&protocol=hls&videoCodec=hevc)+add-limitation(scope=videoTranscodeTarget&scopeName=hevc&scopeType=videoCodec&context=streaming&protocol=hls&type=match&name=video.colorTrc&list=bt709|bt470m|bt470bg|smpte170m|smpte240m|bt2020-10|smpte2084&isRequired=false)+add-transcode-target-audio-codec(type=videoProfile&context=streaming&protocol=hls&audioCodec=ac3&replace=true)+add-limitation(scope=videoAudioCodec&scopeName=ac3&type=upperBound&name=audio.channels&value=6&replace=true)
Jun 18, 2019 14:54:01.136 [11776] INFO - [ui-chrome-webos]   subtitles: burn
Jun 18, 2019 14:54:01.136 [11776] INFO - [ui-chrome-webos]   session: 5xsge29vxp2xzuxr63svb536
  1. Tried to initialize and failed. Switched over and tried again, failed switching to the nVidia encoder.
Jun 18, 2019 14:54:01.137 [7604] DEBUG - Completed: [192.168.178.23:37298] 200 POST /log (10 live) GZIP 1ms 274 bytes (pipelined: 38)
Jun 18, 2019 14:54:01.618 [8328] ERROR - [FFMPEG] - Error initializing an MFX session: -3.
Jun 18, 2019 14:54:01.627 [8328] DEBUG - Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Unknown error occurred
Jun 18, 2019 14:54:01.627 [8328] DEBUG - Codecs: testing h264_nvenc (encoder)
Jun 18, 2019 14:54:01.935 [8328] DEBUG - Codecs: hardware transcoding: testing API dxva2
Jun 18, 2019 14:54:01.997 [8328] DEBUG - Scaled up video bitrate to 232443Kbps based on 4.500000x fudge factor.
Jun 18, 2019 14:54:01.998 [8328] DEBUG - Scaled maximum bitrate for resolution reduction to 58110Kbps.
Jun 18, 2019 14:54:01.998 [8328] DEBUG - MDE: Selected protocol hls; container: mpegts
Jun 18, 2019 14:54:01.998 [8328] DEBUG - MDE: analyzing media item 1479
Jun 18, 2019 14:54:01.998 [8328] DEBUG - MDE: Captain Marvel (2019): Direct Play is disabled
Jun 18, 2019 14:54:01.998 [8328] DEBUG - MDE: Captain Marvel (2019): media must be transcoded in order to use the hls protocol
Jun 18, 2019 14:54:01.998 [8328] DEBUG - MDE: Captain Marvel (2019): selected audio stream is not the first audio stream and direct play stream selection is not enabled
Jun 18, 2019 14:54:01.999 [8328] DEBUG - MDE: Captain Marvel (2019): selected subtitle cannot be converted to a compatible format, burning into video stream
Jun 18, 2019 14:54:01.999 [8328] DEBUG - MDE: Captain Marvel (2019): avoiding video remux due to burned subtitle stream
Jun 18, 2019 14:54:01.999 [8328] DEBUG - MDE: Captain Marvel (2019): no remuxable profile found, so video stream will be transcoded
Jun 18, 2019 14:54:01.999 [8328] DEBUG - Codecs: testing h264_nvenc (encoder)
Jun 18, 2019 14:54:02.158 [8328] DEBUG - MDE: Cannot direct stream video stream due to profile or setting limitations
Jun 18, 2019 14:54:02.158 [8328] DEBUG - Codecs: hardware transcoding: testing API dxva2
Jun 18, 2019 14:54:02.247 [8328] DEBUG - Scaled up video bitrate to 232443Kbps based on 4.500000x fudge factor.
Jun 18, 2019 14:54:02.247 [8328] DEBUG - Scaled maximum bitrate for resolution reduction to 58110Kbps.
Jun 18, 2019 14:54:02.247 [8328] DEBUG - MDE: Captain Marvel (2019): selected media 0 / 1479
Jun 18, 2019 14:54:02.249 [8328] DEBUG - Streaming Resource: Session 0x53f0030:01yj2g72ti2ro1ortc2d8pz4 changed transcode slot usage to used.  Used slots is now 1
Jun 18, 2019 14:54:02.249 [11156] DEBUG - Killing job.

This problem does not occur when playing back with subtitles on Windows Chrome?

It’s not just external subs, same thing happens with embedded SRT as well.

I’m seeing the same issue on Linux PMS. I’ve attached a copy of the relevant server log. I started playing the movie around 16:48:09 and (if I’m reading it right) the MDE decided that direct playing was ok.

It’s then around 16:50:48 where it seems to run MDE again and comes to a different decision. This is when, while watching the movie, the screen momentarily goes black and then comes back with a lower resolution image and no HDR.

A few seconds later (approx 15:50:54), I use the in-player settings to turn the subtitles off and straight back on and the MDE goes back to being happy that the file can be direct played. I didn’t leave it to run this time but if I had then it would’ve repeated the process a few minutes down the line.

Plex Media Server.log (683.5 KB)

That WebOS app is all over the map!

When it re-evaluates MDE after the initial playback button, it’s because something changed to trigger it.

  1. Changing a playback setting
  2. Discovering the playback can’t continue using the initial decision (e.g. Stuttering, etc)
  3. Encountering subtitles in a file, which must be transcoded, which wasn’t listed in the video header.

Where I am stuck here:

  1. I’m seeing PMS on both Windows and Linux exhibiting a problem (Plus Docker)
  2. It appears to be on different versions of PMS as well.

Am I correct here?