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
Quick start
The example scripts are not part of the package. Get them from the repository, together with OpenCV for the video window:
git clone https://github.com/maybites/cyomtlib.git
cd cyomtlib
pip install cyomtlib opencv-python
In one terminal, publish a 1080p60 test pattern with a 1 kHz tone:
python examples/send_test_pattern.py "My Pattern"
In a second terminal, pick the source from the list and watch it:
python examples/receive.py --show
The receiver prints the resolution and frame rate every second. Close the
window, or press q or Esc, to stop. Without --show it only prints
statistics and does not need OpenCV. To skip discovery, pass the source name or
an omt://host:port URL: python examples/receive.py "HOSTNAME (My Pattern)".
Both scripts also work with other OMT software, for example the OBS plugin or OMT player from Open Media Transport.
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.
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.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cyomtlib-0.1.2.tar.gz | 21.6 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| cyomtlib-0.1.2-py3-none-win_arm64.whl | Python 3 | none | Windows ARM64 | Details |
| cyomtlib-0.1.2-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| cyomtlib-0.1.2-py3-none-manylinux_2_28_x86_64.whl | Python 3 | none | Linux glibc 2.28+ x86-64 | Details |
| cyomtlib-0.1.2-py3-none-manylinux_2_28_aarch64.whl | Python 3 | none | Linux glibc 2.28+ ARM64 | Details |
| cyomtlib-0.1.2-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.2.tar.gz
| Download URL | cyomtlib-0.1.2.tar.gz |
|---|---|
| Size | 21.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d401900844ad373d853c683d1d3eb44aaa240e42e13812ee50e0c34d848f4bfb
|
|
BLAKE2b-256 checksum How to use checksums |
d73ede77ef8e580a1e6a865574ca32773072c0f10628a6b5bfd9e6f2ec7329fe
|
| 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 logRelease files / cyomtlib-0.1.2-py3-none-win_arm64.whl
| Download URL | cyomtlib-0.1.2-py3-none-win_arm64.whl |
|---|---|
| Size | 3.2 MB |
| Tags | Python 3 Windows ARM64 |
|
SHA-256 checksum How to use checksums |
dd1d1a9d214aabe54b92746fcc33a66d1a48d233b9510fe2ce7e2a1f57807172
|
|
BLAKE2b-256 checksum How to use checksums |
f5f0767bdfe624bb90624c2c7baf8228de7e6d8e2d12b2e1597dc77d51eb109a
|
| 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 logRelease files / cyomtlib-0.1.2-py3-none-win_amd64.whl
| Download URL | cyomtlib-0.1.2-py3-none-win_amd64.whl |
|---|---|
| Size | 3.4 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
93ec34baf62404f4b91093c5357db72b4c987a8bc239d47652bd6654ccfb8b9e
|
|
BLAKE2b-256 checksum How to use checksums |
7f706f9af6bbfa4b8d0da76c63cabe0045ffbdf4daf0fdd5b2856ac3e4ae8f10
|
| 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 logRelease files / cyomtlib-0.1.2-py3-none-manylinux_2_28_x86_64.whl
| Download URL | cyomtlib-0.1.2-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 |
a843d62477ff21cd01ec5f3430b248a6528c44931cb6930c7e4ce6d7957ed734
|
|
BLAKE2b-256 checksum How to use checksums |
6cd52dc9257836ab96a8a4579cd5a59613504dad1bfec1d19c30153d3f956601
|
| 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 logRelease files / cyomtlib-0.1.2-py3-none-manylinux_2_28_aarch64.whl
| Download URL | cyomtlib-0.1.2-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 |
8b65969bfee728b6f3bcf63692404ad7b6d144c72651bee923e22edf46ffd919
|
|
BLAKE2b-256 checksum How to use checksums |
9b0b8dc2b9e5788553a9559232952b37ca61a36f82e47f4c48feb3200060999c
|
| 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 logRelease files / cyomtlib-0.1.2-py3-none-macosx_10_15_universal2.whl
| Download URL | cyomtlib-0.1.2-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 |
448c066ad0a55e2cdff017522c6e72a87ad30b7442ce3850d2e2b42f535cccfc
|
|
BLAKE2b-256 checksum How to use checksums |
4146c16025fa324e2ab2dee8b5dc11595b87d884ea7c1c3b8a1fdffe17839510
|
| 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