INFRASTRUCTURE SHOWCASE
Custom SRT Streaming, with WebRTC Multi-view
This platform is a custom-built, peer-to-peer streaming environment designed to solve the delay issues, feed drops, and the overall finicky hassle of loading RTMP streams into OBS. By bypassing traditional RTMP protocols and utilizing a direct SRT to WebRTC pipeline, this platform delivers 1080p video feeds from 4 simultaneous broadcasters with sub-second latency. It serves as a real-time "green room" for live commentators to view gameplay instantly and restream to public platforms.
The entire infrastructure is defined as code. MediaMTX and Nginx run in isolated, highly optimized containers, allowing the server to be wiped and rebuilt from a GitLab repository in seconds.
Broadcasters connect to the server using SRT (Secure Reliable Transport) via OBS. This ensures maximum packet delivery and high-quality H264 video ingest with minimal overhead.
A custom backend script utilizes FFmpeg to intercept the SRT feeds, bypass the video to save CPU cycles, and seamlessly transcode standard AAC audio into the WebRTC-required Opus format on the fly.
Nginx routes WebSocket traffic, handles API cross-origin requests, and protects the live feeds with HTTP Basic Authentication. However the web pages utilize HTTPS so we have that sweet, sweet padlock.
The client-side UI is built with lightweight, vanilla JavaScript to maximize browser performance. Instead of brute-forcing video connections, the frontend dynamically queries the MediaMTX internal API.
This low latency streaming environment stands on the shoulders of giants. A massive thank you to the developers and maintainers of the incredibly powerful open-source tools and protocols that make this possible: