Stream a Video Over RTSP Using Live555MediaServer

According to Wikipedia,

LIVE555 Streaming Media is a set of open source (LGPL) C++ libraries developed
by Live Networks, Inc. for multimedia streaming. The libraries support open
standards such as RTP/RTCP and RTSP for streaming, and can also manage video
RTP payload formats such as H.264, H.265, MPEG, VP8, and DV, and audio RTP
payload formats such as MPEG, AAC, AMR, AC-3 and Vorbis. It is used
internally by well-known software such as VLC and mplayer.

The software distribution also includes a complete RTSP server application,
RTSP clients and a RTSP proxy server. 

Live555 is the go to project for many developers when it comes to anything related to RTSP, be it a client or a server. It is written in C++, nice, clean and super stable code and on top of that you can extend it very easily. Apart from that, it comes with few of the tools that includes:

In this post I will be talking about, building live555 and using Live555 Media Server for streaming local video files over RTSP.

To build Live555:

Once this is done, you will find the binaries

To stream the video files over RTSP, we have to use live555MediaServer.

live555MediaServer supports following formats

Unfortunately this tool does not stream an .mp4 file. If you want to stream a video which is an mp4 file, you can convert it very easily from to .mkv or .webm using ffmpeg, the command is as follows.

ffmpeg -i <input-mp4-file-name>.mp4 -o <output-mkv-file-name>.mkv

or

ffmpeg -i <input-mp4-file-name>.mp4 -o <output-webm-file-name>.webm

Once you have converted the video file to the appropriate format that live555 can stream, you are good to go.

just go to the directory containing your video file and run

./live555MediaServer

To access this stream using your RTSP client in my case I use the VLC, link will be as follows (you will find these details in the live555MediaServer’s output also.)

rtsp://<your-ip>:8554/<filename>

for example your ip is 192.168.1.4 and the filename is video_file.mkv then your rtsp link will be

rtsp://192.168.1.4:8554/video_file.mkv

So; in conclusion, Live555MediaServer is a great tool if you want to stream your video files over RTSP.

sources: