Does HW transcode need /dev/dri/card0 to work ? (with tonemapping)

Server Version#: 1.40.3.8555
Player Version#: 4.129.1 (PlexWeb)

Hello,
This is more a question than a problem :wink: @ChuckPa
I want to know if /dev/dri/card0 is needed to get HW transcode (with tonemapping)?

Why I want to know this?

First, my setup

I use a NUC (Geekom Mini IT13), with Intel Core i9-13900H (Raptor Lake), and iGPU Intel Iris Xe 1.50 GHz.
On this NUC, I’ve got ProxmoxVE 8.2 as OS.
I created a LXC container (privileged) with tteck script : Proxmox VE Helper-Scripts
Everything works great: HW transcoding with tone mapping.
The /dev/dri/card0 dans /dev/dri/renderD128 are passed to the LXC with th right GID. And Plex can transcode a 4K DHR or DV video to a 720p 3M video, like a charm.

What’s the problem?

The problem is that, for a reason I don’t know, and since an update I don’t remember when, but likely a kernel update, the /dev/dri/card0 change to /dev/dri/card1 after a reboot.
And if I reboot again, /dev/dri/card0 is back, and reboot → /dev/dri/card1, etc…

And when it’s /dev/dri/card1, of course, the plex LXC won’t start! Until I change the /dev/dri/card0 to /dev/dri/card1 in the ressources.

Ok. That’s annoying.
For now, I found a workaround, see this discussion on GH : Plex LXC on a Intel NUC (Geekom Mini IT13) : /dev/dri/card0 change to /dev/dri/card1 after reboot · tteck/Proxmox · Discussion #3235 · GitHub

My question

When I tested the solution, I also tried to not pass /dev/dri/card0 (or /dev/dri/card1) to the LXC.
And, HW transcode still works like before.

So, does /dev/dri/card0 really used to do transcoding?

Thanks for reading, and for any answer :slight_smile:
Bye
Miles

  1. /dev/dri/renderDxxx (128, 129, 130 …) is used for the transcoding

  2. /dev/dri/cardX (0,1,2,…) is used for the tonemapping (OpenCL access)

It’s up to you. If you want tone mapping then you need card0

The only time I’ve seen this kind of flip-flop is when SR-IOV sharing is involved.
Is that what you’re doing?

Hello :wave:t2:
@ChuckPa
Thanks for your answer.
It seems I need both card0 and renderD128.

But there is something I dont understand : the tone mapping.
Can you confirm me that this this the function to have a clear image with nice color ? Not fade color like all green taint .
Is that so, when I don’t pass card0, all my hdr or doc content are played nice , I get the right colors not the greenish one.
That’s why I don’t understand the tone mapping.
Another thing, before you announced that it was working again , I hadn’t the checkbox checked , and there too I have the right color.

That’s very confusing for me :crazy_face:

For this , I’m not sure but I think there is no such thing for my lxc on the proxmox host.
I can ask the script’s creator to be sure.
But as far I can tell, I’m pretty sure this problem occur not so far ago and after a kernel update , because before It worked fine.

  1. Faded colors happen when HDR (10-bit color) is transcoded to SDR (8-bit) color by dropping two bits. Tonemapping remaps the 10 bit colors properly into the 8-bit (aka. RGB) spectrum.
    – To answer your question, YES, Tone mapping keeps the bright colors from being dull or dark.

  2. You mention green tint. Green tint - Blue water which is green when transcoded. Pink/purple/Fushia color ---- This is ALL a sign of trying to transcode a Dolby Vision Profile 5 file (which has no HDR layer) into SDR space. The colors NEVER come out correctly.

When you get media, You want to use the mediainfo tool and check your media before putting into PMS.

Specifically,

  • BT-709 color space is 8 bit color and will always transcode correctly.
  • BT-2020 is HDR color space. This is what has the right colors but gets dull or dark
  • Profile 7 = Dolby Vision extra metadata with HDR included. This media will transcode. It will drop the Dolby Vision info and then do HDR → SDR correctly.
  • Profile 5 = Dolby Vision metadata only without HDR. It is intended for DirectPlay only. (that’s why the streaming companies use it)
    You have to be careful how / where from you get media into PMS.

The bottom line is Dolby Vision cannot be transcoded correctly. (extremely expensive licensing costs)

1 Like

@ChuckPa Thanks for the answer.
I think I get it correctly.
So in order to test the tonemapping, I’ll need a video with BT-2020, and Profile5.
I’ll check my test video to see if I have some.
I think this one should do the job, right?

So, in order to correctly test the tonemapping.
What should I test? And what should I expect to see?

PS : I’m using a MacBook Air M2, with the embedded screen + a LG ULTRAFINE 32UL750-W (4K (3840 x 2160)) + AOC Q3279WG5B WQHD.

I don’t know anything about Mac / MacOS server or apps (Plex Player)

I looked at the file you want to use as a test.
That is HDR.

If you get DirectPlay results – it will look perfect.
If you get Transcoded results – you’ll likely see some oversaturation

This is an example of strong oversaturation in a browser

This is with full HDR

You should see one of these two images

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