Hardware Transcoding - Getting my bearings

My Plex server has become much more “serious” over the last month. I’ve upgraded the hardware, and purchased a Plex Pass to do hardware transcoding. (so I’m new to optimizing this.)

Question: What’s the best way to setup for a situation where you want 4k movies to always transcode, but stay at 4k? (If they are not transcoding, they stutter.)

When i Disable direct play and direct stream, transcoding happens well on my graphics card. But that’s an application wide setting. Is there a way to force 4k to transcode but allow lower resolutions to stream directly?

also,
Every time a 4k movie starts up, it defaults to a 1080p format and i have to manually change it. How can i always make it pick a 4k option setting?

I am not aware of any case where Plex would transcode 4K to 4K. You could generate optimized versions of the file that are of lower bit rate.

Each client device has to change the default settings for transcoding, with the device capabilities being the limiting factor.

If I disable Direct Stream and Direct play i can keep the aspect ratio at 4k and still transcode.

It only shows one 4k option but many 1080p options.

That one 4k option, if direct streamed causes stutter.

Summary: (You have)
QNAP TS-873A (Is this your Plex Server or just file server?)
It has an AMD V1500B processor (Determines how well 4K is transcoded)
You purchased a Plex Pass (Forum doesn’t show this and likely your server hasn’t picked up the activation. Are you using the same account/email for both?)
Graphics Card (What is it and where is it?)
You have a file you are trying to play and it buffers. (What device are you using for Playback? This is where troubleshooting should be focused)

While playing back the file, go to your computer and in the browser enter https://app.plex.tv/web . Upper right, click on the pulse symbol and then dashboard. Look at the Now Playing to see the details of the session. Tell us what you see, screenshot if you can.

The TS-873A is both the plex server and hosts the videos.

I have a NVIDIA GEFORECE GTX 1050 TI card in it (on the compatibility list for my NAS). NVidia Drivers installed.

I can confirm transcoding works on the card, because i see the graphics card revving in the performance monitor whenever i don’t “Direct Stream”.

The video is GREAT whenever i see the graphics card working. Even at 4k. My server shows the plex pass. I can also view the dashboards (an indication that the Plex Pass is active.)

So as of right now, I have Direct Stream and Direct Play off and things play great (because transcoding kicks in.)

I’m left with:

  1. How can I get the video to default to the highest resoltuion and not pick a 1080p by default?
  2. Should I direct play lower resolution files? And if so, is there a way to only “direct play” 1080p or below?

I will try to get you a screen shot. I have to re-enable direct play/stream.

@Tiberius is correct. Focus on why the buffering occurs.

Forcing a transcode can mask problems with many things - damaged media container, poorly encoded or damaged video/audio tracks, network connectivity problems, etc.

If you’re transcoding HDR material, note that you’re watching tonemapped SDR video.

Also, the capabilities of Plex clients vary widely depending on the client, platform, version, etc. It is difficult to answer client specific questions without knowing which client you are using.

Please provide some additional info:

  • Plex Media Server version
  • Plex client & version
  • XML Info for one of the media files that buffer (save the file as a .txt, the forum does not support .xml attachments).
1 Like

The Server is 1.26.0

Client: Plex For LG
Client Version: 5.37.1
Platform: 3.9.0

Hardwired to a 100mbps switch

here’s the media info:
media info.txt (82.2 KB)

Here’s a pic of the stats. Ignore the video on the right. It’s paused going to my browser.

Right off the bat, I am noticing that the bitrate of the video is above the bitrate of your switch (100mbps). This is likely the source of the buffering in direct-playing. Getting a transcode may cause the server to transcode it to a lower bitrate (while still technically 4K resolution), which means it plays smoothly.

So if you are ok with transcoding all videos, what you want now is to force a PLAYER to pick maximum quality, rather than defaulting to 1080? Hmm. I wonder. I don’t have any 4K content (or players), but I’d be annoyed if it was HARD CODED into the players to choose 1080 without a higher option…

Check your PLAYER settings. See if any of them allow you to pick the default Quality of the video. Look for that keyword, Quality. On my Plex-for-Windows app, I see at most a 20mbps 1080p option, with no setting for CHOOSING a 4K. I hope that is because it knows I have no 4K content/players, but I am worried that they simply didn’t think anyone would choose to transcode up to a 4K video voluntarily.,

Ok thank you for that info. I might be able to rewire my tv and upgrade it to cat 6 so i can plug into my gigabit switch. (old cat 5 now.)

I can first string a long cat6 patch cable along the floor to verify it will subdue buffering.

You’ve all helped me get my bearings.

It would be ideal if the system detected buffering and then began transcoding automatically – slowly dropping the speed until buffering stopped.

