Transcoding 4K - but why?

SOLUTION: The solution was simple, due to a network change the subnet in Settings > Network > LAN Networks was incorrect, as such Plex thought my local client was actually remote. After correcting this everything is streaming perfectly without transcoding.

Server Version#: 1.21.2.3943
Player Version#: WebOS / Roku / etc.
OS: Windows 10 Ver 20H2
CPU: 8086k @ 5.2Ghz all cores
RAM: 32GB DDR4-3600
GPU: GTX 1050ti (hardware encoding is enabled)

As about 1/10th of my collection is 4k (about 500 films) I’m watching more and more - but the majority of the time Plex transcodes the stream down to 1080p and I can’t understand why. I know that if the audio is DTS HD 7.1 my TV can’t play that (an LG B6 OLED) so if the file has 5.1 available I’ll select that - but even then sometimes it’ll transcode. This happens in 2 scenarios:

Local

  • What’s odd is if I stream the same file to my TV via DLNA it works perfectly - including the DTS HD 7.1 audio track. No transcoding and it looks stunning. Why would Plex transcode it if my TV is perfectly capable of playing it natively?

Remote

  • This happens with all content - I have a 1GB down / 40MB up connection, streaming to a friend with a 1GB down/up connection. I’ve been a network engineer for 15 years so I fully understand that we might not get my 40MB between us, depending on the routes, but many times a 1080p at say 8MB will still get transcoded down to 720p sometimes. I’ve verified the remote client is set to direct play and 4k 20MB as the max stream but it still transcodes. We’ve done some testing with me setting up an Apache server at my place to see what bitrate he gets downloading from that – and we get a solid 30-40MB with 1GB+ files. So I don’t understand why it’s transcoding when we both have the bandwidth.

I’m sure you’ll need some details - here are the details for Atomic Blonde, 4K HDR x265

Media

  • Duration 1:54:45
  • Bitrate 18954 kbps
  • Width 3840
  • Height 1608
  • Aspect Ratio 2.35
  • Video Resolution 4K
  • Container MKV
  • Video Frame Rate 24p
  • Audio Profile ma
  • Video Profile main 10

Part

  • Duration 1:54:45

  • File Atomic.Blonde.2017.2160p.UHD.BluRay.x265-TERMiNAL.mkv

  • Size 15.19 GB

  • Audio Profile ma

  • Container MKV

  • Video Profile main 10

  • Codec HEVC

  • Bitrate 17226 kbps

  • Bit Depth 10

  • Chroma Subsampling 4:2:0

  • Coded Height 1608

  • Coded Width 3840

  • Color Primaries bt2020

  • Color Range tv

  • Color Space bt2020nc

  • Color Trc smpte2084

  • Frame Rate 23.976 fps

  • Height 1608

  • Level 5.1

  • Profile main 10

  • Ref Frames 1

  • Width 3840

  • Display Title 4K (HEVC Main 10 HDR)

  • Extended Display Title 4K (HEVC Main 10 HDR)

  • Codec DCA

  • Channels 8

  • Bitrate 1536 kbps

  • Language English

  • Audio Channel Layout 7.1

  • Bit Depth 24

  • Profile ma

  • Sampling Rate 48000 Hz

  • Display Title English (DTS-HD MA 7.1)

  • Extended Display Title English (DTS-HD MA 7.1)

  • Codec AC3

  • Channels 2

  • Bitrate 192 kbps

  • Language English

  • Audio Channel Layout stereo

  • Sampling Rate 48000 Hz

  • Title Commentary with director David Leitch and editor Elā”œĀ”sabet Ronaldsdā”œā”‚ttir

  • Display Title English (AC3 Stereo)

  • Extended Display Title Commentary with director David Leitch and editor Elā”œĀ”sabet Ronaldsdā”œā”‚ttir (English AC3 Stereo)

  • Codec PGS

  • Bitrate 32 kbps

  • Language English

  • Header Compression true

  • Title SDH

  • Display Title English (PGS)

  • Extended Display Title SDH (English PGS)
    (There are SEVERAL more languages that I’ve deleted, all the same as this)

Any thoughts? Any settings I can change to keep things from transcoding so often? What more information can I provide?

Thanks so much for any input you’d have!

~X

Check your clients are set to stream original quality.

Check what you have your Limit remote stream bitrate is set to under remote access.

Check your server logs, it should tell you why it is transcoding.

Another thing to consider, and which many people are not aware of is ā€œAverage Bitrateā€, which literally means, the ā€œAverageā€ for the entire video track. Some parts may be higher, some lower.

If your file has been encoded using Average Bitrate, and it states that the Average Bitate for the video track is 17226 Kbps, it is very possible that there are parts of the video track that may be significantly higher than that, maybe even more than twice the bitrate.

The parts of the video that will require much higher bitrates are the parts that are normally fast moving, or where the entire screen is constantly changing… Smoke from an explosion is one example, car chases is another.

Knowing the movie Atomic Blonde, there are lots and lots of fast moving scenes, and therefore I can actually guarantee there will be many parts of the film that will require much higher bitrates to keep the quality.

Now when you tag onto all of that, the Audio track, which also may be encoded with Average Bitrate, and now you will see that it is actually very easy for parts of that movie to actually be much higher bitrates than you actually expect, to the point where it is too high to be able to fit up your 40 Mbps pipe.

As @Alucard1 has stated, check your PMS logs and it should tell you why a transcode was required, and you might just find it is because the bitrate exceeds your bandwidth due to the nature of Average Bitrate…

Check your clients are set to stream original quality.

Done

Check what you have your Limit remote stream bitrate is set to under remote access.

100 MB

Check your server logs, it should tell you why it is transcoding.

I see nothing in them that indicates the reason for the transcode, just

