Skip to content

Streaming using Newtek NDI

The NDI streaming requires the NDI runtime, and the optional Datastead NDI Filters package, that can be downloaded here:

https://www.datastead.com/downloads/

The installation of the Datastead NDI filters and of the NDI runtime is described here: https://www.datastead.com/docs/ndi/installation.html

Sample code to send a stream to the network:

Videograbber.VideoSource = ...
VideoGrabber.NDIName = "MYSTREAM";
Videograbber.NetworkStreaming = ns_NDI;
Videograbber.NetworkStreamingType = nst_VideoStreaming; // or nst_AudioVideoStreaming if audio needed
Videograbber.StartPreview();

E.g. if the video source is a Logitech 930e webcam:

Videograbber.VideoSource = vs_VideoCaptureDevice;
Videograbber.VideoDevice = Videograbber.VideoDeviceIndex ("Logitech Webcam C930e");
Videograbber.AudioDevice = Videograbber.AudioDeviceIndex ("Microphone (Logitech Webcam C930e)");
VideoGrabber.NDIName = "MYSTREAM";
Videograbber.NetworkStreaming = ns_NDI;
Videograbber.NetworkStreamingType = nst_AudioVideoStreaming;
Videograbber.StartPreview();

Sample code to play a stream from the network:

Videograbber.VideoSource = vs_VideoFileOrURL;
Videograbber.VideoSource_FileOrURL = "ndi://DESKTOP-5B66SBT (MYSTREAM)";
Videograbber.AudioDeviceRendering = true ;
Videograbber.StartPreview();

***Notes: ***

  • replace "DESKTOP-5B66SBT" with the name of the computer that is streaming to the network, and "MYSTREAM" with the real stream name to use.

  • if the sender and receiver are on the same computer, the computer name can be replaced by "localhost", e.g.:

Videograbber.VideoSource_FileOrURL = "ndi://localhost (MYSTREAM)";