If i go into the very large 4k videos, can i choose to turn off direct play and streaming (and set the bandwidth i want) on each video separately? Will it remember that setting? Or is it just a global setting?

I think the Plex system is designed around assuming that your local network is strong and sufficient, but your remote connection is probably close to dial-up. This is why there are a lot of options for transcoding things downwards, but not really upwards.

Cat5 ought to be ok for gigabit networking (well, cat5e), as they’ve been capable of gigabit for decades now. But you do need to make sure each step along the way is also capable of gigabit networking, including your QNAP (most likely) as well as the TV/player (most likely it is NOT. Most manufacturers do not shell out for gigabit network cards on TVs, but do have decent high-speed wifi upwards of 300-500 mbps).

I think I remember seeing an option in one of my… players I think?.. that allowed for automatic adjustment of video quality to maximize the quality per your connection, but I don’t remember where that is. (Just found it, apparently web browsers can adjust quality based on connection speed. Not sure if it is browser-related or only the web app has been updated to use it).

As far as I know, the specific version/quality of a video you play is not preserved between play sessions. And I sure you cannot enable/disable direct-playing/streaming of files on a per-file basis.

1 Like

Thanks for the details. My cat 5 (not cat 5E) is about 20 years old. I think I have a way forward.

I really appreciate the “I think the Plex system is designed around assuming your local network is strong…” It helps me have the right frame of mind.

The Ethernet port on the TV is 100 Mbps.

If available, you will get a faster network connection using 5 GHz, 802.11ac WiFi.

The TV will connect to the WiFi network at a PHY rate of 433 Mbps (1x1). The actual throughput is nowhere near that, but is definitely faster than 100 Mbps.

If a strong wifi signal is not available at the TV’s location, consider adding an inexpensive access point, using the Ethernet cable for backhaul. You’ll have a solid connection for the TV and for other WiFi devices in that location.

1 Like

FYI, that requires Plex to transcode the stream, so any HDR video will be tonemapped to SDR.

Thanks for the additional information.

If the movie has a Dolby Digital, AC3, audio track, consider using it instead of TrueHD. Dolby Digital will direct play instead of transcoding like TrueHD. Movies that shipped on Blu-ray with TrueHD also contain an AC3 version of the audio track, so you should be able to find the AC3 audio if it is no longer in the file on your server.

Edit: An additional bonus of using AC3 audio is that you can enable SRT subtitles and still direct play the video. With the Plex LG app, enabling PGS or VOBSUB subtitles results in a video transcode. If the audio is transcoding, enabling any subtitle, including SRT, results in a video transcode.


Regarding the XML info for the movie, some information is missing.

There should be several additional lines between MediaContainer and /Media.

Double check that the information is available. Of interest is the info for requiredBandwidths. That shows if Plex has analyzed the file and how much bandwidth Plex believes is required to play the file.

From Grease:

<MediaContainer size="1" allowSync="1" identifier="com.plexapp.plugins.library" librarySectionID="4" librarySectionTitle="Movies" librarySectionUUID="140a1df9-1af2-47a7-8e2d-443d30e0f739" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1649089686">
<Video ratingKey="10346" key="/library/metadata/10346" guid="plex://movie/5d776827880197001ec90906" studio="Paramount" type="movie" title="Grease" librarySectionTitle="Movies" librarySectionID="4" librarySectionKey="/library/sections/4" contentRating="PG" summary="Australian good girl Sandy and greaser Danny fell in love over the summer. But when they unexpectedly discover they're now in the same high school, will they be able to rekindle their romance despite their eccentric friends?" rating="7.6" audienceRating="8.7" viewOffset="1889171" lastViewedAt="1652299819" year="1978" tagline="Grease is the word." thumb="/library/metadata/10346/thumb/1652248844" art="/library/metadata/10346/art/1652248844" duration="6627808" originallyAvailableAt="1978-06-15" addedAt="1457164752" updatedAt="1652248844" audienceRatingImage="rottentomatoes://image.rating.upright" chapterSource="media" primaryExtraKey="/library/metadata/9268" ratingImage="rottentomatoes://image.rating.ripe">
<Media id="7483" duration="6627808" bitrate="67672" width="3840" height="2160" aspectRatio="1.78" audioChannels="6" audioCodec="truehd" videoCodec="hevc" videoResolution="4k" container="mkv" videoFrameRate="24p" videoProfile="main 10">
</Media>

From a movie on my server. Note the additional lines beginning with Part accessible and Stream id.

