Hello, in your image, when I tryng to transcoding a video file it shows that is working and cpu is slow, HW words show up, but in the plex container it shows this error :
/usr/share/libdrm/amdgpu.ids: No such file or directory
This is the full test log,
Splitting the commandline.
Reading option ‘-hide_banner’ … matched as option ‘hide_banner’ (do not show program banner) with argument ‘1’.
Reading option ‘-loglevel’ … matched as option ‘loglevel’ (set logging level) with argument ‘debug’.
Reading option ‘-vaapi_device’ … matched as option ‘vaapi_device’ (set VAAPI hardware device (DRM path or X11 display name)) with argument ‘/dev/dri/renderD128’.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option hide_banner (do not show program banner) with argument 1.
Applying option loglevel (set logging level) with argument debug.
Applying option vaapi_device (set VAAPI hardware device (DRM path or X11 display name)) with argument /dev/dri/renderD128.
[AVHWDeviceContext @ 0x7fb8e812ba80] libva: VA-API version 1.16.0
[AVHWDeviceContext @ 0x7fb8e812ba80] libva: Trying to open /vaapi-amdgpu/lib/dri/radeonsi_drv_video.so
[AVHWDeviceContext @ 0x7fb8e812ba80] libva: Found init function __vaDriverInit_1_16
/usr/share/libdrm/amdgpu.ids: No such file or directory
[AVHWDeviceContext @ 0x7fb8e812ba80] libva: va_openDriver() returns 0
[AVHWDeviceContext @ 0x7fb8e812ba80] Initialised VAAPI connection: version 1.16
[AVHWDeviceContext @ 0x7fb8e812ba80] Format 0x3231564e → nv12.
[AVHWDeviceContext @ 0x7fb8e812ba80] Format 0x30313050 → p010le.
[AVHWDeviceContext @ 0x7fb8e812ba80] Format 0x36313050 → unknown.
[AVHWDeviceContext @ 0x7fb8e812ba80] Format 0x30323449 → yuv420p.
[AVHWDeviceContext @ 0x7fb8e812ba80] Format 0x32315659 → yuv420p.
[AVHWDeviceContext @ 0x7fb8e812ba80] Format 0x56595559 → unknown.
[AVHWDeviceContext @ 0x7fb8e812ba80] Format 0x32595559 → yuyv422.
[AVHWDeviceContext @ 0x7fb8e812ba80] Format 0x59565955 → uyvy422.
[AVHWDeviceContext @ 0x7fb8e812ba80] Format 0x41524742 → bgra.
[AVHWDeviceContext @ 0x7fb8e812ba80] Format 0x41424752 → rgba.
[AVHWDeviceContext @ 0x7fb8e812ba80] Format 0x58524742 → bgr0.
[AVHWDeviceContext @ 0x7fb8e812ba80] Format 0x58424752 → rgb0.
[AVHWDeviceContext @ 0x7fb8e812ba80] VAAPI driver: Mesa Gallium driver 22.2.4 for AMD Radeon Graphics (raven, LLVM 15.0.5, DRM 3.35, 5.4.0-135-generic).
[AVHWDeviceContext @ 0x7fb8e812ba80] Driver not found in known nonstandard list, using standard behaviour.
Successfully parsed a group of options.
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]… {[outfile options] outfile}…
Use -h to get full help or, even better, run ‘man ffmpeg’
EDIT: I created a path /usr/share/libdrm/ from host to container and the error is not there. is that ok?
Here’s what I just got from running the test command:
Splitting the commandline.
Reading option '-hide_banner' ... matched as option 'hide_banner' (do not show program banner) with argument '1'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
Reading option '-vaapi_device' ... matched as option 'vaapi_device' (set VAAPI hardware device (DRM path or X11 display name)) with argument '/dev/dri/renderD128'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option hide_banner (do not show program banner) with argument 1.
Applying option loglevel (set logging level) with argument debug.
Applying option vaapi_device (set VAAPI hardware device (DRM path or X11 display name)) with argument /dev/dri/renderD128.
[AVHWDeviceContext @ 0x7f4323660a80] libva: VA-API version 1.16.0
[AVHWDeviceContext @ 0x7f4323660a80] libva: Trying to open /vaapi-amdgpu/lib/dri/radeonsi_drv_video.so
[AVHWDeviceContext @ 0x7f4323660a80] libva: Found init function __vaDriverInit_1_16
[AVHWDeviceContext @ 0x7f4323660a80] libva: va_openDriver() returns 0
[AVHWDeviceContext @ 0x7f4323660a80] Initialised VAAPI connection: version 1.16
[AVHWDeviceContext @ 0x7f4323660a80] Format 0x3231564e -> nv12.
[AVHWDeviceContext @ 0x7f4323660a80] Format 0x30313050 -> p010le.
[AVHWDeviceContext @ 0x7f4323660a80] Format 0x36313050 -> unknown.
[AVHWDeviceContext @ 0x7f4323660a80] Format 0x30323449 -> yuv420p.
[AVHWDeviceContext @ 0x7f4323660a80] Format 0x32315659 -> yuv420p.
[AVHWDeviceContext @ 0x7f4323660a80] Format 0x56595559 -> unknown.
[AVHWDeviceContext @ 0x7f4323660a80] Format 0x32595559 -> yuyv422.
[AVHWDeviceContext @ 0x7f4323660a80] Format 0x59565955 -> uyvy422.
[AVHWDeviceContext @ 0x7f4323660a80] Format 0x41524742 -> bgra.
[AVHWDeviceContext @ 0x7f4323660a80] Format 0x41424752 -> rgba.
[AVHWDeviceContext @ 0x7f4323660a80] Format 0x58524742 -> bgr0.
[AVHWDeviceContext @ 0x7f4323660a80] Format 0x58424752 -> rgb0.
[AVHWDeviceContext @ 0x7f4323660a80] VAAPI driver: Mesa Gallium driver 22.2.4 for AMD Radeon Vega 11 Graphics (raven, LLVM 15.0.5, DRM 3.46, 5.18.0-0.deb11.4-amd64).
[AVHWDeviceContext @ 0x7f4323660a80] Driver not found in known nonstandard list, using standard behaviour.
Successfully parsed a group of options.
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Use -h to get full help or, even better, run 'man ffmpeg'
Everything looks fine with the test, it should work within Plex too. By the way, it’s worth to know that HWAccel with AMDGPU is limited to h264 and hevc (h265).
For your reference, here’s the result on my side :
Splitting the commandline.
Reading option '-hide_banner' ... matched as option 'hide_banner' (do not show program banner) with argument '1'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
Reading option '-vaapi_device' ... matched as option 'vaapi_device' (set VAAPI hardware device (DRM path or X11 display name)) with argument '/dev/dri/renderD128'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option hide_banner (do not show program banner) with argument 1.
Applying option loglevel (set logging level) with argument debug.
Applying option vaapi_device (set VAAPI hardware device (DRM path or X11 display name)) with argument /dev/dri/renderD128.
[AVHWDeviceContext @ 0x7f7b60a1d2c0] libva: VA-API version 1.16.0
[AVHWDeviceContext @ 0x7f7b60a1d2c0] libva: Trying to open /vaapi-amdgpu/lib/dri/radeonsi_drv_video.so
[AVHWDeviceContext @ 0x7f7b60a1d2c0] libva: Found init function __vaDriverInit_1_16
[AVHWDeviceContext @ 0x7f7b60a1d2c0] libva: va_openDriver() returns 0
[AVHWDeviceContext @ 0x7f7b60a1d2c0] Initialised VAAPI connection: version 1.16
[AVHWDeviceContext @ 0x7f7b60a1d2c0] Format 0x3231564e -> nv12.
[AVHWDeviceContext @ 0x7f7b60a1d2c0] Format 0x30313050 -> p010le.
[AVHWDeviceContext @ 0x7f7b60a1d2c0] Format 0x36313050 -> unknown.
[AVHWDeviceContext @ 0x7f7b60a1d2c0] Format 0x30323449 -> yuv420p.
[AVHWDeviceContext @ 0x7f7b60a1d2c0] Format 0x32315659 -> yuv420p.
[AVHWDeviceContext @ 0x7f7b60a1d2c0] Format 0x56595559 -> unknown.
[AVHWDeviceContext @ 0x7f7b60a1d2c0] Format 0x32595559 -> yuyv422.
[AVHWDeviceContext @ 0x7f7b60a1d2c0] Format 0x59565955 -> uyvy422.
[AVHWDeviceContext @ 0x7f7b60a1d2c0] Format 0x41524742 -> bgra.
[AVHWDeviceContext @ 0x7f7b60a1d2c0] Format 0x41424752 -> rgba.
[AVHWDeviceContext @ 0x7f7b60a1d2c0] Format 0x58524742 -> bgr0.
[AVHWDeviceContext @ 0x7f7b60a1d2c0] Format 0x58424752 -> rgb0.
[AVHWDeviceContext @ 0x7f7b60a1d2c0] VAAPI driver: Mesa Gallium driver 22.2.4 for AMD Radeon 500 Series (polaris12, LLVM 15.0.5, DRM 3.40, 5.10.146).
[AVHWDeviceContext @ 0x7f7b60a1d2c0] Driver not found in known nonstandard list, using standard behaviour.
Successfully parsed a group of options.
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Use -h to get full help or, even better, run 'man ffmpeg'
LLVM triggered Diagnostic Handler: non-trivial scalar-to-vector conversion
VAAPI driver: Mesa Gallium driver 22.2.4 for AMD Radeon 500 Series (polaris12, LLVM 15.0.5, DRM 3.40, 5.10.146).
Is the AMD chipset driver : Radeon Vega 11 (raven) vs Radeon 500 (polaris).
FYI I just published a new version which includes libdrm.so from alpine:edge instead of relying on Plex’s version of the library. I don’t think that should have any effect, but who knows. It’s really a hit and miss process at this point.
Its me again, I thought everything works fine but, when I wanted to transcoding from Firetv or Android device it doesnt work anymore. Only works on Plex Web. But using the hexeth docker it works perfect on all device. What should wrong?. Thanks in advanced.
I can confirm though that it also only works on Plex web for me, it does not work on AppleTV or on an iPhone, not working meaning it does it in CPU, not in hw.
it also seems that even on web some movies are not done in hw in all qualities for some reason
mauimauer image works good so I assume it has something to do with alpine being used as the base?
I don’t know if it’s helpful. FWIW, I am able to successfully transcode a few files on any platform (I tried a 4k LOTR TTT and it will hw encode on web and Android at least). This file won’t on any platform (Amazing Spiderman 4k). Here are the verbose logs when transcoding starts:
Here is the log for a file that successfully gets hardware transcoded.
The main difference I see between these two use cases is the presence of these errors (that I saw some of without verbose logging when transcoding this same file)
Dec 06, 2022 08:45:21.241 [0x7f50e931db38] ERROR - [Req#d1f/Transcode/d3fe440ea5030603-com-plexapp-android/e17777b4-a28d-4bc8-ac1d-0b1b105347c6] [AVHWDeviceContext @ 0x7f3b4afdc940] Failed to get number of OpenCL platforms: -1001.
Dec 06, 2022 08:45:21.242 [0x7f50eb6e1b38] ERROR - [Req#d20/Transcode/d3fe440ea5030603-com-plexapp-android/e17777b4-a28d-4bc8-ac1d-0b1b105347c6] [AVHWDeviceContext @ 0x7f3b4afdc940] Failed to get number of OpenCL platforms: -1001.
Dec 06, 2022 08:45:21.242 [0x7f50e911ab38] ERROR - [Req#d21/Transcode/d3fe440ea5030603-com-plexapp-android/e17777b4-a28d-4bc8-ac1d-0b1b105347c6] [Parsed_hwmap_2 @ 0x7f3b4af84980] Failed to created derived device context: -19.
Dec 06, 2022 08:45:21.242 [0x7f50e931db38] ERROR - [Req#d22/Transcode/d3fe440ea5030603-com-plexapp-android/e17777b4-a28d-4bc8-ac1d-0b1b105347c6] [Parsed_hwmap_2 @ 0x7f3b4af84980] Failed to configure output pad on Parsed_hwmap_2
Dec 06, 2022 08:45:21.253 [0x7f50eb6e1b38] ERROR - [Req#d23/Transcode/d3fe440ea5030603-com-plexapp-android/e17777b4-a28d-4bc8-ac1d-0b1b105347c6] Error reinitializing filters!
Dec 06, 2022 08:45:21.253 [0x7f50e911ab38] ERROR - [Req#d24/Transcode/d3fe440ea5030603-com-plexapp-android/e17777b4-a28d-4bc8-ac1d-0b1b105347c6] Failed to inject frame into filter network: Error number -19 occurred
Dec 06, 2022 08:45:21.253 [0x7f50e931db38] ERROR - [Req#d25/Transcode/d3fe440ea5030603-com-plexapp-android/e17777b4-a28d-4bc8-ac1d-0b1b105347c6] Error while processing the decoded data for stream #0:0
Dec 06, 2022 08:45:21.253 [0x7f50eb6e1b38] WARN - [Req#d26/Transcode/d3fe440ea5030603-com-plexapp-android/e17777b4-a28d-4bc8-ac1d-0b1b105347c6] [libopus @ 0x7f3b4d3bd040] 1 frames left in the queue on closing
Dec 06, 2022 08:45:21.281 [0x7f50e931db38] INFO - [Req#d28/Transcode/d3fe440ea5030603-com-plexapp-android/e17777b4-a28d-4bc8-ac1d-0b1b105347c6] Conversion failed!
edit: I searched for some of those errors and it pointed me at HDR tone mapping issues. I disabled that and now more things are being hardware transcoded.
I have Plex installed on Proxmox LXC. I 've updated today to plexmediaserver version 1.30.0.6486-629d58034, copied again the libs as you said and hw acceleration it’s still working.
AMD Ryzen 5 PRO 3400GE
vainfo: Driver version: Mesa Gallium driver 22.3.0-devel for RAVEN (raven, LLVM 15.0.3, DRM 3.42, 5.15.74-1-pve)
Can anyone summarize/post a quick guide again as I went through this forum, installed the docker in unraid, added settings in /boot/config/go file…still no dice .
I would suggest to read the posts, try it out and post results
There hasnt been a definite “works for all” yet so you either participate in the trial and error or wait until (IF) there is a definite working and maintained image…
as a first you might want to check if the (not maintained) version from mauimauer works for you
I guess I’ve tried most of them including mauimauer image, no dice. I gave up, just added an old nvidia card (gtx 1050ti) and it works. Too bad that only Intel and nvidia are well supported but not AMD, they deserve more love
yes, for the lsio based image, this is the best solution, still has some caveats afaik
not all video formats work, does not work on all players (like AppleTV) and falls back to either direct play or cpu decoding
HDR tone mapping needs to be disabled
functionality wise, the last original image from mauimauer works best but unfortunately its not regularly maintained