Glitchless switching of videos from rtspsrc

Vladan Jovanovic vladan.jovanovic at gmail.com
Thu Sep 15 12:41:59 UTC 2022


Hi

I'm looking to perform glitchless on-the-fly switching of video
streams that are coming from RTSP servers through rtspsrc. Switching
works fine, but I always end up with 2sec video "freeze" that I
assumed was due to rtspsrc buffering, but it seems more and more to me
is caused by some clock/synchronization issues due to rtspsrc sources.

Below are links to a few pipeline graphs to demonstrate what I'm
trying to achieve:
- s1r.png: stream1 is running (playing).
- s1r_s2c.png: in preparing for switching videos, a second stream was
added to pipeline and playing (to fakesink).
- s1s_s2r.png: stream1 is disconnected from sink and stream2 is now
playing to waylandsink.

When I start the pipeline directly as in s1r_s2c.png from the start, I
get choppy playback on the first stream that is shown, so it seems to
indicate some clocking issue (but it seems that the video switch works
well then).

Any suggestions as to what could be the problem in either of the two approaches?

Best regards,
Vladan

- s1r.png: https://www.dropbox.com/s/iu0n4t7sxdsq2px/s1r.png?dl=0
- s1r_s2c.png: https://www.dropbox.com/s/vc1xu9cxghpwrks/s1r_s2c.png?dl=0
- s1s_s2r.png: https://www.dropbox.com/s/zwmk88zylnv9ym7/s1s_s2r.png?dl=0


More information about the gstreamer-devel mailing list