[INFO] Plex, 4k, transcoding, and you - aka the rules of 4k

NOTE: for 2022 – Plex has come a long way since this FAQ was originally written, HW transcoding has become more available and more stable, and tone mapping was recently added to address the hdr/sdr color conversion issues.

The first 4 ‘rules’ generally are no longer as important as they once were, but may still be a good thing to bear in mind.

Dolby Vision, is an entirely other mess. THIS thread/FAQ is NOT about DV.

DV work is still in progress, and there are no perfect TV’s or external devices. There are multiple other threads on dolby vision, I would recommend everyone check the links near the bottom of the first post, or search the forum for their particular tv + dolby vision (ie dolby vision sony) to find relevant threads and posts concerning their issues.

Adding your tv/device model# to a search will probably help narrow it down even further.


*** TONE MAPPING SUPPORT ADDED @ https://support.plex.tv/articles/hdr-to-sdr-tone-mapping/ ***
do note: enabling tone mapping potentially can cause your server to no longer be able to transcode 4k due to the extra load, especially on windows (only cpu currently supported).


TLDR; buy a Shield PRO or XBOX ONE > 4K/atmos receiver > 4K tv

added 11/2023: Recent models of Amazon FireTV devices may have support for bitstream/passthrough.

No, nothing new has changed above.

shield pro is recommended over shield tube, due to the tube having less ram and ongoing troubles with high bit rate 4k bluray remuxes. if/when those issues are resolved, then this recommendation will be amended.

Note for 2022: shield experience update has added a new feature, per @ [INFO] Plex, 4k, transcoding, and you - aka the rules of 4k - #446 by W0lfm0n there may be hope for tube owners. I still recommend the pro, do not try to save a few dollars when it affects the whole 4k experience.


“I just want my 4K+ATMOS to work” > Diskstation/Roku/AppleTV Best Setup - Advice Please - #6 by FordGuy61


added 11/2023: Another great HD audio reference explainer @ Reddit - The heart of the internet


These rules are a guideline and meant to be humorous while still being informative and accurate as possible

The Rules of 4k and plex

  • The first rule of 4k is
    • Don’t bother transcoding 4k
  • The second rule of 4k is
    • DON’T bother transcoding 4k
  • The third rule of 4k is
    • If you cannot direct play 4k, then perhaps you should not even be collecting 4k.
  • The forth rule of 4k is
    • If you don’t have the storage space for a copy of both 4k and 1080/720, then perhaps you should not even be collecting 4k.
  • The fifth rule of 4k is
    • To direct play 4k, your entire playback chain must be compatible with both the VIDEO and AUDIO codecs of the content you are trying to play.
    • 4k bluray ripped content typically includes HD audio (ie lossless truehd/atmos), which must have a compatible audio player (ie a truehd/atmos compatible receiver)
    • DTS-HD MA should always have a lossy core which should direct play, even if your system does not support the HD part. Some TV’s and/or soundbars do not support any DTS.
    • This may still depend on what the player reports as compatible back to the plex server, as the server will transcode or not, accordingly.
  • The sixth rule of 4k is
    • You cannot direct play HD audio via optical or ARC, instead you must use use a compatible lossy audio stream such as dolbydigital/dts 5.1 or stereo. You can either manually remove the HD audio streams (ie remux), or choose a non-hd audio stream from within plex pre-play screen or pause screen options.
    • The DTS core (as explained above), should be able to direct play over ARC and optical, assuming your device(s) support DTS (not all do).
    • about atmos https://www.digitaltrends.com/home-theater/dolby-atmos-sound/
  • The seventh rule of 4k is
    • You must use cables that are compatible with hdmi 2.0 or higher. (Premium High Speed/Ultra High Speed) See @ HDMI - Wikipedia for details.
    • Your equipment may need to be manually configured for hdmi 2.0+ (some are set to hdmi 1.4 by default for compatibility).
  • The eighth and non-final rule of 4k is
    • Generally you will need gbit ethernet because 4k bitrate bursts can exceed 100mbit. smart tv’s often have 100mbit which can cause buffering on otherwise direct playing content.
      • Wifi can work, but entirely depends on your network and how much other wifi interference in range. You should not expect consistent 4k playback over wireless even if it works most of the time.
      • reddit thread about 4k/hevc peak bandwidth usage Reddit - The heart of the internet

  • The simplest 4k direct play plex solution is nvidia shield + 4k/atmos receiver + 4k hdr tv.
  • If you are direct playing 4k, then you do NOT need a hugely powerful server, you just need fast enough disk and network.
  • To avoid transcoding for remote and non-4k clients, keep your 4k content in separate plex libraries. (and don’t give users who can’t direct play 4k access to them)
  • This may of course mean that you keep a 4k copy and a 1080/720 copy, but if you are collecting 4k content then you should not be worried about storage space, should you?
  • if you don’t want to create a separate library, you can use LABELS to restrict your users from seeing 4k content:


