vision-mixers — Mix & Effects
vision-mixers — Mix & Effects
Section titled “vision-mixers — Mix & Effects”This is where production happens live: cutting between sources, building layered looks, adding graphics and effects, and mixing audio — all in software, changed on the fly without dropping a frame.
Why it matters
Section titled “Why it matters”A vision mixer is the heart of any live gallery. Phrame delivers it as composable software rather than a fixed console:
- Build the mixer you need. Small, focused components — switch, scale, composite, overlay, 2D DVE, audio mix — combine into exactly the production chain a show requires.
- Change it live. Runtime control is event-driven; operator actions become live mixer changes without interrupting the frames in flight.
- Scriptable. Control logic is embedded Lua, so behaviours and automation are expressed as configuration, not custom builds.
- Same bus, no cabling. Components pass frames over the shared-memory bus — no SDI routing, no physical patching.
In one line: a gallery’s worth of switching, graphics, and audio — as software you compose and re-compose at will.
How it works
Section titled “How it works”Each component is its own executable; you wire them by connecting one component’s bus output to the next’s input.
| Component | Purpose |
|---|---|
phrame_switch | Route / switch between input sources |
phrame_scaler | Scale video |
phrame_compositor | Multi-layer composition |
phrame_overlay | Overlay / graphics rendering |
phrame_dve_2d | 2D digital video effects |
phrame_audio_mixer | Multi-channel audio mixing (party-line mode) |
phrame_package_maker | Package / bundle streams |
Each takes a JSON/YAML config validated against a schema (basic_config.yml
is the base; per-component schemas extend it). A config names the instance,
lists input[] (vdi://…), defines the output (video/audio/package), and
sets video properties (pixel format, size, frame rate) plus an msg_config
for MQTT.
Live control is the Lua layer: MQTT topics are bound to Lua scripts
(actions[]), a shared registry holds state (base topic, stream id, alpha,
…), and scripts call registry:get()/update() and mqtt_obj:queue_msg() to
emit control messages — e.g. turning a UI button press into an
.../OVERLAY/CMD command on the live overlay.
Under the hood
Section titled “Under the hood”- Language: C++17 (CMake). Links FFmpeg (
libavutil/libswscale),libuuid, and the Phrame plugin API. - Frame-safe reconfiguration.
phrame_mixer_connector.cppis the core framework: runtime config updates use a double buffer (desired_configvsactual_config) guarded by mutexes and an atomicneeds_updateflag, so configuration can change without dropping frames. - Runtime plugins. Transports are loaded at runtime via the common plugin
API (
libvdi.so,libplugin-mxl.so,libphramendi.so,libplugin-hls.so,libplugin-null.so, …) — see Frame bus & plugins. - Control transport.
MQTTClient.cpp(TLS/SSL);interface_factory.cpploads the.soplugins;phrame_stats_publisher.cpppublishes stats.
Environment: BUILD_TYPE (Release/Debug/RelWithDebInfo), LOG_LVL.
Part of the Phrame documentation system — one Markdown source, four audiences, a code-generated house-style diagram.
