Anyone hear any updates?
I’m using Proxmox with a Ryzen 4650g. I’ve got a Debian LXC container and am running Jellyfin, Frigate and Plex via docker within this. I’ve got GPU transcoding working for Jellyfin and Frigate but can’t get it to work in Plex. I’m, assuming the LXC configuration is fine as its working for the others which leaves the docker container itself.
I’m using the LinuxServer.io image and applied the patch (well, I took the commands from it and ran them manually). This didn’t work. There was no error, only the dashboard did not show “(hw)” as the transcoder and fell back to CPU.
vainfo shows correct details and no errors. I’ve tried restarting the container to no effect.
I tried these instructions also. Am I missing something? Has anyone got it to work in this way?
Hi,
as explained above, I tried that.
Unfortunately this will not work with the lsio image because it is based on Ubuntu 22.04 where I have not found a way to use the newest drivers.
It would work once they use a newer version as their base image or switch to alpine but they will likely only switch the base once there is a newer LTS version.
What could work is if you combine this with the first part of what mtzro2003 wrote and install the mesa drivers from amd repositories, have you tried to include that part in the hexeth version before files get copied?
If this results in newer mesa drivers on Ubuntu then it should work
I’m not sure I fully understand the steps/process here. Starting with a fresh linuxserver.io docker container, I install the mesa drivers from the AMD repo. This gives me:
Error: XDG_RUNTIME_DIR not set in the environment.
error: can't connect to X server!
libva info: VA-API version 1.14.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_8
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.14 (libva 2.12.0)
vainfo: Driver version: Mesa Gallium driver 22.3.0-devel for RENOIR (renoir, LLVM 15.0.0, DRM 3.42, 5.15.39-1-pve)
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointEncSlice
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
Is the driver the correct/required version?
I think @mtzro2003 copied the libraries from the container because plex was running inside the LXC itself. So from here, do I need to copy files from or to " /usr/lib/plexmediaserver/lib" in the container?
I dont know which version this was fixed on but it is not the latest version thats available on the alpine container by mauimauer.
Thats the exact same version I get when I do it the “normal” way with the lsio container so it seems there is no newer VA-API (I believe thats probably part of the mesa package) version for it…
maybe you can convince lsio to rebase to Alpine ![]()
on your other question, yes you would still need to copy the files for plex to use them
this is where I got to about a month ago…
unfortunately the expert on this (mauimauer) is probably busy with other stuff and didnt have much time to chime in
I would switch to mauimauers image but that one is badly maintained and I prefer a maintained image over hardware acceleration right now.
EDIT: upgrading this might not even fix the issues… we just assume it might because mauimauers image works but is alpine based (check out his image and check the versions there)
Do you where what files I copy and to where?
Re: VAAPI version, if you know the minimum version then there are other repos that could be used which also have newer mesa libraries (such as kisak/kisak-mesa).
I havent found any that offer newer versions for Ubuntu 22.04, only for 22.10
The files you need to copy… I simply used the same copy commands as before, those should include all needed files
Based on @syst.m idea, I created a relatively small linuxserver.io user mod for their Plex image (149MB uncompressed)
Docker Hub
https://hub.docker.com/repository/docker/jefflessard/plex-vaapi-amdgpu-mod/
GitHub
Usage example:
docker run -d \
--device /dev/dri/ \
-e DOCKER_MODS=jefflessard/plex-vaapi-amdgpu-mod \
-e LIBVA_DRIVERS_PATH="/vaapi-amdgpu/lib/dri" \
-e LD_LIBRARY_PATH=/vaapi-amdgpu/lib:/lib/plexmediaserver/lib:/lib/x86_64-linux-gnu/:/lib \
-e VERSION=latest \
...
--name plex \
linuxserver/plex

This looks promising!
I wanted to try this out, but have a question regarding the UPDATE=latest environment variable. Is this for your mod or for the LinuxServer image? The instructions from LinuxServer use the VERSION=latest environment variable, so I was confused.
This should of been the VERSION variable from lsio image. Thanks for noticing. I got confused while documenting. I will update the docs.
You can skip this variable anyway. That was only to show that plex auto update is possible with this mod.
I ran a new test container using your mod in the docker compose file like so:
environment:
- DOCKER_MODS=jefflessard/plex-vaapi-amdgpu-mod
- LIBVA_DRIVERS_PATH="/vaapi-amdgpu/lib/dri"
- LD_LIBRARY_PATH="/vaapi-amdgpu/lib:/lib/plexmediaserver/lib:/lib/x86_64-linux-gnu/:/lib"
I duplicated the settings from my primary Plex image (hexeth/docker-plex-amd), and played the same movie file on both. HW transcoding worked on hexeth’s image, but not on this one.
LSIO Mod

Hexeth’s Container

Additionally, running this command you have on Docker Hub gives the following output:
docker exec -it plex \
/lib/plexmediaserver/Plex\ Transcoder -hide_banner -loglevel debug -vaapi_device /dev/dri/renderD128
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 @ 0x7f43e5aa02c0] libva: VA-API version 1.15.0
[AVHWDeviceContext @ 0x7f43e5aa02c0] libva: Trying to open "/vaapi-amdgpu/lib/dri"/radeonsi_drv_video.so
[AVHWDeviceContext @ 0x7f43e5aa02c0] libva: va_openDriver() returns -1
[AVHWDeviceContext @ 0x7f43e5aa02c0] Failed to initialise VAAPI connection: -1 (unknown libva error).
Device creation failed: -5.
Failed to set value '/dev/dri/renderD128' for option 'vaapi_device': I/O error
Error parsing global options: I/O error
There seems to be a problems with the quotes of LIBVA_DRIVERS_PATH variable
From your output:
[AVHWDeviceContext @ 0x7f43e5aa02c0] libva: Trying to open "/vaapi-amdgpu/lib/dri"/radeonsi_drv_video.so
Try removing the quotes from your compose file ![]()
Hi,
It works like a charm on my environment :
- k8s 1.24.4 cluster (RKE based)
- Node with a Ryzen 5 5600G
I tried to build my own image but your mod do the job !
Tank you so much ![]()
It works with 1080p and 4K source :

