Open Source — v1.9+ Stable Release

Stream Any Media.
Zero Complexity.

MediaMTX is a ready-to-use, zero-dependency media server and proxy that supports RTSP, RTMP, HLS, WebRTC, and SRT — all from a single binary. No configuration headaches, no external dependencies, just pure streaming performance.

Quick start: ./mediamtx — that's it.
RTSP
RTMP
HLS
WebRTC
SRT
mediamtx — terminal
# Download and run in seconds
$ wget mediamtx/latest/mediamtx_linux_amd64
$ chmod +x mediamtx_linux_amd64
$ ./mediamtx_linux_amd64
 
2024/12/15 10:23:01 INF RTSP server ready, tcp :8554
2024/12/15 10:23:01 INF RTMP server ready, tcp :1935
2024/12/15 10:23:01 INF HLS server ready, http :8888
2024/12/15 10:23:01 INF WebRTC server ready, http :8889
✓ All protocols running.
16k+ GitHub Stars
500k+ Monthly Downloads
300+ Contributors
MIT Licensed
Zero Dependencies

Single Binary Deployment

No runtime dependencies, no containers required. Download one file and execute it on any Linux, macOS, Windows, or ARM system.

~15MB
Binary Size
<20MB
RAM Usage

The Media Server That Gets Out of Your Way

MediaMTX (formerly known as rtsp-simple-server) is an open-source media server and media proxy written entirely in Go. It was designed from the ground up to be as simple as possible to deploy while remaining powerful enough for production workloads.

Unlike traditional media servers that require complex configuration files, external libraries, and dedicated infrastructure, MediaMTX ships as a single self-contained binary. You download it, run it, and within seconds you have a fully functional streaming server supporting five major streaming protocols simultaneously.

Whether you need to proxy IP camera feeds to web browsers, set up a low-latency WebRTC pipeline, restream RTMP sources to HLS for mobile delivery, or bridge SRT connections for professional broadcasting, MediaMTX handles the protocol translation automatically. You publish once and consume through any supported protocol.

  • Written in Go with zero CGo dependencies for maximum portability
  • Automatic protocol conversion between RTSP, RTMP, HLS, WebRTC, and SRT
  • Built-in WebRTC ICE servers and STUN support out of the box
  • Configurable via a single clean YAML file with sensible defaults

Five Protocols, One Server

MediaMTX natively supports the most widely used streaming protocols in the industry. Publish through one protocol and consume through another — automatic transcoding of the transport layer happens in real time.

RT

RTSP

The backbone protocol for IP cameras and surveillance systems. MediaMTX acts as both server and client for RTSP streams.

RM

RTMP

Widely used by OBS and other broadcasting software. Ingest RTMP feeds and redistribute them across all other protocols.

HL

HLS

HTTP Live Streaming for broad compatibility with browsers, iOS, Android, and smart TVs. Auto-generates segments and playlists.

W

WebRTC

Sub-second latency streaming directly in browsers. Built-in ICE/STUN support with optional TURN configuration for NAT traversal.

SR

SRT

Secure Reliable Transport for professional broadcast contribution links with built-in error correction and encryption.

Why Developers Choose MediaMTX

01

Zero-Config Startup

Run the binary with no arguments and all five protocol servers start instantly. Sensible defaults cover 90% of use cases without touching a config file.

02

Cross-Protocol Bridging

Publish an RTSP camera feed and instantly make it available via HLS, WebRTC, RTMP, and SRT. No manual pipeline configuration needed.

03

Minimal Resource Footprint

Uses under 20MB of RAM for typical workloads. Deploy on Raspberry Pi, cloud micro-instances, or embedded devices without breaking a sweat.

04

Production-Ready Reliability

Battle-tested across thousands of deployments worldwide. Automatic reconnection, stream health monitoring, and graceful error handling built in.

05

Extensible Architecture

Plugin system supports external RTSP sources, custom authentication via HTTP callbacks, and webhook notifications for stream lifecycle events.

mediamtx.yml — Minimal Configuration
# All settings are optional — defaults work out of the box rtspAddress: :8554 rtmpAddress: :1935 hlsAddress: :8888 webrtcAddress: :8889 srtAddress: :8890 # Path-level configuration example paths: cam_01: # Pull stream from an IP camera automatically source: rtsp://admin:pass@192.168.1.100/stream sourceProtocol: tcp sourceOnDemand: yes obs_stream: # Accept RTMP from OBS, serve via HLS + WebRTC source: publisher sourceProtocol: rtmp

