Video pausing every few seconds on NDI stream from Windows to Linux machine

Excrubulent

New Member
Basically what the title says, I'm trying to stream from a windows PC to a linux PC, and I get frequent pauses in the stream. This happens regardless of any recording or streaming on the receiving PC.

My windows machine has ndi-obs 4.9.0 with OBS Studio 27.2.4.

My Linux machine has ndi-obs 4.9.1 with OBS Studio 27.2.3+dfsg1-1.

Both are the latest versions of OBS 27, with the latest version of ndi-obs, since version 28 doesn't work with ndi-obs.

I'm using the version of NDI that comes with the ndi-obs plugin, which is 4.5.1.

You can see how the video is not being transmitted by looking at the network activity graph in Linux:
Screenshot from 2022-10-12 02-05-44.png

The network activity looks similar in Windows, but the Linux one is a little easier to read. The moments of zero activity correspond to the frozen video. The audio part of the stream doesn't get interrupted.

Both are connected via a gigabit switch and I have checked that both machines see a gigabit connection, so bandwidth isn't the issue. Also sometimes it magically just works, and the network can handle it just fine. Obviously I can't use a system that only works when it feels like it. Also after a while it seems like occasionally - not always - the stream just crashes and no video goes through at all.

Any ideas as to what might be causing this?
 

Excrubulent

New Member
Okay, a little bit of progress, I found this thread where a similar issue was happening: https://obsproject.com/forum/threads/freezing-stuttering-ndi-plugin.120173/post-516983

The fix in that post is to disable the firewall on the Linux PC, which I've just tried and it worked immediately. Obviously I don't want to keep the firewall disabled but for now it's a workaround. They never say there if there's a specific rule they implemented to get it working, if I figure out which rule is needed I'll post an update.
 

Excrubulent

New Member
Okay, figured out what to do, although the answer currently is to use an alternative to NDI called Teleport: https://obsproject.com/forum/resources/teleport.1445/

I just like the fact that it's open source and it works on the latest OBS so I can finally upgrade. Obviously you still need to open the right ports in the firewall so I did some packet sniffing in wireshark and figured out that teleport client/host pairs discover each other through port 9999.

So the ufw rule I added was done as follows:

Code:
sudo ufw allow from [ip address/range] to any port 9999

In my case the ip range I picked was 10.1.1.0/24, which covers every address from 10.1.1.0 to 10.1.1.255. Your network will probably be different. You can also just specify a single address, but I wanted to be able to stream from any device on the network.

Once that was done they just automatically find each other and everything is happy and roses and I've got smooth streaming across the network once more.

Once they find each other, they can negotiate their own communications on any port of their choosing, so you can leave the Teleport port settings as auto.

I suppose I could've figured out which ports NDI was using in the same way, but doing that would mean downgrading both OBS installations back to v27 and reinstalling NDI 4.5, and I'm not really keen on doing that.
 

Excrubulent

New Member
Further update, this is as much for me as anyone else at this point, but Teleport is apparently hot garbage for recording at 1440p 60 fps which is what I record at. Only every couple of frames gets recorded, the rest are just duplicates, so the result is a choppy mess running at anywhere from 30fps to like 15fps or something. So I'm going to try to get NDI working again.
 
Top