Skip to main content

RTSP

FFmpeg Push​

RTSP protocol streaming supports both TCP and UDP modes.

Over TCP(Interleaved mode)​

ffmpeg -re -stream_loop -1  -i test.mp4 -c:v copy  -c:a copy  -rtsp_transport tcp -f rtsp "rtsp://127.0.0.1:5544/live/test?token=123"

Over UDP​

ffmpeg -re -stream_loop -1  -i test.mp4 -c:v copy  -c:a copy -f rtsp "rtsp://127.0.0.1:5544/live/test?token=123"
info

Reference:Transfer RTSP Stream

Play​

Play Streams over TCP​

ffplay -rtsp_transport tcp -i "rtsp://127.0.0.1:5544/live/test?token=123"

Play Streams over UDP​

ffplay -i "rtsp://127.0.0.1:5544/live/test?token=123"
info

Reference:Play RTSP Stream

Pull remote RTSP stream to XIU​

You can pull an RTSP stream from a remote camera to the xiu server and remux it into RTMP/HTTP-FLV/HLS, follow the following steps:

Configuration​

Make sure to enable the RTSP relay switch:

RTSP Configuration

To remux into RTMP/HTTP-FLV/HLS, add the relevant protocol configurations to the configuration file.

HTTP-API​

Use the HTTP-API to start and stop the pulling tasks:

HTTP-API