Cannot get NVENC to work for Plex transcoding

I have got CUDA to work in WSL2 and docker. The tests in the guide run fine.

I installed Plex in docker and tried to transcode a video. Checking the logs NVDEC seems to work fine, but NVENC fails with this error:

[0x7f0e95ffb700] ERROR - [Transcode] [FFMPEG] - Cannot load libnvidia-encode.so.1
[0x7f0e95ffb700] ERROR - [Transcode] [FFMPEG] - The minimum required Nvidia driver for nvenc is 418.30 or newer

I used this docker cmd:

docker run -d
–name=plex
–restart=unless-stopped
–gpus=all
-p 32400:32400/tcp
-p 3005:3005/tcp
-p 8324:8324/tcp
-p 32469:32469/tcp
-p 1900:1900/udp
-p 32410:32410/udp
-p 32412:32412/udp
-p 32413:32413/udp
-p 32414:32414/udp
-h docker
-e ADVERTISE_IP=“http://192.168.1.6:32400/
-e TZ=Europe/Paris
-e PLEX_CLAIM=claim-xxx
-e NVIDIA_VISIBLE_DEVICES=all
-e NVIDIA_DRIVER_CAPABILITIES=compute,video,utility
-e ADVERTISE_IP=http://192.168.1.6:32400/
-e ALLOWED_NETWORKS=192.168.1.0/24
-v $HOME/plex/config:/config
-v $HOME/plex/transcode:/transcode
-v /mnt/d/Video:/video
plexinc/pms-docker:plexpass

I also tested with an earlier Plex version (plexinc/pms-docker:1.20.1.3252-a78fef9a9), but got the same error.

I have the 465.42 driver installed in Windows. Is this a bug in Plex/FFMPEG, or is the correct driver version not forwarded to Plex correctly?

if i remember correctly there is a separate container for exposing the NVIDIA card to containers HERE also just looking at your docker build above it doesn’t appear you have exposed the device to the container

docker create
–name=plex
–hostname=plex
–network=macvlan
–runtime=nvidia
–ip=192.168.1.24
–restart=unless-stopped
-e VERSION=latest
-e PUID=1000
-e PGID=1000
-e TZ=America/Chicago
–device=/dev/dri:/dev/dri
-e NVIDIA_VISIBLE_DEVICES=all
-e NVIDIA_DRIVER_CAPABILITIES=compute,video,utility
-e PLEX_TOKEN={your_token}
-v /mnt/zfs/storage/apps/plex/config:/config
-v /mnt/zfs/storage/apps/plex/data:/data
-v /mnt/zfs/storage/apps/headphones/music:/music
-v /mnt/zfs/storage/apps/plex/data:/transcode
linuxserver/plex:latest

Hi,

Did you fix your issue? If so, could you share how you did?