Server Version#: 1.41.3.9314-a0bfb8370
Player Version#: 4.141.0
Hey there!
I’m not sure this is supported, but I thought it should work since Plex does support VA-API. ![]()
GPU acceleration in WSL has been around for a while now and using it in a Docker container is fairly easy. Although I’ve managed to successfully perform HW transcoding using ffmpeg, Plex itself fails to load the drivers.
Here is the error output on Ubuntu 22.04:
[Req#149/Transcode] Codecs: testing h264 (decoder) with hwdevice vaapi
[Req#149/Transcode] Codecs: hardware transcoding: testing API vaapi for device '' ()
[Req#149/Transcode] [FFMPEG] - libva: dlopen of /usr/lib/x86_64-linux-gnu/dri/d3d12_drv_video.so failed: Error relocating /usr/lib/x86_64-linux-gnu/dri/d3d12_drv_video.so: fcntl64: symbol not found
[Req#149/Transcode] [FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).
[Req#149/Transcode] Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: I/O error
[Req#149/Transcode] Could not create hardware context for h264
With Ubuntu 24.04 I get the same kind of error, but it’s a different symbol… probably because of the different libs versions:
[FFMPEG] - libva: dlopen of /usr/lib/x86_64-linux-gnu/dri/d3d12_drv_video.so failed: Error relocating /usr/lib/x86_64-linux-gnu/dri/d3d12_drv_video.so: __isoc23_strtoul: symbol not found
This is the output for vainfo --display drm on Ubuntu 24.04:
libva info: VA-API version 1.20.0
libva info: User environment variable requested driver 'd3d12'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/d3d12_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.20 (libva 2.12.0)
vainfo: Driver version: Mesa Gallium driver 24.0.9-0ubuntu0.3 for D3D12 (Intel(R) Iris(R) Xe Graphics)
vainfo: Supported profile and entrypoints
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointEncSlice
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD
VAProfileAV1Profile0 : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
I did my homework and I’m guessing this happens because of this change. And others have faced similar problems before… see this reply and this Dockerfile, which downloads the drivers in Alpine to work around the issue.
This is what I’m going to try next, but I don’t think people should go through all this trouble to make it work. I don’t have much expertise with this kind of issue, but I was hoping it could be fixed in Plex.
Here’s a minimal Docker setup if you’d like to reproduce it:
- wsl2-plex-hw-transcoding.zip (1.2 KB)
Just add any video inside the samples folder and then include it in a library once Plex is running. I used this video and on the web player I set resolution to 480p to trigger transcoding.
Not sure it matters, but this is my wsl --version output:
WSL version: 2.3.26.0
Kernel version: 5.15.167.4-1
WSLg version: 1.0.65
MSRDC version: 1.2.5620
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.26100.2894
I’ve shared how I got here in this repo. While it primarily documents my personal home server setup, it includes valuable context that might help others troubleshooting similar issues.