Skip to content

Latest commit

 

History

History
165 lines (125 loc) · 7.96 KB

File metadata and controls

165 lines (125 loc) · 7.96 KB

MediaMTX Connect

The web UI for MediaMTX.
Watch live streams, browse recordings, edit any config key — from your browser.

CI Release Docker MIT

MediaMTX Connect — live stream grid, recording browser, and config editor
🌍 Read this in 30 languages

🇺🇸 English • 🇪🇸 Español • 🇨🇳 中文 • 🇮🇹 Italiano • 🇩🇪 Deutsch • 🇷🇺 Русский • 🇫🇷 Français • 🇵🇹 Português • 🇯🇵 日本語 • 🇵🇱 Polski • 🇰🇷 한국어 • 🇹🇷 Türkçe • 🇳🇱 Nederlands • 🇨🇿 Čeština • 🇹🇼 繁體中文 • 🇧🇷 Português (BR) • 🇮🇩 Bahasa Indonesia • 🇷🇴 Română • 🇸🇪 Svenska • 🇩🇰 Dansk • 🇳🇴 Norsk • 🇫🇮 Suomi • 🇬🇷 Ελληνικά • 🇭🇺 Magyar • 🇺🇦 Українська • 🇻🇳 Tiếng Việt • 🇵🇭 Tagalog • 🇹🇭 ไทย • 🇮🇳 हिन्दी • 🇧🇩 বাংলা

What it is

MediaMTX is a great streaming server with no UI. Connect is the missing front end — one container that talks to the MediaMTX API and turns it into a camera wall, a recording archive, and a config editor.

It's a companion, not a replacement. Every screen maps to something MediaMTX already exposes: a path, an API endpoint, a runOn* hook, a protocol it serves natively. No video stored, no media proxied, no database.

Quick start

Multi-arch images (linux/amd64, linux/arm64) — Docker pulls the right one.

Already running MediaMTX? Add Connect beside it:

docker run -d \
  -p 3000:3000 \
  -e BACKEND_SERVER_MEDIAMTX_URL=http://<your-mediamtx-host> \
  -v /path/to/recordings:/recordings \
  -v mediamtx-connect-data:/data \
  bcanfield/mediamtx-connect:latest

Starting from scratch? The bundled compose runs both:

git clone https://github.com/bcanfield/mediamtx-connect.git
cd mediamtx-connect
docker compose up -d

Then open http://localhost:3000.

Important

Connect needs api: yes in your mediamtx.yml. The included config works as-is.

What you get

Live view

Every path MediaMTX knows, in a 2–4 column grid.

  • WebRTC or HLS, per card. AUTO falls back silently, LOW-LAT insists on WebRTC, COMPAT forces HLS — and each card reports the transport it actually got.
  • Snapshots while idle. A background job keeps a recent frame on every card, with its age on the pill.
  • Live telemetry. Codecs, viewer count, and uptime, straight from the path list.
  • Honest record state. Cards show whether a stream is effectively recording; a state Connect couldn't read says unknown, never off.
  • Publish URLs on the clipboard. RTSP, RTMP, and SRT, built from the server's own listen addresses.

Recordings

  • MP4s per stream, grouped by day, with auto-generated thumbnails.
  • An inline player that expands in place, seekable over HTTP range requests.
  • Downloads that stream, with live progress and cancel.
  • Press / to filter.

Configuration, without YAML

  • The whole server config — 65 typed, validated controls across Logging, API, Hooks, RTSP, RTMP, HLS, WebRTC, and SRT.
  • Path defaults and per-path overrides, on the scopes MediaMTX serves them from. Saving a wildcard-backed stream writes a sparse entry, so untouched keys keep tracking the defaults.
  • All 15 runOn* hooks, with a warning where saving restarts the path.
  • Sparse writes — only the keys you changed.

Ops

One process for API, SPA, and media · multi-arch · GET /health · structured logs · PWA · dark and light · 30 languages · no database.

Environment variables

These seed the first boot. Everything stays editable under Config.

Variable Default Purpose
BACKEND_SERVER_MEDIAMTX_URL http://mediamtx Where Connect reaches the MediaMTX API from inside its container
MEDIAMTX_API_PORT 9997 MediaMTX API port
MEDIAMTX_RECORDINGS_DIR ./recordings Host path mounted for recordings (compose only)
MEDIAMTX_SCREENSHOTS_DIR /screenshots Where thumbnails are stored

http://mediamtx only resolves on the bundled compose network — for a standalone docker run, point it at your host.

How it works

Browser ──HLS / WebRTC (WHEP)──────────────────────────┐
   │                                                   │
   │ oRPC (typed)                                      ▼
   ▼                                              ┌──────────┐
┌─────────────────────┐    MediaMTX HTTP API      │ MediaMTX │
│ mediamtx-connect    │ ────────────────────────▶ │  server  │
│ Hono API + React SPA│                           └──────────┘
└─────────────────────┘                                │
   │ reads                                             │ writes
   ▼                                                   ▼
recordings/ + screenshots/  ◀────────────────────  MP4 segments

Playback is browser-to-MediaMTX. Connect moves JSON, plus the recordings and thumbnails it reads off disk.

Docs

Features Every shipped capability, route, and procedure
Architecture How the pieces fit
Contributing Dev setup, scripts, PR process
Examples Raspberry Pi camera, fake streams for testing

Contributing

Issues and PRs welcome. pnpm install && pnpm dev gets you a full stack with fixtures — see CONTRIBUTING.md, and note that PR titles are conventional commits. We follow a Code of Conduct.

License

MIT