NDI source
Products: Video Capture SDK .Net
Engines:
VideoCaptureCore
,VideoCaptureCoreX
The NDI source is a network video source. It can be used to capture video from NDI cameras and NDI-enabled software.
To use NDI, you'll need to install the NDI SDK or NDI Tools.
Enumerating NDI Sources
Enumerate NDI sources and add them to the combo box.
- VideoCaptureCore
- VideoCaptureCoreX
var lst = await VideoCapture1.IP_Camera_NDI_ListSourcesAsync();
foreach (var uri in lst)
{
cbIPCameraURL.Items.Add(uri);
}
var lst = await DeviceEnumerator.Shared.NDISourcesAsync();
foreach (var uri in lst)
{
cbIPCameraURL.Items.Add(uri.URL);
}
Set NDI source
- VideoCaptureCore
- VideoCaptureCoreX
// Create an IP camera source settings object
settings = new IPCameraSourceSettings
{
URL = new Uri("NDI source URL")
};
// Set the source type to NDI
settings.Type = IPSourceEngine.NDI;
// Enable or disable audio capture
settings.AudioCapture = false;
// Set login information if needed
settings.Login = "username";
settings.Password = "password";
// Set the source to the VideoCaptureCore object
VideoCapture1.IP_Camera_Source = settings;
Use the IPPreview
or IPCapture
mode to preview or capture video from the device.
Create the source settings object using the NDI source URL.
var ndiSettings = await NDISourceSettings.CreateAsync(VideoCapture1.GetContext(), null, "NDI URL");
Or use the NDI name instead of the URL.
var ndiSettings = await NDISourceSettings.CreateAsync(VideoCapture1.GetContext(), cbIPURL.Text, null);
Set the source to the VideoCaptureCoreX object.
VideoCapture1.Video_Source = ndiSettings;
Sample applications that use the NDI source
- VideoCaptureCore
- VideoCaptureCoreX
Visit our GitHub page to get more code samples.