A small live-video-to-display appliance for the church stream machine, replacing MPV/GStreamer for two fixed jobs. This lands job 1 end to end and scaffolds job 2. Pipeline: V4L2 mmap capture -> TurboJPEG decode to YUV planes -> interleave to packed YUY2 -> SDL3 streaming texture -> borderless fullscreen on a chosen Wayland output. The GPU does the colour conversion, so no CPU matrix multiply and half the upload bandwidth of RGBA. Latency is managed by dropping, never queueing: the driver queue is drained to its newest buffer each wakeup, and a one-deep slot between the input thread and the renderer discards any frame the renderer has not taken. Dependency tree is two crates (sdl3-sys, libc). V4L2 and TurboJPEG are hand-written FFI; the V4L2 struct layouts were taken from the target kernel's headers and are pinned by compile-time assertions. Three hardware behaviours found while validating against the real ATEM: * /dev/video1 is a metadata node with no formats, so MJPEG on /dev/video0 is the only path on this hardware. * The ATEM pads frames with a few bytes before the EOI marker. libjpeg warns, and TurboJPEG returns -1 for a warning as well as a failure, so the first cut rejected ~97% of frames. Warnings are now distinguished from failures via tj3GetErrorCode, with a structural SOI/EOI check to still catch genuinely truncated frames. * On KDE Wayland, SDL reports monitor model names, not connector names. Also fixes sticky libjpeg error state, where one corrupt frame would latch an error and fail every valid frame after it. 87 tests. Verified on the real ATEM: sustained 30.0 fps, 0 undecodable frames, 0 frames dropped before display, ~33% of one core.
16 lines
456 B
TOML
16 lines
456 B
TOML
# Job 2: ProPresenter lower thirds over NDI -> fullscreen HDMI -> ATEM key.
|
|
#
|
|
# Install as /etc/video-output/lower-thirds.toml and run:
|
|
# video-output lower-thirds
|
|
|
|
mode = "ndi"
|
|
|
|
# A unique fragment of the NDI source name is enough; see
|
|
# `video-output ndi-sources`. Omit entirely to take the first source found.
|
|
source = "ProPresenter"
|
|
|
|
display = "HDMI"
|
|
|
|
# Uncomment on networks where mDNS discovery does not cross subnets:
|
|
# extra-ip = "10.0.0.42"
|