Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
rust-ndi-sdk (ndi-sdk-sys)
Safe and ergonomic Rust bindings for the NDI (ndi.video) SDK, enabling high-performance video, audio, and metadata transmission over IP networks.
Unlike other bindings this never exposes any raw pointers and uses correct Rust
types for everything (timeouts are handled as std::time::Duration, not
time_in_ms: u32)
Despite its name this is not affiliated with ndi, ndi-sdk, ndi-sys crates
Features
- Safe wrapper around the NDI SDK
- Currently supports:
- Finder API for discovering NDI sources on the network
- Router API for routing NDI streams
- Sender API for transmitting NDI streams
- Receiver API for receiving NDI streams
- Not supported yet:
- Dynamic loading of NDI SDK
- PTZ Control
- FrameSync
- Receiver advertisement
- Audio frame access
- video frame metadata write
Version compatibility
This crate is currently tested against SDK version 6.2.0.3 on Windows and 6.3.2.0 on Linux.
The raw bindings are generated from the header files in the SDK installation directory, this way generated code will always match the version on the machine it is compiled with and linked against.
Platform Support
| OS | Architecture | Support | Notes |
|---|---|---|---|
| Windows | x86_64 | ✅ | NDI_SDK_DIR needs to be set |
| Linux | x86_64 | ✅ | NDI_HEADER_DIR needs to be set if headers are not in /usr/include, and LDPATH must include libndi.so |
| MacOS | x86_64 | ❌ | |
| MacOS | AArch64 | ❌ |
All platforms not mentioned are unsupported and error out during the build.
Feel free to add support for other platforms supported by the NDI SDK. (It shouldn't be that complicated, Windows support is less than 30 lines of nearly-boilerplate code)
Installation
- Make sure to have the NDI SDK installed
- Make sure to have Clang/LLVM installed. see rust-bindgen requirements
- Add
ndi-sdk-systo your cargo dependencies
Check out the examples at https://github.com/deno-plc/rust-ndi-sdk/tree/main/examples
Cargo features
strict_assertions
This crate uses a lot of unsafe ffi bindings and therefore a lot of assertions.
You can turn on this feature to ensure debug assertions are in place even for release builds. During development and testing it is highly recommended to turn this on, as it sometimes also outputs more diagnostics.
dangerous_apis (not recommended)
There are some (unsafe) APIs that are not really necessary, but might in some rare case be useful. Use only if you REALLY know what you do. For example there are APIs that allow to change the resolution of a video frame while it is allocated, which may lead to out-of-bounds memory access by safe code.
Safety
This crate provides safe abstractions of the NDI SDK. The public API is designed to be 100% safe to use (except unsafe APIs of course). If you encounter restrictive lifetimes or &mut borrows, do not try to circumvent them, most likely it just represents the safety requirements of the C SDK.
As expected form a C library, safety requirements are not always documented in-depth by the NDI SDK. One common assumption this crate uses it that it is safe to drop arguments that are passed as pointers (and strings inside them) immediately after the call they were passed to has returned (unless defined otherwise by the documentation).
Contributing
Contributions are welcome! Here's how you can help:
- Add support for other platforms in
build.rs - Report bugs and find missing APIs
- Implement these missing APIs
- Improve documentation and examples
License
Copyright (C) 2025 - 2026 Hans Schallmoser & Contributors
Licensed under GPL-v3.
A lot of the doc comments is adapted from the NDI Docs
Note: The NDI SDK is subject to its own EULA.
Disclaimer
This project is not affiliated with NDI® or NewTek/Vizrt