Subtitles

Depending on the client and subtitle type, enabling subtitles may cause video transcoding. Since plex does not transcode INTO x265, your 4k video will be transcoded down to x264 SDR, and you will lose all the benefits of 4k hdr.

So if you are having problems with transcoding what you think should be direct play, then double check if you have subtitles enabled, then disable them and see if it works.

In order to direct play subtitles, your CLIENT must be able to direct play those subtitles.

Client capabilities vary greatly, some clients may always require transcoding to have subtitles. Other clients may handle most subtitle types.

For example, Nvidia shield can direct play 4k with most subtitles types, like SRT and PGS.


Plex and 4k transcoding

Ok I want to ignore all the above and still want to transcode 4k; There is no free lunch. If you are transcoding 4k instead of having a direct play solution, then you will pay for it instead with expensive server hardware.

1080 transcoding is like a grain of sand on the beach of 4k transcoding. that is how much more power 4k requires. Great power does not come cheaply or easily.

transcoding 4k with CPU requires an extremely powerful cpu (plex cpu support article)

transcoding 4k with GPU requires active plex pass

audio is never transcoded on GPU so the cpu must be powerful enough to handle the number of streams expected even when GPU is doing the video.

plex does not currently transcode TO x265

any transcoding is also a highly IO intensive operation, this means you need sufficient ram, disk IO, and network bandwidth to get this bits in, converted, and sent out to the client(s).

plex does not currently do color mapping or conversion from HDR to SDR. transcoded HDR will have washed out colors.

  • tone mapping at the transcoder added @ Plex Media Server - #381 by StSimm1
  • some clients can now color correct the washed out colors and display hdr on an sdr display (experimental ios/android players I believe). The server is NOT doing it, the client/player is.

transcoding 4k hdr without a separate gpu requires a 7th generation intel cpu (i3/5/7 7000 series) with a 6th generation quicksync capable igpu. (ie intel uhd 600 series or better)

intel igpu transcoding is fully supported on both windows and linux

nvidia gpu transcoding is fully supported on windows.

nvidia linux gpu transcoding currently only supports ENCODING (the easier part). nvidia linux DECODING (the hard part) is still under development. there is no ETA, do not ask, it will be released when it is ready.

plex 4k/hevc decoding on linux/nvidia now available @ pms server beta @ Plex Media Server - #286 by emilybersin

nvidia 4k transcoding generally needs a 10 series or equivilent gpu. generally minimal 4k working cards would be gtx 960 (gm206) or 1050 or p400 quadro. p2000 quadro is often recommended due to unlocked encoding streams (still the easier part)

  • for linux+nvidia, VIDEO RAM is very important. 4k transcodes require approx ~1.3 gigs of video ram PER 4k transcode. This means in most cases, VRAM will be the limit on the number of 4k transcodes. Non-4k transcodes will typically use less than 500 megs of video ram.
  • cards within the same generation have the same decode/encode chip, ie all pascal cards will have the same quality/speed for transcoding.

a great comparison page for plex GPU transcoding and additional details @ nVidia Hardware Transcoding Calculator for Plex Estimates

there is a driver hack to unlocked some nvidia cards encoding, which may work, but that is obviously not something supported here or by plex. google is your friend.

the gtx 1030 does not have any encoder, so while it can decode 4k (the hard part), the cpu will be used to encode (the easier part).

amd gpu transcoding should work in windows, not sure about linux (I don’t know the details here, will update over time)

related plex support articles
https://support.plex.tv/articles/115002178853-using-hardware-accelerated-streaming/


some questions, answers, solutions


Q: Why does vlc/kodi/infuse/(any other common apps?) direct play my 4k content, while plex player doesn’t?

  • A: those applications are custom designed standalone applications which have their own built in codecs and capabilities and do not require a server, while plex clients are typically a lightweight app that depends more on the DEVICE to do the playback of directly compatible containers/codecs and make use of the SERVER to do the heavy lifting to convert (transcode) content which is not directly handled by the device/player.


