website-title-text

Fixing Nvidia Hardware Transcoding in Plex Docker Container

December 9, 2025

Recently, I’ve been having major issues with hardware accelerated transcoding in Plex. It seems that no matter what I did, despite Plex seeing the Nvidia card, it refused to use it for transcoding.

Heading to the logs only further demonstrated that this was an issue.

docker exec -it plex bash -c "grep -i 'hw' /config/Library/Application\ Support/Plex\ Media\ Server/Logs/Plex\ Media\ Serv  
er.log | tail -20"
Dec 05, 2025 16:07:41.643 [140280869260088] DEBUG - [Req#588/Transcode] Codecs: testing hevc (decoder) with hwdevice nvdec
Dec 05, 2025 16:07:41.644 [140280869260088] DEBUG - [Req#588/Transcode] Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Operation not permitted

At least now I can confirm that it’s attempting to use nvdec hardware transcoding.

A recent update of Nvidia Container Toolkit v1.18, changed the default mode the runtime injection from “legacy” to “just-in-time-generated CDI.” This seemed to have caused some containers (including many Plex setups) that relied on legacy behavior to stop seeing usable NVIDIA libraries/devices inside the container.

The Solution

Add the following entry into your environment variables in your Plex docker container: LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/nvidia/current

Now Nvidia hardware accelerated transcoding should work! 🎉

Big thank you to this Reddit post that helped me find the solution.