MediaMTX
Media streaming server · Free
A media server and realtime stream router: connects RTSP, RTMP, SRT, WebRTC, and HLS, with video and audio recording and reading.
What you can use for free
The open source component used locally or self-hosted for the stated workflow, within its license terms.
Paid features and costs
Your own server, external APIs, and compute; managed cloud hosting, support, and additional commercial features if selected.
Access and limitations
Code licensing and hosting costs are separate matters. Check the conditions for the specific version and edition.
Use cases
- Embed a live stream in a web app
- Publish a stream, read it through WebRTC or HLS, and check recovery after a disconnection
Example workflow
A possible workflow; this is not a report of hands-on testing.
Embed a live stream in a web app
Before you start
- A test video source and browser client.
- A test project and completion criteria for the task: Embed a live stream in a web app.
Steps
- Set up MediaMTX to test: A test video source and browser client.
- Publish a stream, read it through WebRTC or HLS, and check recovery after a disconnection.
- Integrate the checked version into your project; document its configuration, limitations, and recovery method.
Check your result
- Publishing and viewing authorization are separate; latency is measured on target devices.
- Check the result against a reference example; separately confirm the terms of any assets and external services used.
Choosing MediaMTX
Embed a live stream in a web app
Choose this when
- Embed a live stream in a web app
- Publish a stream, read it through WebRTC or HLS, and check recovery after a disconnection
Requirements
- Choose protocol/path, authentication, and recording format for your producer and reader.
Things to consider
- Costs and limits of free use: Your own server, external APIs, and computing resources; managed cloud hosting, support, and additional commercial features if selected.
- Terms of use: MIT
- Automatic protocol conversion does not guarantee compatibility with every codec and client: check the current codec matrix and playback method for the chosen pair.
Frequently asked questions
What can you use for free in MediaMTX?
The openly available portion, used locally or self-hosted for the stated use case within its license terms.
What additional costs might arise with MediaMTX?
Your own server, external APIs, and computing resources; managed cloud hosting, support, and additional commercial features if selected.
What terms of use matter for MediaMTX?
MIT
How do you get started with MediaMTX?
Set up MediaMTX to test: A test video source and browser client. Publish a stream, read it through WebRTC or HLS, and check recovery after a disconnection. Integrate the checked version into your project; document its configuration, limitations, and recovery method.
What does MediaMTX handle beyond live stream transmission?
One zero-dependency binary for Linux, Windows, and macOS can receive, read, proxy, record, and replay streams. Recordings are saved as fMP4 or MPEG-TS; features include multiple paths, hot reload without disconnecting clients, internal/HTTP/JWT authentication, Control API, Prometheus metrics, and hooks for publish/read/connect/disconnect events.
License
MIT
MIT — permissive license
You can use, modify, distribute, and sell the code, including in a closed-source commercial product. When sharing copies or substantial portions of the code, retain the license text and copyright notice. You do not need to open-source your entire project; the author provides no warranties.
License termsTechnologies and topics
- MediaMTX
- Media streaming server