Q: Why is my 4k smart tv app transcoding? its 4k it should be direct playing?!!?!? netflix/hulu/amazon/etc play in 4k with no problem?

  • A: smart tvs do not normally support the HD AUDIO that is included with 4k bluray rips/remuxes. when you are ripping your own 4k disks, you can see and choose which audio streams are included, make sure to include an dolby digital or dts 5.1 or stereo stream.
    then when you are going to play a movie, make sure that 5.1 or stereo stream is selcted.
    netflix etc does not use HD audio so it does not have this problem.
    also, netflix etc have greater control over both their APP and the how their CONTENT is encoded, so they can match them up to get the best experience.
    plex has to deal with content from all over the place, with unknown/inconsistent qualities and codec variations. Streaming 4k is also MUCH lower bitrate than 4k bluray remuxes.


Q: Why doesn’t my 4k smart tv direct play hd audio?

  • A: most smart tvs are made as cheaply as possible, have crappy speakers, and only include the bare minimum codecs and functionality required to get the job done.
    so mostly only dolbydigital/dts 5.1 or stereo is directly compatible.
    most smart tvs do allow for hdmi passthrough via something called ARC.
    however ARC does not support the HD audio as explained previously, so again dd/dts 5.1 or stereo is generally the best that can come out of the tv.
    some brand new tvs and receivers support a new version of HDMI which has hd audio support via E-ARC.
    even then, e-arc support is still in its infancy.


Q: Ok how do I get my HD audio along with 4k to direct play ?!?!?

  • A: you must use a plex client that can directly handle the codecs you are using, including the HD audio. This will likely NOT be your smart TV, it will be a separate device. You must also have the HARDWARE (ie receiver) that can handle the hd audio, like an atmos/4k receiver.

I use an nvidia shield with no issues and I highly recommend them, but you still need an atmos/4k receiver to direct play 4k/hdr/hd-audio content.

nvidia shield + 4k/atmos receiver + 4k tv = the simplest full 4k solution (dolby vision support has been added to the plex android clients, not all clients support all the different dolby vision profiles).

dolby vision rips should be created with makemkv version 1.15.3 or newer to have the proper mkv container compatiblity see @ http://www.makemkv.com/

there are other possible solutions, but I don’t have any experience with them and cannot recommend them, perhaps others will list their recommendations.



Q: how can I determine exactly why plex is transcoding?

  • A: go to Plex > settings > console > filter > type “mde” without the quotes
  • play the video on the device in question
  • examine the log entries with the MDE: and TPU: lines, these should help explain why plex is transcoding.

in the logs, look for entries with
mde: will tell WHY something is transcoded
tpu: will tell you WHAT cpu/or gpu transcoder mode is used

you can see/filter the logs @ https://app.plex.tv/desktop > settings > console

or settings > troubleshooting > download logs


What about DOLBY VISION ?
DV is a whole other can of worms. Again the 2019 shield pro is your best bet, but some DV compatible tvs can support DV playback with the plex smart tv app.

Not all TV’s support all the various DV profiles (of which there are several).

Instead of repeating existing good info/discussion, please see these links:

Dolby Vision primer @ https://avdisco.com/t/demystifying-dolby-vision-profile-levels-dolby-vision-levels-mel-fel/95

DV and plex discussion @


I hope this can be helpful.

feel free to post other questions, answers, solutions, corrections, or any other feedback.

this topic is a work in progress and with your help, I’ll attempt to keep updated and corrected as needed.

116 Likes

Good post. I’m always amazed at the number of people complaining about transcoding 4K as if that’s something that should ever happen. If you’re transcoding 4K you’re doing it wrong.

8 Likes

Great post, really helpful and mostly correct :slight_smile:

  • DTS-HD MA is your friend, you don’t need HD compatible audio gear so long as your player is able to parse the stream and extract the DTS core. This can then be passed over ARC to your sound equipment

I strip the TrueHD streams from all my rips and use only AC3 (usually present alongside a TrueHD track) or DTS-HD MA tracks as I have a sound bar connected via ARC to my LG 4k set and that works just fine for me.

I’d also add something about subtitles to your piece. I can only speak with experience of the app on LG TVs, but PGS subs will always trigger a transcode as bitmap format needs burning in to the video stream. SRT subs can be streamed separately to the video and audio and overlaid by the client, and do not trigger a transcode.

