Skip to main content

cyomtlib

Python bindings for Open Media Transport (OMT).

cyomtlib wraps libomt, the C interface to OMT, with ctypes. Encoding and decoding run in native code and NumPy arrays are passed to libomt without copying, so 1080p60 is realistic from Python. Wheels bundle libomt and the libvmx codec, so there is nothing else to install.

Platform Wheel Native libraries
macOS 10.15+ (Intel and Apple Silicon) macosx_10_15_universal2 official OMT release
Windows x64 win_amd64 official OMT release
Windows ARM64 win_arm64 official OMT release
Linux x86_64 (glibc 2.28+, AVX2 CPU) manylinux_2_28_x86_64 built from source
Linux aarch64 (glibc 2.28+) manylinux_2_28_aarch64 built from source

The package is pure Python, so one wheel per platform covers every Python 3.9+.

On Linux, discovery uses Avahi: install libavahi-client3 (Debian/Ubuntu) or avahi-libs (Fedora/RHEL) and make sure avahi-daemon is running. Without it, senders and receivers still work but sources are not discovered: connect to omt://host:port URLs or use a discovery server (omt.settings.set_discovery_server(...)). The Linux libraries carry a small patch for this (patches/); unpatched upstream libomt aborts the process when avahi-daemon is not running.

Install

pip install cyomtlib

Send

import numpy as np
import cyomtlib as omt

frame = np.zeros((1080, 1920, 4), dtype=np.uint8)  # BGRA
frame[..., 2] = 255                                  # red
frame[..., 3] = 255

with omt.Sender("Python Test Pattern") as sender:
    print("Publishing as", sender.address)
    while True:
        # timestamp=-1 (the default) lets OMT pace the frames to frame_rate.
        sender.send_video(frame, omt.Codec.BGRA, frame_rate=60)

send_video takes packed formats (BGRA, UYVY, YUY2) as arrays shaped (height, width, bytes_per_pixel) and infers the size. Planar formats (NV12, YV12, UYVA, P216, PA16) need width= and height=. Pass flags=omt.VideoFlags.ALPHA to keep an alpha channel.

Audio is planar float32, shaped (channels, samples_per_channel):

sender.send_audio(np.zeros((2, 960), np.float32), sample_rate=48000)
sender.send_metadata("<scene name='intro'/>")

Discover and receive

import cyomtlib as omt

sources = omt.discover(wait=2.0)          # ["HOSTNAME (Python Test Pattern)", ...]

with omt.Receiver(sources[0], video_format=omt.PreferredVideoFormat.BGRA) as receiver:
    while True:
        frame = receiver.receive(timeout_ms=1000)
        if isinstance(frame, omt.VideoFrame):
            pixels = frame.packed()           # (height, width, 4) uint8 view
        elif isinstance(frame, omt.AudioFrame):
            samples = frame.data              # (channels, samples) float32
        elif isinstance(frame, omt.MetadataFrame):
            print(frame.xml)

receive copies frame data into NumPy arrays you own. Pass copy=False to get views into libomt's buffers instead; they stay valid only until the next receive call for that frame type. To receive video and audio on separate threads, call receive(omt.FrameType.VIDEO) in one and receive(omt.FrameType.AUDIO) in the other.

Also available: tally (set_tally, get_tally), sender information, per-connection metadata, redirects, quality suggestions, video and audio statistics, settings, and logging:

omt.settings.log_to_python()          # OMT log lines go to logging.getLogger("cyomtlib.omt")
omt.settings.set_integer("NetworkPortStart", 7000)

Call omt.settings.shutdown() once before the process exits, after every Sender and Receiver has been closed.

Using your own libomt build

Set CYOMTLIB_LIB_DIR to a folder containing libomt and libvmx. This takes precedence over the bundled libraries. The source distribution builds a wheel without native libraries, which finds libomt this way or on the system library path.

Building wheels

python scripts/fetch_native.py          # macOS / Windows: stage the official binaries
python -m build --wheel

On Linux, build the libraries from source inside a manylinux container, then stage them:

