Plex chooses to transcode video on Nvidia Shield Pro, but not on Roku Streaming Stick+ 2021

Server Version#: 1.28.2.6106
Player Version#: Nvidia Shield Pro: 9.7.0.34811 (e3f8b112)
Player Version#: Roku Streaming Stick+ (2021): 7.0.13.7804-2fd4cda44-Plex

TV: Hisense H8F TV (ARC-only, no eARC)
AV Receiver: Onkyo NR-737 (Supports Atmos but does not do HDR video, so devices are plugged into TV)

I’m wondering if I’ve encountered a bug in Plex for certain files where it has to transcode audio but is able to direct play video.

My Nvidia Shield Pro is plugged into a TV with ARC that only supports Dolby Digital and Dolby Digital Plus 5.1. Within the Plex app, I can set Audio Passthrough to Optical, and Audio encodings set to AC3 to force Dolby Digital 5.1 over HDMI to the TV’s ARC port down to my receiver.

I need to change the optical/ac3 setting or else Plex will try to convert unsupported audio to Opus for Android-TV (Shield) clients, which isn’t recognized by my TV’s ARC and is passed down to the receiver as Dolby Digital 2.0 (L/R front channels only). This fixes audio for my specific setup.

However, when forcing ac3, Plex will sometimes also transcode video with the transcoding reason being the file’s required bandwidth attribute exceeds the maximum bandwidth limit of the Nvidia Shield profile of 200000 kbps.

From BBC series “Seven Worlds, One Planet” s01e03 with optical/ac3 forced-on (Attachment: Shield_s01e03_converts video and video.log)

Aug 28, 2022 20:07:14.426 [0x7fa17b0bdb00] DEBUG - MDE: Selected protocol hls; container: mkv
Aug 28, 2022 20:07:14.426 [0x7fa17b0bdb00] DEBUG - MDE: analyzing media item 78163
Aug 28, 2022 20:07:14.426 [0x7fa17b0bdb00] DEBUG - MDE: E3 - South America: Direct Play is disabled
Aug 28, 2022 20:07:14.426 [0x7fa17b0bdb00] DEBUG - Streaming Resource: Calculated bandwidth of 484621kbps exceeds bandwidth limit. Changing decision parameters provided by client to fit bandwidth limit of 200000kbps
Aug 28, 2022 20:07:14.426 [0x7fa17b0bdb00] DEBUG - Streaming Resource: Determining preferred transcode encoders through transcode only decision.

Plex is thinking the required bandwidth for the file is 484621 kbps, where the Shield’s profile has a max limit of 200000 kbps.

  • If I do not force ac3, Plex will direct play the video and fall back to transcoding audio to opus. However, the confusing part is that audio is being transcoded in either case - so why is Plex choosing to transcode video when the audio is set to ac3?

  • The even more confusing thing is that s01e02 of the series has an even higher required bandwidth of 575357 kbps and when forcing optical/ac3 the video is not transcoded (Attachment: Shield_s01e02_direct_plays_video_and_audio.log) - so this appears to be a bug somewhere?

The real kicker is that both files play fine on the lower-powered Roku Streaming Stick+ (2021) as Roku clients will transcode unsupported audio to Dolby Digital Plus instead of Opus which is recognized by the TV ARC and receiver.

I’m assuming these are server-side decisions so I’ve included the Plex server logs and media XML files:
Shield_s01e03_converts video and audio.log (95.3 KB)
Shield_s01e02_direct_plays_video_and_audio.log (49.2 KB)
SevenWorlds_OnePlanet_4k_BluRay_s01e03_transcodesvideo.xml.txt (4.4 KB)
SevenWorlds_OnePlanet_4k_BluRay_s01e02_directplaysvideo.xml.txt (4.4 KB)

Here is the Roku log in case that is interesting: Roku_s01e03_direct plays video, converts audio.log (72.6 KB)

That looks like an incorrect Deep Analysis was performed. You can perform a manual update using the info from this post:

Thank you - that does seem like the problem.

I re-ran deep analysis although unfortunately it is still reporting an outlier in for the video bitrate required bandwidth:

requiredBandwidths=“476807,93529,86083,81650,79867,78729,78297,78297”

So it sounds like this may be a bug in deep analysis? I’ll have to remove/readd the file to the Library before it runs deep analysis again to see if it plays correctly without the required bandwidth tags (I think it will).

