Files
mediamtx/docs/3-publish/07-rtsp-clients.md
T
Alessandro RosandGitHub b5b63d02fc support reading and publishing with Media-over-QUIC (#5815)
Media-over-QUIC is a streaming protocol built upon cutting edge
protocols (QUIC, HTTP3) and browser APIs (WebTransport, WebCodecs).
It's slightly faster than WebRTC, has an advanced data recovery
mechanism (placed at the frame level and not at the packet level), it
supports additional codecs (FLAC) and is less complicated to route.
2026-06-02 23:04:24 +02:00

1.8 KiB

RTSP clients

supported codecs
video AV1, VP9, VP8, H265, H264, MPEG-4 Video (H263, Xvid), MPEG-1/2 Video, MJPEG
audio Opus, MPEG-4 Audio (AAC), MPEG-1/2 Audio (MP3), AC-3, G726, G722, G711 (PCMA, PCMU), LPCM
other KLV, MPEG-TS, any RTP-compatible codec

RTSP is a protocol that allows to publish and read streams. It supports several underlying transport protocols and encryption. In order to publish a stream to the server with the RTSP protocol, use this URL:

rtsp://localhost:8554/mystream

The resulting stream will be available on path /mystream.

Some clients that can publish with RTSP are FFmpeg, GStreamer, OBS Studio, Python and OpenCV.

Advanced RTSP features and settings are described in RTSP-specific features.

MPEG-TS inside RTSP

Some RTSP clients encode tracks with MPEG-TS before sending them to the server, causing the server to see a single "MPEG-TS" track, and preventing track conversion from a protocol to another.

It's possible to automatically demux these MPEG-TS-encoded streams, by toggling rtspDemuxMpegts:

pathDefaults:
  # Demux MPEG-TS over RTSP into elementary streams.
  # When enabled, RTSP publishers sending MP2T/90000 will be demultiplexed
  # and their elementary streams (H.264, H.265, AAC, etc.) exposed as native tracks.
  # This allows HLS, WebRTC, and other outputs to work transparently with MPEG-TS sources.
  rtspDemuxMpegts: true