8 Likes

^^ What Gary says + this also works over toslink/spidf, at least it does in my case.

Still a nice guide, thanks for the effort.

2 Likes

Thanks for the post, TeknoJunky. This post would have saved me quite a few hours in trouble shooting.
That said, I’ve found the best solution is, that if I want to watch my 4K movies, I’ll play locally through VLC via my HTPC. It can (for the most part) handle playing without buffering, and I can output Dolby True HD Audio to my receiver.
I Love Plex and use it constantly, but I’ve decided to only stream via Plex all non-4k movies. Force Direct Stream can work on Plex, for the 4K movies, but I see a lot more issues with buffering.

1 Like

Thanks for the all the comments and feedback.

I totally forgot about subtitles issues, thanks for the reminder, definitely a common problem for otherwise direct play.

the whole dts-hd ma & core thing I was never very clear on; when you say player, are referring to the software (plex) or the hardware (tv/receiver/soundbar/etc) ?

Given a lossless dts-hd ma audio track, will plex send only the dts core, or will it transcode, for example going to a smart tv then over ARC to receiver?

My 4k journey started with a roku tcl 4k tv with the roku plex app.

I was immediately able to get 4khdr working but of course due to the ARC limitations my server was bogging down trying to convert the audio and direct stream (ie not direct playing).

At some point I found out about the ARC limitations, and how to change to compatible audio streams, which worked, but was annoying. And my tv has weird audio sync issues with DTS.

So I thought there was a solution with the xbox one x, which I ended up buying during xmas season.

As I quickly found out, that wasn’t any better than the roku situation since the xbox can’t currently passthrough HD audio.

After much further research and reading many recommendations from here, I finally went for an nvidia shield and got the 500 gig drive model.

If I recall correctly, I think this was just before the big update that allowed for adopted storage, so I went big to avoid the small 16g storage issues.

Once I got the shield up, my 4k has been awesome without further issues.

4k works, hdr works, atmos works. I can even operate the shield and plex with my receiver remote via cec.

Thats is pretty much why I push the nvidia shield so much, because it would have saved me a ton of money and time and frustration if I had simply started there.

3 Likes

I just can tell you how it works for me:

I have a Shield connected via HDMI to the TV (Sony XE9305) and the TV is connected via toslink to the amp. When I play back a UHD remux, irrespective of whether I select DTS-MA or DTS standard, only DTS (core) is passed to my amp and the movie is direct played.

1 Like

@Coxeroni

yea but is the server sending the whole lossless dts stream, and the shield is then decoding the dts core to pass to optical…

or is the server only sending the dts core, because the shield says I can’t play dtshd ma ?

the shield by itself is more capable than most other clients and tvs, so what may be true for shield is not necessarily true for other clients.

I will try to experiment with this later myself, and see how 4k/hdr+ dtshd ma works across plex roku-tv client.

Now I get what you want to know. Honestly I don’t know how it works, but I just care whether my files are direct played or transcoded :slight_smile:

1 Like

As I understand it, PMS is sending the whole DTS-HD MA stream to the Plex Client, the client passes the stream to the TV’s OS, which then makes a decision, based on HDMI handshake and the audio equipment’s capabilities, on what to do next. If your TV is connected by an ARC HDMI link to a DTS capable audio device the TV then extracts the DTS core and sends it to the audio device. As far as PMS and the Plex client are concerned, you’re playing a DTS-HD MA track. Same goes if the TV detects no external audio hardware and just down mixes the DTS core to 2.0 and plays it back through the speakers. DTS-HD MA is pretty neat like that :sunglasses:

6 Likes

gary that makes a lot of sense, otherwise if the server were processing the MA into core, I would think that would be more like a direct stream (remux) or even full audio transcode, (not direct play).

it is too bad that truehd/atmos doesn’t seem to downgrade to dd+ as simply.

1 Like

9th rule: If you want to be able to transcode and are willing to give up HDR, don’t use HEVC with 4k content and just encode with AVC h.264 instead.

I have a bunch of 4K content encoded with h.264 in bitrates ranging from 12mb/s to over 20mb/s. My Plex server is an i5 quad-core NUC and it downsamples to 1080p perfectly fine for remote streaming. Plus I get to enjoy full resolution on my TV when I’m at home. For my eyes, the increase in sharpness with 4K is easier to spot than the color dynamics of HDR, so being able to keep just one copy of the file for every purpose is more worth it to me. If I really, really wanted to watch in both 4K and HDR, I’ll just get my lazy butt off the couch, go grab the disc and stick it in the BD player.

