Files
Media-Server-Setup/live
Brandyn / Techy 9bdf9f1947 WebRTC audio mirror: AAC cannot cross WebRTC, so transcode audio to Opus into <path>.webrtc
bin/mtx-on-ready.sh (runOnReady inside the mediamtx container) posts the is-live notice and, for sources whose
audio is not Opus, runs ffmpeg: video copy, audio -> Opus, published over MediaMTX's loopback RTSP to
<user>/<Title>.webrtc (record: no). dumpd accepts .webrtc publishes only from 127.0.0.1. The portal hides
mirror paths, plays the mirror over WHEP (HLS stays on the source), holds an AAC source for 15 s while its
mirror comes up, and corrects the viewer count. Verified headless with a mocked path list.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-01 13:58:15 -06:00
..

Vanguard Live — the live-stream portal

React + dockview page at https://live.<domain>/ (behind Authentik): every active stream opens as a dockable window; audio follows the focused window; per-window mute button and volume slider. Playback is WebRTC (WHEP) with HLS fallback, straight from MediaMTX via Caddy.

npm install
npm run build          # -> dist/ (static; Caddy serves it)
npm run dev            # local dev; VITE_MTX=http://<server> to proxy to a MediaMTX

Deploy: build here, scp -r live/dist debian@HOST:~/vanguard-stream/live/, Caddy picks it up (no restart).

Audio rules: all windows start muted; the focused window is unmuted at its slider volume. Clicking the speaker on an unfocused window pins its audio on (yellow border) until you click it again. "Mute all" silences everything until you focus a window; "Follow focus" clears pins.

Endpoints (proxied by Caddy, all behind the Authentik gate): /api/* → MediaMTX API 9997 · /webrtc/* → WebRTC/WHEP 8889 · /hls/* → HLS 8888.

Go Live (browser broadcast)

Toolbar → Go Live: closes all viewer windows, fetches the logged-in user's stream key from /me/stream-key (dumpd, identity from Authentik's header), opens Chrome's window picker (windows only, audio requested), and publishes over WebRTC/WHIP to <user>/HelmetCam-<date> at ≤12 Mbps, H.264, up to 1440p60. Recording, the "is live" post, the sweep and Jellyfin follow exactly as for an OBS stream. Window audio: Windows only, Chrome/Edge 141+ (windowAudio: "window"). Linux/Mac Chrome captures tab audio only → window without sound; use OBS there. Requires the Authentik username to equal the MediaMTX streamer name (configure.py keeps them in sync via /etc/vanguard/streamers.json).