2023-11-15, 09:11 PM
Some context for this: I couldn't get GPU hardware transcoding working on my jellyfin container installed on Unraid. I really struggled with the clarity of the official guides so I decided to just post the solution to my problem exactly in the way I understand it and hope others will too.
Essentially what I had to do was modify my jellyfin container by: adding this line to my extra parameters under Advanced View
Extra Parameters: -e NVIDIA_DRIVER_CAPABILITIES=all -e NVIDIA_VISIBLE_DEVICES=all --gpus all
That's the exact line I used, I copy and pasted exactly that, obviously without the Extra Parameters part.
Than I created 2 variables in the container editor.
Variable 1:
Name: NVIDIA_VISIBLE_DEVICES
Key: NVIDIA_VISIBLE_DEVICES
value: all
Variable 2:
Name: NVIDIA_DRIVER_CAPABILITIES
Key: NVIDIA_DRIVER_CAPABILITIES
Value: all
Aside from this you need to make sure NVIDIA drivers and NVIDIA container toolkit is installed. On Unraid, you can install the "Nvidia Driver" app/plugin from the built-in apps installer, the author at time of writing is 'ich777'.
The container toolkit just works, I assume it comes with the drivers.
I also installed "GPU Statistics" I don't think it's necessary but it's nice to see how the GPU is performing.
After that I just setup the hardware transcoding on jellyfin and was good to go.
There's 2 ways to verify the functionality. First, you can turn NVENC encoding on in Jellyfin and try to stream a show. The second way is run this command in the Unraid terminal: docker exec -it jellyfin nvidia-smi
If the command outputs a table with GPU statistics you know it worked.
Essentially what I had to do was modify my jellyfin container by: adding this line to my extra parameters under Advanced View
Extra Parameters: -e NVIDIA_DRIVER_CAPABILITIES=all -e NVIDIA_VISIBLE_DEVICES=all --gpus all
That's the exact line I used, I copy and pasted exactly that, obviously without the Extra Parameters part.
Than I created 2 variables in the container editor.
Variable 1:
Name: NVIDIA_VISIBLE_DEVICES
Key: NVIDIA_VISIBLE_DEVICES
value: all
Variable 2:
Name: NVIDIA_DRIVER_CAPABILITIES
Key: NVIDIA_DRIVER_CAPABILITIES
Value: all
Aside from this you need to make sure NVIDIA drivers and NVIDIA container toolkit is installed. On Unraid, you can install the "Nvidia Driver" app/plugin from the built-in apps installer, the author at time of writing is 'ich777'.
The container toolkit just works, I assume it comes with the drivers.
I also installed "GPU Statistics" I don't think it's necessary but it's nice to see how the GPU is performing.
After that I just setup the hardware transcoding on jellyfin and was good to go.
There's 2 ways to verify the functionality. First, you can turn NVENC encoding on in Jellyfin and try to stream a show. The second way is run this command in the Unraid terminal: docker exec -it jellyfin nvidia-smi
If the command outputs a table with GPU statistics you know it worked.