Direct Stream Nvidia Shield Confusion

I run an Ubuntu VM on a beefy server with a decent transcoder chip and I run my content on a 2019 Shield Pro. I don’t get something that’s going on.

Some of my files are taking FOREVER to load (like a minute of Plex spinning) and it comes down to either the file being transcoded for some reason (HDMI set to passthrough and all bitrates set to Maximum) and others showing that they’re running as Direct Stream.

As I understand Direct Stream it’s the client (Plex on the server) saying it can play the files but can’t deal with the wrapper (all MKVs). That makes little sense to me as nearly all my few hundred files are MKVs and the Shield plays most of them instantly regardless of file size/resolution/audio.

What might be going on?

Streaming is used if either:

  • the container format is unsupported by the player
    (support for this can differ between playing the file directly from USB and streaming it over network. So it is not conclusive for Plex if playing from USB is successful.)
  • the player can’t handle one or several of the streams directly (e.g. unsupported codec)
  • a different audio stream than the first one has been selected for playback

The latter might be the source for some of your confusion.

Also, you might want to check for an “DNS rebinding protection” issue in your local DNS resolver.
https://support.plex.tv/articles/206225077-how-to-use-secure-server-connections#toc-4

Otto, thanks for the reply! Let me go through these three one at a time with basic questions, if that’s okay:

The Container: The fact that it plays at least half my content just fine (DIrect Play) and nearly all my content is MKV suggests to me that it’s not the container issue. Plus this is all known stuff. Plex on a Shield playing MKV’s. Wouldn’t we know if this was not supported? So, I discount that one.

The Streams: Unsupported Codec. Wouldn’t Plex have a way of telling me there’s a codec that’s an issue? I thought it was a DTS HD issue, but then I have one film with that that has this slow load/Direct Stream issue and one film with it that plays just fine. Thus, I discount this as the issue.

A Different Stream: I think you’re onto something here, but I’m not sure what you mean by “than the first one”. I put the file in place and play. No one is manually selecting audio options, so does this apply?

“DNS rebinding protection” I doubt as, again, then I suspect it would be a problem across all my MKVs and other media. I’ll check, but this seems unlikely to me. It’s OPNSense here.

Activate server logs.
Stop and restart Plex server
play an affected video for ~ 1 minute
download the server logs
look into the Plex Media Server.log
seek for lines with the time stamp of your playback start
Look particularly for lines beginning with MDE:. These and the surrounding lines are explaining the decision to transcode.

Thanks. I also noticed on your previous note that the link on DNS Rebinding INCLUDES pfSense as a culprit of which OPNSense it based so I’m looking into that as well. However, so far that seems to point to all files failing to Direct Play and I’m not having that issue. Time to go to the logs. Thanks.

Found info in logs from previous problem files. What does this tell you:

