Skip to content

dkprog/ndi-loop-camera

Repository files navigation

ndi-loop-camera

Container service that plays video files on a continuous loop and outputs a Full NDI stream.

example

What it does

  • Serves as a lightweight Python + GStreamer example that I use to simulate extra NDI Full cameras during development and testing
  • Runs as a container
  • Opens a video file (.mp4, .mov) and loops it indefinitely
  • Converts the video into a Full NDI source using the ndisink element from gst-plugins-rs
  • Optional audio support

pipeline with audio pipeline video only

Quick start

Install dependencies

To build the container, download the NewTek NDI SDK for Linux and place it at NDI_SDK_DIR="NDI SDK for Linux" in the project root.

Set the SDK version via the .env file:

NDI_SDK_VERSION=6.2.1

If you're using the Advanced SDK, set:

NDI_SDK_FLAVOR=advanced

and provide your license in ndi-config.v1.json.

(NewTek does not allow redistributing the SDK inside the container, so this step must be done manually.)

Select the video file

Place a video file in video/ and set:

VIDEO_FILENAME=/video/video.mp4

This file will loop continuously.

Define the NDI source name

Set the NDI source name using:

NDI_NAME=foobar

The final advertised NDI source will follow this pattern:

<HOSTNAME> (NDI_NAME)

For example, if your machine is named DEVBOX and you set NDI_NAME=foobar, the NDI stream will appear on the network as:

DEVBOX (foobar)

Build the container

docker compose build ndi-loop-camera

Run the container

docker compose up -d ndi-loop-camera

You can preview the stream using NDI Studio Monitor (Windows).

Run tests

docker compose run test

About

Container that loops a video file and outputs a Full NDI stream.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors