omtsndcli_v01 is the current documented Linux OMT sender CLI snapshot for the sender PC project.
It targets a direct capture path:
Linux sender PC -> Magewell Pro Capture HDMI -> V4L2 / ALSA -> OMT sender
The current source snapshot is based on the proven working implementation from omtcli06_fix.cpp, renamed and documented for repository use.
Validated in the project handoff:
- Debian 13 sender PC
- host
qduv1 - 4× Magewell Pro Capture HDMI visible as
/dev/video0to/dev/video3 - OMT stack already built:
libvmx,libomtnet,libomt - verified against vMix:
- discovery works
- test video works
- test audio works
- live V4L2 video works
- live ALSA HDMI audio works
- sends video from:
- built-in testcard
- Linux V4L2 capture device
- sends audio from:
- built-in test noise generator
- ALSA capture device
- exposes module help for video/audio backends
- classifies V4L2 formats as passthrough, conversion-only, or unsupported
- maps user bitrate options onto OMT quality enums
- prints runtime video/audio statistics every 5 seconds
- prints sender health roughly every 60 seconds
- keeps rolling interval data and prints a last-24h summary on exit
- stops cleanly on
SIGINT/SIGTERM
Primary repo source:
omtsndcli_v01.cpp
Lineage source used for this snapshot:
omtcli06_fix.cpp
System / project dependencies expected by the current source:
- C++17 compiler
- ALSA development headers (
alsa/asoundlib.h) - Linux V4L2 headers (
linux/videodev2.h) - OMT C/C++ wrapper header:
libomt.h - linkable
libomt - linkable
libasound
Example build command used by the current source layout:
clang++ -O3 -std=c++17 -o omtsndcli_v01 omtsndcli_v01.cpp \
-L. -lomt -lasound -Wl,-rpath,'$ORIGIN'Reference OMT library build sequence from the validated environment:
cd ~/omt/libvmx/build && bash ./buildlinuxx64.sh
cd ~/omt/libomtnet && dotnet build -c Release
cd ~/omt/libomt/build && bash ./buildlinuxx64.sh./omtsndcli_v01 [-t video_source] [-s audio_source]./omtsndcli_v01 -h./omtsndcli_v01 -t help
./omtsndcli_v01 -t testcard:help
./omtsndcli_v01 -t v4l2:help./omtsndcli_v01 -s help
./omtsndcli_v01 -s testcard:help
./omtsndcli_v01 -s alsa:helpTestcard video only:
./omtsndcli_v01 -t testcardTestcard video + testcard audio:
./omtsndcli_v01 -t testcard -s testcardMagewell / V4L2 video only:
./omtsndcli_v01 -t v4l2:device=/dev/video0Magewell video with explicit name / format / quality:
./omtsndcli_v01 -t v4l2:device=/dev/video0:name=Cam1:format=YUY2:b=midMagewell video + ALSA audio:
./omtsndcli_v01 -t v4l2:device=/dev/video0 -s alsa:hw:2,0V4L2 with control override example:
./omtsndcli_v01 -t v4l2:device=/dev/video0:ctrl.brightness=128Style:
driver:param=value:param=value
Notable aliases:
device=ord=format=orfmt=bitrate=orb=
Built-in moving test image. When compatible with 1920x1080 UYVY, it can also try to load:
california-1080-uyvy.yuv
Syntax:
-t testcard[:name=Testcard][:width=1920][:height=1080][:fps=60][:format=UYVY][:file=california-1080-uyvy.yuv]
Supported testcard output formats in the current code:
UYVYYUY2
Linux V4L2 capture input, intended for Magewell cards.
Syntax:
-t v4l2:device=/dev/video0[:name=Cam1][:width=1920][:height=1080][:fps=50][:format=YUY2]
-t v4l2:device=/dev/video0:ctrl.<control_name>=<value>
Module help enumerates:
- available
/dev/video*devices - formats
- sizes
- frame rates
- normalized control names
The sender classifies formats into:
- OMT passthrough
- conversion-only
- unsupported
Formats currently handled in code include these categories:
- passthrough:
YUYV/YUY2,UYVY,NV12,YV12,BGR32/BGRA - conversion to
BGRA:RGB32,RGB24,BGR24 - explicitly not forwarded as-is:
YUV420/YU12/I420
Built-in audio generator using random noise.
Syntax:
-s testcard[:volume=-20][:rate=48000][:channels=2]
Notes:
- default volume is
-20 dB - current implementation expects 2 channels
ALSA capture device input.
Syntax:
-s alsa:hw:2,0
-s alsa:device=hw:2,0[:volume=0][:rate=48000][:channels=2]
The module help enumerates visible ALSA capture PCM devices.
The current code accepts both labels and numeric aliases:
lowor1->OMTQuality_Lowmid,medium,2, or default ->OMTQuality_Mediumhighor3->OMTQuality_High
Startup prints the resolved OMT quality explicitly.
The sender prints:
- selected video source
- selected audio source
- stream name
- resolved OMT quality
- audio frame size
- capture startup information
- 5-second interval stats
- OMT sender connection / tally / totals
- 60-second sender health line
- final rolling summary for the last 24 hours
Sender health fields:
captured= frames obtained from capturesent= frames accepted byomt_senddropped= send failureslate=omt_sendexceeded frame-time budgetomt_send avg/max= mean and peak send duration in milliseconds
Important interpretation:
latedoes not automatically meandropped- on the validated 1080p50 path, occasional
lateevents can happen while the pipeline still runs correctly
Observed/recorded bitrate behavior in earlier testing:
low≈75 Mbit/smedium≈136 Mbit/shigh≈136 Mbit/s
Interpretation used in the project notes:
- medium and high looked similar on the tested content
- that was treated as an observation to re-measure, not yet as a confirmed encoder bug
The current source handles:
Ctrl+C/SIGINTSIGTERM
On shutdown it:
- stops V4L2 streaming
- unmaps capture buffers
- closes ALSA capture
- frees frame buffers
- prints the rolling summary
- destroys the OMT sender
- treat
omtsndcli_v01.cppas the canonical repo source - re-measure medium vs. high quality behavior
- archive a stable release snapshot
- then proceed to multi-instance execution and systemd services
This repository snapshot is meant to preserve the current known-good implementation state in a cleaner, documented form for GitHub. It does not claim that packaging, install scripts, service units, or multi-instance orchestration are finished.
This repository can be published under the MIT License for the project’s own code.
Why this looks safe for the current tree:
- the checked-in application source directly depends on
libomt.h, ALSA, and Linux V4L2 headers - the project notes say the sender lineage began from the OMT C++ example sender
- the Open Media Transport organization lists
libomtnet,libomt,libvmx, andExamplesas MIT-licensed repositories alsa-libis LGPL-2.1videodev2.his part of the Linux V4L2 userspace API and is published under((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)
Practical implications:
- your application source may be MIT
- OMT libraries remain under their own MIT licenses
- ALSA remains under LGPL-2.1; dynamic linking is the normal path on Linux and does not force your own source code to become LGPL, but binary redistribution should still respect LGPL obligations
- if you later commit vendored copies of
libomt.h,libomt.so,libvmx.so, or other third-party files into the repository, keep their original license texts/notices with them - no Magewell SDK headers are used in the current source snapshot; capture is done through generic V4L2/ALSA interfaces
This is a technical license check for the current repository contents, not formal legal advice.