Anybody get HW transcoding working with the A380 on Ubunutu?

Server Version#: Version 1.30.1.6497
Player Version#: Plex for Windows Version 1.57.1.3358-5fd2a504, Plex Web Version 4.87.2

New Intel Arc A380 installed, drivers installed as per Intel: Ubuntu* 22.04 (jammy) — Intel® software for general purpose GPU capabilities documentation

Mounted into the Plex container as ‘/dev/dri’ and ‘privileged: true’ (this 100% works for the Intel iGPU).

Everything appears to be working, but Plex won’t HW Transcode on the A380. All transcoding goes to the CPU.

There’s lot of threads on reddit reporting the same issue: https://www.reddit.com/r/IntelArc/comments/zrd2mm/anybody_get_plex_hw_transcoding_work_on_ubuntu_w/

Anybody get hardware transcoding working on Plex hosted on Ubuntu/Docker?

3 Likes

Plex supports Intel QSV (the internal ASIC) and Nvidia.

Nothing has been mentioned about supporting the Intel GPUs at this time but it does stand to reason that should Intel resolve the issues with the drivers -then- it stands to reason it would work (still no promises until actually tried)

From reading the Github issue, it doesn’t seem to be fully resolved.
Also, there might be additional dependencies to use it in FFMPEG and kernel / kernel drivers .

What’s odd is the process to attach an Intel CPU that has Quick Sync to a container is the same as the Intel GPU: mount /dev/dri and set container security connect privileged=true (or something very close to that, on mobile now).

I ran Plex with the iGPU with HW transcoding for over a year, and can certify this integration 100% works.

However when I run that container configuration with the A380 installed, Plex will not use the iGPU.

No errors or warnings in the logs… Just doesn’t work

Weird stuff

Do you now have renderD128 and 129 devices or did you disable the onboard iGPU?

I have a couple questions -

  1. Does /dev/dri show both the iGPU and the discrete card ?
    ** /dev/dri/renderD128
    ** /dev/dri/renderD129

  2. If so, are you selecting the card for PMS use?
    ** HardwareDevicePath="/dev/dri/renderD129"

  3. Are you passing the right device(s) into the container ?

@elan needs to get an Intel GPU for @ChuckPa to play with!

No he doesn’t

I have a P2200 which will outrun that Intel any day of the week!

:stuck_out_tongue:

Intel Arc (DG2) will work with the existing QuickSync API but Plex needs the latest media-driver built. Currently, the iHD_drv_video.so that comes with Plex does not support DG2 even though the latest intel-media-driver does work with DG2.

A different ffmpeg configuration (--enable-libvpl instead of --enable-libmfx) is also needed for AV1 support AFAIK, and oneVPL supports legacy CPUs/GPUs: oneVPL Support Added to FFMPEG for Great Streaming on Intel® GPUs

Are libvpl and libmfx mutually exclusive? From superficial inspection, they seem to be.

If that’s true, I don’t know how it’s possible to support everyone else AND the Intel Arc

BUT

That’s what they have the transcoder team for … so I’ll go find out :slight_smile:

1 Like

Yes, they are mutually exclusive. Though oneVPL should, according to their docs, support non-Arc products (legacy products included) such as 10th gen iGPUs and lower.

Glad you’re able to bring this to the attention of someone working on this stuff :slight_smile: I recently received an Arc A750 and put it in my server which I mainly use for Plex, however sadly Arc is currently unsupported by Plex so I’ve had to use Plex alternatives as a workaround.

This will be a problem.

There will be technology and product decisions required due to the number of customers potentially impacted. (Don’t forget Nvidia GPUs)

For now, there is no short-term workaround / fix.

NVIDIA is unrelated as they use NVENC. As long as ffmpeg is built with --enable-nvenc AND --enable-libvpl, ffmpeg will support both NVIDIA GPUs and Intel GPUs (iGPU and DG2/Arc)

Edit: I checked what configuration Plex Transcoder is currently built with, and it looks like they specify exactly which encoders/decoders are enabled rather than building against a whole library. av1_vaapi, hevc_vaapi and h264_vaapi encoders are already enabled. This means the transcoder theoretically supports Intel Arc GPUs.

It just needs an update of the intel media driver (and possibly libva) that it bundles with it (iHD driver).

Thanks,

I’ll send a message direct to the team lead. She’ll know what to do with it.

As for “Theoretically supports” - that was my understanding too but the transcoder is not my specialty. I’m the OS guy.

1 Like

@KingFaris10

can you please recreate for me DEBUG logs which capture the failure of the A380 ?


The key error is being unable to init iHD_drv_video, caused by an outdated intel-media-driver
Another cause of this error is an outdated libva (a requirement of intel-media-driver)

Transcoding works fine if I enable my iGPU, but fails with just the Arc A750. Works fine with other software, just not Plex

I’ve chatted with the transcoder team.

They ask to see the DEBUG logs which capture the start of playback

They also request which kernel version (uname -a) you have installed as there are a lot more dependencies than just iHD driver.

Not that they don’t trust – they do need to verify your findings so they fully understand.
The idea here is to find out what’s NOT working so it can be fixed.

First of all thanks for your help on passing this message along

Full log from when I hit play on a video, till I close the video (it does software encoding after giving up on hardware encoding): Removed

