Stars
Forks
Watchers
Developer links
MediaMTX
MediaMTX sits between cameras and viewers as a self-hosted live media server, taking in video and audio streams over one protocol and handing them back out over another, so one IP camera feed can end up playing in a browser, a phone app, and a recording archive simultaneously. Publish with FFmpeg, GStreamer, OBS Studio, a browser, or a Raspberry Pi camera over RTSP, RTMP, SRT, WebRTC, Media-over-QUIC, HLS, MPEG-TS, or RTP, and read it back on any other protocol without a transcoding pipeline. Run dozens of camera feeds side by side, each on its own path, and keep every path available even while its publisher is offline. Record everything to disk in fMP4 or MPEG-TS as it streams, then play recordings back later through the same server instead of shipping files around. Authenticate publishers and viewers with built-in users, an external HTTP check, or JWT, and use the control API plus Prometheus metrics to wire the server into the rest of your monitoring stack. Forward streams to other servers, proxy cameras behind NAT, and fire hook commands whenever a client connects, publishes, or disconnects, so a doorbell camera can trigger a snapshot or an alert as it starts streaming. Reload the configuration while clients stay connected, and tune everything from the same mediamtx.yml file or environment variables, with no database or runtime dependencies to babysit. Running on a dedicated VPS on RepoCloud with guaranteed CPU, RAM, and SSD, full root SSH access, and a browser serial console. MIT licensed.
Benefits
- One Server, Every Protocol
- Publish a camera over RTSP and serve the same feed as WebRTC to browsers and HLS to phones; MediaMTX converts between protocols automatically, so one process replaces a rack of gateways and transcoders.
- Recording And Playback Built In
- Streams are written to disk in fMP4 or MPEG-TS as they flow through, and the server plays recordings back on demand, turning the same box into a lightweight network video recorder.
- Cameras Behind NAT, Handled
- MediaMTX pulls feeds from cameras and encoders on other networks, proxies requests to other servers, and forwards your own streams onward, so remote sites publish to one public endpoint you control.
- Scriptable, Observable, Always On
- A control API, Prometheus metrics, and hook commands on connect, publish, and disconnect events make the server easy to automate, while hot configuration reloads keep live viewers connected during changes.
Features
- Eight Streaming Protocols
- RTSP, RTMP, SRT, WebRTC, HLS, Media-over-QUIC, MPEG-TS, and RTP are all served by one binary, with automatic conversion between publishing and reading protocols.
- Per-Path Stream Routing
- Every stream lives on its own path with separate settings for sources, recording, authentication, and overrides, letting one server carry many unrelated feeds at once.
- Flexible Access Control
- Publishers and readers authenticate with internal users, an external HTTP endpoint, or JWT tokens, and secure protocol variants such as RTSPS and RTMPS encrypt traffic in transit.
- Control API And Metrics
- An HTTP control API manages paths and clients at runtime, Prometheus-compatible metrics expose server health, and hooks run your commands on stream lifecycle events.
- Zero-Dependency Single Binary
- The server ships as one self-contained executable for Linux, Windows, and macOS with an official Docker image, configurable through a single YAML file or environment variables.