qumo

command module
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 8, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

README ΒΆ

qumo

CI Go Report Card License

qumo is a high-performance Media over QUIC (MoQ) relay server with intelligent topology management, enabling distributed media streaming over the QUIC transport protocol.

Features

  • πŸš€ High-Performance Relay: Built on QUIC for low-latency media streaming
  • πŸ“‘ MoQT Protocol: Full Media over QUIC Transport support (moq-lite draft-03)
  • πŸ”— Peer-Based Topology: Relays connect to each other via ANNOUNCE_PLEASE for decentralized content discovery
  • πŸ“Š Observability: Prometheus metrics, health probes, and status APIs
  • πŸ”’ TLS Security: Built-in TLS 1.3 support for encrypted connections
  • 🐳 Docker-Support: Env-var zero-config; prebuilt multi-arch images on GHCR (ghcr.io/qumo-dev/qumo)

Installation

Option 1: Install via Go
go install github.com/qumo-dev/qumo@latest
Option 2: Download Binary

Download the latest binary from GitHub Releases:

# Linux/macOS
curl -L https://github.com/qumo-dev/qumo/releases/latest/download/qumo-linux-amd64 -o qumo
chmod +x qumo
export ADVERTISE_ADDR=localhost:4433
export INSECURE=true
./qumo relay

# Windows: download qumo-windows-amd64.exe from the releases page
Option 3: Docker

See docker/README.md for compose examples, GHCR usage, and deployment options.

Option 4: Build from Source
git clone https://github.com/qumo-dev/qumo.git
cd qumo
mage build        # builds bin/qumo with version info
# or: go build -o qumo .

Usage

qumo relay       # Start MoQ relay server (QUIC/MoQT, WebTransport, peer mesh)
qumo rtmp        # Start RTMP ingest server (bridges RTMP β†’ MoQT)
qumo rtsp        # Pull from an RTSP source (e.g. IP camera) and republish as MoQT
qumo rtsp-push   # Start the RTSP push ingest server (bridges RTSP β†’ MoQT)
qumo playground  # One-command local demo: in-process relay + embedded web UI on http://127.0.0.1:8080
qumo version     # Print build-time version info

For environment variables and configuration, see relay-config.example.env. For Docker-based deployment, see docker/README.md.

Architecture

System Overview
graph LR
    Publisher["Publisher<br/>(Browser/WebTransport)"]
    Hub["Hub Relay<br/>(qumo relay)"]
    EdgeA["Edge Relay A<br/>(qumo relay)"]
    EdgeB["Edge Relay B<br/>(qumo relay)"]
    Subscriber["Subscriber<br/>(Browser/WebTransport)"]

    Publisher -->|"QUIC/MoQ<br/>WebTransport"| EdgeA
    EdgeA <-->|"ANNOUNCE_PLEASE<br/>QUIC peer"| Hub
    Hub <-->|"ANNOUNCE_PLEASE<br/>QUIC peer"| EdgeB
    EdgeB -->|"QUIC/MoQ<br/>WebTransport"| Subscriber
Peer Discovery

On startup, each relay discovers peers through one or more PeerResolver implementations:

  1. Static peers (PEERS): dial each address directly and maintain the connection.
  2. Nomad native discovery (within-cluster): automatically discovers peers within the same Nomad cluster via the Nomad service API. Edges discover all local hubs; hubs discover nothing locally (no local hub↔hub connections).
  3. Remote resolver (cross-cluster, optional): queries an external traffic resolver API (e.g. qumo-enterprise) for cross-cluster hub discovery. Hubs discover remote hubs; edges never query the remote resolver.

Each connection dials QUIC with ALPN moqt, exchanges ANNOUNCE_PLEASE / ANNOUNCE, and registers the peer's tracks on the local TrackMux. On disconnect the connection is retried after 5 s.

graph TD
    Start["Relay Startup"]

    Start -->|"for each PEER"| ALPN
    Start -->|"Nomad API (within-cluster)"| Resolve["PeerResolver.ResolvePeers"]
    Start -->|"Remote resolver (cross-cluster)"| Resolve

    Resolve -->|"returned peer list"| ALPN

    ALPN["QUIC dial (ALPN: moqt)"] --> Announce["ANNOUNCE_PLEASE / ANNOUNCE"]
    Announce --> TrackMux["Register tracks on local TrackMux"]
    TrackMux --> Serve["Serve subscribers"]

    ALPN -->|"failed"| Retry["Wait 5s β†’ retry"]
    Serve -->|"disconnected"| Retry
    Retry --> ALPN

