MediaMTX
Single-binary media server for SRT, WebRTC, RTSP, RTMP, HLS, and MoQ, configured by one YAML file and a Control API.
A zero-dependency Go media router that publishes, reads, proxies, records, and plays back live streams across protocols. Every setting is in mediamtx.yml and hot-reloads; the same settings and all sessions are exposed through an HTTP Control API with an OpenAPI spec in the repo.
- I need to take an SRT or RTMP feed from a camera or OBS and hand it out as WebRTC and HLS from one box
- I want an agent to add camera paths, start recordings, and kick sessions over HTTP
- Control API is off by default and binds to localhost only; set api: yes and secure it before exposing
- No transcoding: MediaMTX routes and remuxes; use ffmpeg hooks if you need to change codecs
- Thin product surface by design; the value is the protocol matrix, not a UI
Last activity Sep 2, 2026. Fit: adaptable 3, operable 3.
Adaptable: what is yours to change
Make it yours
Config only2 things to edit
Everything is in mediamtx.yml: protocol addresses, auth, recording, playback, hooks, and per-path settings under pathDefaults and paths. Set api: yes to enable the Control API. Any key can also be overridden with an MTX_-prefixed environment variable. No code changes needed for normal use.
- Env vars
MTX_<PARAMNAME> (env override of any mediamtx.yml key, for example MTX_RTSPADDRESS)- Config files
mediamtx.yml- Prompt files
- none
- Accounts you need
- none
Source
- github.com/bluenviron/mediamtx
- MIT license
- Last commit Sep 2, 2026
- 20,007 stars
Operable: what an agent can drive
Interface
OfficialAPIpublished by the builderlocal
How an agent can drive an Operable Listing, in five levels: native (built for the agent as the primary interface), official (the Builder ships an agent interface), wrapped (a third party wraps the software's API), config (an agent can only drive it by editing files), gui (screen control only). An interface is official only when it is published by the same organization that ships the software. GUI-level Listings are allowed and sorted last.
Reach
Complete coverage. 10 of 10 jobs reachable through the stated interface.
| Job | Through the interface | Evidence |
|---|---|---|
| Publish streams to the server | Reachable | api/openapi.yaml: /v3/config/paths/add/{name}; publishers connect over any protocol |
| Read streams in another protocol | Reachable | README: automatic conversion; paths served on every enabled protocol |
| Serve several streams on separate paths | Reachable | api/openapi.yaml: /v3/config/paths/list, /v3/paths/list |
| Reload configuration without dropping clients | Reachable | api/openapi.yaml: /v3/config/global/patch, /v3/config/pathdefaults/patch |
| Record streams to disk | Reachable | path config record keys through /v3/config/paths/patch; /v3/recordings/list |
| Play back recordings | Reachable | mediamtx.yml playback server; api/playback.openapi.yaml |
| Authenticate users (internal, HTTP, JWT) | Reachable | authMethod, authInternalUsers, authHTTPAddress, authJWTJWKS keys settable through /v3/config/global/patch |
| Forward and proxy streams to other servers | Reachable | api/openapi.yaml: /v3/paths/forward/list; source key in path config |
| Kick sessions and inspect connections | Reachable | api/openapi.yaml: /v3/rtspsessions/kick/{id}, /v3/webrtcsessions/kick/{id}, /v3/srtconns/list |
| Run hooks on connect, publish, read | Reachable | runOnConnect, runOnInit, runOnReady keys in mediamtx.yml, patchable over the API |
Code stack
- Languages
- Go
- Frameworks
- none
- Package manager
- go modules
- Database
- none
- Hosting target
- LinuxWindowsmacOSDockerRaspberry Pi
- Built
- Human-written (recorded, never ranked)
Evidence and confidence
| Field | Where it was seen | Confidence |
|---|---|---|
| formFactor | README: single executable server, no dependency or interpreter | 90% |
| executionModel | no model at runtime | 99% |
| operability | api/openapi.yaml in the repo; Control API page at mediamtx.org published by the Builder | 95% |
| effort | mediamtx.yml at repo root lists every key; README: hot reload | 95% |
| editions | MIT LICENSE; releases and Docker Hub | 99% |
| active | GitHub pushedAt 2026-09-02; release v1.20.1 2026-08-18 | – |
| reach | 90% |
Open questions
- Confirm the MTX_ environment variable convention from the mediamtx.org configuration page; it was not fetched this pass (the mediamtx.yml comments only show MTX_CONN_* hook variables)
Sources
- mediamtx.org sourcing:video-streaming:curated
- github.com/bluenviron/mediamtx#control-api sourcing:video-streaming:curated
- github.com/bluenviron/mediamtx/blob/main/api/openapi.yaml analysis