Architecture question: store, preview and browse a stream at the same time

Gregoire Gentil gregoire at gentil.com
Fri Dec 6 18:20:16 UTC 2019


Hello,

I would like to receive a RTSP stream, store it on file, preview it in 
real-time and being able to browse its past, everything in a single UI 
with a single progress bar.

So basically, if you push the progress bar to the far right, you get the 
real-time stream, if you are in the middle of the progress bar, you are 
watching the "history", aka. the past of the stream.

The best thing I managed to do is to have two pipelines and two windows:

- rtspsrc latency=250 ! rtph264depay ! tee name=d ! h264parse ! 
mpegtsmux ! filesink d. ! decodebin ! autovideosink
for storing and real-time preview

- playbin
for replay the past

Is there a better way to achieve my goal?

For instance, would it be possible to store the stream in one background 
pipeline and watch the stored stream, going to the very end of the 
stream to see it in real-time (with a maximum delay of 250ms)? I have 
managed to do that but with a delay of 2 or 3 seconds which is not 
acceptable in my case,

Grégoire


More information about the gstreamer-devel mailing list