Recording RTSP streams

Dylan Broome dylan at
Sun Feb 9 09:18:28 PST 2014


I am looking for some advice/help in correctly recording rtsp streams that
we provide from our web cams. I am able to view the rtsp stream and record
it but with some problems that im not sure exactly how to resolve.

First off, here is the pipeline that I am using :

matroskamux name=mux streamable=true ! filesink name=sink append=true
rtspsrc name=videosrc protocols=tcp ! queue name=videoqueue ! rtph264depay
name=depay ! h264parse name=decode ! mux. appsrc name=appsrc stream-type=0
format=3 is-live=true ! queue name=appqueue ! kateenc category=subtitles
name=kateenc ! mux.

The appsrc encodes a subtitle stream that we use to embed custom
information (text strings containing instrumentation readings). This works
and displays correctly in the resulting video as subtitles. Im wondering if
this could be encoded in custom meta data within the video stream but that
is not the problem here.

1) Firstly, when I play the recorded stream, say in VLC, I cannot seek
quickly to any position. Some video programs have trouble seeking at all.
Is this possible to modify the stream to do this?

2) I want to record a days worth of stream into the same file however the
system needs to sometimes reboot during the day. I'm guessing that just
setting append=true on the filesink is not enough. Is there a way to
seamlessly continue writing the new stream to the end of the old stream?

3) At a later time I want to extract a specific time period out of this
file and save it into a new file. Is there a way for timestamps to be
encoded with real world clock time and not just stream time? I'm terribly
unsure how this part works so advice/direction would be very useful.

Thank you very much for your time and advice.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gstreamer-devel mailing list