Configs2026年7月4日·1 分钟阅读

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.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
MediaMTX Overview
直接安装命令
npx -y tokrepo@latest install ce677b58-77c5-11f1-9bc6-00163e2b0d79 --target codex

先 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

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产