Experimental video-only NDI receiver for Raspberry Pi 3B/3B+. Target: 1080p30 HDMI from NDI Screen Capture HX. Audio is out of scope.
Measure native SDK receive performance before implementing DRM/KMS rendering. No hardware acceleration or 30 FPS performance is guaranteed.
Install Raspberry Pi OS Lite and a compatible official Linux NDI SDK separately (https://ndi.video/for-developers/ndi-sdk/). Do not redistribute SDK binaries.
sudo apt install build-essential cmake
cmake -S . -B build -DNDI_ROOT=/path/to/sdk
cmake --build build -j2
./build/pindi --list
./build/pindi 'exact source name'Use wired LAN and configure the source for 1080p30. CPU percentage uses 100% per core. SDK drops are cumulative. HDMI rendering and latency measurement are not yet implemented.
- Verify SDK compatibility and benchmark Pi 3.
- Direct DRM/KMS video output with bounded buffering.
- Automatic reconnect and systemd service.
- Web source selection.
The workflow targets Raspberry Pi OS Lite 64-bit Bookworm, using Debian Bookworm ARM64 and Cortex-A53 flags (-O3, LTO). Set Settings > Secrets and variables > Actions > Variables > NDI_SDK_URL to an authorized tar archive containing the extracted SDK headers and compatible ARM64 shared library. Self-extracting installers must be unpacked first. Use a trusted SDK source and verify its license and Pi 3 compatibility. The artifact contains the executable and README, not the SDK runtime. Install the matching NDI runtime on the Pi separately. Download the artifact from Actions, unpack it and run ./pindi --list. A successful CI build does not verify playback performance or runtime CPU compatibility.
Install libdrm2 on the Pi (libdrm-dev and pkg-config for local builds). On Raspberry Pi OS Lite with full KMS and a connected HDMI display, run sudo pindi --play "exact source name". Ctrl-C stops playback. The original 60-second benchmark is unchanged. The renderer uses two UYVY dumb buffers, a black primary framebuffer and a hardware overlay plane; it copies each frame once and waits for vblank. No RGB fallback, audio, reconnect or resolution-change support yet. Requires DRM master and a compatible overlay. Hardware testing is pending.
The ARM64 test tools receive compressed H.264 and pass it to the Raspberry Pi FFmpeg V4L2 decoder. A separate DRM program feeds the decoded 1080p NV12 frames to an existing CRTC and overlay plane. The default build creates the standard player. With the optional local runtime installed, the Quality profile uses the Advanced path for compatible H.264 and HDMI modes. Performance and Software retain the standard executable.
Build with a locally authorized NDI Advanced SDK, the usual standard-SDK settings, libdrm development headers, and Raspberry Pi FFmpeg with h264_v4l2m2m and native NV12 output.
cmake -S . -B build -DNDI_ROOT=/path/to/standard-sdk \
-DPINDI_BUILD_ADVANCED_HX_TEST=ON -DNDI_ADVANCED_ROOT=/path/to/advanced-sdk
cmake --build build --target pindi-advanced-hx-receive pindi-advanced-hx-render pindi-advanced-hx-dmabufOn an isolated test system, release DRM master before running the bench. Find the connected 1080p CRTC and a compatible NV12 overlay with modetest -M vc4 -p. The two IDs in this example are specific to the test Pi.
bash experiments/advanced-hx/run.sh build 'NDI source name' 30 97 98 30000/1001The program expects an Annex B H.264 source and an active 1920 ? 1080 HDMI mode. Supply the actual source frame rate. The diagnostic runner uses a fixed frame cadence and a raw video pipe. It measures packet acquisition and DRM updates, and requires timestamp-aware playback and reconnect handling before service integration.
The receiver requests a keyframe after an initial video silence of six seconds when a connection exists. It buffers up to 64 compressed packets and 8 MiB between acquisition and the decoder pipe. If the limit is reached, capture stops with an explicit error and the writer drains the packets already queued.
For a local service deployment, install the two Advanced executables and
experiments/advanced-hx/service.py in /opt/pindi-advanced, together with the
authorized ARM64 SDK library named libndi_advanced.so.6 and the built module
libpindi-advanced-hx-dmabuf.so. Install the matching
webui.py as /usr/local/bin/pindi-webui. The library is loaded from the local
bundle. The Quality profile uses the source frame rate and discovers the active
HDMI CRTC and NV12 plane. If the source format or HDMI mode is unsupported,
Quality falls back to the standard player. Transient errors are handled by the
existing service restart policy. The Advanced SDK runtime is obtained separately
from its vendor.
The Quality service starts with DMA-BUF if the module is installed. It loads the
module only in its FFmpeg subprocess. The module imports the decoder capture
buffers into DRM and returns them to V4L2 after a later buffer is scanned out.
If direct output fails to start, the supervisor can still try NV12 copy.
After direct playback starts, a video or HDMI stall triggers a short HX Low
probe without opening HDMI. If the probe receives video, one replacement
Advanced receiver is prepared while the current output still owns HDMI. The
supervisor hands HDMI to the replacement DMA-BUF pipeline once a keyframe is
ready. If recovery fails or the replacement stalls, it falls back to HX Low.
Set PINDI_DMABUF=0 in the service environment to select the copy pipeline
explicitly. The standard build and HX Low have no dependency on the module.
On KMS devices that expose an out-fence, the DMA-BUF module waits for the current
scanout confirmation and uses source delivery for pacing. On devices without
the required atomic properties it keeps the legacy vblank path. Set
PINDI_DMABUF_ATOMIC=0 to select the legacy timing explicitly.
The Performance profile intentionally requests the sender's low-bandwidth stream (HX Low for an HX source). It trades resolution and bitrate for lower load. Use Quality for the full-bandwidth stream. The optional H.264 decoder hook is loaded only for Performance, explicit hardware decoding, or software tracing on supported 64-bit ARM glibc builds. Hardware decoding is selected only when Linux exposes an accessible V4L2 H.264 decoder. Other codecs use the SDK's normal decoder path. Standard playback does not require the hook.
The player service uses systemd to restart after a watchdog exit. Use the service for unattended playback and ensure it can acquire the HDMI DRM device.
When the TV forwards Channel Up or Channel Down over HDMI-CEC, PiNdiDecoder steps through the alphabetically sorted NDI sources and wraps at either end. A source change keeps the current playback profile and enables autostart with the selected source. Holding a key does not cycle repeatedly. HDMI-CEC must be enabled on the TV. Some TVs handle the channel keys locally, even with CEC enabled.
The web service requires the Linux CEC input device and the optional
cec-ctl utility (Debian package v4l-utils). It registers as
PiNdiDecoder when the HDMI adapter has no logical CEC address.
Set PINDI_CEC=0 in the web service environment to disable remote input.
Install or update the standard player through the usual GitHub release. The release includes the project-owned NV12 renderer, DMA-BUF module and supervisor inside the web UI asset. If a compatible Advanced runtime is already provisioned, the Quality profile takes those helpers from the installed release automatically. Without the runtime it uses the standard Quality path. Rollback restores the helpers associated with the previous web UI.
For a new Advanced installation, obtain the authorized Linux ARM64 SDK from
NDI, then build
pindi-advanced-hx-receive locally as described above. Place that executable and
the licensed runtime with SONAME libndi_advanced.so.6 in
/opt/pindi-advanced. The two files are local prerequisites for the Advanced
profile. The GitHub archive contains neither file. SDK trial limits apply.
NDI® is a registered trademark of Vizrt NDI AB. NDI
Run the release's install.sh as a regular user on the Pi. It downloads the
latest public binary and verifies its checksum. A local --artifact FILE
can be supplied for offline use. The standard SDK is downloaded from NDI when
needed. Use --standard-sdk ARCHIVE_OR_DIR to supply it locally instead.
Supply the separately obtained Advanced SDK with --advanced-sdk ARCHIVE_OR_DIR.
The installer lets you review the vendor license for each archive, builds the
Advanced receiver locally and installs its library separately.
Rebuild an existing Advanced receiver with the release installer to enable the
fast connection-aware stall detection. The Web UI update installs the supervisor
and output modules, while the locally linked receiver is built by the installer.
bash install.sh --advanced-sdk /path/to/Install_NDI_Advanced_SDK_v6_Linux.tar.gzAdd --check to validate and build without installing anything. For an offline
check provide --artifact and both SDKs; the Pi needs the existing runtime
dependencies and a compiler. Advanced HX High requires a Raspberry Pi FFmpeg
build with the NV12 output option on h264_v4l2m2m.
The release archive includes an optional helper to hide Linux boot messages and the login prompt on the foreground HDMI console. It preserves serial console settings and the system journal. Run these commands on the Pi from the extracted release archive:
sudo python3 quiet-hdmi-boot.py enable
sudo rebootUse SSH or switch to another virtual console for maintenance. This setting
does not control Raspberry Pi firmware output or install a boot animation.
To restore the saved boot settings, run
sudo python3 quiet-hdmi-boot.py disable and reboot.