I cannot believe I missed that!
This is the output for that command now, does it look correct to you?
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 @ 0x7f613da12a80] libva: VA-API version 1.16.0
[AVHWDeviceContext @ 0x7f613da12a80] libva: Trying to open /vaapi-amdgpu/lib/dri/radeonsi_drv_video.so
[AVHWDeviceContext @ 0x7f613da12a80] libva: Found init function __vaDriverInit_1_16
/usr/share/libdrm/amdgpu.ids: No such file or directory
[AVHWDeviceContext @ 0x7f613da12a80] libva: va_openDriver() returns 0
[AVHWDeviceContext @ 0x7f613da12a80] Initialised VAAPI connection: version 1.16
[AVHWDeviceContext @ 0x7f613da12a80] Format 0x3231564e -> nv12.
[AVHWDeviceContext @ 0x7f613da12a80] Format 0x30313050 -> p010le.
[AVHWDeviceContext @ 0x7f613da12a80] Format 0x36313050 -> unknown.
[AVHWDeviceContext @ 0x7f613da12a80] Format 0x30323449 -> yuv420p.
[AVHWDeviceContext @ 0x7f613da12a80] Format 0x32315659 -> yuv420p.
[AVHWDeviceContext @ 0x7f613da12a80] Format 0x56595559 -> unknown.
[AVHWDeviceContext @ 0x7f613da12a80] Format 0x32595559 -> yuyv422.
[AVHWDeviceContext @ 0x7f613da12a80] Format 0x59565955 -> uyvy422.
[AVHWDeviceContext @ 0x7f613da12a80] Format 0x41524742 -> bgra.
[AVHWDeviceContext @ 0x7f613da12a80] Format 0x41424752 -> rgba.
[AVHWDeviceContext @ 0x7f613da12a80] Format 0x58524742 -> bgr0.
[AVHWDeviceContext @ 0x7f613da12a80] Format 0x58424752 -> rgb0.
[AVHWDeviceContext @ 0x7f613da12a80] VAAPI driver: Mesa Gallium driver 22.2.4 for AMD Radeon Graphics (raven, LLVM 15.0.5, DRM 3.46, 5.18.0-0.deb11.4-amd64).
[AVHWDeviceContext @ 0x7f613da12a80] 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'
However, when I tried to play that movie the dashboard indicated it was trying to HW transcode, but nothing played for a while, and then it seemed to fallback onto CPU transcoding.
I’ve attached the Plex Media Server.log from this time. Going through the logs, it seems that it starts using vaapi, but fails and reverts back to CPU transcoding.
Plex Media Server.log (49.9 KB)
doesnt work for me either… uses cpu decoding and vainfo doesnt even exist anymore (as compared to hexeth image… that command is not there on the default lsio image)
@InvisiGo It looks like ffmpeg (Plex Transcoder) has problem processing the input file. Maybe you can try another file (encoded differently) to see if the problem.
From your log:
Dec 03, 2022 20:46:31.408 [0x7f97ef47eb38] ERROR - [Req#1344/Transcode/i4tuy72zhxgb3fig9wctmzid/2f412707-679a-466a-8655-8be8cf1650f6] av_interleaved_write_frame(): Invalid data found when processing input
Dec 03, 2022 20:46:31.420 [0x7f97ee060b38] ERROR - [Req#1346/Transcode/i4tuy72zhxgb3fig9wctmzid/2f412707-679a-466a-8655-8be8cf1650f6] Error writing trailer of chunk-%05d: Invalid data found when processing input
... (unrelated)
Dec 03, 2022 20:46:31.474 [0x7f97f253fb38] DEBUG - Jobs: '/usr/lib/plexmediaserver/Plex Transcoder' exit code for process 662 is 1 (failure)
Dec 03, 2022 20:46:31.474 [0x7f97ede5db38] DEBUG - Streaming Resource: Changing client to use software decoding
@war_lock I didn’t include vainfo as it is not relevant. You could install Ubuntu package but Plex won’t use it anyway.
The real test is the following command. You should see about the same result of @InvisiGo previous post.
docker exec -it plex \
/lib/plexmediaserver/Plex\ Transcoder -hide_banner -loglevel debug -vaapi_device /dev/dri/renderD128
EDIT
I have published my mod Dockerfile to github :
I also had a closer look to hexeth Dockerfile and we have some differences :
-
alpine:edgevsalpine:3.16source image -
mesa-va-galliumvsxf86-video-amdgpu+linux-firmware-amdgpusource packages -
dri/radeonsi_drv_video.sovsdri/*.so*dri librairies - some other librairies differences but that shouldn’t be an issue (unless there is a missing library reported by the quick ffmpeg test)
I published a newer version now including
- libbsd.so.0
- libmd.so.0
- libzstd.so.1
- dri libs for older amd gpus (nouveau_drv_video.so and r600_drv_video.so)
I hope it closes the gap with @hexeth version, but it’s hard to say as it works properly on my side!
Please report if it works or not for you. Thanks
does not work for me…
falls back to cpu decoding still
using a pretty recent AMD 5900HX with Vega8