Built for Real-World Streaming

Every feature in MediaMTX exists because a real deployment needed it. No bloat, no half-implemented features — each capability is production-proven and thoroughly documented.

Authentication, Encryption, and Access Control

MediaMTX supports per-path and global authentication for every protocol. RTSP can use both Basic and Digest auth. RTMP credentials are validated per publish or read request. WebRTC sessions are secured with ICE credentials. TLS/HTTPS is available for HLS and WebRTC endpoints, and SRT streams benefit from built-in AES encryption. For custom auth logic, HTTP callback hooks let you integrate with any identity provider or database.

Digest Auth TLS/SSL Per-Path Credentials HTTP Auth Callbacks

Powerful Media Proxying Capabilities

MediaMTX can pull streams from remote RTSP, RTMP, and SRT servers on demand or continuously. This makes it ideal for aggregating camera feeds from multiple locations into a single access point. The redirect mode sends clients directly to the source, reducing server load. Source protocol selection (UDP, TCP, UDP-multicast) gives you fine-grained control over how upstream connections are established, which is critical for navigating firewalls and unstable networks.

On-Demand Pull Redirect Mode Multi-Source Protocol Selection

Webhooks, Run-On-Demand, and Plugin Hooks

The webhook system notifies external services when streams are published, read, or terminated. Run-on-demand lets you launch FFmpeg or custom scripts only when a viewer connects, saving resources on idle streams. The external authentication HTTP API enables integration with OAuth, JWT, LDAP, or any custom auth backend. These hooks transform MediaMTX from a simple server into a programmable media orchestration layer.

Webhook Events Run-On-Demand External Auth API FFmpeg Integration

Optimized for Throughput and Low Latency

Written in Go with careful memory management, MediaMTX achieves exceptional throughput with minimal CPU usage. WebRTC latency sits below 500ms in typical deployments. The server uses non-blocking I/O throughout and can handle hundreds of concurrent streams on modest hardware. Memory allocation is pooled and reused, eliminating GC pressure even under sustained high-bitrate loads. This makes it suitable for everything from a single home camera to large-scale surveillance hubs.

Sub-500ms WebRTC Low CPU Usage Pooled Memory Non-Blocking I/O

Up and Running in Four Steps

MediaMTX eliminates the traditional complexity of media server setup. There is no installation wizard, no database to configure, and no service dependencies to manage. The entire workflow from download to streaming takes under a minute.

1

Download the Binary

Visit the GitHub releases page and download the pre-compiled binary for your platform — Linux, macOS, Windows, or ARM architectures are all available.

2

Make It Executable

A single chmod command on Linux/macOS or simply double-click on Windows. No installer, no system changes, no PATH modifications required.

3

Run It

Execute the binary. All five protocol servers start immediately on their default ports. Check the terminal output to confirm everything is listening.

4

Start Streaming

Publish a stream via RTSP, RTMP, or WebRTC. Consume it through any supported protocol. Cross-protocol delivery works automatically with zero extra configuration.

Where MediaMTX Shines

From home security to professional broadcasting, MediaMTX serves a wide range of streaming scenarios. Its flexibility makes it the go-to choice for developers and system integrators who need reliable media delivery without the overhead of enterprise-grade server stacks.

IP Camera Surveillance

Aggregate RTSP feeds from Hikvision, Dahua, Axis, and other IP cameras. Serve them via HLS for web dashboards and WebRTC for real-time monitoring with minimal latency. On-demand pulling means cameras are only contacted when a viewer connects.

Live Event Broadcasting

Ingest from OBS, vMix, or any RTMP encoder and redistribute to web viewers via HLS and WebRTC simultaneously. The SRT protocol support enables reliable contribution links from remote locations with built-in error correction.

AI and Computer Vision Pipelines

Feed camera streams into OpenCV, TensorFlow, or YOLO-based detection systems. MediaMTX can restream the processed output via any protocol, making it the ideal bridge between raw video sources and AI inference engines.

Digital Signage Networks

Deliver content to remote displays using HLS for compatibility or SRT for reliability over unpredictable networks. Centralized management through a single MediaMTX instance with per-path access control for different display groups.

