input-selector pixelation when changing active-pad on RTSP stream

nimaaghli aghli.nima at
Sat Dec 21 08:46:10 UTC 2019

I am trying to switch between 2 RTSP input sources and push it to another
rtsp stream as an output. When performing encoding-decoding things work well
but I found it unnecessary as it was using lots of processing. Hence, I am
trying to just switch between the payloads from the inputs but as soon as
active-pad is changed there is a pixelation in the screen for a second and
then the stream is good. 
I'm coding in python and this is my pipeline: 

rtspsrc location=rtsp://  is-live=true latency=0  !
rtspsrc location=rtsp://  is-live=true latency=0  !
input-selector name=selector ! rtph265depay  ! rtph265pay name=pay0 pt=96
I'm using GstRtspServer as my rtsp server. When playing the stream with
ffplay as soon as I trigger the active-pad change I see this error msg in
red in the console : "Could not find ref with POC 61"

Here is my call to change active pad: 
*    def on_switch(self):
        active_pad = self.selector.get_property("active-pad")
        if active_pad.get_name() == "sink_0":
            new_pad = self.selector.get_static_pad("sink_1")
            new_pad = self.selector.get_static_pad("sink_0")

        print("switching from %s to %s" % (active_pad.get_name(),

        self.selector.set_property("active-pad", new_pad)*

Sent from:

More information about the gstreamer-devel mailing list