Skip to main content

pixtreme-transport-ndi

Full NDI® video and audio output for pixtreme.transport. NDI® is a registered trademark of Vizrt NDI AB. See NDI.

Send processed GPU frames from a transport core FrameBuffer to NDI receivers. The package provides the Python Output factory, a C++ shared library, public headers, a CMake package, and a bundled libndi runtime. It provides output only.

Installation

pip install pixtreme-transport-ndi

Supported wheels target Linux x86_64 (including WSL2) and native Windows x86_64, with CPython 3.12 and 3.13. Linux wheels use manylinux_2_28_x86_64 (glibc 2.28 or newer); Windows wheels use win_amd64. Processing requires an NVIDIA GPU and a driver that supports CUDA 13. Pixel serialization calls pixtreme's conversions, built for sm 86, sm 89, and sm 120. The wheel requires no CUDA Toolkit or NDI SDK installation.

On Linux, Avahi's libavahi-client.so.3, libavahi-common.so.3, and their dependencies must be installed on the host. Install libavahi-client3 on Debian/Ubuntu or avahi-libs on RHEL-family systems. NDI mDNS discovery also needs a running avahi-daemon. Import errors identify a missing Avahi library and the packages to install.

Windows requires Microsoft Visual C++ v14 Redistributable x64 for MSVC toolset 14.44 or later. The wheel bundles Processing.NDI.Lib.x64.dll and its Processing.NDI.Lib.Licenses.txt notice under the package's _ndi/ directory. The package registers its own bin/ and _ndi/ with os.add_dll_directory before importing the native binding; pixtreme and the core register their own DLL directories. Their DLLs, CUDA runtime, NVIDIA driver and C runtime DLLs stay outside this wheel. Use Linux wheels inside WSL2.

The dependency pixtreme-transport>=0.38.0 installs the transport core, which supplies frame types, buffers, worker threads, audio processing, and pixel serialization. This module directly depends on pixtreme>=2.25.3 and uses pixtreme's color definitions to match the primaries and white point of YCbCr images to the NDI standard for their resolution. The core's native ABI must match the ABI used to build this module; import rejects an incompatible core before loading the NDI extension. The core library stays in its own wheel. This package installs libndi under its own _ndi directory and uses relative library paths on Linux, so LD_LIBRARY_PATH is not needed to locate the installed NDI and core libraries.

Using the output

from fractions import Fraction
from pixtreme.transport.ndi import Output
from pixtreme.transport.session import ExitSettings, FrameBuffer

post = FrameBuffer(2)
settings = ExitSettings(Fraction(1001, 30000))  # 30000/1001 fps
settings.audio.enabled = True
settings.audio.accepted_formats = [
    (48000, 2, "stereo", "s16le"),
    (48000, 2, "stereo", "f32le"),
]
settings.audio.output_format = (48000, 2, "stereo", "f32le")
settings.audio.target_format = "FLTP"
settings.ancillary_kinds = ["caption"]

output = Output(0, post, settings, "Processed output")
output.open()
try:
    for frame in processed_frames:  # TransportFrame values from your pipeline.
        post.put(frame)
    post.close()
    output.join()
finally:
    output.close()

Output(device, buffer, settings, name) requires all four arguments. Device numbers follow the core's CUDA device selection. Output returns the core's Exit, with open, request_stop, join, close, check, and inspection. open() creates the NDI source; video begins after the first frame is acquired. The output never closes the caller's buffer. Output is a factory function; use isinstance(output, Exit) to check the returned session, with Exit imported from pixtreme.transport.session.

ExitSettings.prefill_frames defaults to 2. Set it to 1 to start with one buffered frame. The value must be positive and fit the buffer's capacity. Closing the buffer drains its remaining frames even below that count.

On each output period, the core's sending thread takes one picture from the buffer, serializes it into the module's host memory, and passes it to the SDK. There is no queue of encoded pictures before sending.

While an open buffer has no new frame, the output repeats the latest picture with silent audio. request_stop() stops acquisition and sends only pictures already accepted by the core; pictures left in the buffer are not sent. close() joins the workers and destroys the source.

Video, audio, and timecode

The core's sending thread measures each frame period on a monotonic clock and controls the sending interval. The output uses Pacing.CORE_CLOCK with clock_video and clock_audio disabled, so the SDK sends each picture as soon as it receives it. Resolution follows each input image, and frame rate follows ExitSettings.frame_period. Image widths must be divisible by two.

RGB images (without a matrix) are serialized as RGBA; images without alpha receive opaque alpha. YCbCr images (with a matrix) are serialized as UYVY: 8-bit 4:2:2, legal range, with byte order Cb0, Y0, Cr0, Y1. The output preserves the input matrix, colorspace, and transfer function. Convert incompatible images in your pipeline before submitting them.

NDI interprets UYVY colour according to the image resolution:

Resolution Required matrix Required colorspace
Width > 1920 or height > 1080 BT.2020 Rec.2020
Otherwise, width > 720 or height > 576 BT.709 Rec.709
Otherwise BT.601 Preserved from the input

