Glitchless switching of videos from rtspsrc
Vladan Jovanovic
vladan.jovanovic at gmail.com
Mon Oct 10 09:16:13 UTC 2022
Still struggling with this topic, so let me rephrase the question.
Documentation and examples I've seen so far discuss gstreamer
pipelines in form of:
source -> filter -> sink
So typically a single source going to one or multiple sinks.
Are there any special considerations when one GstPipeline has separate
parallel paths that don't interact? So pipeline that contains:
source1 -> filter1 -> sink1
source2 -> filter2 -> sink2
I see in my tests that a pipeline with one path (source1 -> filter1 ->
sink1) works fine. But when I add second path (source2 -> filter2 ->
sink2), all elements in the second path switch state to PLAYING except
sink2 (which is fakesink in my case), for which graph diagram
continues to show "[-] -> [>]".
best regards,
Vladan
On Thu, Sep 15, 2022 at 3:41 PM Vladan Jovanovic
<vladan.jovanovic at gmail.com> wrote:
>
> 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