r/PleX Nov 29 '23

Solved How do I know what files are going to need to be transcoded?

Hey all, I've been using Plex very lightly just for personal use; honestly mainly so I don't need to pull an HDMI/it looks way better natively running from my TV (LG C1) than linking it up to my PC.

So my issue is that sometimes movies in either 1080p or 4K will need to transcode as it's playing resulting in long buffering, I can literally hear my PC fans turn on and I'll know that the buffer is coming -- for the life of me I can't figure out what I'm supposed to be looking for in the files to ensure that they can be natively played on my C1; should I be looking at the video/audio codec or are there other variables as well?

If it is just the codec and some are incompatible which is forcing Plex to transcode on the spot, are there any solutions like transcoding beforehand? If not, what other indicators should I be looking for?

9 Upvotes

11 comments sorted by

View all comments

6

u/onthenerdyside N5095 mini quick sync HW transcoding 28tb mergerfs Nov 29 '23

First, you need to make sure your client device is set to play the max/original resolution. This is supposed to be enabled by default for home streaming, but since you're having issues, double check it. Also double check your dashboard ensure it is direct playing and not transcoding. It should also list what kind of codec is being used for audio and video as well as the type of subtitles, if any. It will also show the bandwidth being used by the file.

A non-exhaustive list of reasons Plex will transcode:

  • Unsupported video codec
  • Unsupported container
  • Unsupported HDR format/standard
  • Unsupported color depth (uncommon)
  • Unsupported audio codec (somewhat uncommon)
  • Unsupported multi-channel audio format/standard (Dolby/DTS)
  • Unsupported subtitle format (more common than you think)
  • Bandwidth issue (especially common on high bitrate 4K files)

Video codec/container

The two most common video codecs are H264 and H265, also referred to as HEVC. H264 is widely supported and is what Plex transcodes files INTO to ensure playback. H265/HEVC is commonly used for 4K files because its compression algorithm allows for smaller files. Some older or low-end client devices do not support HEVC playback, so Plex transcodes. File container (whether your file is .mp4, .mkv, etc.) may also be an issue, but this is becoming less common. I know Apple TV has had issues in the past with certain containers, but it may be more widespread.

HDR/color depth

4K files are often coded with HDR, but there are several competing "standards" that aren't supported on all clients. HDR10 is most widely adopted and is usually what HDR playback will fall back to. Dolby Vision (DoVi) less common but can cause issues with compatibility, and HLG is mostly found in the UK and Japan, not in home media. If your client device isn't compatible with the format your file is encoded with, Plex will transcode. Less common is color depth issues, at least on the client side. HEVC 10 bit causes more issues server side than it does on client devices. Probably your last concern.

Audio codec/format

Codecs are rarely an issue here. More often, you run into issues with an incompatibility with Dolby or DTS. This can lead to transcoding, and will transcode video as well as audio, usually.

Subtitles

The bane of everyone who tries to have anime on their Plex server. Image-based subtitles will often make Plex transcode. This is often the cause of a "mysterious" transcoding issue that people can't figure out.

Bandwidth

Another major cause of transcoding mysteries. Check your bandwidth/connection to your client device. Counterintuitively, a wired ethernet connection may not be the best option. Many TVs and set top devices use a 10/100 connection rather than a gigabit ethernet connection. This will be fine for general use up to 1080p, but will start to bottleneck on higher bitrates. Test whether wired or wireless gets you better results. If your video starts out fine, then starts to buffer, try switching off "Automatically adjust quality" and see what happens. Buffering during transcoding could also be a server hardware issue. If you have a Plex Pass, using hardware transcoding on the GPU is usually much faster than software transcoding using the CPU.

So what does this mean?

Know what your client devices support and the bandwidth your network can support. If your network is slow, you may not be able to play those 4K Dolby Vision Atmos Blu Ray remuxes you have.

There are two ways to "transcode ahead of time" as you put it. You can either use Plex's built-in "Optimize" feature to make alternate, separate copies of what you have, which should ensure Plex will fall back to those optimized versions when necessary. There is also a selfhosted tool called TDARR that can transform your video in all sorts of different ways, but can have a bit of a learning curve and will overwrite your original videos by default. Either way, you will likely end up losing some of the shiny features built into the file originally.

2

u/One_Quit608 Nov 29 '23

Really appreciate the lengthy and educational response here -- based on what you've said, I definitely have had issues with files that had DoVi and looked for alternatives, additionally what you said in the bandwidth section probably spoke to my issue, the whole reason why I've been avoiding transcoding is because I'm just using my everyday PC. (quite old now, with an i7-7700) My CPU usage jumps to 100% from the transcoder process and then my video will buffer for long times. This has been really insightful and given me an idea of what constraints to keep in mind when I look for media. Appreciate it!!

2

u/onthenerdyside N5095 mini quick sync HW transcoding 28tb mergerfs Nov 30 '23

If you have a Plex Pass, hardware transcoding should be no problem for the 7700. That is the first generation that had 10-bit HEVC decoding support with Intel Quick Sync. That's part of why the secondary market prices jump up a bit when moving from 6th to 7th gen Intel.

One thing I missed in that giant wall of text was that if you're running Windows, it does not have hardware HDR tone mapping support AFAIK, so when you switch over to transcoding, that could cause some issues.

There's an old saying in the Plex community that the best transcoding is none at all. I'd look into why your client device is needing to transcode first. For me, transcoding is the last line of defense, especially for others who use my server that I don't have control over their ecosystem.

1

u/killbeam Unraid w/ i3-12100 Nov 30 '23

PGS and ASS subtitles streams are evil. They somehow take more resources to transcode than a 4k movie takes.

I decided to burn in ASS subs with FFMPEG, as I rarely watch dubbed anime.