2 Likes

you bring up a great point.

its not so much the resolution that is hard.

its the x265 codec, it simply takes waaaaaay more processing to both decode and encode. which is why without gpu support most generic servers just do not have the processing power to do it.

Yeah, I’ve found that even though we tend to use the word “transcoding” generically, there are different types of transcoding with different effects on CPU usage. If you’re truly transcoding from one codec to another (e.g. HEVC to AVC, or WMV to AVC), then you’re going to need more horsepower. And we all know how much horsepower h.265 needs. But, if you’re simply downsampling and staying within the same codec, you can get away with more modest CPU usage (h.265 notwithstanding).

Anyway, HUGE kudos to @TeknoJunky for the original write-up. It really is worthy of being an official HC article.

3 Likes

Really? What TV do you have? For me it is quite the opposite, HDR is directly evident since the brightness is noticeably increased where it has to be. Have to say, that my Sony XE9305 has a remarkable peak brightness of ~1400 nits, which makes HDR a blast.

3 Likes

I have a Samsung QLED 75". But it’s just the entry level Q6 series so maybe there isn’t quite the color fidelity of their higher end models. I was really excited to see HDR and since most 4K UHD Blu-Rays also come with FHD, I immediately did some back-to-back comparisons. While I do notice more color depth, I was particularly impressed by the sharpness. Granted, I know that many UHD discs are just upscaled FHD content. But I still notice a difference and am happier with not having to deal with performance issues. So sticking with h.264 works better in my situation. Maybe someday my wife will let me upgrade to one of the Q9s.

Everyone has their own goto reference disc but get a copy of Pacific Rim and give that a go. The first 10 minutes has some incredible HDR imagery and sound to make the windows shake.

1 Like

I just want to say thank you, because I was just testing my Optical and ARC connections from my TV to a new receiver, and could not figure out why DTS-MA was direct-playing. Your write-up happily appeared at the top of my first search attempt (woo hoo forum search works!). I forgot that DTA-MA contains the lossy DTS track inside.

1 Like

The first rule of 4k is , don’t bother transcoding 4k

Not true at all.

The third rule of 4k is, If you cannot direct play 4k, then perhaps you should not even be collecting 4k

Also not true at all.

First off, 4k isn’t something that is “hardware supported”. You can have an h264 4k video that plays on existing clients just fine. You can have a 1080p h265 file that does not play well. The difference is in the codec, not in the resolution. The codec is what is or is not supported in hardware.

Second, even as you posted this thread, Plex added support for both decoding and encoding on nVidia GPUs. So you can buy pretty cheap video cards now that allow you to support 20+ 4K h265 transcoding sessions without really utilizing your CPU very much. I average 5+ h265 4k transcodes most nights and sar says my CPU is 99.8% idle.

Please do not spread disinformation.

5 Likes

The ‘rules’ are a reference to fight club, so they are not necessarily being expressed as immutable facts but to inform and explain to everyone who does not know or care about the nittty gritty but simply wants to understand why it doesn’t work as they expect, or to help explain how to get it working.

In either case I did not state you CAN’T transcode 4k (or 265).

In both cases I am simply suggesting that in most situations if you are not going to be direct playing 4k/265 content, then what is the point of even having it !?!? You can save time and expense by simply going with standard x264 1080/720 rips of the quality you desire.

265 may save you some disk space for non-4k content, but if you have to buy more cpu and/or gpu just to convert back to 264 to play it, what does that save you ? disk space, sure ok.

You are absolutely correct, it is the 265 codec that is extremely difficult to decode/encode, not necessarily the resolution.

I will see if I can make this more clear since apparently I did not make it clear enough already.

plex has supported nvidia gpu decode/encode on WINDOWS for awhile and works relatively well. this was never under dispute.

it is the linux nvidia gpu decoding support that everyone has been waiting for.

Talk about misinformation.

There is no reality where you are transcoding 5+ 4k h265 4k streams with a 99.8% idle cpu.

Because the CPU has to be doing all the other processing that encompasses transcoding and is not handled by the GPU, including but not limited to; AUDIO transcoding and DISK/NETWORK IO involved.

2 Likes