Skip to content

Technical Overview

Objective Abstract

At its core, xplex is an rtmp-enabled nginx server that pushes identical copies of incoming RTMP streams to one or more pre-configured RTMP endpoints.

It also provides a simple web-based dashboard with REST API — called xplexHQ — to conveniently manage the ingest URLs.

Design Principles

Effective make it do what it’s supposed to do

Efficient do it with minimal teleological overhead

Elegant and with fluent grace of pieces falling in place

Extensible while leaving room for progressive enhancements

Repository Overview

  • Directory.github/ ---> actions & workflows automations
  • Directoryapp/ -------> source files for xplexHQ server
  • Directoryconf/ ------> nginx configs for HTTP & RTMP
  • Directorydocs/ ------> website with landing page & docs
  • .gitignore
  • Dockerfile -> containerization instructions
  • LICENSE ---> source is available under MPLv2.0
  • README.md
  • setup.sh ---> xplex manual setup script
  • xplex.sh ---> xplex container startup script

Operational Steps

  • There’s no official nginx-rtmp container; so first, we built one from scratch.
    • You can build it by explicitly mentioning the target as nginx instead of xplex as the default target; e.g. docker build --target nginx -t xplex/nginx .
  • Next up we implant the nginx-rtmp installation on a Node.js base image.
    • This is simpler than installing Node.js on the nginx-rtmp image.
    • We may want to move out or refactor Node.js dependency in future.
  • Then we apply configurations for the HTTP & RTMP servers.
    • The HTTP server reverse proxies the xplex server to run on port 8080 to port 80.
    • Reverse proxying is not functionally necessary for the setup to work (API or stream).
    • But accessing dashboard over port 80 the easiest way to validate nginx build success.
  • Then we install xplexHQ as a simple Node.js app to manage the ingest URLs
  • Finally, we start the processes inside the container in sequence
    • The Node.js server is started first & sent to background
    • Then the nginx process is started with daemon mode off

Future Roadmap

  • xplexHQ improvements
  • Let’s Encrypt integration
  • Unit & integration tests
  • x86, ARM, RISC-V support

Stretch Goals

  • RTMPS support
  • RTSP support
  • SRT support
  • HLS support
  • NDI support
  • …and more