MCPcopy
hub / github.com/bluenviron/mediamtx

github.com/bluenviron/mediamtx @v1.19.2 sqlite

repository ↗ · DeepWiki ↗ · release v1.19.2 ↗
2,601 symbols 11,713 edges 404 files 783 documented · 30%
README

MediaMTX [![Website](https://img.shields.io/badge/website-mediamtx.org-1c94b5)](https://mediamtx.org) [![Test](https://github.com/bluenviron/mediamtx/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/bluenviron/mediamtx/actions/workflows/test.yml?query=branch%3Amain) [![Lint](https://github.com/bluenviron/mediamtx/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/bluenviron/mediamtx/actions/workflows/lint.yml?query=branch%3Amain) [![CodeCov](https://codecov.io/gh/bluenviron/mediamtx/branch/main/graph/badge.svg)](https://app.codecov.io/gh/bluenviron/mediamtx/tree/main) [![Release](https://img.shields.io/github/v/release/bluenviron/mediamtx)](https://github.com/bluenviron/mediamtx/releases) [![Docker Hub](https://img.shields.io/badge/docker-bluenviron/mediamtx-blue)](https://hub.docker.com/r/bluenviron/mediamtx)

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.

Install Documentation

Features

  • Publish live streams to the server with Media-over-QUIC, SRT, WebRTC, RTSP, RTMP, HLS, MPEG-TS, RTP, using FFmpeg, GStreamer, OBS Studio, Python , Golang, Unity, web browsers, Raspberry Pi Cameras and more.
  • Read live streams from the server with Media-over-QUIC, SRT, WebRTC, RTSP, RTMP, HLS, using FFmpeg, GStreamer, VLC, OBS Studio, Python , Golang, Unity, web browsers and more.
  • Streams are automatically converted from a protocol to another
  • Serve several streams at once in separate paths
  • Reload the configuration without disconnecting existing clients (hot reloading)
  • Serve always-available streams even when the publisher is offline
  • Record streams to disk in fMP4 or MPEG-TS format
  • Playback recorded streams
  • Authenticate users with internal, HTTP or JWT authentication
  • Forward streams to other servers
  • Proxy requests to other servers
  • Control the server through the Control API
  • Extract metrics from the server in a Prometheus-compatible format
  • Monitor performance to investigate CPU and RAM consumption
  • Run hooks (external commands) when clients connect, disconnect, read or publish streams
  • Compatible with Linux, Windows and macOS, does not require any dependency or interpreter, it's a single executable
  • ...and many others.

Extension points exported contracts — how you extend this code

Publisher (Interface)
Publisher is an entity that can publish a stream. [44 implementers]
internal/defs/publisher.go
Writer (Interface)
Writer is an object that provides a log method. [48 implementers]
internal/logger/writer.go
Message (Interface)
Message is a control message. [6 implementers]
internal/protocols/moq/controlmessage/message.go
Unmarshaler (Interface)
Unmarshaler can be implemented to override the unmarshaling process. [2 implementers]
internal/conf/env/env.go
OnExitFunc (FuncType)
OnExitFunc is the prototype of onExit.
internal/externalcmd/cmd.go
Payload (Interface)
Payload is a codec-dependent payload.
internal/unit/payload.go
OnDataFunc (FuncType)
OnDataFunc is the callback passed to OnData().
internal/stream/reader.go
APISRTServer (Interface)
APISRTServer contains methods used by the API and Metrics server. [7 implementers]
internal/defs/api_srt.go

Core symbols most depended-on inside this repo

Equal
called by 875
internal/conf/path.go
Close
called by 337
internal/defs/reader.go
metric
called by 288
internal/metrics/metrics.go
Add
called by 192
internal/errordumper/dumper.go
Log
called by 150
internal/logger/writer.go
Run
called by 146
internal/staticsources/handler.go
String
called by 142
internal/conf/ip_network.go
WriteUnit
called by 128
internal/stream/sub_stream.go

Shape

Method 1,389
Function 672
Struct 349
TypeAlias 103
Interface 74
Class 10
FuncType 4

Languages

Go95%
TypeScript5%

Modules by API surface

internal/metrics/metrics_test.go68 symbols
internal/core/path.go60 symbols
internal/servers/moq/reader.js42 symbols
internal/stream/rtp_encoder.go40 symbols
internal/servers/rtsp/server.go40 symbols
internal/servers/webrtc/server.go39 symbols
internal/servers/moq/publisher.js38 symbols
internal/stream/rtp_decoder.go35 symbols
internal/servers/hls/server.go35 symbols
internal/core/path_manager.go35 symbols
internal/protocols/webrtc/peer_connection.go33 symbols
internal/servers/webrtc/reader.js29 symbols

Dependencies from manifests, versioned

aead.dev/minisignv0.2.0 · 1×
code.cloudfoundry.org/bytefmtv0.78.0 · 1×
dario.cat/mergov1.0.0 · 1×
github.com/Masterminds/semver/v3v3.5.0 · 1×
github.com/MicahParks/jwksetv0.11.0 · 1×
github.com/MicahParks/keyfunc/v3v3.8.0 · 1×
github.com/Microsoft/go-winiov0.6.2 · 1×
github.com/ProtonMail/go-cryptov1.1.6 · 1×
github.com/abema/go-mp4v1.7.1 · 1×
github.com/asticode/go-astikitv0.30.0 · 1×
github.com/asticode/go-astitsv1.15.0 · 1×

For agents

$ claude mcp add mediamtx \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact