HEVC Encoding Forum Preview

@chris_decker08

Got some more weird behavior for you to check out. So you know how I was saying my recordings were getting washed out. I think I found out why and it has to do specifically with transcoding to 1080p 20Mbps.

I was playing around with each of the different quality settings and for some reason the only one that acts different is the 1080p@20Mbps, this quality setting washes out the picture, I can 100% reproduce this every time I select it as an option.

1 Like

Any word if updating to a newer version of FFMPEG will let us use hardware for generating thumbnails, as it’s a feature available in FFMPEG?

3 Likes

This is already the case?

Negative. Currently, all thumbnail generation (as well as intro/credits detection, but that’s another thing altogether) is done on cpu.

Honestly, hw acceleration would add a negligible benefit to those processes. There is no hw acceleration for image encoding that I am aware of and thats the current bottleneck

@chris_decker08 ,
I wanted to say thank you for working on this. My isp likes to pinch off at the upload side of what they sell (asymmetrical). I’ve used intel quick sync, nvida quadro p400, and now igpu for an amd 5800g (vega 8). I’ve never had any issues and have been waiting on h.265 or av1 or vp9.

@Kilgry @vertigo235 After thinking about it this weekend I believe there has been some miscommunication, likely on my part. The Target resolution for transcodes is always the minimum of the original resolution and the client display resolution (plus some tweaking to maintain aspect ration, ensure its divisible by 4, ect). When a client say “convert to 480p” it tells PMS to use a bitrate of 1.5Mbps (which looks like 480), it does not scale it down to 480. So for HEVC transcoding the bitrate will stay the same and will result in a better quality since the resolution never changed in the first place. This means the client will be lying to you about which resolution it will appear as.

2 Likes

In essence, you’re saying that the 4Mbps 720p HEVC encode would then be equivalent to 8Mbps 1080p h264 and would keep the 1080 raster, just incorrectly report 720p? (I understand the math isn’t exact, but for ease of use I’m using same visual quality in 50% data rate of h264-> hevc conversions).

1 Like

that is correct, those raster don’t actually mean anything, its just easier for most users to grasp “it looks like 720p” rather than understanding bitrate

1 Like

Oh, so this has been going on all the time then in Plex? Sorry, not trying to incriminate, but trying to understand the technical. What you are saying makes a lot of sense in the behavior I’ve been noticing with the current H264 transcoder.

See, I’ve been confused why Plex says 2Mbps 720p and then Tautulli always reports a 480p stream, even if the display is 1080p and the original source is 1080p. But, it is also obvious that if the bitrate of the original source is close to 2Mbps, then the video quality remains about the same even though it is being transcoded down to a smaller bitrate.

Overall, what you are clarifying is very good news! It addresses my concerns because there was never a reason to be concerned; HEVC transcoding will deliver the best quality it can at the user’s chosen bitrate.

Honestly, I don’t think most users even understand 1080p, 720p, 480p. It’s just, “It looks good, it looks good, it doesn’t look good.”

:slightly_smiling_face:

Are the thumbnails of HDR content tonemapped today? It would be nice if they are or could be.

1 Like

Is there any possibility we can get a way to enable the HEVC options without having to pick the GPU in the drop down? Maybe some advanced setting or override workaround?

My GPU decoding and transcoding is working and always has been working perfectly. But no matter what I try, I cannot get my GPU to show up in the dropdown list…

It really sucks if the HEVC options are going to be locked behind the dropdown list selection.

I have an RTX 2060.

image

image

See, I’ve been confused why Plex says 2Mbps 720p and then Tautulli always reports a 480p stream, even if the display is 1080p and the original source is 1080p.

Yes, this had been confusing me as well, because Tautulli is reporting a different raster at these bitrates:

@SirMaster and others,

I’m here at @chris_decker08’s request to help where I can.

I have:

  1. PVE on N100 CPU
  2. NUC12 Dragon Canyon (i9-12900) with Nvidia RTX2000 in LXC.

what I currently see

With the Nvidia RTX2000, I get

The only failing here is I did not pass the runtimes into the container.
(I forgot how so had to rely on the inodes)

How can I be of help?

EDIT:

LXC Nvidia GPU – container profile additions

  nvidia.driver.capabilities: all
  nvidia.require.cuda: "true"
  nvidia.runtime: "true"

I don’t think this is right, I’m pretty sure when I check all the way down to 1.5mbps it is changing the resolution to 480p.

@SwiftPanda16 when Tautulli is reporting the raster of a transcode, is it getting that information from the actual file metadata, or is it just reporting the raster from the transcode setting that Plex is using? Ie if Plex says 4 Mbps is 720p, Tautulli is just assuming the raster is 1280x720 even if Plex is actually transcoding to a 4Mbps 1920x1080 file?

@dklein @Kilgry @vertigo235 you are all correct, there was code tucked away, seperate from where all other resolution calculations are done which restricts the resolution per bitrate. Now ive found it i can modify it for hevc (the selector will still lie to you). It was a pita to find in the code so ill make it more obvious to future developers as well.

6 Likes

The resolution (width and height) and bitrate comes directly from the transcode details from the Plex Media Server API.

http://localhost:32400/status/sessions

The quality profile is just a selection from the preset list of options based on the bitrate only. i.e. if Plex is reporting the stream bitrate is 1725 kbps, the closest option in the list is 2 Mbps 720p. Nothing to do with the actual profile selected in the Plex client nor the resolution.

2 Likes