Unraid - Nvidia Transcoding

Hi,

I recently migrated my DVR to unraid from a windows desktop and installed the nvidia docker. I think my gpu is used for transcoding, but not sure since it's not an option in the DVR GUI. I can see a light load on the gpu when viewing a show via browser. In the windows version I had the option to select hardware for transcoding.

Am I missing a setting? I was under the impression no additional changes were necessary when installing the docker. Included a screen shot for reference.

Pretty sure if you aren't seeing the option it's doing it in software only. I'm on a test linux box and only saw hardware when I updated the nvidia drivers from the open source ones. My CPU doesn't have the necessary capability to include hardware so I know it's my GPU that's enabling the hardware option.

Are you on Unraid 6.9+ which added better support for the Nvidia drvier? A popular YouTube channel for Unraid did a recent video on Nvidia transcoding in Docker containers.

Thanks for the reply. I am on Unraid 6.9.1. I'd also viewed the popular YT channel. The one thing I see different in the setup of Plex is the ability to identify the Nvidia devices. I have 2 GPUs, one for media transcoding, the other for a VM so not sure if that's causing the issue or not. Also, don't see the ability to add the parameter for the GPU id or nvidia visible devices to add my gpu ID, but this is may be chalked up to my knowledge of Unraid (admittedly I would consider myself a noob).

all NVIDIA_VISIBLE_DEVICES

I've included some pics from my setup, the one thing different I see from my initial post is on the docker tab, I see nvidia listed in the version data.

cc @timstephens24

I was getting a lot of kernel panics on Unraid 6.9.0rc2 and above so I currently don't have an Unraid machine running to test out some stuff. I would recommend a few things:

  • Make sure the Nvidia-Driver plugin is updated. Also make sure you can see the Nvidia cards listed there, which includes the UUID for the GPU (which you'll need).
  • Make sure your Nvidia card isn't being used by a VM that you're using in the docker. The next step covers how to do this.
  • Since you have two cards, click the 'Show more settings...' in the docker creation/editing page. You should see 'NVIDIA_VISIBLE_DEVICES' variable with a value of 'all'. Change the all to the UUID of the GPU that you want to use (the whole UUID starts with GPU-xxxxxxxxxx so make sure you have GPU included). You can get the GPU from the Nvidia-Driver plugin page.
  • I always bound my Nvidia cards to VFIO-PCI. With 6.9 there's the VFIO-PCI Config plugin that's built in to the Web-UI to make this a lot easier. You should just be able to go there and click the boxes next to your Nvidia cards (the graphics and audio device needs to be selected) and click save at the bottom. (go to Tools -> System Devices and put a checkmark next to the device you want to stub and and click "Bind selected to VFIO at boot"). You'll need to reboot when that's done.

That's what I have right now, hope it helps!

1 Like

Also looking at your 'Host Path 1' I wouldn't recommend putting all of your shares there. I would limit it to specifically the media folder for channels, i.e. /mnt/user/data/Media/ChannelsDVR or however you have that setup.

So thanks everyone for all the feedback.

I've confirmed the Nvidia driver is up to date and the card I want to use is not being used by my VM. Took your advice and assigned my other GPU to VFIO-PCI to reserve for the VM.

I also tried a couple of installs (1 restore, 1 fresh install) and HW encoding refuses to be an option. Also, showing more settings is empty and doesn't give me the nvidia visible devices to assign my GUP ID (advanced view). I can confirm I can assign my GPU to Plex for transcoding as similarly defined above so the GPU is available (confirmed via GPU stats that Plex is an active service).

Also updated the share as suggested (thanks!).

Not sure what to do now. After the last restore install, Nvidia is not showing up in the docker tab like previously show in the image.

Are you using the Fancybits Channels template or did you just fill everything in? I looked at the template @tmm1 made and those variables are there.

You could also use mine:

  1. Navigate to "Docker" tab and then the "Docker Repositories" sub-tab in the unRAID webui
  2. Enter in a URL of https://github.com/timstephens24/docker-templates in the "Template repositories" field
  3. Click on the "Save" button
  4. Click back to "Docker" tab and then click on the "Add Container" button
  5. Click on the "Template" dropdown menu and select the ' ChannelsDVR_NVIDIA Docker image
  6. Click the "Advanced View" toggle on the top right and fill in required fields e.g. volume data, environment variables etc
  7. Click on the "Create" button at the bottom of the window to begin pulling down the Docker image

I was using the fancybits nvidia template.

I used your template and it worked perfectly!! Did a couple of test runs and confirmed it worked as expected.

Thank you!!!

2 Likes

you don't happen to use Unraid do you? if you do can you make it so it shows up under "GPU Statistics" plugin? Whenever Plex uses the Nvidia GPU it shows that it's using it

If you’re using NVIDIA (or Intel and AMD) for hardware transcoding, it’ll show up there. There’s nothing outside of providing support for that GPU in a container to get it to show up. They just run the commands ‘nvidia-smi’ or ‘intel-gpu-top’ with some options to get it displayed in the plug-in.

If it’s not showing up there when something is transcoding then there’s an issue somewhere, most likely in how the variables are passed to the container.

Thanks didn’t know that. Where can I look to see if it’s transcoding

Edit.... think I found it on stats when something is playing. I have Fios and looks like everything is direct play