Help debugging transcoding (hevc hdr) on gemini lake

Server Version#: 1.25.0.5246
Player Version#: 4.66.1 (Web)

I recently got a cheap Gemini lake box to be my plex server to enable my use of intel quicksync. For 1080p avc content it seems to work fine, it shows that its doing hw transcoding.

However, I just tried to play an HEVC HDR (HEVC Main 10 HDR) file, and it didn’t show the hw for transcoding and it was pegging the cpu (and as gemini lake, no hope in keeping up, even with one stream).

This should be supported right? gemini lake should have transcode support for hevc? and even support tone mapping for hdr content? or am I mistaken?

I’m running on ubuntu 21.10 (i.e. literally just installed). is it possible I’m missing libraries that are needed?

edit: including server logs

Plex Media Server Logs_2021-11-22_10-36-52.zip (503.2 KB)

from what I can tell looking at it, it seems to say that hevc main 10 is supported?

edit 2: I installed intel-media-va-driver-non-free and it didn’t seem to make a difference. though vainfo now shows more codecs

edit 3: in watching it closely with intel-media-va-driver-non-free, it seems to temporarily show hw transcoding but then it disappears.

But, I looked at dmesg for whatever reason and saw this

[  636.707211] Plex Transcoder[2178]: segfault at 0 ip 00007f9b7f9d999b sp 00007fff37ba6b00 error 4 in libstdc++.so.6.0.29[7f9b7f9c5000+103000]
[  636.707225] Code: 10 00 00 00 5d e9 35 35 ff ff 0f 1f 44 00 00 f3 0f 1e fa 0f b6 07 84 c0 75 4d 55 53 48 89 fb 48 83 ec 08 48 8b 05 25 49 16 00 <80> 38 00 75 20 31 c0 ba 00 01 00 00 f0 0f b1 17 75 2e 48 83 c4 08
[  677.176980] Plex Transcoder[2224]: segfault at 0 ip 00007f89af7aa99b sp 00007ffdd7c702c0 error 4 in libstdc++.so.6.0.29[7f89af796000+103000]
[  677.176999] Code: 10 00 00 00 5d e9 35 35 ff ff 0f 1f 44 00 00 f3 0f 1e fa 0f b6 07 84 c0 75 4d 55 53 48 89 fb 48 83 ec 08 48 8b 05 25 49 16 00 <80> 38 00 75 20 31 c0 ba 00 01 00 00 f0 0f b1 17 75 2e 48 83 c4 08
[  748.644809] Plex Transcoder[2264]: segfault at 0 ip 00007f89474f499b sp 00007fffa65abf50 error 4 in libstdc++.so.6.0.29[7f89474e0000+103000]
[  748.644839] Code: 10 00 00 00 5d e9 35 35 ff ff 0f 1f 44 00 00 f3 0f 1e fa 0f b6 07 84 c0 75 4d 55 53 48 89 fb 48 83 ec 08 48 8b 05 25 49 16 00 <80> 38 00 75 20 31 c0 ba 00 01 00 00 f0 0f b1 17 75 2e 48 83 c4 08
[ 1102.977443] Plex Transcoder[2648]: segfault at 0 ip 00007f734f94799b sp 00007ffeed28b070 error 4 in libstdc++.so.6.0.29[7f734f933000+103000]
[ 1102.977471] Code: 10 00 00 00 5d e9 35 35 ff ff 0f 1f 44 00 00 f3 0f 1e fa 0f b6 07 84 c0 75 4d 55 53 48 89 fb 48 83 ec 08 48 8b 05 25 49 16 00 <80> 38 00 75 20 31 c0 ba 00 01 00 00 f0 0f b1 17 75 2e 48 83 c4 08
[ 1137.733073] perf: interrupt took too long (2528 > 2500), lowering kernel.perf_event_max_sample_rate to 79000
[ 1367.160783] Plex Transcoder[2887]: segfault at 0 ip 00007f22f393e99b sp 00007fffa9339b80 error 4 in libstdc++.so.6.0.29[7f22f392a000+103000]
[ 1367.160806] Code: 10 00 00 00 5d e9 35 35 ff ff 0f 1f 44 00 00 f3 0f 1e fa 0f b6 07 84 c0 75 4d 55 53 48 89 fb 48 83 ec 08 48 8b 05 25 49 16 00 <80> 38 00 75 20 31 c0 ba 00 01 00 00 f0 0f b1 17 75 2e 48 83 c4 08

i.e. the transcoder is crashing. that’s probably why and probably related to what I saw, it tried to hardware transcode then crashed.

