Real Time Streaming Protocol (RTSP)

adventofcyber4

Real Time Streaming Protocol (RTSP) is a protocol designed to control streaming media servers. It allows clients to remotely control the playback of media files, as well as live media streams, over a network.

🐊️ Ports: 554 (TCP) or 8554 (TCP)

You can run your own server using mediamtx (9.7k ⭐):

$ docker run --rm -it --network=host aler9/rtsp-simple-server
$ docker run --rm -it -e RTSP_PROTOCOLS=tcp -p 8554:8554 -p 1935:1935 -p 8888:8888 aler9/rtsp-simple-server

You can view a live video and save it using :

$ sudo apt-get install -y ffmpeg
$ ffplay rtsp://localhost:8554/mystream # watch live
$ ffmpeg -i rtsp://localhost:8554/mystream output_file.mp4
<press q when you want to stop the capture>
$ vlc rtsp://localhost:8554/mystream