April 07, 2021

Unraid 6.9 Capture, Encoding, and Streaming Server

Streaming server 1
Gaming PC Setup

Now, on your Unraid server inside the container, you just need to add the NDI Source to the Sources box. The source name should be the hostname of your gaming PC, in this case, my gaming pc is named “Queenbootywhomp”. Don't ask.

Queenbootywhomp

Success!

From here you can play around with the settings as you see fit. While streaming to YouTube, this is how much CPU and RAM is being used for a 1920x1080p stream at 60FPS. You will definitely want to tweak your settings in accordance with your hardware.

Stats During Stream

Nvidia NVENC Encoding

While all of the above is cool and all, what if we want to use NVENC for Youtube or Twitch streaming instead?

I do have a spare Quadro or GeForce laying around. Luckily, it’s pretty simple now:

  1. In Community Apps search for Nvidia-Driver
  2. Download and install Ich777 Nvidia Driver
  3. Reboot
  4. After waiting patiently go to Plugins -> Nvidia Driver
  5. You will see that the plugin has automatically downloaded the driver for your graphics card. You will need to copy your GPU key from here. It should look like this picture below.
Nvidia Driver Plugin Page

Now that you have that copied we will need to go back to our container and add two variables and an extra parameter:

Nvidia_visible_devices

NVIDI Adevices

Nvidia_Driver_Capabilities

Nvidia Capabilities

Extra Parameters

Finally, all you need to do is add “—runtime=nvidia” to the extra parameters line and we are done. Your configuration should look similar to the one below.

Nvidia Done

Check OBS for NVENC

Okay time to make OBS use NVENC:

Nvidia OBS Done 1
Nvidia SMI

In the picture above, I am running the command “watch nvidia-smi” to see if the Quadro P600 is actually being used. As soon as you hit record or start stream “No running processes found” goes away but is not replaced with any PID or name. Could be a bug.

See All of This in Action

Troubleshooting

What if your NDI source is blank?

The NDI version of both the gaming pc and the container must be the same for this to work. If the NDI versions are different then there will be no Source. You can also try rebooting both machines, that helped me a couple of times.

I did not run into any other bugs.

Other Features

Can I Record Locally?

Yes. I’d also recommend setting a recording path in the container to something like /video. Then in Unraid setting up a Container Path of /Video to a Host Path of something like /mnt/cache/obs-ndi/video.

Third-Party Applications

Here is a brief list of 3rd party applications this setup does not work with. I may add more based on comments or other findings in the future.

  • NDI HX Camera - most likely an NDI compatibility issue.
  • SLOBS - To my knowledge SLOBS only receives NDI Output, as in, you can only add an incoming source not broadcast. Also, as far as I know, SLOBS is not Linux compatible. Such a shame. Please note I have not tested the following and it is mere speculation on my part.
    • You could get “crazy” with your set up and do OBS -> docker-obs-ndi -> nginx-rtmp-docker -> SLOBS VM -> Twitch/YouTube/Mixer/etc
    • Or maybe even OBS -> docker-obs-ndi -> SLOBS VM -> Twitch/Youtube/Mixer/etc

Conclusion

I don’t think there would be much of a difference in quality between newer GPUs (Pascal and newer). In the past, I have used K4000’s and the P600 and didn’t notice any differences. GTX 1060's or newer would also perform plenty well.

Look Interesting?

What are you streaming these days and what is your setup? Let us know in the forums!