Skip to content

Building an RTSP Server and Recording Streams with GStreamer

A guide to serving RTSP media and recording incoming streams with GStreamer components.

This English edition preserves the original commands, configuration fragments, and diagrams so the steps can be reproduced directly.

Commands and configuration

./test-launch " videotestsrc ! x264enc ! rtph264pay name=pay0 pt=96 "
./test-launch "videotestsrc ! tee name=t ! queue ! x264enc ! rtph264pay name=pay0 pt=96 t. ! queue ! mp4mux ! filesink location=recording.mp4"

./test-launch "videotestsrc !  x264enc ! tee name=t ! queue ! rtph264pay name=pay0 pt=96 t. ! queue ! mp4mux ! filesink location=recording.mp4"


./test-launch "videotestsrc ! x264enc ! tee name=t ! queue ! rtph264pay name=pay0 pt=96 t. ! queue ! mp4mux ! filesink location=recording.mp4 t. ! queue ! fakesink"

Notes

Use these examples as a starting point and adjust versions, device names, codecs, and network addresses for the target platform.