Skip to content

Technical Overview

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.

Structure

  • Directory.github/ ---> actions & workflows automations
  • Directoryapp/ -------> source files for xplexHQ server
  • Directoryconf/ ------> nginx configs for HTTP & RTMP
  • Directorydaemons/ ---> systemd service management units
  • Directorydistro/ ----> distribution specific package config
  • 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

Operations

  1. 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 .

  2. 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.

  3. Then we apply configurations for the HTTP & RTMP servers.

    The HTTP server reverse proxies the xplexHQ 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.

  4. Then we install xplexHQ as a simple Node.js app to manage the ingest URLs

    This is the reason for our Node.js dependency, and it needs a massive overhaul.

  5. Finally, we start the processes inside the container in sequence

    The Node.js server is started first, ready for nginx to proxy. Then the nginx process is started with daemon mode off.

Roadmap

  • ARM, RISC-V support
  • Unit & integration tests
  • xplexHQ improvements
  • Let’s Encrypt integration
  • 1-click vendor intergrations
  • Stretch goals:
    • RTMPS support
    • RTSP support
    • SRT support
    • HLS support
    • NDI support
  • …and more