OBS and NDI – Gotchas

On the face of it, NDI and OBS look like a marriage made in heaven, but don’t be fooled, there are a boat-load of dragons.

Scenario:

  • Intel i7 8th gen-based laptop with Nvidia Quadro 1000 GPU
  • Thunderbolt 3-based 10 GbE interface running at 5GbE (gbic overheats at 10 GbE)
  • The latest OBS but running a customised obs-ndi plugin.
  • The customised obs-ndi plugin splits video and audio retrieval per source onto separate threads, makes everything unbuffered (aka “Low Latency”) and timestamps everything with obs_get_video_frame_time().
  • Canvas set to 1920×1080 @ 29.97p

In this scenario:

  • If 4-6 sources are BirdDog encoders, running in 1920×1080 @ 29.97p, in TCP mode, everything largely works, however there are occasional stutters/frame drops and CPU core 0 maxes out @ 100%.
  • If above but the encoders are set to use UDP mode, load on the first CPU core drops to ~50%, so UDP is much lighter on CPU time.
  • The above, but with a USB3 based ethernet interface (as opposed to Thunderbolt 3) on an AMD Ryzen-based machine makes no difference. I think this might be due to buffer sizes on the interfaces.
  • If an OBS instance’s NDI output is introduced into this mix, all hell breaks loose and everything, except the OBS NDI input, stutters. If the upstream OBS instance feed is switched to H.264/AAC on RTMP, the problem goes away. The problem is slightly reduced if ndi-config.v1.json is configured to only receive UDP, but it’s not perfect.

Latency (aka NDI and OBS for IMAG)

Spoiler: I wouldn’t use OBS+NDI for IMAG.

  • OBS machine (gigabit connected ethernet) HDMI-based display output vs output rendered via NDI (on NDI Studio Monitor) in FHD @ 60p, low latency mode: ~4 frames (or 66.6 ms). This is unaffected by video being sent asynchronously.
  • Changing the framerate to 30p has no effect on the latency: the number of frames decreases to ~2 frames.
  • OBS on a Linux desktop, ingestion from a BirdDog NDI encoder, Panasonic FZ2500, delay 10 frames (60p).
  • OBS on a Windows machine, ingestion from a BirdDog NDI encoder, Panasonic FZ2500, delay of 9 frames (60p).