A controller system that drives a tiled booth display built from LG Display LD290EJS-FPN1 panels (1920x540) and keeps them in sync.
It crops a single virtual canvas into one region per display and streams all of them at once over low-latency UDP (H.264 Annex-B). It is made of three parts:
- Backend (Go,
controller/): thedisplay-controllerbinary. HTTP/WebSocket API,config.yaml, and it runs and supervises the media core. The Web GUI is embedded in it. - Media core (Rust,
core/): thebooth-corebinary. NDI input, canvas mixer, per-display H.264 encoding and UDP streaming. NDI goes through thendicrate of moip-engine, included as a git submodule (moip-engine/). - Frontend (Vue 3,
controller/frontend/): the Web GUI.
See docs/ for the architecture and protocol details:
- System architecture: docs/architecture.md
- Video streaming protocol: docs/streaming-protocol.md
- Development notes and environment setup: docs/development.md
- OS: Linux (Debian 12+, Ubuntu 22.04+, AlmaLinux / RHEL 9+, Fedora 39+, etc.)
- Go: 1.26 or later
- Rust: stable (cargo), with a C compiler (
gcc) - Node.js: 20 or later
- libx264 runtime library (
libx264-164on Debian/Ubuntu,x264-libsfrom RPM Fusion): the software encoder, used when VA-API is unavailable. booth-core loads it at run time and does not bundle it. - FFmpeg: 6.0 or later, only for video-file and rainbow input and the
vaapi-ffmpegcomparison encoder. Without it, test pattern, logo and NDI input and both regular encoders still work. - Intel VA-API driver for fast encoding at low CPU load:
intel-media-driver(iHD) on 5th-gen Broadwell and newer, or the legacyi965driver on 3rd/4th-gen Ivy Bridge / Haswell (the reference target is a Core i5-3470) - NDI runtime (
libndi.so.6) for NDI input: installed from the official NDI SDK for Linux withmake setup-ndi(see NDI runtime) - uv: Python package manager (only for the client simulator)
- To build the Android client:
- JDK 17 or later
- Android SDK (
platforms;android-34,build-tools;34.0.0) - Point to the SDK with
sdk.dir=...inandroid-client/local.propertiesor with theANDROID_HOMEenvironment variable
On a new machine, in this order (each step is explained in its own section below):
# 0. Clone with the moip-engine submodule (or, in an existing clone:
# git submodule update --init; make build also does this)
git clone --recurse-submodules https://github.com/TechnoTUT/booth-display.git
# 1. VA-API driver, libx264 and (optionally) FFmpeg
# → see "Encoders (VA-API and libx264) setup"
# 2. NDI runtime: downloads the official NDI SDK for Linux, shows its license,
# installs libndi.so.6 to /usr/local/lib and registers it with the dynamic linker (sudo)
make setup-ndi
# 3. Frontend dependencies (once, and after package-lock.json changes)
npm --prefix controller/frontend ci
# 4. Build and run
make build
./controller/bin/display-controller -config config.yamlThen open the Web GUI at http://<host>:8080/ (the port is server.http_port in config.yaml).
Optional, for development:
make run-simulator: client simulator, a stand-in for the displays (needsuv; its Python dependencies are installed automatically)make ndi-stamp-sender: NDI test sender for measuring NDI latency (see docs/development.md)
Python and a .venv are not needed to run the controller.
The media core encodes in hardware through VA-API on Intel integrated graphics (Intel HD / UHD Graphics), calling libva directly (no ffmpeg in between). This keeps CPU load and latency to a minimum and makes simultaneous real-time 30 fps output to several displays stable. On systems without VA-API it automatically falls back to CPU software encoding with libx264, also driven in-process. Only the libva runtime, the driver and the libx264 runtime are needed; building needs no headers for either.
# Enable the RPM Fusion / EPEL repositories (if not already enabled)
sudo dnf install -y epel-release
sudo dnf install -y --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-$(rpm -E %rhel).noarch.rpm
# Install the VA-API driver, diagnostic tools, libx264 and FFmpeg (FFmpeg is optional)
sudo dnf install -y libva-utils intel-media-driver x264-libs ffmpegsudo apt update
sudo apt install -y vainfo intel-media-va-driver-non-free libx264-164 ffmpeg # ffmpeg is optional
# (for the open-source driver, use intel-media-driver or intel-media-va-driver instead)The iHD driver does not support these GPUs. Install the legacy i965 driver instead and select it:
# AlmaLinux / RHEL / Fedora (RPM Fusion)
sudo dnf install -y libva-intel-driver
# Ubuntu / Debian
sudo apt install -y i965-va-driver
# Only needed when both drivers are installed
export LIBVA_DRIVER_NAME=i965vainfo should then list VAProfileH264ConstrainedBaseline : VAEntrypointEncSlice. The i965 driver prints a Not using hybrid_drv_video.so notice; it is harmless. If VA-API cannot start, the controller falls back to libx264, which keeps up with three 1920x540 outputs on a Core i5-2400S (about 1.5 cores).
Ivy Bridge (the i5-3470 target) has not been tested yet. VA-API with the i965 driver has run on Skylake and Sandy Bridge.
On a Sandy Bridge machine with VT-d enabled, VA-API encoding for three displays froze the whole machine within seconds, leaving nothing in the logs. Turn VT-d off in the BIOS, or keep it and exclude the GPU with the kernel parameter intel_iommu=igfx_off (not tested yet). sudo dmesg | grep 'VT-d active for gfx' prints nothing when the GPU is excluded.
# Check that a VA-API device is present (e.g. renderD128)
ls -l /dev/dri/renderD*
# Check for H.264 encode support (VAEntrypointEncSlice)
vainfo
# Optional: check that FFmpeg has the VA-API encoder (only for encoder: vaapi-ffmpeg)
ffmpeg -hide_banner -encoders | grep h264_vaapiAfter make build, the controller log shows which encoder runs, e.g. [encoder] VA-API: Intel i965 driver ... (EncSlice, derived image), and /api/status reports it as pipeline.encoder (vaapi, vaapi-ffmpeg or libx264). LIBVA_DRIVER_NAME=i965 or iHD forces a driver.
Note: The user running the controller needs access to
/dev/dri/renderD128. If needed, add the user to therender(orvideo) group withsudo usermod -aG render $USERand log in again.
The Makefile in the repository root builds the frontend (Vue 3), the media core (Rust) and the backend (Go) together. The frontend build output is embedded into the Go binary.
# Build frontend and backend
make build
# Run tests
make testThe build produces controller/bin/display-controller and, next to it, controller/bin/booth-core. Keep the two together: the controller looks for booth-core in its own directory, then on PATH (or pass -core /path/to/booth-core).
Individual targets for development:
make build-frontend # Build the frontend only
make build-core # Build the Rust media core only (initializes the submodule if needed)
make build-backend # Build the Go controller only
make dev-frontend # Start the frontend dev server (Vite)Run the binary with a config file:
# Start normally
./controller/bin/display-controller -config config.yaml
# Or start via make
make runThen open the dashboard in a browser:
- Web GUI dashboard:
http://localhost:8080
Containerfile builds one image with display-controller and booth-core, the VA-API drivers (iHD and i965), libx264 and FFmpeg. It runs as UID 10001 and keeps config.yaml on the /data volume: on the first start the entrypoint copies it from /etc/booth-display/config.yaml (the image's default, or a ConfigMap mounted there), and from then on the Web GUI saves its changes to /data/config.yaml. Video files go in /data/assets/. Arguments are passed on to display-controller (e.g. -auto-start).
git submodule update --init
podman build -t booth-display -f Containerfile .The NDI runtime is not in the image, because of the NDI SDK license. install-ndi-sdk.sh is: with NDI_LIB_DIR=/ndi it only copies libndi.so* there (no sudo, no ldconfig), and the image already sets NDI_RUNTIME_DIR_V6=/ndi.
Pushing a controller release tag controller-vX.Y.Z makes GitHub Actions (image.yml) push ghcr.io/technotut/booth-display:X.Y.Z, and :latest unless the version has a pre-release suffix. Pull requests that touch the image only build it.
deploy/k8s/ is a sample for the TechnoTUT cluster (kustomize, in the style of TechnoTUT/Infra's k8s/manifest):
- An init container fetches the NDI runtime from the official SDK on every start (
NDI_ACCEPT_LICENSE=yes: whoever deploys it accepts the NDI SDK license). Without WAN access the pod still starts, without NDI input. - Multus attaches the pod to the AV VLAN (
kube-public/vlan20-bridge) for NDI, andndi-config.v1.jsonpoints NDI at the Discovery Server. Video to the displays leaves through the pod network and is routed; the displays answer to the source address and port, so their control messages come back through conntrack. config.yaml(the seed; set the displays' IPs) and the data volume (NFS PVC). Replace/data/config.yamlon the PVC, or delete it, to apply a changed seed.vaapi-patch.yamlhands the node's Intel GPU to the pod (hostPath/dev/dri, privileged, the node'srendergroup ID, a node label). Remove it fromkustomization.yamlto encode with libx264 only.
kubectl kustomize deploy/k8s shows the result.
The app that receives and displays the video on the LG Display LD290EJS-FPN1 (Android 7.1 / 1920x540).
- Hardware H.264 decoding with MediaCodec, rendering directly to a SurfaceView
- Low-memory design for 1 GB RAM (no intermediate Bitmaps, which avoids OOM)
- Immersive full-screen mode and auto-start on boot (BOOT_COMPLETED)
Set up the Android SDK listed under Requirements first.
cd android-client
# Debug build (signed, so it can be installed on the device as is)
./gradlew assembleDebugOutput: android-client/app/build/outputs/apk/debug/app-debug.apk
# Install on the device
adb install -r app/build/outputs/apk/debug/app-debug.apkThe release build (
./gradlew assembleRelease) has no signing config, so it producesapp-release-unsigned.apk, which cannot be installed until you sign it.
The media core (booth-core) receives NDI through the NDI SDK library (libndi), loaded at runtime by moip-engine's ndi crate, so building needs no SDK. Install it once per machine from the official NDI SDK for Linux:
make setup-ndi # scripts/install-ndi-sdk.sh: downloads the SDK, shows its license, installs libndi.so.6 to /usr/local/lib (sudo)The script registers /usr/local/lib with the dynamic linker (/etc/ld.so.conf.d/ndi-sdk.conf) when it is not searched already, as on Fedora/RHEL. PREFIX=/opt/ndi make setup-ndi installs elsewhere. On further machines, NDI_ACCEPT_LICENSE=yes make setup-ndi skips the license prompt once you have accepted it.
The library is looked for in this order:
$NDI_RUNTIME_DIR_V6/libndi.so.6(the NDI SDK's environment variable)libndi.so.6/libndi.soon the system library path/usr/local/lib/libndi.so.6, then/usr/lib/libndi.so.6
Without it, everything except NDI input works, and the GUI shows why NDI is unavailable.
NDI finds senders over mDNS (UDP 5353). If a firewall blocks it, list sender addresses in the NDI configuration file (~/.ndi/ndi-config.v1.json, or the directory named by NDI_CONFIG_DIR):
{"ndi": {"networks": {"ips": "192.168.1.20,192.168.1.21"}}}Lets you check the stream without real hardware: it decodes the H.264 stream received over UDP and shows it in a web browser. Its Python dependencies are declared inside the script (inline script metadata), and uv run installs them into a cached environment on first run.
# Start the simulator for display-1 (UDP :8554), then open http://localhost:9001
make run-simulatorSets the server ports, the virtual canvas resolution, and each display's destination IP/port and crop position.
ip: "127.0.0.1"in the example below is for local testing with the simulator. For real hardware, change it to the actual IP address of each display (Android client).
server:
http_port: 8080
default_stream_port: 8554
ws_ping_interval_sec: 5
canvas:
width: 5760
height: 540
fps: 30
displays:
- id: "display-1"
name: "Display Left"
ip: "127.0.0.1"
port: 8554
width: 1920
height: 540
crop_x: 0
crop_y: 0
bezel_padding_right: 0
- id: "display-2"
name: "Display Center"
ip: "127.0.0.1"
port: 8555
width: 1920
height: 540
crop_x: 1920
crop_y: 0
bezel_padding_right: 0
- id: "display-3"
name: "Display Right"
ip: "127.0.0.1"
port: 8556
width: 1920
height: 540
crop_x: 3840
crop_y: 0
bezel_padding_right: 0
media:
default_mode: "testpattern" # "testpattern", "video", or "ndi"
video_file: ""
pipeline:
encoder: "auto" # "auto" (prefer VA-API, fall back automatically), "vaapi", "vaapi-ffmpeg" (VA-API through ffmpeg, for comparison) or "software"
vaapi_device: "/dev/dri/renderD128" # VA-API device node
send_rate_mbps: 0 # pacing of each display's packets in Mbps; 0 = default (80), -1 = off