An incompatible YCbCr image stops the output before reaching the SDK. The error identifies its matrix, colorspace, resolution, and the required NDI standard. The core serializes pixels into page-locked host memory, which the output passes directly to the SDK. That memory remains valid until serialization and SDK reads finish, including during shutdown.

When audio is enabled, the core supplies interleaved f32le PCM at the requested sample rate and channel layout. The output rearranges it into NDI's planar float layout without changing sample values or counts. The core handles dropped frames, repeats, padding, and trimming. At 48 kHz and 30000/1001 fps, five periods contain 8008 samples per channel. Disabled audio is not sent.

With core 0.36.0 or later, a frame can carry an AudioReference into the core's PcmStore. The core resolves that range immediately before sending, so PCM arriving while the picture is prepared can still reach the output. Set settings.audio.max_audio_wait_ms to limit the wait for missing PCM; None uses one nominal frame period and 0 does not wait. The budget starts when the core selects the picture and includes preparation and pacing. Repeated pictures and pictures without audio send nominal silence without waiting. The output's inspection.audio_filled_samples counts unread source samples sent as silence; audio_added_samples and audio_trimmed_samples count output sample adjustments separately. NDI preserves the PCM that the core supplies.

An input FrameTiming.source_timecode is converted to the NDI video frame's 100 ns timecode units. Its displayed hours, minutes, seconds, and nominal-rate frame fraction are preserved, including for drop-frame labels. Fractional ticks round to the nearest integer, with halves rounding up. Repeated pictures retain that input timecode. Pictures without an input timecode receive the current system time on every send, including repeats.

Ancillary metadata

Declare accepted kinds in settings.ancillary_kinds; the core rejects undeclared kinds. Each new picture's AncillaryData.items becomes XML in the NDI video frame's metadata:

<pixtreme_ancillary encoding="base64"><item kind="Y2FwdGlvbg==">PCY=</item></pixtreme_ancillary>

The example carries kind caption and payload bytes <&. Each AncillaryItem becomes one item; its kind and payload use standard padded base64. Order, duplicate kinds, opaque bytes, and empty payloads are preserved. Empty collections produce no metadata. Repeats omit the original ancillary metadata.

Send timing trace

Before open(), call the core session's output.set_trace(trace) with a pixtreme.trace.Trace containing eight integer values per record. NDI records kind 1001 immediately before the synchronous SDK video send, after audio has been rearranged, and 1002 when that send returns. Kinds 1003 and 1004 surround the SDK audio send and are omitted when audio is disabled. These rows join the core's send rows (13 and 14) by session ID and work ID, with the core's input number, epoch, sequence, ticket, and repeat flag. Reading and exporting the trace belongs to the caller after the session has stopped. Without a trace, the module makes no measurement clock or recording calls; SDK inputs and the core's send cadence are unchanged.

C++ integration

The wheel installs its CMake package under pixtreme/transport/ndi/cmake. Use your organization's shared Conan recipes to obtain the core 0.38.0 and pixtreme 2.25.3 prebuilt SDKs and retain their Conan lock. The module's native SDK archive is available alongside wheels in the public GitHub Release. Configure with that Conan toolchain, set pixtreme-transport-ndi_DIR to the module's installed CMake directory, call find_package(pixtreme-transport-ndi CONFIG REQUIRED), and link pixtreme::ndi. Include <pixtreme/transport/ndi/output.hpp> to use Output. Public headers require the core SDK and do not require NDI SDK headers. The C session owns the NDI sender; the C++ Output is a view of that session. Close the session explicitly or release its last owning handle to stop it. Overriding the C++ view's processing hooks to replace NDI sending is not supported.

To select the output by name, link only pixtreme::transport and include <pixtreme/transport/module.h>. The core finds the installed NDI wheel without importing Python or linking the NDI C++ library:

// post is a caller-owned session::FrameBuffer. Build core settings via its C API.
namespace pt = pixtreme::transport;
pixtreme_transport_exit_settings_options values{};
values.struct_size = sizeof(values);
values.period_numerator = 1;
values.period_denominator = 25;
values.prefill_frames = 1;
pixtreme_transport_exit_settings* raw_settings = nullptr;
pixtreme_transport_error* error = nullptr;
auto status = pixtreme_transport_exit_settings_create(&values, &raw_settings, &error);
pt::check_status(status, error);
auto settings = pt::Handle::adopt(raw_settings);
const pixtreme_transport_module_exit_request request{
    sizeof(request), 0, post.native_handle(), settings.get()};
const pixtreme_transport_module_option options[]{
    {sizeof(pixtreme_transport_module_option), {"name", 4}, {"Processed output", 16}}};
auto output = pt::module::create_exit("ndi", request, options);
// output owns one unopened core exit reference. Use the core C session API.
status = pixtreme_transport_exit_open(output.get(), &error);
pt::check_status(status, error);
// Feed post, then close the session before releasing output.

The C equivalent is pixtreme_transport_module_create_exit from <pixtreme/transport/c/module.h>. Supply the module name ndi, the request, and the options array with its count and byte stride. A successful result owns one unopened exit reference; close it and release it with the core handle API. name is the only NDI option and is required exactly once. Its value is the source name as UTF-8 bytes without NUL. Unknown, duplicate, missing and invalid options report the key path without including the value. Device, buffer and core settings belong in the request. Each creation returns an independent session and preserves the caller's current CUDA device and context.

