Jump to content

[support] OBS-NDI


Recommended Posts

This is the support Thread for OBS-NDI

 

https://hub.docker.com/r/patrickstigler/obs-ndi 

 

# Docker Open Broadcaster Software (OBS)
This container is based on [bb12489/gui-docker](https://github.com/bb12489/gui-docker) & [bb12489/docker-obs](https://github.com/bb12489/docker-obs). The OBS with NDI is incorporated into the container and can be used to stream your desktop.
The main reason for this fork is to update the container and add it to the unraid app store.

Here is a screenshot:

 

# To run
You can start the container with:

`docker run --shm-size=256m -it -p 5900:5900 -p 5901:5901 -e VNC_PASSWD=123456 patrickstigler/docker-obs-ndi:latest`

The shm-size argument is to make sure that the webclient does not run out of shared memory and crash. You can change the default VNC password of '123456' on the docker run command to whatever you wish.

You can connect with your own VNC client at 5900 or use the webclient at 5901

To enable GPU Support also add -e NVIDIA_VISIBLE_DEVICES=<your GPU ID> -e NVIDIA_DRIVER_CAPABILITIES=all and also add --runtime=nvidia as extra parameter.

Edited by maddash1337
  • Thanks 1
Link to comment
  • 2 weeks later...

Hey is there any way to run this with the OBS virtual webcam? I'm not seeing "start virtual camera". I'm trying to use it as a way to stream video files from my server through "VLC Video Source" and into Discord. It sounds like no matter what I'll need to run Discord + OBS on a VM and tunnel the stream to it. But I assume that would be better performing considering with an OBS docker I can pass through my GPU (which is shared with Plex) and solely use the VM to upload the stream.

Edited by s449
Link to comment
  • 3 weeks later...

Perhaps I miss something but it seems that the recording does not really uses the GPU?

 

I have everything set - same as for Plex for the Docker run statements. But the GPU is barely in use.

The settings are just an example. I have tried a lot of different  settings.

 

The output from my main computer is 1080p 60FPS.

 

On the Docker I reach only max 40FPS recording.

 

 

Screenshot 2021-11-26 150658.png

Screenshot 2021-11-26 150734.png

Link to comment
15 hours ago, Evidenz said:

Perhaps I miss something but it seems that the recording does not really uses the GPU?

It iw only possoble that it uses the dGPU or doesn't use it, something in between is not possible.

 

What card are you using? In your screenshot I see the Recording tab, what does the Streaming tab look like.

 

Do you simulaneus use Plex, or better speaking is Plex transcoding in the background?

 

15 hours ago, Evidenz said:

same as for Plex

Have you turned on trottling in the Plex settings for transcoding?

This is just a normal behavior if yes, try to turn it off, force a transcode and see what happens.

 

15 hours ago, Evidenz said:

On the Docker I reach only max 40FPS recording.

I'm really not to sure what's the issue here because I'm not too familiar with OBS.

 

 

8 hours ago, patrickstigler said:

But I guess it could be something with the driver directly. 

I don't think that this is related to the driver, you can try to set up Jellyfin and use the dGPU there.

Depending on the card and transcoding settings the load will be between 5- 15% usually.

 

8 hours ago, patrickstigler said:

It is working fine with 30FPS. But not really with 60FPS.

Maybe this is something related to OBS or the streaming Platform that you are streaming to or a setting in OBS?

 

 

With this container you have two OBS instances to manage at the same time or am I wrong, maybe it is also related to the plugin for OBS, but that's only guess.

  • Like 1
Link to comment

@Ich777

 

I am starting up plex as soon as unraid is up. It usally doesn't encode at the same time. 

Both containers have access to all GPUs. 

 

I am running a Quadro P400 - no active processes.

image.thumb.png.300b0de1bddf264eb0f63dfda76971dd.png

 

My Plex Settings are default:

image.png.5abf5a7577737d58d385a34bf86a3d59.png

I assume you speak german. But it's basically default, auto select Quality, Hardware acceleration and unlimited simultanes Encodings.

 

But none are active.

 

image.png.d904444828c281f5b0841abdea2c5910.png

When I run an encoding and OBS as well I see both threads.

 

If I got you right there, you think I have obs running 2times at the same time?! No

I am running a docker with OBS and a Docker with Plex which share the GPU.  If you have an idea let me know. I will check again. And as soon as I find a solution I will update the container.

 

 

 

 

Link to comment
3 hours ago, patrickstigler said:

I am running a Quadro P400 - no active processes.

This seems completely okay to me.

Side note, you can also type in "watch nivida-smi" this will update nvidia-smi every two seconds, to end it press CTRL+C

 

3 hours ago, patrickstigler said:

If I got you right there, you think I have obs running 2times at the same time?! No

No, I thought maybe you run 2 or even 3 Plex transcodes and try to use it for a 4th transcode for OBS (by default only 3 simultaneous transcodes are allowed on consumer/prosumer cards).

 

I really can't help, from what I see OBS is using your card and should work just fine.

The difference in usage from OBS and Plex is caused because you started transcoding a 4K file am I right?

 

A 1080p file is really not that hard to transcode, even for the P400. I only can think of a problem with OBS that it transcodes not like you want it to, the card should be capable of 1080p/60 without a sweat.

  • Like 1
Link to comment
On 11/27/2021 at 7:28 AM, ich777 said:
Quote

It iw only possoble that it uses the dGPU or doesn't use it, something in between is not possible.

Alright, seems strange that it does show the possibility to use hardware encoding but does end up with the CPU.

Quote

What card are you using? In your screenshot I see the Recording tab, what does the Streaming tab look like.

GTX 1080

Quote

Do you simulaneus use Plex, or better speaking is Plex transcoding in the background?

Plex is running as well but it is not trans coding. I tried also with Plex container off.

 

Quote

I'm really not to sure what's the issue here because I'm not too familiar with OBS.

Quote

With this container you have two OBS instances to manage at the same time or am I wrong, maybe it is also related to the plugin for OBS, but that's only guess.

 

One thing I was missing was the hardware acceleration on the NDI source but even with this option enabled only the CPU is used.

 

 

 

 

 

 

Screenshot 2021-11-28 205031.png

Link to comment
11 hours ago, ich777 said:

I really can't help here since I'm not too familiar with OBS, but I can't think of a driver issue when everything is working just fine in Plex and other containers.

 

Seems like this is related to OBS and not NVENC.

No worries. 

 

On my PC itself the whole NVENC works just fine. Do you have any starting point for me how I could troubleshoot it to check for the issue within the container/with the driver?

Link to comment
23 minutes ago, Evidenz said:

Do you have any starting point for me how I could troubleshoot it to check for the issue within the container/with the driver?

Wait you transcode first on your PC or am I wrong?

From my understanding you don't need to enable NVENC on the main machine where you actually capture the screen because you are "streaming" the raw footage over the NDI plugin, correct me if I'm wrong please...

 

Also keep in mind that the low usage can be also caused because the card only has to encode the stream and not like it's the case on Plex where it has to decode/encode it again.

Link to comment
On 11/1/2021 at 4:57 PM, patrickstigler said:

You must be in the same subnet. Than it will work. Just define your container within the same Subnet i.e. 192.168.0.X

That is the exact way I am using it. 

Sometimes it can take a bit till your Desktop will be found. (Have you enabled it on your desktop?)

I found the problem. 
If i enable "Privacy" in NDI Tools on my Pc so the Docker cant find it anymore. I dont find the option to enable this Modus in Docker so only public option works.

 

The next problem OBS in the Docker detect a ndi stream if i start "Screen Captute". But this is oldschool und slow. 
If i start "Screen Capture HX" on my PC (NDI Tools v5) the Obs cant find any ndi stream.
The OBS NDI Version in the docker is old (NDI SDK 4.5.1, April 1 2020) - is a update to NDI SKD 5 possible? How? 

Link to comment

@ich777 Good point with the limit of the encoding. Thanks

 

Yes, the idea is that your main system (Gaming) streams your screen almost raw to your docker who should encode it for i.e. twitch.

 

@Evidenz you have to enable it on your gaming system, basically just turn it on in plugins.

image.png.bc3fe2bab9f72488768a0c5f1cdcb248.png

 

Then you should see it on your docker to stream it to i.e. twitch

There you need to add a source NDI and you will find it if you setup your docker in the same subnet like your streaming pc. (As far as I know, not working for Mac)

Let's say your gaming pc has the IP 192.168.0.20 - Then your docker should have something like 192.168.0.XXX i.e. 192.168.0.220.

 

@Wetterchen

Yes and no - I checked the linux version of NDI 5 is not released yet. So I can't upgrade it right now. I have to wait for the release.

 

I also found some problems with NDI on Ubuntu (base of the container) but there is no real fix yet.

  • Like 1
Link to comment
On 11/29/2021 at 10:03 AM, ich777 said:

Wait you transcode first on your PC or am I wrong?

From my understanding you don't need to enable NVENC on the main machine where you actually capture the screen because you are "streaming" the raw footage over the NDI plugin, correct me if I'm wrong please...

 

Also keep in mind that the low usage can be also caused because the card only has to encode the stream and not like it's the case on Plex where it has to decode/encode it again.

 

You are right. NDI basically only captures what you can see on your screen and sends it over to a receiving end (the docker). There the whole work needs to be done to transform the data into a stream / media file.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...