SevenWorlds_OnePlanet_s01e03_new.xml.txt (4.5 KB)

When you tried the manual Deep Analysis, did it finish immediately or take some time? If it finished immediately, you might have to add the -x or --force option for it to run.

You might run into the same issue without the Deep Analysis as it always greatly overestimates the necessary bandwidth when those values don’t exist.

The deep analysis took around 5 - 6 minutes.

To test, I removed the s01e03 from the Library and then re-added it. Without the required bandwidth tag and before deep analysis is run, the video direct plays for the entire length of the file.

If I run a deep analysis, I get the same required bandwidth string, and video is then transcoded.

Since the file plays fine on the Roku even with the required bandwidth set and the file decodes properly in ffmpeg I assume this is an issue with the outlier in the required video bandwidth string being checked during transcoding when optical/ac3 is forced-on on the Shield.

This also affects a few other unrelated 4k titles like Shrek (2001) where deep analysis comes up with a high > 200,000 kbps video bitrate, I’ll have to comb through my 4k library to see what other content is affected by this.

Is there a way to troubleshoot why deep analysis is coming up with this high number?

@FordGuy61 Might be able to help as I’ve seen him on previous Deep Analysis threads. Not sure if more than the Deep Analysis logs are needed or not for debug.

One last thought I have is to remux in MKVToolnix prior to adding and performing the analysis. That bandwidth value is out of spec for UHD HEVC, so it can’t be accurate.

Well remuxing with ffmpeg or MKVToolnix unfortunately didn’t help, or even remuxing directly from the .ts file from the disc instead of the MKV file produced by MakeMKV.

After combing through the ~ 180 4k titles on my Plex server it seems to mostly only affect the BBC documentaries and two other movies, although all were ripped with different versions of MakeMKV and even different optical drives across 2-3 years.

I wrote a bash script to replace any requiredbandwidth string value that exceeds 200000kbps with the next smallest value and this gets the files to direct play on the Shield, although I suspect I’ll have to re-run this occasionally as new titles are added or if deep analysis is re-ran as part of maintenance.

I can try uploading a test file if this has piqued anyone’s interest or if they want to take a closer look at what may be going on.

Affected files:

/Media/Data/4k/TV/Blue Planet II (2017)/Disc2/Blue Planet II - S01E05 - Green Seas.mkv
/Media/Data/4k/TV/Blue Planet II (2017)/Disc3/Blue Planet II - S01E06 - Coasts.mkv

/Media/Data/4k/TV/A Perfect Planet (2021)/A Perfect Planet - s01e04 - Oceans - Disc2_t00.mkv
/Media/Data/4k/TV/A Perfect Planet (2021)/A Perfect Planet - s01e05 - Humans - Disc2_t01.mkv

/Media/Data/4k/TV/Seven Worlds, One Planet (2019)/Disc 1/Seven Worlds, One Planet (2019) - S01E01 - Antarctica.mkv
/Media/Data/4k/TV/Seven Worlds, One Planet (2019)/Disc 1/Seven Worlds, One Planet (2019) - S01E02 - Asia.mkv
/Media/Data/4k/TV/Seven Worlds, One Planet (2019)/Disc 1/Seven Worlds, One Planet (2019) - S01E03 - South America.mkv
/Media/Data/4k/TV/Seven Worlds, One Planet (2019)/Disc 2/Seven Worlds, One Planet (2019) - S01E04 - Australia.mkv
/Media/Data/4k/TV/Seven Worlds, One Planet (2019)/Disc 2/Seven Worlds, One Planet (2019) - S01E05 - Europe.mkv
/Media/Data/4k/TV/Seven Worlds, One Planet (2019)/Disc 3/Seven Worlds, One Planet (2019) - S01E06 - North America.mkv

/Media/Data/4k/Movies/Halloween/Halloween - Scream Factory 4k/Halloween II (1981) - 4k/Halloween II (1981) - With Commentaries by Director Rick Rosenthal, Leo Rossi, and Actor Dick Warlock - t00.mkv

/Media/Data/4k/Movies/SAW/Spiral - From the Book of Saw (2021)/Spiral - From the Book of Saw (2021) - With Commentaries by Director Darren Lynn Bousman, Co-Screenwriter Josh Stolberg, Composer Charlie Clouser, and Producers Oren Koules and Mark Burg - t06.mkv

plex_requiredbandwidth.sh.txt (5.3 KB)

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