Direct play vs transcoding

I just recently started loading 4k movies on my plex, so this is a new issue for me. My server isn’t fast enough to transcode 4k, but if I choose direct play “force” instead of “auto”, it plays fine. if i goto the server and disable video stream transcoding, then I get an error message saying direct play is disabled.

I was under the assumption that transcoding is what happens when it can’t direct play.

I have searched, so i apologize, I’m sure it’s been asked and answered, I’m just not asking the right thing in the search bar.

First question is what wizardry does plex do to decide when to transcode vs when to direct play. Since the roku bar can play the media when forced is chosen, I would think that plex shouldn’t be transcoding. I’ve obviously told it something wrong since under auto it tries to transcode, when it shouldn’t.

Second, when I goto the server and disable video stream transcoding, why does it also disable direct play?

I think my expected behavior is off load as much of the work to the client, until some feature is needed from the server that requires transcode.

Some other options that might factor in…not sure
Remote Access: upload speed 100mbps
limit remote stream bitrate - original no limit
Network:

  • prefer any interface
  • lan neworks: blank (servers subnet is considered local) both the client and server are on the same subnet…same gigabit switch even
  • treat wan ip as lan bandwidth - checked. i don’t think this affects my issue, i’m using the local private ip to connect to the server from the client.
  • enable relay - checked - again both client and server are local.

Any other settings you may need, let me know.

here is a log file from one of the times it transcoded, i did redact my public ip.

Thanks in advance!

<<Player address="192.168.0.105" device="Roku Streambar Pro" machineIdentifier="134c0e6f11c3fea84fe496f313588efc" model="9100X" platform="Roku" platformVersion="11.x" product="Plex for Roku" remotePublicAddress="x.x.x.x" title="Roku Streambar Pro" vendor="Roku" version="7.0.11.7782-303374816-Plex" local="1" relayed="0" secure="1" userID="1" />
<Variants>
<Variant id="675e041d-bc89-409f-869c-30e48dbd4f71" targetBitrate="11924" context="streaming" sourceVideoCodec="hevc" sourceAudioCodec="aac" videoDecision="transcode" audioDecision="transcode" protocol="http" container="mkv" videoCodec="h264" audioCodec="aac" audioChannels="2" transcodeHwRequested="0" transcodeHwFullPipeline="0">
<Media audioProfile="he-aac" id="65726" videoProfile="main 10" audioChannels="2" audioCodec="aac" bitrate="11356" container="mkv" duration="3839978" height="1080" videoCodec="h264" videoFrameRate="24p" videoResolution="1080p" width="1920" selected="1">
<Part audioProfile="he-aac" id="74471" indexes="sd" videoProfile="main 10" bitrate="11356" container="mkv" duration="3839978" height="1080" width="1920" decision="transcode" selected="1">
<Stream bitrate="11205" codec="h264" default="1" displayTitle="4K (HEVC Main 10)" extendedDisplayTitle="4K (HEVC Main 10)" frameRate="23.975999832153320" height="1080" id="202861" streamType="1" width="1920" decision="transcode" location="direct" />
<Stream bitrate="151" bitrateMode="cbr" channels="2" codec="aac" default="1" displayTitle="English (HE-AAC Stereo)" extendedDisplayTitle="English (HE-AAC Stereo)" id="202862" language="English" languageCode="eng" languageTag="en" selected="1" streamType="2" decision="transcode" location="direct" />
</Part>
</Media>
</Variant>
</Variants>
<SegmentList />
<PlaybackReports>
<Playback startTime="5225" endTime="5323" state="stopped" progress="0" />
</PlaybackReports>
<StateReports />
<StateReports />
</SessionReport>>

From what I understand from reading these forums by default Plex likes to remux the stream. If you have a powerful client (Roku, Amazon Fire Cube, NVidia box) and your source data is properly muxed then Direct Play is the way to go, it has very low load on the PMS and there’s absolutely nothing wrong with enabling DirectPlay. I have Direct Play enabled on all my Roku Ultra clients. If the source data is not properly muxed it’ll play back like crap and thats when PMS transcoding would be a benefit. Also if the client doesnt have the right video codec, or audio codec, or cant play PGS subtitles natively, then PMS has to come into play & do some transcoding. Audio transcoding is not very CPU intensive. Video transcoding is very CPU intensive, thats when a GPU comes into play. All the media I play had been generated by software I trust and is muxed correctly so I have no problem forcing Direct Play. I hope this answers some of your questions.

ty! yes, that’s what i was thinking…so i’m still wondering what i did to tell the plex server to transcode even when it doesn’t need to. By the fact that if I choose Force, and it plays perfectly, that tells me that the server doesn’t need to.

Any clues on how i can get the server to relax and let roku do the work?

I would try mkclean (I’m assuming it is an MKV) . I don’t think our Roku guys are around at the moment but from what i recall it does try to transcode if it detects something off about the file.

Just set Direct Play to Force on the client like you’ve done. That tells PMS to just stream the file.

If you happen upon a source that wont play properly you can try mkclean as BigWheel suggested, or remux the file with ffmpeg. It’ll work with many container types; mkv, mp4, avi.

ffmpeg -i input.mkv -map 0 -c copy output.mkv

If you re-enable auto mode, then during playback when its transcoding go to the settings and look at the transcode reason. That may provide some insight.

We’d can also look at remote logs.

  • Enable Remote logging
  • Start playback of the item with direct play set to auto
  • Let it start playing and verify it was transcoding, then stop playback
  • Report back with the time/timezone and Plex username.

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