A lightweight RTSP server and pusher library written in C++11.
This repository is maintained by the ZoneMinder project and is the RTSP server used by ZoneMinder's zms/monitor streaming. It originated as a fork of PHZ76/RtspServer; the original project has been inactive since 2023, so this repository is now developed independently. Many thanks to PHZ76 for the original implementation.
- Linux, Windows, and macOS platforms
- Video: H.264, H.265, VP8, AV1 (including a passthrough mode for pre-formed RTP payloads)
- Audio: AAC, G.711 A-law, G.711 µ-law
- Simultaneous audio and video in one session
- Unicast (RTP over UDP, RTP over RTSP/TCP interleaved) and multicast
- RTSP push/publish over TCP
- Digest authentication
- Connection keep-alive/heartbeat detection (unicast)
sprop-parameter-setsin H.264/H.265 SDP for faster stream start-up
- A C++11 compiler (gcc 4.8+/clang or Visual Studio 2015+)
- CMake 3.10 or later
- rtsp_server.cpp — serve a live stream
- rtsp_h264_file.cpp — serve an H.264 elementary stream from a file
- rtsp_pusher.cpp — push a stream to another RTSP server
- How do I stream a media file (mp4, mkv, ...)? This library does not parse container formats. Use FFmpeg (or similar) to demux/read frames and feed them to a
MediaSession.rtsp_h264_file.cppshows the pattern for a raw H.264 stream. - The RTSP client connects but receives no data. Capture the session with Wireshark and inspect the RTP packets; also double-check byte order (endianness) when packing frames on unusual platforms.
- PHZ76, author of the original RtspServer
- MD5 implementation from websocketpp
- All contributors
Please open an issue in this repository. For ZoneMinder-specific questions, use the ZoneMinder forums or the main ZoneMinder repository.