> For the complete documentation index, see [llms.txt](https://docs.dbnetsoft.com/dbnetsoft/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dbnetsoft.com/dbnetsoft/screenspro/projects-and-configs/ndi-output.md).

# NDI Output

The server sends its output as an NDI source on the network. The source shows up as `MACHINE (Name)` in NDI receivers like vMix, OBS or NDI Studio Monitor.

## Settings pane

The NDI row of the settings pane changes the output right away: a running NDI output is restarted with the new settings.

| Field      |                                                                                                        |
| ---------- | ------------------------------------------------------------------------------------------------------ |
| Name       | Name of the NDI source. Empty switches NDI off. Applied with Enter or when leaving the field.          |
| Size       | `Output size` (the size of the render screen, see Dimensions), `1280x720`, `1920x1080` or `3840x2160`. |
| Frame rate | `25 fps`, `50 fps` or `59.94 fps`.                                                                     |
| GPU        | Window capture on the GPU instead of rendering the output again, see [GPU capture](#gpu-capture).      |

Next to it, `@MACHINE` shows that the output is running, `Off` that it is not.

## Config settings

| Setting               |        |                                                                                                                      |
| --------------------- | ------ | -------------------------------------------------------------------------------------------------------------------- |
| NdiName               | string | Name of the NDI source. Empty or missing: no NDI output.                                                             |
| NdiWidth              | int    | Width of the NDI output in pixels. Empty: the width of the render screen (RenderScreenWidth).                        |
| NdiHeight             | int    | Height of the NDI output in pixels. Empty: the height of the render screen (RenderScreenHeight).                     |
| NdiFramerate          | Enum   | `Framerate_25Hz` (default), `Framerate_50Hz` or `Framerate_5997Hz` (59.94 fps).                                      |
| NdiCapture            | Enum   | `Render` (default): the output is rendered again for NDI. `WindowCapture`: the render window is captured on the GPU. |
| TransparentBackground | bool   | Transparent render window. Needed for an alpha channel with `WindowCapture`.                                         |

## Alpha channel

The NDI output has an alpha channel (BGRA), so receivers can key the graphics over other video.

* With `Render`, only the layouts are sent: everything where no layout draws is transparent.
* With `WindowCapture`, the render window is sent as it is shown. It only has an alpha channel with `TransparentBackground`, otherwise the background of the render window (color or image) is part of the output.

## Smooth movement

WPF renders animations on the refresh of the display that shows the render window. Moving graphics are only smooth if the refresh rate fits the frame rate:

| Frame rate | Display refresh rate |
| ---------- | -------------------- |
| 25 fps     | 50 Hz or more        |
| 50 fps     | 50 Hz or 100 Hz      |
| 59.94 fps  | 60 Hz or 120 Hz      |

The server logs a warning when the output starts and the display doesn't fit, e.g. 50 fps on a 60 Hz display, where one in five frames moves twice as far.

At 25 fps, the animations of all layouts are limited to 25 fps, so every NDI frame shows exactly one animation step. This limit stays until the server is restarted, also when the frame rate is changed to 50 or 59.94 fps in the meantime.

## GPU capture

With `Render`, every frame of the output is rendered a second time on the UI thread, in software. That is fast for simple layouts, but effects like `DropShadowEffect` or `BlurEffect` make it slow: a full HD layout with 60 texts with drop shadows takes 200 ms and more per frame, the output can't keep up.

With `WindowCapture` (the GPU switch), the render window is captured as Windows shows it, on the graphics card, and copied in the background. This takes about 4 ms per frame, no matter how complex the layout is, and nothing is rendered on the UI thread.

Requirements and differences:

* Windows 11. On Windows 10 the output is rendered as with `Render` (warning in the log).
* The render window gets exactly the size of the NDI output in pixels. It has to be completely on the displays: parts outside of the displays are black in the output (warning in the log). Other windows covering the render window are fine.
* The display is kept on while the window is captured. If it is dimmed or switched off anyway, Windows doesn't draw the render window and the output stays on the last frame (warning in the log).
* Alpha channel only with `TransparentBackground`, see above.
* The captured frames are buffered to even out the timing of Windows, which adds about 1.5 frames of latency.

The status bar of the server shows the frames per second and the time per frame of the NDI output, which makes it easy to compare both modes.

{% hint style="info" %}
NDI isn't available on Windows on ARM.
{% endhint %}
