Hardware support for Intel Arc/Alchemist GPUs being explored?

With the release of the A380 GPU now beginning i was wondering if the Dev team was exploring adding support for these GPUs into the roadmap.

With their impressive transcode capabilities and their low price ( ~$130 for the A380) they could easily become a serious goto option for discrete GPUs for hardware transcoding.

5 Likes

I was wondering the same, and also how it compares in 4k streaming againt some popular other gpus

1 Like

Adding myself to this too. The drivers do seem to be a mess, for now, but seems like the hardware encoder/decoder is no joke. This could end up being a good price/lower power option for and cpu users like myself.

1 Like

I don´t think the plex devs have to do some special work to get them working. The ARC GPUs use the same video en/decoding framework called QuickSync as it is used on their iGPUs. So as long as the drivers expose it correctly it should work.

@Mitzsch I think they mean for the AV1 instead of QuickSync.

I received a A380 today and promptly installed it in my Windows Server 2019 Plex server with an older Xeon v5 with iGPU, no resizable bar available.

Latest Intel drivers installed but not the Arc controller. Disabled the iGPU and ran some tests. Plex is not utilizing the A380 for transcoding even though it reports HW encoding. CPU is maxed out during a 4k HDR x265 transcode to 1080p.

Anyone have this GPU transcoding in windows? Is resizable bar required for encoding?

2 Likes

Resizable bar should have no effect on encoding/decoding. So the guess is Plex doesn’t use it at all at the moment.

Thanks for testing and letting us know about your experience!

May I ask to test different things?

  • Does hw decoding even work with Windows server? I had some trouble in the past with Windows Server regarding hardware acceleration.

(You can easily check if its working by using mpv. Simply download the mpv player, unzip it and run mpv.com h264.mkv -vo=gpu -hwdec=d3d11va -v. In the cli you can see if its using hw-decoding or by hitting i in the player’s window - at the end of the Video line it should state hwdec: d3d11va in brackets)

  • If it’s not working with Windows Server, can you test it with Windows 10 as well?

  • Have you tried a simple 1080p SDR x264 to 1080p transcode? (Maybe x265 isn’t stable yet on ARC)

  • Can you also test it on Ubuntu? You likely need mesa upstream for it to work. (Updated Open Graphics Drivers - since 2011! : Oibaf)

As stated above, it should not be required.

Thanks!

  • Does hw decoding even work with Windows server? I had some trouble in the past with Windows Server regarding hardware acceleration.

Yes. On the P530 iGPU HW encoding works (not for x256 as its not supported) but only with a older non-DCH Driver. Driver version 21.20.16.5174.

I initially installed the Intel DCH Driver for the A380 - BETA 31.0.101.3276 but noticed the non-beta is 31.0.101.3277 so I installed that which allowed ARC Control to install and work.

(You can easily check if its working by using mpv. Simply download the mpv player, unzip it and run mpv.com h264.mkv -vo=gpu -hwdec=d3d11va -v . In the cli you can see if its using hw-decoding or by hitting i in the player’s window - at the end of the Video line it should state hwdec: d3d11va in brackets)

Im getting a error running that command

[bdmv/bluray] Opening h264.mkv
[file] Opening h264.mkv
[osd/libass] Shaper: FriBidi 1.0.12 (SIMPLE) HarfBuzz-ng 5.2.0 (COMPLEX)
[file] Cannot open file 'h264.mkv': No such file or directory
[stream] Failed to open h264.mkv.
  • Have you tried a simple 1080p SDR x264 to 1080p transcode? (Maybe x265 isn’t stable yet on ARC)

Not working no “Transcode hw” displayed, CPU Maxed out. I did notice “Transcode hw” is showing on x256 content but the CPU is maxed out.

  • If it’s not working with Windows Server, can you test it with Windows 10 as well?

Can you also test it on Ubuntu? You likely need mesa upstream for it to work.

Sorry I cannot, Server 2019 has my PMS and all media files.

Maybe there is a driver conflict with PMS with the 2 intel drivers? I have the P530 disabled in the task manager (unable to disable in bios). Changing the ARC GPU to the primary GPU in bios did not work, HDMI dummy plug did not help (headless server), reverting to x86 PLEX build did not work. Reenabling the P530 iGPU HW encoding works as expected albeit no x256.

Okay, thats a good and a bad sign. (I mean it should also work with the newest driver. Or did Intel also fu****d up the non arc driver???)

Okay, well you need to put in a file you have on your pc/server. I was just using h264.mkv as an example for a possible h264 video file.