Video Conferencing Bridges

Use WebRTC for sub-second latency participant feeds. Combine with RTSP recording endpoints or RTMP distribution to archive conferences or broadcast them to wider audiences on platforms like YouTube.

Industrial and IoT Monitoring

Monitor manufacturing lines, remote infrastructure, or agricultural sites with lightweight RTSP cameras. The minimal resource footprint allows deployment on edge devices like Raspberry Pi or industrial gateways.

What Sets MediaMTX Apart

MediaMTX occupies a unique position in the media server landscape. It is not trying to be a full-featured streaming platform — instead, it focuses on doing one thing exceptionally well: moving media between protocols with absolute reliability and minimal complexity.

Featherweight Binary

The entire server compiles to approximately 15MB. No JVM, no Node.js runtime, no shared libraries. Just one file that runs everywhere.

Instant Startup

Cold start to all five protocols listening takes under one second. There is no warm-up period, no cache to build, no database to migrate.

Single Config File

Everything is controlled through one mediamtx.yml file. No scattered properties, no environment variable soup, no XML monstrosities.

Automatic Protocol Translation

Publish once, consume through any protocol. The server handles the transport layer differences transparently without any manual routing rules.

Active Development

Regular releases with new features, bug fixes, and performance improvements. The project has a large and active contributor community driving it forward.

FFmpeg Pipeline Integration

Run-on-demand support launches FFmpeg commands automatically when viewers connect, enabling real-time transcoding, overlay generation, or format conversion.

MediaMTX vs. Alternative Media Servers

Understanding how MediaMTX compares to other popular media servers helps you make an informed decision. This comparison focuses on the capabilities that matter most for self-hosted and embedded streaming deployments.

Feature MediaMTX nginx-rtmp Ant Media Wowza
RTSP Server + Client
RTMP Support
HLS Output
WebRTC Support
SRT Support
Zero Dependencies
Single Binary
Open Source (Full)
RAM Usage (Idle) <20MB ~30MB ~500MB+ ~1GB+
Setup Complexity Trivial Moderate Complex Complex

How MediaMTX Processes Streams

The internal architecture follows a clean hub-and-spoke model. Every incoming stream becomes an internal representation that all output protocols can read from simultaneously. This design eliminates redundant decoding and ensures consistent behavior across all delivery methods.

RTSP Camera

Publisher / Source

OBS / vMix

RTMP Publisher

MediaMTX Core

Internal Stream Representation

HLS Viewers

Browsers / Mobile

WebRTC Peers

Low-Latency

When a stream is published to MediaMTX — whether via RTSP, RTMP, WebRTC, or SRT — the server creates an internal stream object. All other protocols can immediately read from this object. There is no transcoding of the actual video or audio data; only the transport and framing layers are translated. This means zero quality loss and minimal CPU overhead, as the media payload passes through essentially untouched.

Deep Dive: Enterprise-Grade Features

Beyond basic streaming, MediaMTX includes a suite of advanced features that make it suitable for demanding production environments. These capabilities are designed to be opt-in — they do not add complexity unless you need them.

On-Demand Stream Activation

Streams can be configured to activate only when a reader connects, rather than running continuously. For camera sources, this means the RTSP connection to the camera is established only when someone is actually watching. When the last viewer disconnects, the upstream connection is torn down automatically. This dramatically reduces bandwidth and load on camera infrastructure in deployments with hundreds of mostly-idle streams.

Run-On-Demand Command Execution

For scenarios requiring transcoding or processing, MediaMTX can launch a custom command (typically FFmpeg) when a reader connects. The command's output becomes the stream that readers receive. This enables real-time transcoding between codecs, resolution scaling, overlay watermarking, or any other FFmpeg-compatible transformation — all triggered automatically and cleaned up when no longer needed.

Webhook Event System

Every significant stream lifecycle event — publication, reader connection, reader disconnection, stream termination — triggers an HTTP POST to a configurable webhook URL. This enables real-time integration with monitoring systems like Prometheus or Datadog, notification services like Slack or PagerDuty, and custom dashboards that track viewer counts and stream health across your entire deployment.

External Authentication via HTTP API

Instead of hardcoding credentials in the YAML file, you can point authentication to an external HTTP endpoint. MediaMTX sends the user, password, action (publish/read), and path to your API, and your response determines access. This integrates seamlessly with OAuth providers, JWT validation, LDAP directories, database lookups, or any custom authentication logic your organization requires.

