Cette page est affichée en anglais. Une traduction française est en cours.
ConfigsJul 4, 2026·3 min de lecture

MediaMTX — Ready-to-Use SRT, WebRTC, and RTSP Media Server

A zero-dependency, ready-to-use real-time media server and proxy that supports RTSP, RTMP, HLS, WebRTC, SRT, and SDI protocols for live streaming and recording.

Prêt pour agents

Installation agent prête

Cet actif peut être installé après choix du runtime, vérification du plan et exécution de la commande adaptée.

Native · 98/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
MediaMTX Overview
Commande d'installation directe
npx -y tokrepo@latest install ce677b58-77c5-11f1-9bc6-00163e2b0d79 --target codex

À exécuter après confirmation du plan en dry-run.

Introduction

MediaMTX (formerly rtsp-simple-server) is a zero-dependency real-time media server written in Go. It acts as both a standalone server and a proxy, allowing you to publish, read, and relay live audio and video streams using multiple protocols from a single binary.

What MediaMTX Does

  • Accepts and serves streams via RTSP, RTMP, HLS, Low-Latency HLS, WebRTC, and SRT
  • Proxies and relays streams between different protocols automatically
  • Records live streams to disk in segmented or continuous formats
  • Runs external commands on stream events like connect, read, and publish
  • Provides a built-in API for runtime stream and path management

Architecture Overview

MediaMTX is a single Go binary with no external dependencies. It manages named paths, where each path can have one publisher and multiple readers across any supported protocol. Internal stream data flows through a shared in-memory pipeline that handles protocol translation, so an RTMP publisher can be read by WebRTC clients without transcoding.

Self-Hosting & Configuration

  • Deploy via Docker, a standalone binary, or package managers (Homebrew, APT)
  • Configure paths, authentication, and recording in a single YAML file
  • Set per-path credentials or integrate external authentication via HTTP hooks
  • Enable TLS for RTSP, HTTPS for HLS and WebRTC, and encryption for SRT
  • Use the REST API on port 9997 for dynamic path and session management

Key Features

  • Single binary, zero external dependencies, minimal resource footprint
  • Supports seven major streaming protocols with automatic cross-protocol bridging
  • Built-in stream recording with configurable segment duration and path templates
  • External command hooks for authentication, transcoding, and event-driven workflows
  • Hot-reloadable YAML configuration without restarting the server

Comparison with Similar Tools

  • Nginx-RTMP — requires compiling an Nginx module; limited to RTMP/HLS without WebRTC or SRT support
  • Janus Gateway — full WebRTC media server with plugin architecture; more complex to configure
  • LiveKit — focused on WebRTC rooms and real-time communication; heavier for simple relay scenarios
  • GStreamer — powerful multimedia framework but requires building custom pipelines for server use cases

FAQ

Q: Does MediaMTX transcode streams? A: No, it relays streams without transcoding. Use FFmpeg in an external command hook if transcoding is needed.

Q: Can I run multiple streams simultaneously? A: Yes, each named path operates independently and you can run hundreds of concurrent streams.

Q: Is authentication supported? A: Yes, via static credentials in YAML, external HTTP-based authentication hooks, or JWT-based auth.

Q: What is the latency for WebRTC playback? A: Sub-second latency is typical for WebRTC readers when the publisher uses RTSP or RTMP.

Sources

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires