Media Randomly Being Transcoded to HLS

Issue has been occurring for a while, but never dug in to it.
Streaming with a Roku ultra.
Currently PMS 1.8.4.4249
Movie in h264 mkv. Direct Stream and Direct Play enabled.
Randomly, movie will buffer.

Digging in to it finally… begin movie, check stream info.
Playback Direct Play
Format mkv

Just after buffer
Playback Transcode
Format HLS
Video copy (h.264)
Audio convert (AC3 5.1)

The issue seems to occur at around the same time mark of said media. This case, about 6:45 in.

So for over 6 minutes it’s direct play.
Out of the blue it has to start transcoding.

This started shortly after an update in the last couple/few months. Possibly with 1.7.5.4035 that was installed on Aug 5?
The same time this issue started occurring, I also started having issues with PlexScriptHost processes hanging on to the media I previously watched. I was unable to delete them, sometimes for upwards of 2 hours after I finished watching it.

Issue appears to be occurring on devices other than Roku also:


Sep 08, 2017 19:41:15.223 [7696] DEBUG - Streaming Resource: Added session 0953B288:0d7882a056db703bffff91f17b87ce4e
Sep 08, 2017 19:41:15.223 [7696] DEBUG - Streaming Resource: Reached Decision id=1564 codes=(MDE=1000,Direct play OK.) media=(id=1757 part=(id=149918 decision=direct play protocol=hls streams=(Video=(id=304424 decision= width=0 height=0) Audio=(id=304425 decision= channels=0 rate=0))))
Sep 08, 2017 19:41:15.227 [15128] DEBUG - Completed: [192.168.1.12:45181] 200 GET /video/:/transcode/universal/decision (12 live) TLS GZIP 32ms 3413 bytes (pipelined: 1)

I skipped forward to just before the 6:45 mark.

Sep 08, 2017 19:42:00.509 [7700] DEBUG - Audio Stream: 304425, Subtitle Stream: -1
Sep 08, 2017 19:42:00.512 [7700] DEBUG - MDE: analyzing media item 1757
Sep 08, 2017 19:42:00.512 [7700] DEBUG - MDE: ■■■ Tape (2014): Direct Play is disabled
Sep 08, 2017 19:42:00.512 [7700] DEBUG - MDE: ■■■ Tape (2014): media must be transcoded in order to use the hls protocol
Sep 08, 2017 19:42:00.513 [7700] DEBUG - MDE: ■■■ Tape (2014): no direct play video profile exists for http/mkv/h264/dca
Sep 08, 2017 19:42:00.513 [7700] ERROR - PropertyContainer::get - invalid frameRate value: 23.976
Sep 08, 2017 19:42:00.513 [7700] DEBUG - Codecs: testing aac_mf (encoder)
Sep 08, 2017 19:42:00.514 [7700] DEBUG - Codecs: testing mp3_mf (encoder)
Sep 08, 2017 19:42:00.514 [7700] DEBUG - MDE: ■■■ Tape (2014): selected media 0 / 1757
Sep 08, 2017 19:42:00.515 [7700] DEBUG - Streaming Resource: Added session 0953B448:0d7882a056db703bffff91f17b87ce4e
Sep 08, 2017 19:42:00.516 [7700] DEBUG - Streaming Resource: Reached Decision id=1564 codes=(General=1001,Direct play not available; Conversion OK. Direct Play=3000,App cannot direct play this item. Direct play is disabled. Transcode=1001,Direct play not available; Conversion OK.) media=(id=1757 part=(id=149918 decision=transcode container=mpegts protocol=hls streams=(Video=(id=304424 decision=copy width=1280 height=688) Audio=(id=304425 decision=transcode bitrate=640 encoder=ac3 channels=6 rate=48000))))

It’s randomly selecting HLS protocol, in the middle of the stream, when this is all local?

1 Like

It is an issue with Roku firmware version 7.7. I have been trying to get Roku to put me back on 7.6 but nobody is responding. There is a secret menu that had allowed people to roll back to 7.6 but then they were auto updated back to 7.7 and now the secret menu no longer allows roll back to 7.6. I checked roku forums and there is a huge thread about this issue where roku dev staff says to email them and they will put you on a rollback list. no luck for me so far.

to access secret menu (if you’re interested) hit (in order):
Home key 5x
FF 3x
RW 2x

you will see that you are on Ver 7.7 and cannot roll back to 7.6.

do you mean 297.7?
Version: 297.70E04135A

Build date of 8/18 so… yeah that could certainly be it based on timing.

Thanks for the tip, I’ll go check the Roku forums.

Actually, it may not be the Roku.
Per my Roku, it updated on August 24.
I made a post to /r/plex/ about PlexScriptHost locking open files. I want to say the buffering issue was occurring at that time, but I didn’t think they were related and disregarded the random Buffering dialog.
That post to /r/plex/ was made on Aug 22.

There’s also the other plex forum post in my OP, where they’re having the buffering issues and not-direct-play issues on their XBone.

edit add: “Now Playing” in web app reports Transcoding DCA to AC3. It reports video is direct stream. So it’s only the audio that’s being transcoded, per the Plex Now Playing. After not requiring transcoding for the first 6:45. Media file only has 1 audio track which is DTS.
Yet Stream Info from Plex app on Roku reports both audio and video transcoding.

The other movie… I don’t know. Plex web app reports “Converting” yet both Video and Audio report Direct Stream. This one always occurs at the 9:08 timestamp.
This media’s audio is AC3.

There have been patches. Aug 24th you probably received a patch. Ver 7.7 was pushed out Mid July.

I do see the Roku updated on Aug 24 (which I stated as much), but I began having issues with PlexScriptHost locking files (3 PlexScriptHost processes each locking the same file) open for unknown reasons prior to that date; and I believe the buffering (which I now know to be errant transcoding) issues started around the same time. Which would have been prior to the Roku updating to 7.7.

Well if I ever get a response from Roku support for the upgrade/downgrade I’ll find out.

right, i understood that. im just saying youve almost definitely had 7.7 since before aug 24th. it was pushed out beginning/mid july. the aug 24th patch of 7.7 (almost definitely) isnt the first iteration of 7.7 you’ve be on. in other words, on aug 24th your previous 7.7 firmware was updated with a patch so it only looks like you were upgraded to 7.7 on that day…but youve actually had it since it was first pushed out a couple months ago and aug 24th was just a 7.7 patch, not an upgrade from 7.6 to 7.7.

would be interested to know if they downgrade you. im still trying. goodluck.

Oh, gotcha. Yeah I don’t know if/when the Roku had been updated prior to that.
If they pushed different 7.7 builds, then that would make sense.

they are working on pushing out 7.7.0.4139 (from 4135, the aug 24th patch) this morning to the users that have requested it. i got the push to one of my rokus so far. testing it now with a movie.

I had that build when I got home. So, it does appear that build resolved the buffering/errant transcoding. At least, the two movies I was testing with no longer experienced the issue.
Did not resolve the PlexScriptHost process(es) locking files, so they must be unrelated.