Dec 29, 2022 16:57:17.098 [0x7f85a63c9b38] DEBUG - [Req#83396/Transcode/Req#83398] We're going to try to auto-select an audio stream for account 1.
Dec 29, 2022 16:57:17.098 [0x7f85a63c9b38] DEBUG - [Req#83396/Transcode/Req#83398] Selecting best audio stream for part ID 32264 (autoselect: 1 language: en)
Dec 29, 2022 16:57:17.098 [0x7f85a63c9b38] DEBUG - [Req#83396/Transcode/Req#83398] We're going to try to auto-select a subtitle.
Dec 29, 2022 16:57:17.098 [0x7f85a63c9b38] DEBUG - [Req#83396/Transcode/Req#83398] Audio Stream: 77671, Subtitle Stream: -1
Dec 29, 2022 16:57:17.100 [0x7f85a63c9b38] DEBUG - [Req#83396/Transcode] MDE: Selected protocol hls; container: mkv
Dec 29, 2022 16:57:17.100 [0x7f85a63c9b38] DEBUG - [Req#83396/Transcode] MDE: analyzing media item 15372
Dec 29, 2022 16:57:17.100 [0x7f85a63c9b38] DEBUG - [Req#83396/Transcode] MDE: Antlers (2021): Direct Play is disabled
Dec 29, 2022 16:57:17.100 [0x7f85a63c9b38] DEBUG - [Req#83396/Transcode] MDE: Antlers (2021): media must be transcoded in order to use the hls protocol
Dec 29, 2022 16:57:17.100 [0x7f85a63c9b38] DEBUG - [Req#83396/Transcode] MDE: Antlers (2021): no direct play video profile exists for http/mkv/h264
Dec 29, 2022 16:57:17.100 [0x7f85a63c9b38] DEBUG - [Req#83396/Transcode] MDE: Antlers (2021): no direct play video profile exists for http/mkv/h264/dca
Dec 29, 2022 16:57:17.100 [0x7f85a63c9b38] DEBUG - [Req#83396/Transcode] MDE: Antlers (2021): no direct play video profile exists for http/mkv/h264/ac3
Dec 29, 2022 16:57:17.100 [0x7f85a63c9b38] DEBUG - [Req#83396/Transcode] MDE: Antlers (2021): no direct play video profile exists for http/mkv/h264/ac3
Dec 29, 2022 16:57:17.100 [0x7f85a63c9b38] DEBUG - [Req#83396/Transcode] MDE: Antlers (2021): no direct play video profile exists for http/mkv/h264/ac3
Dec 29, 2022 16:57:17.100 [0x7f85a63c9b38] DEBUG - [Req#83396/Transcode] MDE: Antlers (2021): selected media 0 / 15372
Dec 29, 2022 16:57:17.100 [0x7f85a63c9b38] DEBUG - [Req#83396/Transcode] Streaming Resource: Added session 0x7f85cf6117b8:e421262afb201455-com-plexapp-android
Dec 29, 2022 16:57:17.100 [0x7f85a63c9b38] DEBUG - [Req#83396/Transcode] Streaming Resource: Reached Decision id=12128 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=15372 part=(id=32264 decision=transcode container=mkv protocol=hls streams=(Video=(id=77670 decision=copy width=1920 height=1080) Audio=(id=77671 decision=copy channels=6 rate=48000))))

Same thing for the problem file before it:

Dec 29, 2022 16:37:57.481 [0x7f85a4fe1b38] DEBUG - [Req#81e86/Transcode/Req#81e87] We're going to try to auto-select an audio stream for account 1.
Dec 29, 2022 16:37:57.481 [0x7f85a4fe1b38] DEBUG - [Req#81e86/Transcode/Req#81e87] Selecting best audio stream for part ID 23168 (autoselect: 1 language: en)
Dec 29, 2022 16:37:57.481 [0x7f85a4fe1b38] DEBUG - [Req#81e86/Transcode/Req#81e87] We're going to try to auto-select a subtitle.
Dec 29, 2022 16:37:57.481 [0x7f85a4fe1b38] DEBUG - [Req#81e86/Transcode/Req#81e87] Audio Stream: 49889, Subtitle Stream: -1
Dec 29, 2022 16:37:57.482 [0x7f85a4fe1b38] DEBUG - [Req#81e86/Transcode] MDE: Selected protocol hls; container: mkv
Dec 29, 2022 16:37:57.483 [0x7f85a4fe1b38] DEBUG - [Req#81e86/Transcode] MDE: analyzing media item 1023
Dec 29, 2022 16:37:57.483 [0x7f85a4fe1b38] DEBUG - [Req#81e86/Transcode] MDE: Free Fire (2016): Direct Play is disabled
Dec 29, 2022 16:37:57.483 [0x7f85a4fe1b38] DEBUG - [Req#81e86/Transcode] MDE: Free Fire (2016): media must be transcoded in order to use the hls protocol
Dec 29, 2022 16:37:57.483 [0x7f85a4fe1b38] DEBUG - [Req#81e86/Transcode] MDE: Free Fire (2016): no direct play video profile exists for http/mkv/h264
Dec 29, 2022 16:37:57.483 [0x7f85a4fe1b38] DEBUG - [Req#81e86/Transcode] MDE: Free Fire (2016): no direct play video profile exists for http/mkv/h264/dca
Dec 29, 2022 16:37:57.483 [0x7f85a4fe1b38] DEBUG - [Req#81e86/Transcode] MDE: Free Fire (2016): no direct play video profile exists for http/mkv/h264/dca
Dec 29, 2022 16:37:57.483 [0x7f85a4fe1b38] DEBUG - [Req#81e86/Transcode] MDE: Free Fire (2016): no direct play video profile exists for http/mkv/h264/ac3
Dec 29, 2022 16:37:57.483 [0x7f85a4fe1b38] DEBUG - [Req#81e86/Transcode] MDE: Free Fire (2016): selected media 0 / 1023
Dec 29, 2022 16:37:57.483 [0x7f85a4fe1b38] DEBUG - [Req#81e86/Transcode] Streaming Resource: Added session 0x7f85ca8b64f8:e421262afb201455-com-plexapp-android
Dec 29, 2022 16:37:57.483 [0x7f85a4fe1b38] DEBUG - [Req#81e86/Transcode] Streaming Resource: Reached Decision id=416 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=1023 part=(id=23168 decision=transcode container=mkv protocol=hls streams=(Video=(id=49888 decision=copy width=1920 height=1080) Audio=(id=49889 decision=copy channels=6 rate=48000))))
Dec 29, 2022 16:37:57.483 [0x7f85da291b38] DEBUG - Completed: [192.168.1.165:42868] 200 GET /video/:/transcode/universal/decision?audioBoost=100&autoAdjustQuality=0&directPlay=0&directStream=1&directStreamAudio=1&fastSeek=1&hasMDE=1&location=lan&maxVideoBitrate=200000&mediaBufferSize=209664&mediaIndex=0&partIndex=0&path=%2Flibrary%2Fmetadata%2F416&protocol=*&session=e421262afb201455-com-plexapp-android&subtitleSize=100&videoBitrate=200000&videoQuality=100&videoResolution=3840x2160 (7 live) TLS GZIP 7ms 2785 bytes (pipelined: 15)

Did you enable “automatic bitrate” in the client’s settings? If so, disable it.

Please post the Plex media info XML of both files.

The only setting I have like what you mention, on the Shield, is under Video Quality called “Adjust Automatically” and it’s set to “OFF”.

Here are the two example Media Info files:

xml_info.zip (19.5 KB)

<Media id="1023" duration="5434528" bitrate="28396" width="1920" height="1080" aspectRatio="1.78" audioChannels="6" audioCodec="dca-ma" videoCodec="h264" videoResolution="1080" container="mkv" videoFrameRate="24p" audioProfile="ma" videoProfile="high">
<Part accessible="1" exists="1" id="23168" key="/library/parts/23168/1500015701/file.mkv" duration="5434528" file="/mnt/smb/Media/Movies/Free.Fire.2016.1080p.BluRay.REMUX.AVC.DTS-HD.MA.5.1-FGT/Free.Fire.2016.1080p.BluRay.REMUX.AVC.DTS-HD.MA.5.1-FGT.mkv" size="19268751458" audioProfile="ma" container="mkv" deepAnalysisVersion="6" hasThumbnail="1" indexes="sd" requiredBandwidths="38288,36133,32740,31195,30821,30455,29766,29541" videoProfile="high">
<Stream id="49888" streamType="1" codec="h264" index="0" bitrate="22452" language="English" languageTag="en" languageCode="eng" bitDepth="8" chromaLocation="left" chromaSubsampling="4:2:0" codedHeight="1088" codedWidth="1920" frameRate="23.976" hasScalingMatrix="0" height="1080" level="41" profile="high" refFrames="4" requiredBandwidths="31450,29302,26383,25050,24675,24343,23829,23607" scanType="progressive" title="Free.Fire.2016.1080p.BluRay.REMUX.AVC.DTS-HD.MA.5.1-FGT" width="1920" displayTitle="1080p (H.264)" extendedDisplayTitle="Free.Fire.2016.1080p.BluRay.REMUX.AVC.DTS-HD.MA.5.1-FGT (1080p H.264)">
</Stream>
<Stream id="49889" streamType="2" selected="1" default="1" codec="dca" index="1" channels="6" bitrate="3720" language="English" languageTag="en" languageCode="eng" audioChannelLayout="5.1(side)" bitDepth="24" profile="ma" requiredBandwidths="4301,4241,4241,4241,4241,4241,4241,4241" samplingRate="48000" title="Free.Fire.2016.1080p.BluRay.REMUX.AVC.DTS-HD.MA.5.1-FGT" displayTitle="English (DTS-HD MA 5.1)" extendedDisplayTitle="Free.Fire.2016.1080p.BluRay.REMUX.AVC.DTS-HD.MA.5.1-FGT (English DTS-HD MA 5.1)">
</Stream>
<Stream id="49890" streamType="2" codec="dca" index="2" channels="6" bitrate="1509" language="English" languageTag="en" languageCode="eng" audioChannelLayout="5.1(side)" bitDepth="24" profile="dts" requiredBandwidths="1508,1508,1508,1508,1508,1508,1508,1508" samplingRate="48000" title="Free.Fire.2016.1080p.BluRay.REMUX.AVC.DTS-HD.MA.5.1-FGT" displayTitle="English (DTS 5.1)" extendedDisplayTitle="Free.Fire.2016.1080p.BluRay.REMUX.AVC.DTS-HD.MA.5.1-FGT (English DTS 5.1)">
</Stream>
<Stream id="49891" streamType="2" codec="ac3" index="3" channels="2" bitrate="640" language="English" languageTag="en" languageCode="eng" audioChannelLayout="stereo" requiredBandwidths="640,640,640,640,640,640,640,640" samplingRate="48000" title="Free.Fire.2016.1080p.BluRay.REMUX.AVC.DTS-HD.MA.5.1-FGT" displayTitle="English (AC3 Stereo)" extendedDisplayTitle="Free.Fire.2016.1080p.BluRay.REMUX.AVC.DTS-HD.MA.5.1-FGT (English AC3 Stereo)">
</Stream>
<Stream id="49892" streamType="3" default="1" codec="pgs" index="4" bitrate="42" language="English" languageTag="en" languageCode="eng" headerCompression="1" requiredBandwidths="66,66,66,66,66,66,66,66" title="English-PGS" displayTitle="English (PGS)" extendedDisplayTitle="English-PGS">
</Stream>
<Stream id="49893" streamType="3" codec="pgs" index="5" bitrate="32" language="Spanish" languageTag="es" languageCode="spa" headerCompression="1" requiredBandwidths="57,57,57,57,57,57,57,57" title="Spanish-PGS" displayTitle="Spanish (PGS)" extendedDisplayTitle="Spanish-PGS (Spanish)">
</Stream>
</Part>
</Media>

<Media id="23319" duration="8054889" bitrate="16491" width="1920" height="804" aspectRatio="2.35" audioChannels="8" audioCodec="dca-ma" videoCodec="h264" videoResolution="1080" container="mkv" videoFrameRate="24p" audioProfile="ma" videoProfile="high">
<Part accessible="1" exists="1" id="40211" key="/library/parts/40211/1672254084/file.mkv" duration="8054889" file="/mnt/smb/test_mount/Amsterdam.2022.REPACK.1080p.BluRay.x264-KNiVES[rarbg]/Amsterdam.2022.REPACK.1080p.BluRay.x264-KNiVES.mkv" size="16243211621" audioProfile="ma" container="mkv" deepAnalysisVersion="6" hasThumbnail="1" indexes="sd" requiredBandwidths="24915,21977,20158,19220,19065,18910,18207,17902" videoProfile="high">
<Stream id="112371" streamType="1" default="1" codec="h264" index="0" bitrate="11866" language="English" languageTag="en" languageCode="eng" bitDepth="8" chromaLocation="left" chromaSubsampling="4:2:0" codedHeight="816" codedWidth="1920" frameRate="23.976" hasScalingMatrix="0" height="804" level="41" profile="high" refFrames="5" requiredBandwidths="19770,15962,14557,13986,13833,13681,13036,12970" scanType="progressive" width="1920" displayTitle="1080p (H.264)" extendedDisplayTitle="1080p (H.264)">
</Stream>
<Stream id="112372" streamType="2" selected="1" default="1" codec="dca" index="1" channels="8" bitrate="4056" language="English" languageTag="en" languageCode="eng" audioChannelLayout="7.1" bitDepth="24" profile="ma" requiredBandwidths="5285,5170,4839,4548,4494,4494,4494,4494" samplingRate="48000" displayTitle="English (DTS-HD MA 7.1)" extendedDisplayTitle="English (DTS-HD MA 7.1)">
</Stream>
<Stream id="112373" streamType="3" selected="1" default="1" forced="1" codec="srt" index="2" language="English" languageTag="en" languageCode="eng" requiredBandwidths="1,1,1,1,1,1,1,1" displayTitle="English Forced (SRT)" extendedDisplayTitle="English Forced (SRT)">
</Stream>
<Stream id="112374" streamType="3" codec="pgs" index="3" bitrate="73" language="English" languageTag="en" languageCode="eng" headerCompression="1" requiredBandwidths="85,85,85,85,85,85,85,85" displayTitle="English (PGS)" extendedDisplayTitle="English (PGS)">
</Stream>
<Stream id="112375" streamType="3" codec="pgs" index="4" bitrate="53" language="French" languageTag="fr" languageCode="fra" headerCompression="1" requiredBandwidths="66,66,66,66,66,66,66,66" displayTitle="French (PGS)" extendedDisplayTitle="French (PGS)">
</Stream>
<Stream id="112376" streamType="3" codec="pgs" index="5" bitrate="54" language="German" languageTag="de" languageCode="deu" headerCompression="1" requiredBandwidths="65,65,65,65,65,65,65,65" displayTitle="German (PGS)" extendedDisplayTitle="German (PGS)">
</Stream>
<Stream id="112377" streamType="3" codec="pgs" index="6" bitrate="56" language="Italian" languageTag="it" languageCode="ita" headerCompression="1" requiredBandwidths="66,66,66,66,66,66,66,66" displayTitle="Italian (PGS)" extendedDisplayTitle="Italian (PGS)">
</Stream>
<Stream id="112378" streamType="3" codec="pgs" index="7" bitrate="56" language="Spanish" languageTag="es" languageCode="spa" headerCompression="1" requiredBandwidths="71,71,71,71,71,71,71,71" displayTitle="Spanish (PGS)" extendedDisplayTitle="Spanish (PGS)">
</Stream>
<Stream id="112379" streamType="3" codec="pgs" index="8" bitrate="53" language="Dutch" languageTag="nl" languageCode="nld" headerCompression="1" requiredBandwidths="67,67,67,67,67,67,67,67" displayTitle="Dutch (PGS)" extendedDisplayTitle="Dutch (PGS)">
</Stream>
<Stream id="112380" streamType="3" codec="pgs" index="9" bitrate="54" language="Danish" languageTag="da" languageCode="dan" headerCompression="1" requiredBandwidths="65,65,65,65,65,65,65,65" displayTitle="Danish (PGS)" extendedDisplayTitle="Danish (PGS)">
</Stream>
<Stream id="112381" streamType="3" codec="pgs" index="10" bitrate="62" language="Finnish" languageTag="fi" languageCode="fin" headerCompression="1" requiredBandwidths="74,74,74,74,74,74,74,74" displayTitle="Finnish (PGS)" extendedDisplayTitle="Finnish (PGS)">
</Stream>
<Stream id="112382" streamType="3" codec="pgs" index="11" bitrate="54" language="Norwegian" languageTag="no" languageCode="nor" headerCompression="1" requiredBandwidths="65,65,65,65,65,65,65,65" displayTitle="Norwegian (PGS)" extendedDisplayTitle="Norwegian (PGS)">
</Stream>
<Stream id="112383" streamType="3" codec="pgs" index="12" bitrate="50" language="Swedish" languageTag="sv" languageCode="swe" headerCompression="1" requiredBandwidths="62,62,62,62,62,62,62,62" displayTitle="Swedish (PGS)" extendedDisplayTitle="Swedish (PGS)">
</Stream>
<Stream id="112384" streamType="3" codec="pgs" index="13" bitrate="1" language="English" languageTag="en" languageCode="eng" headerCompression="1" requiredBandwidths="65,65,65,65,65,65,65,65" displayTitle="English (PGS)" extendedDisplayTitle="English (PGS)">
</Stream>
<Stream id="112385" streamType="3" codec="pgs" index="14" bitrate="1" language="French" languageTag="fr" languageCode="fra" headerCompression="1" requiredBandwidths="59,59,59,59,59,59,59,59" displayTitle="French (PGS)" extendedDisplayTitle="French (PGS)">
</Stream>
<Stream id="112386" streamType="3" codec="pgs" index="15" bitrate="1" language="German" languageTag="de" languageCode="deu" headerCompression="1" requiredBandwidths="56,56,56,56,56,56,56,56" displayTitle="German (PGS)" extendedDisplayTitle="German (PGS)">
</Stream>
<Stream id="112387" streamType="3" codec="pgs" index="16" bitrate="1" language="Italian" languageTag="it" languageCode="ita" headerCompression="1" requiredBandwidths="53,53,53,53,53,53,53,53" displayTitle="Italian (PGS)" extendedDisplayTitle="Italian (PGS)">
</Stream>
<Stream id="112388" streamType="3" codec="pgs" index="17" bitrate="1" language="Spanish" languageTag="es" languageCode="spa" headerCompression="1" requiredBandwidths="65,65,65,65,65,65,65,65" displayTitle="Spanish (PGS)" extendedDisplayTitle="Spanish (PGS)">
</Stream>
</Part>
</Media>

There is not enough information in the log snippets you posted. Important information is missing.

Did you open the zip file? There appears (to me) to be full files inside the zip. Not sure what’s going on with the two snippets shown. One is 25k in size the other is 62k.

I was not able to post either one without zipping them as they exceeded size limits.

The ZIP file you provided only contained 2 XML files
There were no server logs (Settings - Server - Troubleshooting - Download Logs)

Chuck, I can provide that, but that’s not what Otto asked for so I didn’t provide that. I’ll get the logs tomorrow. Thanks again for the help.

If you would please.

Do you need any assist with the DNS rebinding ?

Plex Media Server Logs_2022-12-30_11-51-07.zip (5.0 MB)

Log 1 is the Amsterdam example run.

Regarding the DNS Rebinding, I’m not entirely sure how to resolve that.

Under my OPNSense settings I have two related options:

I can check the first one (certainly great for doing testing), but I think there’s supposed to be a way to just let Plex get excepted while still keeping this on using the second item, but I have zero idea how to go about that one. Any ideas?

It’s contained in the link I gave above. Add the domain name plex.direct to “alternate hostnames” (I think).

Doing so. At first I checked the first thing and it still had the 1-minute loading time.

I added “plex.direct” to the Alternate Hostnames box and tried again. Still a 1-minute load time, but this happened:

image

So it’s direct playing, but still taking forever to load. Odd.

After a reboot it now played instantly. Let’s assume this is fixed and due to an OPNSense issue?

At least you are now getting the full quality of the file into the player.
To verify, re-check this playback status after a few minutes. Sometimes it is switching to transcoding automatically.

There are other reasons why playback can start delayed.
Sticking close to the Plex naming guides for media is a good start.
See that your media storage is on local hard drives.
And these drives are better not spun down when idle.

Oops. Whack-a-mole continues. I played Top Gun Maverick and failed. 1-minute load time and this:

image