Kernel: Linux server-1 6.2.0-rc2+ #4 SMP PREEMPT_DYNAMIC Mon Jan 2 17:37:28 GMT 2023 x86_64 x86_64 x86_64 GNU/Linux
HuC and GuC are enabled, no errors with i915 in dmesg.
I’ve also tried this on Intel’s drm-tip based on 6.2.0-rc1 and it didn’t work.

I wanted to check in on this thread, since it was the only one I could find with a technical look into what’s going on.

I’ve been able to get my new A380 working in ffmpeg with both --enable-libvpl and --enable-libmfx, though with libmfx, there isn’t support for AV1 encode. I’m able to get AV1 decode working though.

Side note: oneVPL has a dispatcher layer that dispatches to the Intel Media SDK (very similarly to what libmfx does) for older hardware, so there shouldn’t be any drop in support.

Let me know if there is anything that could help with the process.

Cheers!

Right now, we’re trying to fix Nvidia.

There’s currently no time / extra hands to add another GPU.

Adding the A380, should engineering decide to, will unfortunately wait until we resolve the problem with the new Nvidia CUDA drivers & PMS.

Well that’s a bit of a bummer. I also have an Intel A380. I wanted to move away from using an Nvidia RTX A2000 and built myself a system, hypervisor, vm, and container for this and have the card successfully passed through where it needs to be.

This is me, from the Arc A380 system, attempting to transcode live tv from a network tv tuner. This works without issue on my other system with the RTX A2000 (using the older nvidia driver that doesn’t cause an issue, heh)

Same confirmations… /dev/dri is being sent over to the container in full
5.17.0-1020-oem #21-Ubuntu SMP PREEMPT Fri Oct 14 09:33:24 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

From debug logs:

    "response": "{\"MediaContainer\":{\"size\":3,\"playbackState\":\"complete\",\"skipCount\":0,\"viewCount\":9,\"viewOffset\":-1,\"Bandwidths\":[{\"Bandwidth\":[{\"time\":0,\"bandwidth\":1981,\"resolution\":\"SD\"}]}],\"TranscodeSession\":[{\"key\":\"/transcode/sessions/bv5dwqsufhe06iasxih1u5gc\",\"throttled\":false,\"complete\":false,\"progress\":-1.0,\"size\":-22,\"speed\":1.100000023841858,\"error\":false,\"duration\":7200000,\"context\":\"streaming\",\"sourceVideoCodec\":\"h264\",\"sourceAudioCodec\":\"ac3\",\"videoDecision\":\"transcode\",\"audioDecision\":\"transcode\",\"protocol\":\"dash\",\"container\":\"mp4\",\"videoCodec\":\"h264\",\"audioCodec\":\"aac\",\"audioChannels\":2,\"transcodeHwRequested\":true,\"timeStamp\":1675466025.1220742,\"maxOffsetAvailable\":372.0053386720053,\"minOffsetAvailable\":46.01268005371094}],\"CaptureBuffer\":[{\"size\":1,\"TranscodeSession\":[{\"key\":\"/transcode/sessions/fae281eb-6de9-4069-9129-3fd02d40ae0e\",\"throttled\":false,\"complete\":false,\"progress\":-1.0,\"size\":-22,\"speed\":1.0,\"error\":false,\"duration\":7200000,\"context\":\"static\",\"sourceVideoCodec\":\"\",\"sourceAudioCodec\":\"\",\"videoDecision\":\"copy\",\"audioDecision\":\"copy\",\"protocol\":\"hls\",\"container\":\"mpegts\",\"videoCodec\":\"*\",\"audioCodec\":\"*\",\"audioChannels\":2,\"width\":1280,\"height\":720,\"transcodeHwRequested\":true,\"transcodeHwFullPipeline\":false,\"timeStamp\":1675466025.1220742,\"maxOffsetAvailable\":373.785178,\"minOffsetAvailable\":0.0}]}]}}",
    "time": "2023-02-03T23:19:56.324Z"

…and this is from Plex Transcoder Statistics.log

<Variant id="c8f990f6-e96e-41b0-9a65-98b0aaf94b40" targetBitrate="1981" context="streaming" sourceVideoCodec="h264" sourceAudioCodec="ac3" videoDecision="transcode" audioDecision="transcode" protocol="dash" container="mp4" videoCodec="h264" audioCodec="aac" audioChannels="2" transcodeHwRequested="1" transcodeHwFullPipeline="0">


<Media id="9" origin="livetv" timeStamp="1675466025.1220741" uuid="fae281eb-6de9-4069-9129-3fd02d40ae0e" audioChannels="2" audioCodec="aac" bitrate="1886" container="mp4" height="404" optimizedForStreaming="1" protocol="dash" videoCodec="h264" videoFrameRate="60p" videoResolution="SD" width="720" selected="1">
<Part deepAnalysisVersion="6" id="9" bitrate="1886" container="mp4" height="404" optimizedForStreaming="1" protocol="dash" width="720" decision="transcode" selected="1">
<Stream bitrate="1724" closedCaptions="1" codec="h264" displayTitle="720p (H.264)" extendedDisplayTitle="720p (H.264)" frameRate="59.939998626708984" height="404" id="31" streamType="1" width="720" decision="transcode" location="segments-video" />
<Stream bitrate="162" bitrateMode="cbr" channels="2" codec="aac" displayTitle="English (AC3 5.1)" extendedDisplayTitle="English (AC3 5.1)" id="32" language="English" languageCode="eng" languageTag="en" requiredBandwidths="384,384,384,384,384,384,384,384" selected="1" streamType="2" decision="transcode" location="segments-audio" />