RTSP TCP/UDP/Multicast Transport Control

Each RTSP source can be configured to use TCP, UDP, or UDP-multicast transport independently. This is critical in environments where firewalls block UDP, where multicast is available on local networks for efficient multi-viewer delivery, or where TCP is needed for reliability over lossy networks. The flexibility to mix transport modes per-path is a feature rarely found in other servers.

Pros and Cons of MediaMTX

No tool is perfect for every situation. Here is an honest evaluation of MediaMTX's strengths and limitations to help you determine if it fits your specific requirements.

Strengths

  • Genuinely zero-config startup with sensible defaults that work for most deployments without any modification
  • Single binary with absolutely no runtime dependencies — deploy by copying one file
  • Automatic cross-protocol bridging between all five supported protocols without manual pipeline configuration
  • Extremely low resource consumption makes it viable on Raspberry Pi, cloud micro-instances, and embedded devices
  • Active open-source community with rapid bug fixes, regular releases, and extensive documentation
  • Flexible authentication system supporting static credentials and external HTTP-based auth providers
  • Production-proven reliability with thousands of deployments handling real traffic daily

Limitations

  • No built-in transcoding — you need FFmpeg integration for codec conversion, which adds complexity
  • MediaMTX includes built-in stream recording and playback capabilities. However, advanced DVR workflows and large-scale archive management may require additional storage and infrastructure planning.
  • No web-based management UI in the open-source version for visual stream monitoring or configuration
  • Not designed as a full-featured OTT platform — no DRM, no ad insertion, no subscriber management
  • Cluster scaling requires external load balancing — there is no built-in multi-node coordination
  • Limited analytics — for detailed viewer metrics you need to implement webhook-based custom monitoring

What Developers Say

"We replaced a three-server nginx-rtmp + Restreamer setup with a single MediaMTX binary. Our camera dashboard latency dropped from 8 seconds to under 500ms with WebRTC, and the deployment went from a day of configuration to literally two minutes."

MK
Marcus K.

Security Systems Integrator

"The webhook system is a game changer. We pipe stream events into our Grafana dashboard and get real-time visibility into which cameras are active, how many viewers each stream has, and when connections drop. All without touching the MediaMTX codebase."

SL
Sarah L.

DevOps Engineer, Smart Building Platform

"I run MediaMTX on a Raspberry Pi 4 handling 12 camera streams. CPU stays under 15% and RAM under 100MB. For our farm monitoring system, nothing else comes close in terms of efficiency. The on-demand pull feature means idle cameras use zero bandwidth."

JP
James P.

Agricultural IoT Developer

Frequently Asked Questions

Is MediaMTX really free for commercial use?
Yes. MediaMTX is released under the MIT license, which is one of the most permissive open-source licenses available. You can use it in commercial products, modify the source code, and distribute it without paying any fees or royalties. There are no license key requirements, no feature gates, and no user limits in the open-source version.
Can MediaMTX transcode video between H.264 and H.265?
MediaMTX itself does not perform transcoding. It passes through the encoded media as-is to avoid quality loss and CPU overhead. However, through the run-on-demand feature, you can integrate FFmpeg to handle transcoding. When a viewer connects, MediaMTX launches an FFmpeg process that decodes the source and re-encodes in the target format, feeding the output back into MediaMTX for delivery.
How many concurrent streams can MediaMTX handle?
The number of concurrent streams depends on your hardware, the bitrate of each stream, and the number of viewers per stream. On a modern cloud VPS with 4 CPU cores and 4GB RAM, users commonly report handling 50-100+ concurrent streams with multiple viewers each. Since MediaMTX does not transcode, the bottleneck is typically network bandwidth rather than CPU. The on-demand pull feature further extends capacity by only connecting to sources when actively viewed.
Does MediaMTX support HTTPS and secure WebRTC?
Yes. You can configure TLS certificates for the HTTP server, which secures both the HLS endpoints and the WebRTC signaling channel. For WebRTC media itself, DTLS encryption is always used regardless of TLS configuration. You can also specify external STUN and TURN servers for reliable NAT traversal in production WebRTC deployments. SRT streams have their own built-in AES encryption independent of TLS settings.
Can I run MediaMTX inside a Docker container?
Absolutely. While MediaMTX is designed to run as a standalone binary, official Docker images are available on Docker Hub. The container approach is useful when you want to integrate MediaMTX into a larger Docker Compose stack alongside FFmpeg, databases, or web applications. Keep in mind that the bare binary approach offers the absolute lowest resource usage if container overhead is a concern.
What happened to rtsp-simple-server?
MediaMTX is the successor to rtsp-simple-server. The project was renamed to reflect its expanded scope beyond just RTSP. All the RTSP functionality remains, but the new name better represents the multi-protocol nature of the server. Existing rtsp-simple-server configurations are fully compatible with MediaMTX — the YAML format and all path settings remain the same. You can simply swap the binary without changing your config file.
How does WebRTC latency compare to HLS in MediaMTX?
WebRTC through MediaMTX typically achieves sub-500ms end-to-end latency, making it suitable for interactive and real-time applications like remote monitoring, two-way communication, and live event viewing where delay is unacceptable. HLS, by design, introduces segment-based latency typically between 2-8 seconds depending on your segment duration settings. The choice depends on your use case — HLS for broad compatibility and CDN caching, WebRTC for absolute minimum delay.

