RTSP¶
media.play.rtsp
Transport¶
RTSP 1.0 and interleaved RTP/RTCP on one TCP connection. UDP transport is unsupported: a UDP SETUP returns 461.
Supported codecs¶
Video
- H.264
- HEVC
- AV1
Audio
- AAC
- Opus
- PCMA
- PCMU
The list describes Sapsan RTP packetization; decoding support depends on the client. Correct delivery requires codec parameters and a compatible RTP payload format.
Sapsan acts as an RTSP server, delivering compatible tracks to NVRs, analytics systems and other media servers. RTSP availability depends on the stream codecs and RTP packetization.
AAC uses MPEG4-GENERIC with AU headers; AV1 uses RTP fragmentation and a sequence header. SDP declarations exist for MP4A-LATM and MPEG Audio (MPA, MP2/MP3), but the current output path does not provide their complete corresponding RTP packetization; they are excluded from the list above. Convert audio to AAC or Opus when needed. A codec name in SDP alone does not guarantee compatibility.
Configuration¶
Enable the RTSP listener through central in the streamer config:
listeners:
rtsp:
- port: 554
Playback¶
ffplay rtsp://server:554/cam1
What the server supports:
- OPTIONS, DESCRIBE, SETUP, PLAY, TEARDOWN methods;
- RTP/AVP/TCP (interleaved) transport — works over a single TCP port, firewall-friendly;
- an RTCP Sender Report before the first RTP packet of each track — the client gets absolute time anchoring right away;
- H.264, HEVC and AV1 video; AAC audio (RFC 3640);
- original stream timestamps are preserved.
The URL path is the exact stream name: rtsp://server:554/group/cam1 selects group/cam1. For protected playback, append ?token=<token>: the request uses the shared playback authorization mechanism. Access without a token depends on authorization settings. Supply the token in the URL; an HTTP Bearer header does not replace it in RTSP.
For each track the client sends SETUP with RTP/AVP/TCP;unicast;interleaved=0-1 (use another channel pair for the next track). PLAY then starts live playback. PAUSE and GET_PARAMETER keepalive are also supported. Numeric NPT does not select the archive: use the separate RTSP DVR mode.