Hmm, I guess then hw acceleration is not working on ARC. Maybe you can try mpv again?

A driver conflict could be possible, although I have seen people running an AMD APU and an Nvidia GPU in the same system with their corresponding driver installed and Plex HW acceleration still worked. Have you tried uninstalling the P530 driver? (Windows should use its default driver for the GPU then - on windows server, auto driver install like seen in consumer windows versions is disabled)

As for Linux testing, maybe I can get my hands on an A380. They were just recently available here in Germany but were sold out almost immediately.

Okay, well you need to put in a file you have on your pc/server. I was just using h264.mkv as an example for a possible h264 video file.

:man_facepalming: So it seems it is working. Test ran with iGPU disabled:

x264

[vd]     h264 - H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
[vd]     h264_qsv (h264) - H264 video (Intel Quick Sync Video acceleration)
[vd]     h264_cuvid (h264) - Nvidia CUVID H264 decoder

x265

[vd]     hevc - HEVC (High Efficiency Video Coding)
[vd]     hevc_qsv (hevc) - HEVC video (Intel Quick Sync Video acceleration)
[vd]     hevc_cuvid (hevc) - Nvidia CUVID HEVC decoder

Plex not using the A380

Could this because of the version of FFmpeg Plex uses?

Thanks for testing!
So hw decoding is working with the A380. Also for x265? I see no decoding activity in your task manager. Is x265 actually working? (Does it state hwdec: d3d11 when hitting i in mpv?)

This is just an enumeration of what mpv can potentially use for hw decoding.

This is what it should look like. (You can also remove the -v and only the white line should be show in case hw decoding works)

Maybe you can post your PMS log? Maybe we can find something there.

Headless server? How are you starting Plex? Both as a service and RDP cause access problems with the driver.

Thanks for testing!

Absolutely! Hopefully we or the plex devs can resolve this before my return window is closed to help everyone in the community.

So hw decoding is working with the A380. Also for x265? I see no decoding activity in your task manager. Is x265 actually working? (Does it state hwdec: d3d11 when hitting i in mpv?)

It is

x265

[vd] Requesting pixfmt 'd3d11' from decoder.
[vd] Using hardware decoding (d3d11va).

PMS Server logs.
Plex Media Server Logs_2022-09-21_16-20-24.zip (421.7 KB)

I played one x265 file then a x264 file. As before the x265 file shows hw transcoding but CPU is maxed out, the x264 file shows no hw transcoding, cpu maxed out again.

1 Like

Headless server?

Yes.

How are you starting Plex? Both as a service and RDP cause access problems with the driver.

Just with the exe running in the system trey, not as a service as I had issues with hw transcoding using it while logged off a few years ago. Has this changed? Would be nice to run as a service not logged in all the time. RDP’ing in while hw transcoding with the iGPU doesn’t seem to cause issues. Let me test closing the RDP session.

UPDATE
Trying to transcode with the RDP session closed just crashed the stream to my local pc after this error:

An unknown error occurred (4294967283)
Error code: 4294967283

Not realty specific but from https://www.newegg.com/asrock-arc-a380-a380-cli-6g/p/N82E16814930076?Description=arc%20a380&cm_re=arc_a380-_-14-930-076-_-Product

  • Intel Arc Graphics products require a Resizable BAR enabled system.
  • Intel Arc Graphics products leverage the latest in system technologies to deliver a great gaming experience. In order to ensure you get the best gaming experiences from Intel Arc A-Series Desktop Graphics, a supported hardware configuration is required, and there are a few system BIOS settings that are critical to configure.
  • System BIOS are designed to support configurations for a broad range of devices and some default configurations may not be optimal for Intel Arc A-Series Desktop Graphics.

Not sure how to interpret this…

From what I read from Intel is resizable bar is for optimal gaming performance but not required. Not sure how it affects encoding/decoding since information is very scarce at the moment. I want to try to make this work for plex as on paper its superior to nvidia’s encoder. Maybe enough attention will get PLEX dev’s to chime in.