The wheel places libpixtreme_transport_ndi_entry.so under pixtreme/transport/ndi/lib/. Discovery returns CPU metadata; creation loads the same output library used by Python and reports missing Avahi libraries with the system packages to install. NDI reception remains unsupported.

On Windows the entry is pixtreme/transport/ndi/bin/pixtreme_transport_ndi_entry.dll. The body is bin/pixtreme_ndi-<core ABI>.dll, using the ABI of the core SDK selected at build time; its import library is lib/pixtreme_ndi.lib. The core and module must share one installation tree. Native applications choose their own DLL search directories and load each pixtreme and core DLL once. Link through pixtreme::ndi when using C++ Output.

Building from source

Source builds use Conan 2 for the prebuilt core and pixtreme SDKs, the shared CUDA toolkit recipe, Catch2, and a local description of the licensed NDI SDK. The shared recipe archive is verified against SHA256SUMS, and exported recipe revisions must match cpp/conan.lock. Core and pixtreme are not compiled. Install the pinned CLI with uv tool install conan==2.34.0, set NDI_SDK_ROOT, and prepare test dependencies with python3 cpp/conan/prepare-tests.py. cpp/conan/prepare.py prepares dependencies before CMake runs; the shared tools profile supplies locked CMake and Ninja binaries from ConanCenter. Development builds do not need an OS CUDA Toolkit. See DEVELOPMENT.md for Python builds, standalone C++ tests, and manylinux wheels.

License

This module's code is distributed under the MIT license.

The bundled libndi is subject to the NDI SDK License Agreement and the notices in libndi_licenses.txt on Linux or Processing.NDI.Lib.Licenses.txt on Windows. The wheel includes the complete nanobind and robin_map license texts and a libndi notice in its .dist-info/licenses/ directory.

NDI terms and attribution

libndi is bundled with libndi_licenses.txt. NDI SDK redistribution remains subject to its license conditions. Applications using NDI must supply the applicable SDK license terms and notices to users, link to NDI, and show the NDI® trademark and the attribution “NDI® is a registered trademark of Vizrt NDI AB” near NDI selection or use, in their About box, and in their trademark notices.

Metadata

Release files for pixtreme-transport-ndi 0.30.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for pixtreme-transport-ndi 0.30.0
File Actions
pixtreme_transport_ndi-0.30.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for pixtreme_transport_ndi-0.30.0-cp313-cp313-win_amd64.whl
pixtreme_transport_ndi-0.30.0-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details for pixtreme_transport_ndi-0.30.0-cp313-cp313-manylinux_2_28_x86_64.whl
pixtreme_transport_ndi-0.30.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for pixtreme_transport_ndi-0.30.0-cp312-cp312-win_amd64.whl
pixtreme_transport_ndi-0.30.0-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details for pixtreme_transport_ndi-0.30.0-cp312-cp312-manylinux_2_28_x86_64.whl

Total release size: 15.0 MB

Release files / pixtreme_transport_ndi-0.30.0-cp313-cp313-win_amd64.whl

Download URL pixtreme_transport_ndi-0.30.0-cp313-cp313-win_amd64.whl
Size 3.9 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
cda65ee5d6678e0f03c1de27fe81f357a1d1d1be1d49e2aa2bdd683ce76e4e52
BLAKE2b-256 checksum
How to use checksums
6b2a4f117ee381ae5e696c26e5447438901dc909d3efe53106672891a2772c4a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / pixtreme_transport_ndi-0.30.0-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL pixtreme_transport_ndi-0.30.0-cp313-cp313-manylinux_2_28_x86_64.whl
Size 3.6 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
df5fdc776ac0b33185decbabcbb1849c2a86d99c62cf44b3f1e577e019c34e5f
BLAKE2b-256 checksum
How to use checksums
95c2b2319eb4054805af1eee5624c7625c9eeed12991b7128db6f8df9b361f42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / pixtreme_transport_ndi-0.30.0-cp312-cp312-win_amd64.whl

Download URL pixtreme_transport_ndi-0.30.0-cp312-cp312-win_amd64.whl
Size 3.9 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
afc9a724b4585a51e55b19d964b9407c0e96081110288f45d62c9976cdbb022f
BLAKE2b-256 checksum
How to use checksums
406d29bf82080d5488ba9a3accd18868c1b1dd8c9c67fc5aa3b79adbe310b653
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / pixtreme_transport_ndi-0.30.0-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL pixtreme_transport_ndi-0.30.0-cp312-cp312-manylinux_2_28_x86_64.whl
Size 3.6 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
dfd4ff89d1b70b13ccbece9f6fe8638caa88a1bcd877c3f3976ba09e61fff79b
BLAKE2b-256 checksum
How to use checksums
2c5ae734bb491cf634e1eee7cbda2b012a2f453c53d2db9c58145bb6b9f29cdd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for pixtreme-transport-ndi 0.30.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.30.0 This release

4 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page