Development

Requirements
  • Go 1.26+ β€” Download or use your package manager
  • Deno (optional, for web demo) β€” Download β€” see playground/README.md for setup
  • Mage β€” Build automation tool
    go install github.com/magefile/mage@latest
    
    Then run mage help to see all available tasks.

For complete Mage documentation and all available targets, see magefiles/README.md.

Project Structure
qumo/
β”œβ”€β”€ docker/                     # Docker artifacts & docs
β”‚   β”œβ”€β”€ Dockerfile              # Multi-stage container build
β”‚   β”œβ”€β”€ docker-compose.yml               # Single relay (local build)
β”‚   β”œβ”€β”€ docker-compose.external.yml      # Single relay (GHCR prebuilt)
β”‚   β”œβ”€β”€ docker-compose.static.yml        # 3-region topology, static PEERS (no discovery)
β”‚   β”œβ”€β”€ docker-compose.nomad.yml         # Single-region Nomad cluster (LocalResolver)
β”‚   β”œβ”€β”€ nomad/                           # Nomad agent config + job spec
β”‚   └── README.md               # Docker usage guide
β”‚
β”œβ”€β”€ internal/                   # Core implementation
β”‚   β”œβ”€β”€ relay/                  # Relay server (handlers, peer resolvers, caching)
β”‚   β”œβ”€β”€ ingest/                 # RTMP & RTSP ingest, FLV parsing
β”‚   β”œβ”€β”€ rtmp/                   # RTMP utilities
β”‚   β”œβ”€β”€ rtsp/                   # RTSP protocol stack & RTP de-packetization
β”‚   β”œβ”€β”€ smoketest/              # Cross-region streaming smoke test harness
β”‚   └── version/                # Version info
β”‚
β”œβ”€β”€ magefiles/                  # Build automation (Mage tasks)
β”‚
β”œβ”€β”€ docs/                       # Design docs
β”œβ”€β”€ playground/                 # Web demo / relay test client (Deno + Solid)
β”œβ”€β”€ .github/workflows/          # CI/CD pipelines
β”œβ”€β”€ go.mod & go.sum             # Go dependencies
└── main.go                     # Entry point (CLI dispatch)
Build System (Mage)

See magefiles/README.md for the complete reference. Common targets:

mage build         # Build binary to bin/qumo
mage test          # Run tests
mage check         # Format, vet, and test
mage lint          # Run golangci-lint
mage docker:build  # Build Docker image
mage relay         # Run relay server locally
mage smoke         # Run cross-region streaming smoke test

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Directories ΒΆ

Path Synopsis
internal
cors
Package cors provides WebTransport origin validation (cross-site WebTransport forgery mitigation), shared by the relay and ingest servers.
Package cors provides WebTransport origin validation (cross-site WebTransport forgery mitigation), shared by the relay and ingest servers.
ffpub
Package ffpub drives ffmpeg as an RTMP publisher for integration tests.
Package ffpub drives ffmpeg as an RTMP publisher for integration tests.
ingest
Package ingest bridges media publish protocols (RTMP, SRT, WHIP, etc.) to MoQT.
Package ingest bridges media publish protocols (RTMP, SRT, WHIP, etc.) to MoQT.
integration
Package integration holds the reusable subscription-gate collector and evaluation logic for the OBS/ffmpeg interop tests (PRD #147, M5/M6).
Package integration holds the reusable subscription-gate collector and evaluation logic for the OBS/ffmpeg interop tests (PRD #147, M5/M6).
playground
Package playground powers the `qumo playground` subcommand: a self-contained local demo that starts the relay in-process, serves the embedded web UI, and exposes runtime configuration to the browser via a /config endpoint.
Package playground powers the `qumo playground` subcommand: a self-contained local demo that starts the relay in-process, serves the embedded web UI, and exposes runtime configuration to the browser via a /config endpoint.
relay
Package relay provides the MoQT relay server for content distribution.
Package relay provides the MoQT relay server for content distribution.
rtmp
Package rtmp implements the RTMP (Real-Time Messaging Protocol) v1.0 specification for live media ingest.
Package rtmp implements the RTMP (Real-Time Messaging Protocol) v1.0 specification for live media ingest.
smoketest command
version
Package version holds build-time version metadata injected via ldflags.
Package version holds build-time version metadata injected via ldflags.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL