Using NDI or Spout stream
This page explains how to use the NDI protocol to create and receive NDI and/or Spout video streams.
Both processes are exactly the same.
MindDev provides the ability to create and receive streams compatible with the NDI or Spout protocols.
NDI
Create an NDI Stream
It is possible to create an NDI stream from the current scene view. To do this, you need to add the NDI Sender
entity, ideally at the protocol level.
Only the entity name is important here, as this name will be used by the NDI server to name the created stream.
NDI Stream Name
When creating an NDI stream, the entity name is used. Thus, the stream name becomes MACHINE_NAME (ENTITY_NAME)
By default, the stream will use the default camera. In the case of a multi-camera projection system with several cameras active at the same time, it is possible to create a stream from a specific camera by using its name.
NDI stream linked to a specific camera
In cases where the NDI stream needs to be linked to a camera, you must specify the camera name. This name can be partial — the software will automatically find the camera whose name contains the given parameter value.
Receive an NDI Stream
Receiving NDI streams is a bit more complex than sending them.
The NDI Receiver
entity allows receiving a stream and storing it in a container texture ("Render Texture"). This entity has:
- A server name parameter
- A render texture storing the video stream
Receive Multiple NDI Streams
It is possible to receive multiple NDI streams. For each NDI stream, you need to add an NDI Receiver
entity.
NDI Stream Name to Receive
The NDI server name parameter of the receiver entity is just a search string. The first stream found whose name contains the configured name will be used. Therefore, it is not necessary to provide the full name.
Video Stream Recording
The NDI Receiver entity does not record the video stream, it only communicates with an NDI server and retrieves the information. The image must be used in real time for the stream to be useful.
Spout
Creating a Spout Stream
It is possible to create a Spout stream from the current scene visualization. To do this, you should add the Spout Sender
entity, ideally at the protocol level.
Only the entity's name matters here, as this name will be used by the Spout server to name the created stream.
Spout Stream Name
When creating a Spout stream, the entity's name is used.
By default, the stream will use the default camera. In the case of a multi-camera projection system with several cameras active at the same time, it is possible to create a stream from a specific camera by using its name.
NDI stream linked to a specific camera
In cases where the NDI stream needs to be linked to a camera, you must specify the camera name. This name can be partial — the software will automatically find the camera whose name contains the given parameter value.
Receiving a Spout Stream
Receiving Spout streams is slightly more complex than sending them.
The Spout Receiver
entity allows you to receive a stream and store it in a container texture ("Render Texture"). This entity has:
- A server name parameter
- A render texture storing the video stream
Receiving Multiple Spout Streams
It is possible to receive multiple Spout streams. For each Spout stream, you should add a separate Spout Receiver
entity.
Name of the Spout Stream to Receive
The Spout server name parameter in the receiver entity is just a search string. The first stream found containing the specified name will be used. Therefore, it is not necessary to provide the full name.
Recording the Video Stream
The Spout Receiver entity does not record the video stream; it only communicates with a Spout server and retrieves the data. The image must be used in real-time for the stream to be useful.
Using the Video Stream
The video stream is stored as a Render Texture. It can be used in two ways:
- Applied to a 3D object
- Applied to a 2D image
In both use cases, a special configuration must be set up for it to work. Indeed, regarding 3D objects, they have materials, but conventional materials are not compatible with the use of Render Texture
. You must use materials compatible with Render Texture
:
- Albedo Render Texture Material (subject to the scene's lighting characteristics)
- Unlit and Unlit Color Render Texture Material (not subject to the ambient scene lighting)
In the case of 2D images, you must use the Render Texture Image
2D component and not the conventional image.
In all cases, the created objects require a link to the Render Texture
entity. The parameters allow establishing this link.