<MediaContainer size="1" allowSync="1" identifier="com.plexapp.plugins.library" librarySectionID="6" librarySectionTitle="Movies - 4K" librarySectionUUID="60782c55-1532-4666-852d-b97bdb5f37ba" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1649153867">
<script/>
<Video ratingKey="11965" key="/library/metadata/11965" guid="plex://movie/5d77705edd931c001e38bde2" studio="Universal Pictures" type="movie" title="1917" librarySectionTitle="Movies - 4K" librarySectionID="6" librarySectionKey="/library/sections/6" contentRating="R" summary="April 6th, 1917. As an infantry battalion assembles to wage war deep in enemy territory, two soldiers are assigned to race against time and deliver a message that will stop 1,600 men from walking straight into a deadly trap." audienceRating="8.3" viewCount="8" skipCount="14" lastViewedAt="1650688982" year="2019" tagline="Time is the enemy" thumb="/library/metadata/11965/thumb/1652235182" art="/library/metadata/11965/art/1652235182" duration="7139488" originallyAvailableAt="2019-12-04" addedAt="1584633109" updatedAt="1652235182" audienceRatingImage="imdb://image.rating" chapterSource="media" primaryExtraKey="/library/metadata/11985">
<Media id="32796" duration="7139488" bitrate="74393" width="3840" height="2160" aspectRatio="1.78" audioChannels="8" audioCodec="truehd" videoCodec="hevc" videoResolution="4k" container="mkv" videoFrameRate="24p" videoProfile="main 10">
<Part accessible="1" exists="1" id="46912" key="/library/parts/46912/1584633109/file.mkv" duration="7139488" file="/nas/media/movies-4k/1917 (2019) [2160p.HDR10+]/1917 (2019) [2160p.HDR10+].mkv" size="66403139119" container="mkv" deepAnalysisVersion="6" indexes="sd" requiredBandwidths="107228,93570,91299,87555,85356,84329,82693,81399" videoProfile="main 10">
<Stream id="105544" streamType="1" default="1" codec="hevc" index="0" bitrate="70111" language="English" languageTag="en" languageCode="eng" bitDepth="10" chromaLocation="topleft" chromaSubsampling="4:2:0" codedHeight="2160" codedWidth="3840" colorPrimaries="bt2020" colorRange="tv" colorSpace="bt2020nc" colorTrc="smpte2084" frameRate="23.976" height="2160" level="153" profile="main 10" refFrames="1" requiredBandwidths="101556,89491,87217,83477,80975,79948,78325,77102" width="3840" displayTitle="4K HDR10 (HEVC Main 10)" extendedDisplayTitle="4K HDR10 (HEVC Main 10)"> </Stream>
<Stream id="105545" streamType="2" selected="1" default="1" codec="truehd" index="1" channels="8" bitrate="3810" language="English" languageTag="en" languageCode="eng" audioChannelLayout="7.1" bitDepth="24" requiredBandwidths="5482,5120,4284,4027,3867,3839,3839,3839" samplingRate="48000" title="TrueHD 7.1 + Atmos" displayTitle="English (TRUEHD 7.1)" extendedDisplayTitle="TrueHD 7.1 + Atmos (English)"> </Stream>
<Stream id="105546" streamType="2" codec="ac3" index="2" channels="6" bitrate="448" language="English" languageTag="en" languageCode="eng" audioChannelLayout="5.1(side)" requiredBandwidths="448,448,448,448,448,448,448,448" samplingRate="48000" title="Dolby Digital 5.1" displayTitle="English (AC3 5.1)" extendedDisplayTitle="Dolby Digital 5.1 (English AC3)"> </Stream>
<Stream id="105547" streamType="3" default="1" codec="pgs" index="3" bitrate="25" language="English" languageTag="en" languageCode="eng" requiredBandwidths="53,53,53,53,53,53,53,53" displayTitle="English (PGS)" extendedDisplayTitle="English (PGS)"> </Stream>
<Stream id="105772" key="/library/streams/105772" streamType="3" codec="srt" language="English" languageTag="en" languageCode="eng" format="srt" displayTitle="English (SRT External)" extendedDisplayTitle="English (SRT External)"> </Stream>
</Part>
</Media>

Adding to what has been presented above, you either conform your media to the devices you have on hand or go the expensive route and select devices that can direct play the media.

The one thing not said is that the CPU in that NAS will struggle with transcoding HD audio and since the tv is always going ask for stereo it is much easier to default the audio to AC3 or when ripping only choose AC3. Otherwise you are buying an Nvidia Shield and surround system to put in front of the TV.

1 Like

The Ethernet port on the TV is 100 Mbps.

If available, you will get a faster network connection using 5 GHz, 802.11ac WiFi.

Good point. It probably is 100MBps. I can flip over to my wifi which is 5 GHz, 802.11ac. I don’t really know how reliable that will be, but it’s a lot easier than trying to rewire.

thanks for the tips on Dolby.

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