Problems when receiving NDI in two OBS instances

YorVeX

Member
I use NDI to send the streaming from my gaming PC to the streaming PC. On the streaming PC what works totally fine is to run one OBS instance that encodes both the live stream using x264 and a recording with NVENC.

However, in order to not have stream overlays and alerts in the recording for an edited YouTube upload later I'd rather use one OBS instance for streaming that adds those overlays and another separate OBS instance for recording that doesn't add those overlays. The load on the system should be pretty much the same (leaving aside a minor overhead that might come from an extra OBS) and it also works fine at first.

The problem is that after a certain time (sometimes 20 minutes, sometimes 3 hours) the sound is suddenly broken. I am pretty sure this is related to NDI (maybe because the runtime is utilized twice to receive the same stream?), because I then change an NDI source setting, which causes a reset of the NDI connection (e.g. change the sync from "Network" to "Internal" or vice versa) and this fixes the problem. Until it occurs again at a later point if I am unlucky.

I am using OBS 26.0.2 64 Bit on Windows 10 with latest NDI runtime on both computers.

I am hoping that somebody had a similar problem and found a solution. Unfortunately I don't have any logs, I have been taking a break from streaming for some months and only remembered this problem again now. While I do still have logs from my last streams I don't know anymore on which day and time exactly it occured the last time, so I wouldn't know which log was relevant.

I hate when I run into trouble with a tool that uses a third party library. I can already see being sent away to NDI support and them sending me back here :-/
 

YorVeX

Member
hehe looks like your network connection is to slow you grab 2 NDI Streams from the gaming PC ? what says the ethernet connection monitor in the taskmanager ?
The gaming PC sends only one stream. My expectation was that the NDI stream also is sent only once over the network no matter how often I have an OBS instance open that receives it, since it's a broadcast being sent anyway. If it's really sent twice that could indeed explain the problem. I will check with a connection monitor later, thanks for this hint!

If that really is the case I wonder whether I can make the OBS that records the stream send out this stream again using NDI and OBS instance 2 that sends it to Twitch receives it on the loopback interface without having it go through the network again. But then I would need somehow block the recording OBS from sending that NDI stream again out over network and really keep it local to the PC, otherwise it would still jam the line.
 

YorVeX

Member
add a second Networkcard
on the first you only send out the NDI block the incomming connection with the firewall
on the second you only received the NDI and block the send
didnt know it works but it can be a solution
I think this could work and the PC even has two network ports from the mainboard already. But since that streaming PC is in a separate small room it would mean to run a second cable all the way there, lots of work for me. So I would only consider this as a last resort option.

First I have to find out whether the NDI stream is really sent twice. TBH I don't really believe that since NDI streams are broadcasts. The disadvantage of a broadcast is that the packets are sent through the network regardless of clients actually wanting them and receiving them. But that also means it doesn't matter how many clients listen to it connected to the same network, whether it's 0 or 100, the sent stream stays the same.

My theory is that there is a bug in either the NDI runtime or in how OBS utilizes it when it's invoked twice to receive the same stream. Or even just invoked twice to receive two NDI streams in the same machine in general.
 

YorVeX

Member
have found that ndi works in the normal mode as single cast in the most software you must configure it
OK, this was information I didn't have.

And you're right: as soon as I start the second instance, the network traffic to the server doubled:
1606428524515.png


So thanks a lot for pointing me in the right direction, much appreciated! Now I have to see what I can do to work around this. My whole network and all network cards are Gigabit, but in the screenshot above I only sent a stream without much changes. I assume when there is happening more (it's a 1080p60 stream) then it's getting too close to the limit and this is when I run into trouble.
 

YorVeX

Member
Actually that streams are only sent as requested is good news. I just did a first short test where the OBS recording instance on the streaming PC is sending out again the NDI stream and the OBS streaming instance on that same streaming PC is receiving it. And this indeed causes no extra network traffic, since it's happening within the same PC. Even better, when I compare the preview windows of the two OBS instances there is no noticeable extra delay (although I am using "Normal (safe)" latency mode) introduced by this. So as long as I don't run into any weird software bugs now I got my solution. Thanks again!
 
Top