videoDecision=ā€œtranscodeā€ audioDecision=ā€œtranscodeā€

But I can’t find anything that says why that was the case. Again when I play ALL these files using DLNA from the simple client on my TV they play perfectly, no transcoding needed and they stream perfectly, no buffering, etc.

As for average bitrate I guess you didn’t read ā€œI’ve been a network engineer for 15 yearsā€ - I fully understand these are AVERAGES but what I don’t understand is why Plex would transcode it to its own client yet the Plex DLNA server would stream the exact same file on the exact same network to the exact same TV perfectly without needing to transcode. Clearly the client can play the filetype just fine, clearly I have enough bandwidth for this (I’m on gigabit wired ethernet and even in the same switch as the server).

So I’m right back where I started - WHY is PMS transcoding something that my client can play fine and my network can support just fine. What specifically in the logs will tell me the WHY it’s doing this. My gut says I can’t do anything about it, which is a real shame as I’d much rather use the Plex client on my TV rather than the stupid DLNA app but if that’s going to give me perfect picture/sound without transcoding anything that’s what I’m forced to do.

Just surprised as it’s not like 4K content just got released…

Thoughts anyone else?

~Ross


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


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

another thing to consider, when you set the upload bandwidth limit, plex generally applies a percentage of that (not the whole amount) to a single stream, so that other streams can still be started, each new stream will get a smaller portion until there is insufficient upload left.

if you suspect or determine the upload limit is causing transcoding, you can remove the limit to find out, then of course your remote client may direct play, but start buffering if the stream exceeds the upload.

so, if your upload is set to 40, plex may reserve 10 meg for future streams, your initial stream gets limited to ~30 (or whatever the actual percent is).

as already pointed out above, hevc can have much higher bit rates than what the ā€˜average’ shows.

2 Likes

I’m fairly sure I did say that, in a long winded detailed kinda way! lol

  • 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.

THANK YOU - This was actually VERY helpful. As I’ve tried to explain MANY times I fully understand how bitrates and bandwidth works, it seems everyone kept missing this is on my LOCAL GIGABIT LAN so even a huge say 80MB bitrate should be fine - and is fine when I stream DLNA. So there is/was clearly something in PMS that was the problem - and I finally found it.

What I didn’t share, as I didn’t think of it as a ā€œchangeā€ was recently I change my local IP network to a different subnet. I had the old subnet set in the networking section of Plex to ensure it knew what was local and what wasn’t. As that was wrong Plex through I was trying to stream remotely and as such thought it needed to transcode when it absolutely does not. After changing that to the correct subnet EVERYTHING I’ve tested now Direct Plays perfectly, no bandwidth issues at all, as I knew from the start.

So thanks for at least putting me on the right path by looking through the console, I hadn’t used that before but I sure will in the future. I know I had a difficult question, hopefully in the future when folks want to help, which is great, they’ll actually read what’s been written and believe it rather than multiple times bring up the same thing that was addressed in the original post. You sending me to the console got me there.

I do see an odd error that Plex can’t load/find a profile for my LG OLED, but is seems that’s somewhat common and might just be a BS error. I did think that was the issue for a few hours but then when the network change hit me like a ton of bricks I knew that was it and sure enough it was. As I thought, something in Plex was telling it to transcode when it in no way needed to do so, especially not for bandwidth reasons.

So thanks again for putting me on the right path.

~Ross

1 Like

I have to say, that sometimes getting comments like this stings a little… There really is no need, especially when your original post had a rather sizable paragraph centered around your WAN / Remote connection…

By all means, take people’s suggestions or don’t, but to then go ahead and bite the hand that feeds you is pretty rude actually!

I don’t think I’ve ever seen a ā€œTHANK YOU, BUT ā€¦ā€ before. Why’d you mark your post as the solution, instead of his? My first reaction is that it seems rude or ungrateful.

Which means even local connections were treated as remote, so @Alucard1’s initial suggestions may have been relevant.

Having said that, there are a few other places with useful info, before digging into logs.

The ā€œNow Playingā€ section of the Plex Status/Dashboard. This will show you if the connection is considered Local, Remote, or Indirect (Plex Relay) - a useful clue about what’s going on, and why quality/bandwidth decisions are made.

And in the players/apps themselves. They will generally give you information about what transcoding is being performed, but admittedly they each give different information about why.


You also mentioned issues streaming to a friend. Make any progress on that?

1 Like

I don’t think I’ve ever seen a ā€œTHANK YOU, BUT ā€¦ā€ before. Why’d you mark your post as the solution, instead of his? My first reaction is that it seems rude or ungrateful.

Please quote me where I said ā€œthank you butā€. As to why I marked my comment as the solution, well it has the actual solution to my problem, not a vague reference that lead me there. It amazes me that people get so bent out of shape from little text comments but I care more about people finding the actual solution in the future rather than something that might point them in the right direction. I guess I care more about facts that feelings.

I guess you just needed to chime into a thread you weren’t involved in, had no help in to what, berate me in some way, as if I care about what some random online thinks. I sure wish I had the free time for things like that, I wonder what that’s actually like…

Regardless again my thanks to @TeknoJunky for putting me on the right path with detailed help rather than things I tried to make clear I understood from the outset that had, as I knew from the start, absolutely nothing to do with the problem.

I guess others can enjoy raging back, I’ve gotten what I need from the thread and have marked it so it may be helpful to others in the future.

~Ross

Hmmmm… I think it’s more about attitude than anything else.

Surely you appreciate that from your point of view, everyone on a forum will be a random as you don’t actually know them, but it’s the randoms that are offering the help.

Again, it’s all about attitude, and in the space of minutes, 2 different randoms were both of the opinion that you were kinda coming across as being rude.

This is not beratement, this is helpful feedback.

EDIT: Anyway, you got the answer you needed…

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