explaingit

bluenviron/mediamtx

📈 Trending18,798GoAudience · ops devopsComplexity · 3/5ActiveLicenseSetup · moderate

TLDR

A self-hosted media server that routes live video and audio streams between different protocols, RTSP, HLS, WebRTC, RTMP, and more, without configuration.

Mindmap

mindmap
  root((MediaMTX))
    What it does
      Routes live streams
      Protocol conversion
      Records to disk
      Proxies requests
    Input protocols
      RTSP
      WebRTC
      RTMP
      SRT
    Output protocols
      HLS
      WebRTC
      RTMP
      MPEG-TS
    Use cases
      IP camera systems
      Live events
      Home lab streaming
      YouTube re-streaming
    Tech stack
      Go
      Docker
      Prometheus metrics

Things people build with this

USE CASE 1

Set up a self-hosted live streaming server for IP cameras, drones, or home lab without a complex media platform.

USE CASE 2

Convert a camera's RTSP stream to HLS for web browsers and WebRTC for low-latency viewing simultaneously.

USE CASE 3

Record live streams to disk in fMP4 or MPEG-TS format and play them back on demand.

USE CASE 4

Re-stream a local camera feed to YouTube or other platforms using RTMP output.

Tech stack

GoDockerFFmpegGStreamer

Getting it running

Difficulty · moderate Time to first run · 30min

Requires Docker and FFmpeg/GStreamer dependencies; initial stream routing setup needs protocol endpoint configuration.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice and license text.

In plain English

MediaMTX is a ready-to-use media server and media proxy for routing live video and audio streams. Think of it as a traffic router for video: you send a stream in using one protocol and other viewers can receive it using a completely different protocol. For example, a camera might publish an RTSP stream, and MediaMTX can simultaneously serve that same stream as HLS to a web browser, WebRTC for low-latency viewing, and RTMP to re-stream to YouTube, all at once without any additional configuration. It supports publishing and reading streams via SRT, WebRTC, RTSP, RTMP, HLS, MPEG-TS, and RTP. Sources can include FFmpeg, GStreamer, OBS Studio, Raspberry Pi cameras, web browsers, and custom code in Python or Go. It also records streams to disk in fMP4 or MPEG-TS format, plays back recorded content, proxies requests to other servers, supports user authentication via internal credentials, HTTP, or JWT tokens, and exposes metrics in Prometheus format for monitoring. You would use MediaMTX if you need to set up a self-hosted live streaming server, for IP cameras, drones, live events, or a home lab, without needing a complex media platform. It ships as a single binary with no external dependencies, runs on Linux, Windows, and macOS, and can be deployed as a Docker container. It is written in Go.

Copy-paste prompts

Prompt 1
How do I set up MediaMTX to accept an RTSP stream from an IP camera and serve it as HLS to a web browser?
Prompt 2
Show me a MediaMTX config file that records all incoming streams to disk and enables user authentication.
Prompt 3
How do I deploy MediaMTX in Docker and expose it so external cameras can publish streams to it?
Prompt 4
Can MediaMTX proxy streams from multiple sources and re-stream them to YouTube using RTMP?
Prompt 5
How do I monitor MediaMTX performance using Prometheus metrics and set up alerts?
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.