selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

MediaMTX logo

Self-host MediaMTX

v1.21.3

Zero-dependency live media router for RTSP, WebRTC, SRT

ReleaseOpen SourceMIT
Updated2 weeks ago
LanguageGo
Setup difficultyEasy
Stars
20 649
Ports
8554 (RTSP (TCP)), 1935 (RTMP (TCP)), 8888 (HLS (TCP/HTTP)), 8889 (WebRTC (TCP/HTTP signalling, WHIP/WHEP)), 8890 (SRT (UDP)), 8892 (Media-over-QUIC HTTP/2 and HTTP/3 (web client and WebTransport)), 8893 (native MoQ over QUIC (UDP)), 8189 (WebRTC ICE (UDP))
Docker
bluenviron/mediamtx
Install with Docker

What is MediaMTX?

MediaMTX alternatives

Should you self-host MediaMTX?

MediaMTX scores 79/100 on selfhost.directory (how scoring works) and ranks #2 of 119 in Media Server. It has 20 649 GitHub stars, +306 in the last 30 days.

It shipped 18 stable releases in the past year. The latest, v1.21.3, came out on 25 October 2026. New versions land roughly every 2 weeks.

Setup is easy: most people get it running in one sitting. An official Docker image is available. It is MIT-licensed and written mostly in Go.

Its closest alternative on selfhost.directory is Jellyfin (88/100, 59 149 stars). It scores higher overall, so compare the two before you pick. See MediaMTX vs Jellyfin side by side.

Features

  • Always-available streams
  • Authentication
  • Automatic protocol conversion
  • Hot reload of configuration
  • Lifecycle hooks
  • Multiple streams on separate paths
  • Multi-protocol live streaming
  • Performance profiling endpoint
  • Playback of recordings
  • Prometheus Metrics
  • Proxy to other servers
  • REST control API
  • Stream forwarding
  • Stream recording to disk
  • Zero-dependency single executable

MediaMTX README


MediaMTX is a ready-to-use and zero-dependency live media server and media proxy that allows to publish, read, proxy, record and playback real-time video and audio streams. It has been conceived as a "media router" that routes media streams from one end to the other, with a focus on efficiency and portability.

Features

How to install MediaMTX

Install MediaMTX with Docker

--network=host is required for the RTSP UDP transport and is not compatible with Windows, macOS and Kubernetes
Environment variables
MTX_RTSPTRANSPORTS, MTX_WEBRTCADDITIONALHOSTS
docker run --rm -it \
-e MTX_RTSPTRANSPORTS=tcp \
-e MTX_WEBRTCADDITIONALHOSTS=192.168.x.x \
-p 8554:8554 \
-p 1935:1935 \
-p 8888:8888 \
-p 8889:8889 \
-p 8892:8892 \
-p 8890:8890/udp \
-p 8189:8189/udp \
-p 8892:8892/udp \
-p 8893:8893/udp \
bluenviron/mediamtx:1

Recommended for production environments; variants with FFmpeg and/or Raspberry Pi camera support exist as image tags.

How to configure MediaMTX

  • logLevelinfoVerbosity of the program.

    values: error, warn, info, debug

  • logDestinations[stdout]Where log messages are sent.

    values: stdout, file, syslog

  • logStructuredfalseEmit logs in JSONL format when writing to stdout or a file.
  • logFilemediamtx.logFile that receives logs when the file destination is used.
  • dumpPacketsfalseDump packets to disk for debugging.

MediaMTX releases & version history

@ Every self-hosted release, weekly

One Monday email with the week's stable releases across the directory.

More in Media Server

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…