Streaming through Newtek NDI
Streaming through NEWTEK NDI
Description
The NDI streaming requires the Newtek 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 the Newtek NDI runtime are described in the INSTALL_README.rtf
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" by the name of the computer that is streaming to the network, and "MYSTREAM" by 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)";