Sep 21, 2022 14:07:42.335 [13864] ERROR - [Req#3c5/Transcode/q6t38behroc876agok5ak43l/fdc43bd7-1b14-47d2-9760-80ed8764dc25] [h264 @ 00000271760febc0] Failed to retrieve decoder device GUIDs
Sep 21, 2022 14:07:42.335 [13864] ERROR - [Req#3d6/Transcode/q6t38behroc876agok5ak43l/fdc43bd7-1b14-47d2-9760-80ed8764dc25] [h264 @ 00000271760febc0] Failed setup for format dxva2_vld: hwaccel initialisation returned error.
Sep 21, 2022 14:07:42.529 [13604] ERROR - [Req#3d7/Transcode/q6t38behroc876agok5ak43l/fdc43bd7-1b14-47d2-9760-80ed8764dc25] [AVHWFramesContext @ 00000271762459c0] The hardware pixel format 'qsv' is not supported by the device type 'DXVA2'
Sep 21, 2022 14:07:42.529 [13604] ERROR - [Req#3e4/Transcode/q6t38behroc876agok5ak43l/fdc43bd7-1b14-47d2-9760-80ed8764dc25] [Parsed_hwmap_0 @ 0000027176280600] Failed to create frame context for reverse mapping: -40.
Sep 21, 2022 14:07:42.530 [13604] ERROR - [Req#3e5/Transcode/q6t38behroc876agok5ak43l/fdc43bd7-1b14-47d2-9760-80ed8764dc25] [Parsed_hwmap_0 @ 0000027176280600] Failed to configure output pad on Parsed_hwmap_0
Sep 21, 2022 14:07:42.530 [13604] ERROR - [Req#3e6/Transcode/q6t38behroc876agok5ak43l/fdc43bd7-1b14-47d2-9760-80ed8764dc25] Error reinitializing filters!
Sep 21, 2022 14:07:42.531 [13604] ERROR - [Req#3e7/Transcode/q6t38behroc876agok5ak43l/fdc43bd7-1b14-47d2-9760-80ed8764dc25] Failed to inject frame into filter network: Function not implemented
Sep 21, 2022 14:07:42.531 [13604] ERROR - [Req#3e8/Transcode/q6t38behroc876agok5ak43l/fdc43bd7-1b14-47d2-9760-80ed8764dc25] Error while processing the decoded data for stream #0:0

This what I found in your logs. (I also found some access denied lines? => Plex Media Server.5.log line 242/244)

So it seems Plex uses (the older) DXVA2 (instead of D3D11) for decoding on windows. However, DXVA2 should be fine as well.

Can you please try different things?

  • Run mpv again but this time: mpv.com h264.mkv -vo=gpu -hwdec=dxva2
    Is hw decoding working? Can you please use the video file you tested with plex?

  • Try to transcode with plain ffmpeg.

Download ffmpeg here => https://www.gyan.dev/ffmpeg/builds/ffmpeg-git-full.7z, unzip and run the commands listed below. Change the input-videofile.mkv to a file you have on your pc - preferably the one you also used with plex. You can also try to use an h265 file for the input file but please try an h264 file first.

ffmpeg.exe -hwaccel dxva2 -i input-videofile.mkv -c:v h264_qsv -c:a copy output-videofile.mkv
ffmpeg.exe -hwaccel d3d11va -i input-videofile.mkv -c:v h264_qsv -c:a copy output-videofile.mkv
ffmpeg.exe -hwaccel qsv -i input-videofile.mkv -c:v h264_qsv -c:a copy output-videofile.mkv

You don’t need to run the full transcode, just abort the transcode with CTRL + C after you can confirm its using the GPUs decoding and encoding capabilities.

  • Run mpv again but this time: mpv.com h264.mkv -vo=gpu -hwdec=dxva2
    Is hw decoding working? Can you please use the video file you tested with plex?

I don’t recall what I ran with plex so ill post new logs with the same 2 files for all tests

x264

[vd] Opening decoder h264
[vd] Looking at hwdec h264-dxva2...
[vo/gpu] Loading hwdec drivers for format: 'dxva2_vld'
[vo/gpu] Loading hwdec driver 'dxva2-egl'
[vo/gpu] Loading failed.
[vo/gpu] Loading hwdec driver 'dxva2-dxgi'
[vo/gpu] Loading hwdec driver 'dxva2-dxinterop'
[vo/gpu] Loading failed.
[vd] Trying hardware decoding via h264-dxva2.
[vd] Pixel formats supported by decoder: cuda dxva2_vld d3d11va_vld d3d11 yuv420p
[vd] Codec profile: High (0x64)
[vd] Requesting pixfmt 'dxva2_vld' from decoder.
[ffmpeg/video] h264: Failed to retrieve decoder device GUIDs
[ffmpeg/video] h264: Failed setup for format dxva2_vld: hwaccel initialisation returned error.
[vd] Pixel formats supported by decoder: cuda d3d11va_vld d3d11 yuv420p yuv420p
[vd] Codec profile: High (0x64)
[vd] Requesting pixfmt 'yuv420p' from decoder.
[vd] Selected codec: h264 (H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10)
[vf] User filter list:
[vf]   (empty)
[ad] Codec list:
[ad]     dca (dts) - DCA (DTS Coherent Acoustics)
[ad] Opening decoder dca
[ad] Requesting 1 threads for decoding.
[ad] Selected codec: dca (DCA (DTS Coherent Acoustics))
[af] User filter list:
[af]   (empty)
[cplayer] Starting playback...
[vd] Falling back to software decoding.

x265

[vd] Opening decoder hevc
[vd] Looking at hwdec hevc-dxva2...
[vo/gpu] Loading hwdec drivers for format: 'dxva2_vld'
[vo/gpu] Loading hwdec driver 'dxva2-egl'
[vo/gpu] Loading failed.
[vo/gpu] Loading hwdec driver 'dxva2-dxgi'
[vo/gpu] Loading hwdec driver 'dxva2-dxinterop'
[vo/gpu] Loading failed.
[vd] Trying hardware decoding via hevc-dxva2.
[vd] Selected codec: hevc (HEVC (High Efficiency Video Coding))
[vf] User filter list:
[vf]   (empty)
[ad] Codec list:
[ad]     truehd - TrueHD
[ad] Opening decoder truehd
[ad] Requesting 1 threads for decoding.
[ad] Selected codec: truehd (TrueHD)
[af] User filter list:
[af]   (empty)
[cplayer] Starting playback...
[vd] Pixel formats supported by decoder: dxva2_vld d3d11va_vld d3d11 cuda yuv420p10le
[vd] Codec profile: Main 10 (0x2)
[vd] Requesting pixfmt 'dxva2_vld' from decoder.
[ffmpeg/video] hevc: Failed to retrieve decoder device GUIDs
[ffmpeg/video] hevc: Failed setup for format dxva2_vld: hwaccel initialisation returned error.
[vd] Pixel formats supported by decoder: d3d11va_vld d3d11 cuda yuv420p10le yuv420p10le
[vd] Codec profile: Main 10 (0x2)
[vd] Requesting pixfmt 'yuv420p10le' from decoder.
[af] [in] 48000Hz 7.1 8ch s32
[af] [userspeed] 48000Hz 7.1 8ch s32
[af] [userspeed] (disabled)
[af] [convert] 48000Hz 7.1 8ch s32
[vd] Falling back to software decoding.

MPV failed using hardware acceleration

  • Try to transcode with plain ffmpeg.

x264
dxva2

[h264 @ 000001e419ea40c0] Failed to retrieve decoder device GUIDs
[h264 @ 000001e419ea40c0] Failed setup for format dxva2_vld: hwaccel initialisation returned error.

HW Transcoding Failed

d3d11va & qsv


HW Transcoding Worked

x265
dxva2

[hevc @ 000002453046bb40] Failed to retrieve decoder device GUIDs
[hevc @ 000002453046bb40] Failed setup for format dxva2_vld: hwaccel initialisation returned error.
[h264_qsv @ 0000024530472340] Current pixel format is unsupported
[h264_qsv @ 0000024530472340] some encoding parameters are not supported by the QSV runtime. Please double check the input parameters.
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!

d3d11va

[h264_qsv @ 00000200b339ebc0] Current pixel format is unsupported
[h264_qsv @ 00000200b339ebc0] some encoding parameters are not supported by the QSV runtime. Please double check the input parameters.
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!

qsv

[h264_qsv @ 0000017fa8dae340] Current pixel format is unsupported
[h264_qsv @ 0000017fa8dae340] some encoding parameters are not supported by the QSV runtime. Please double check the input parameters.
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!

I cant get the x265 file to run. Seems like I need to add parameters in the command?

Updated PLEX logs
Plex Media Server Logs_2022-09-22_10-52-48.zip (433.7 KB)

1 Like

Well, so we can draw the conclusion that dxva2 is not working on ARC (yet) and therefore not working with plex on the decoding side on windows. (Would interesting to see how it behaves on Linux) This is nothing plex can resolve, hopefully, Intel will fix it soon.

At least d3d11va and the direct qsv device works.

For x265 maybe you can try again with -c:v libx265 instead of h264_qsv, to put the Intel encoder out of the equation. In this case it will software encode an hevc stream. You may also try h265_qsv or hevc_qsv although I have no idea if they are actually implemented.

Thanks!