The Streaming Landscape in 2024

Understanding the broader market helps contextualize why lightweight, protocol-flexible media servers like MediaMTX are gaining rapid adoption across industries.

The Rise of Edge Streaming

As IoT devices proliferate and edge computing matures, the demand for media servers that can run on constrained hardware has exploded. Traditional server stacks like Wowza or Red5 require significant resources that edge devices simply do not have. MediaMTX's sub-20MB RAM footprint positions it perfectly for this shift toward processing media at the network edge rather than in centralized data centers.

Protocol Fragmentation Is Real

The streaming industry has not converged on a single protocol — and likely never will. RTSP dominates surveillance, RTMP remains the standard for encoder ingestion, HLS is required for iOS compatibility, WebRTC is essential for low-latency browser delivery, and SRT is gaining ground in broadcast contribution. A server that bridges all five eliminates the need for complex multi-server architectures.

Open Source Winning Infrastructure

Organizations are increasingly choosing open-source media infrastructure over commercial alternatives, driven by cost, transparency, and avoiding vendor lock-in. The MIT license of MediaMTX provides maximum freedom, while the active GitHub community ensures the project evolves with industry needs. This mirrors the broader trend seen with tools like FFmpeg, GStreamer, and WebRTC itself.

Deployment Best Practices

These recommendations come from real-world production deployments and will help you get the most out of MediaMTX from day one.

01

Use TCP Transport for Remote Cameras

When pulling streams from cameras over the internet or through firewalls, always set sourceProtocol to tcp. UDP-based RTSP frequently fails through NAT devices and corporate firewalls, causing silent stream failures that are difficult to diagnose.

02

Enable On-Demand for Large Camera Counts

If you have more than 20 cameras, configure sourceOnDemand: yes on each path. This prevents MediaMTX from maintaining idle connections to all cameras simultaneously, reducing both server load and camera-side resource usage significantly.

03

Set Up Webhooks from Day One

Even if you do not need event-driven automation immediately, configure the webhook endpoint early. Log the events to a file or simple service. When you eventually need monitoring or alerting, the historical data will already be there.

04

Use Systemd for Production Reliability

Create a systemd service unit for MediaMTX on Linux. This handles automatic restarts on crashes, proper log management through journald, clean shutdown on system halt, and ensures MediaMTX starts automatically after reboots without manual intervention.

05

Configure HLS Segment Duration for Your Use Case

Default HLS segments work for most cases, but tuning hlsSegmentDuration to 1s reduces latency at the cost of more HTTP requests, while 6s segments reduce server load for CDN-backed delivery. Match the segment duration to your actual latency requirements.

06

Secure WebRTC with TURN for Public Deployments

STUN alone works for most local network scenarios, but public-facing WebRTC deployments almost always need a TURN server to handle symmetric NAT and restrictive corporate firewalls. Configure webrtcICEServers in your YAML with a TURN URI and credentials to prevent one-way audio or complete connection failures for viewers behind strict NATs.

Ready to Stream Without the Complexity?

Join thousands of developers who chose MediaMTX for its simplicity, reliability, and performance. Download the binary, run one command, and have a production-ready media server running in seconds — not hours.