Search code examples
gstreamerrtsp

Recording RTSP stream


I want to record video data coming from Camera(through RTSP H.264). Can anybody help me how to record rtsp stream using gstreamer?(Please provide gstreamer command line details). Recording will be in MPEG4 formate

Regards Kiran


Solution

  • This will stream the video and output to your screen.

    gst-launch rtspsrc location=rtsp://some.server/url ! decodebin ! xvimagesink gst-launch uridecodebin uri=rtsp://some.server/url ! xvimagesink

    To record the stream to your drive using MPEG4:

    gst-launch rtspsrc location=rtsp://some.server/url ! decodebin ! mpegtsmux ! filesink location=file

    rtspsrc from the reference manual and another useful resource.