NDI streaming output
NDI (Network Device Interface)
: Developed by NewTek, NDI is a royalty-free technology that allows video-compatible products to communicate, deliver, and receive high-quality, low-latency video and audio over IP networks. This makes it ideal for live video production environments.
Use the NDISinkSettings
class to set the parameters.
Block info
Name: NDISinkBlock.
Pin direction | Media type | Pins count |
---|---|---|
Input audio | F32LE | one |
Input video | UYVY, I420, NV12, NV21, YV12 | one |
BGRA, BGRx, RGBA, RGBx |
The sample pipeline
Sample code
The following code shows how to create a pipeline that streams video and audio to an NDI sink.
// Pipeline
var pipeline = new MediaBlocksPipeline();
// video and audio sources
var virtualVideoSource = new VirtualVideoSourceSettings
{
Width = 1280,
Height = 720,
FrameRate = VideoFrameRate.FPS_25,
};
var videoSource = new VirtualVideoSourceBlock(virtualVideoSource);
var virtualAudioSource = new VirtualAudioSourceSettings
{
Channels = 2,
SampleRate = 44100,
};
var audioSource = new VirtualAudioSourceBlock(virtualAudioSource);
// NDI sink
var ndiSink = new NDISinkBlock(new NDISinkSettings("NDITestOutput"));
pipeline.Connect(videoSource.Output, ndiSink.CreateNewInput(MediaBlockPadMediaType.Video));
pipeline.Connect(audioSource.Output, ndiSink.CreateNewInput(MediaBlockPadMediaType.Audio));
// Start
await pipeline.StartAsync();
Platforms
Windows, macOS, Linux, iOS, Android.