Hardware Accelerated Decode (Nvidia) for Linux

QNAP NAS: Nvidia Hardware Transcoding in Plex and Emby Docker Containers

Hey everybody. This thread had some good info that I used to put together some docker-compose.yaml files that should bring up Plex or Emby containers that can actually utilize the GPU for transcoding on a QNAP NAS.

#anagj: Thanks for making the docker container that wraps the Plex Transcoder! I’m using that in my compose files!

Here’s my writeup: https://gist.github.com/weshofmann/620b924cde5dd498880e9315e48e793b

Great write up.
To address the plex cpu usage being higher, that’s because plex doesn’t do hw acceleration for decoding, it’s all software. It only does hw for the encode. In your Plex log, it shows blank for the decoder, and lists nvenc for the encoder.

Emby on the other hand does hw accel for both decode and encode. It uses cuvid for decode and nvenc for encode.

There is a way to force Plex to hw decode through a script hack. Basically, folks rename the Plex transcoder and replace it with a script that injects the hardware decode parameters into the Plex transcoder commands. Again, it’s pretty hacky but works for the most part.

EDIT: just read the part about how you’re already using the hack through a docker image. Ignore my post, oops

Thanks for the info! Yeah, I perused the posts above and I thought that the docker image I was using for Plex included that wrapper. Possibly it’s not playing well with the mangled /usr I’m including. When I have a chance I think I’ll just write up a quick Dockerfile to roll my own container that includes the hack and see if that allows it to decode using the nvidia card. I’ll keep ya posted!

Honestly, for now, I’m actually pretty impressed with Emby and am just considering buying the lifetime license for it and forgetting about Plex. shrugs

Any movement in this space? it seems to be largely ignored by plex… which is crazy to me. It’s a very powerful feature that Linux users should be able to use!

1 Like

Does Nvidia have fixed drivers for this yet?

I’m now on 430.40 and still have the same problem with hw decoding 2160p HEVC HDR10.

Link to the emby thread if anyone is interested

1 Like

Hello Plex you there? We are still waiting for something.

This is coming. (I have been personally testing it on my P2000) We have some Windows issues to resolve and then we will be working towards a forum preview. I want to get this into the hands of our users to play with as soon as possible :slight_smile:

6 Likes

if the windows problems can’t or won’t be resolved soon, perhaps a linux only preview… since windows already supports decode and linux doesn’t…

Woot! Always glad to hear from plex that things are still moving forward.

Thank you for chiming in! Been tracking this thread from the early days, so it’s a relief to hear something unofficially official at last. :wink:

Our Transcoder forum preview is live here!

6 Likes

I have the “hack” enabled that was shared in this thread many months ago. Are there any effective differences with this release or was that simply overriding to force using the same new transcoder? If there’s a difference, do I need to remove that for the new build to work properly?

Yes you will want to remove the. “Hack” this gives you updated ffmpeg and offical nvdec as well as GPU scaling of the video.

Great news that finally transcoding on Nvidia will work on Linux!
There is any hope that you will support it on AMD too? I have a Linux server with an AMD APU and the only thing stopping me to buy a Plex pass is that I won’t have the hardware transcode feature.

This is just the moment i’m sure quite a few people have been waiting for " Hardware Accelerated Decode (Nvidia) for Linux" / without having to using the patch. I don’t think it resonated / propagated in communication yet but i’m very very happy.

Thank You, Plex Team!!!

1 Like

Yes, thank you. Hopefully, that will move quick in the Plex Pass channel since it cannot be use for now in the Docker image on unraid. When this goes Live in the PlexPass, that will be a lot more “tested” by the community too.

Idk if it’s a mental thing, but seems like 4K content is transcoding faster with this build. Nice work.

It’s about time!

Testing this out right now with a one month subscription. You earned yourself a lifetime customer, if this works well.

I noticed the player crashing when I did some upscaling to 4k. Where can I find the logs for this? I’ve checked the transcoder logs and those seemed fine.

1 Like