Many have noted that the transcoder isn’t working with 21.10 which is a short term release, should drop back to 20.04.03.

Even working, there are no guidelines or benchmarks for a passmark score to do successful tone mapping for which I wouldn’t be too hopeful for on a J4105.

ok, I’ll install the LTS then. thanks for the info

so I installed 20.04, and I see sort of similar behavior. (though without the crashing). What I’ve noticed is that transcoding works perfectly when streaming to my nvidia shield (don’t need to transcode, but was using it for testing purposes) as well as my phone, but trying to do the exact same transcoding to the browser failed (i.e. just hung, dashboard showed stuck in buffering). so transcoding deffinitely works for hevc and avc, I just have no idea why it doesnt work with the browser.

I can’t test hdr10 tone mapping well as all my mobile devices are hdr10 supporting.

Browsers are going to be tough since they have limited video, audio and subtitle support.

Open a couple tabs pointing to https://app.plex.tv/web, navigate to the dashboard in one and start playback in the other. You can expand the details to find out transcoding details. Make sure subtitles are off and then choose different audio tracks if available. Lossless audio may be to much for that CPU when handling the HEVC decode so if you have a track that will direct play you may get by.

FYI - Playback to the browser has a lot of limits.

The biggest browser limit is the bitrate. You can’t hit a browser with 50+ Mbps unless you have a seriously ‘honking’ CPU to render with.

If you go to Plex/Web - Player - Quality Settings

Set the limit to about 30 Mbps, SAVE it , and you’ll be much better off.

The devices (nvidia, appletv, tv itself) have dedicated hardware to render where browsers are 100% software

re this point, you’re right (in a way), but part of that seems to be that tonemap ffmpeg filter isn’t multithreaded. Looking at top, it seems to be pegging a single core (which cannot keep up at all), but it be more interesting if it could use all cores. With that said, this box probably couldn’t keep up with more than 1 playback in that case (probably not even 1)

I’m thinking it must have been a tone mapping issue that I was having issues in browser, as now it seems to be playing fine (just tried it with 4 15mb/s hevc streams and it didn’t seem like it was missing a beat. I might have had tone mapping configured for my earlier browser failure but disabled it when I tested on my tv.

I assume quicksync has limits on how much hevc bandwidth it has or does it really have nothing to do with the bandwidth of the hevc stream and much much more to do with the resolution (i.e. a decode of a 60mb/s hevc stream would perform similiar to the 15mb/s I just tested)

If I may add here ?

Tonemapping is done by the GPU (the display adapter component), where OpenCL runs, independently of the QSV ASIC.

Any loading / sluggishness you’d see is from the PCI bus traffic to/from that GPU.

so its weird, intel_gpu_top does not show the gpu maxed out, but that can be a limitation of intel_gpu_top I guess.

it doesn’t even stutter or not “keep up” so occasionally buffers, for me, it “buffers” for 10s, then I get a couple of seconds at most of playback, rinse and repeat. I also see Plex Transcoder maxing out a single cpu which it doesn’t do (uses like 10-20% cpu) for normal hw transcode (some of that is probably audio as well + whatever overhead it has to feed the gpu).

as the cpu usage jumped mightly when tonemap was enabled, it made me think it was all cpu oriented (as I saw tonemap mobius in the transcoder command line) and I, and have lots of experience with many ffmpeg functions not being threaded, (the most common one being vc-1, many things would be able to software decode vc-1 if it was threaded). most TVs that don’t have a VC-1 decoder built in should have enough cpu power to decode vc-1 blurays, but ffmpeg being single threaded means that even a 4core cpu in a tv doesn’t always have enough single core performance to do it.

Intel GPU top is going to be pretty low usage unless you’re pushing it really hard (5-6 concurrent 2160p, 60+ Mbps → 12 Mbps 1080p)

It’s my experience the KabyLake (-7xxx) will handle 5-6 depending on bitrates and codec.

VC-1 is always tough but works.

Tonemapping is done at the bitmap level (after decode – prior to encode) when the image is raw/uncompressed.

Thank you, I was curious just how well it would do. Elsewhere someone is trying to get an Jasper Lake N6005 working, this chip has 2 rendering pipelines so getting perf stats from there would be an interesting baseline for a 10W part.

Another datapoint –

Browsers have very substantial and tangible limits.

It’s easy to overload the browser and make it stutter / stall / and out right fail

I’ve found that Chrome will have “heartburn” if you try to play above ~30 Mbps to it.
Hit it with 80 Mbps , tonemapped or not, and it will lock up & fail.

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