docker run --rm -v "$PWD":/io -w /io quay.io/pypa/manylinux_2_28_x86_64 scripts/build_linux_native.sh
python scripts/fetch_native.py --from-dir build/linux-native --platform-tag manylinux_2_28_x86_64
python -m build --wheel

Upstream versions are pinned in native-sources.env. The GitHub workflow in .github/workflows/wheels.yml builds and tests all five wheels and publishes them to PyPI when a v* tag is pushed.

License

cyomtlib is MIT licensed. The bundled OMT libraries are MIT licensed by the Open Media Transport contributors (see LICENSE-OMT.txt).

Release files for cyomtlib 0.1.0

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

Source distribution (sdist)

Source distribution for cyomtlib 0.1.0
File Size Uploaded
cyomtlib-0.1.0.tar.gz 20.7 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for cyomtlib 0.1.0
File
cyomtlib-0.1.0-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details
cyomtlib-0.1.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
cyomtlib-0.1.0-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details
cyomtlib-0.1.0-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details
cyomtlib-0.1.0-py3-none-macosx_10_15_universal2.whl Python 3 none macOS 10.15+ universal2 (ARM64, x86-64) Details

Total release size: 21.8 MB

Release files / cyomtlib-0.1.0.tar.gz

Download URL cyomtlib-0.1.0.tar.gz
Size 20.7 kB
Tags Source
SHA-256 checksum
How to use checksums
5d1795d2a023766bf87f553bb164d8eedb924a58cd9e44ed9162c2b66e362cbe
BLAKE2b-256 checksum
How to use checksums
36633f4d1ee1280df8b9af2edc8ba048eeb3aa3c4775d67e7b2b77e672298162
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.

Transparency log

Release files / cyomtlib-0.1.0-py3-none-win_arm64.whl

Download URL cyomtlib-0.1.0-py3-none-win_arm64.whl
Size 3.2 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
a98dc95c70c1d253d7fc92fa5938bf3256d05b978978029044d4babca4d85e09
BLAKE2b-256 checksum
How to use checksums
eb501bbe329fcb8f45e4fb8db6662252e4bd294e4e7214e0513ebc100b28820a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.

Transparency log

Release files / cyomtlib-0.1.0-py3-none-win_amd64.whl

Download URL cyomtlib-0.1.0-py3-none-win_amd64.whl
Size 3.4 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
141b705443274ac51ef9d06b7d51071232009bc6a9d21f7fbc09971cdbdc5134
BLAKE2b-256 checksum
How to use checksums
4320a60e17bebf5be09c67bc13372fc924dc78277c71f9bfbd06e8d1326301cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.

Transparency log

Release files / cyomtlib-0.1.0-py3-none-manylinux_2_28_x86_64.whl

Download URL cyomtlib-0.1.0-py3-none-manylinux_2_28_x86_64.whl
Size 3.8 MB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
56bd15f50efc02d53decede8eb651b356e9573798369f27c8d8c74ea0a3be7fc
BLAKE2b-256 checksum
How to use checksums
5a5f57cd72ac7fc2dc026b3ec30126eb4e57e3c80ecbfe98364143f5e1854cf4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.

Transparency log

Release files / cyomtlib-0.1.0-py3-none-manylinux_2_28_aarch64.whl

Download URL cyomtlib-0.1.0-py3-none-manylinux_2_28_aarch64.whl
Size 3.7 MB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
7817385012260654c0ceb553341904fab5402d85dbfa6c3946f57ddbd21b8d16
BLAKE2b-256 checksum
How to use checksums
03dd76f1aaf79eba958c102ab3721a113de99feec2cc89b3a90e6908a702b85e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.

Transparency log

Release files / cyomtlib-0.1.0-py3-none-macosx_10_15_universal2.whl

Download URL cyomtlib-0.1.0-py3-none-macosx_10_15_universal2.whl
Size 7.7 MB
Tags Python 3 macOS 10.15+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
71f462b50af25adc41d4571241d8961bf43caa288adc1a0c74cde43a35798925
BLAKE2b-256 checksum
How to use checksums
592e3c960000a69df833147322a9c5e17dff751efcc75ee231e1dfa206fd5770
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.2

6 release files

This release

0.1.0 This release

6 release files

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