Unable to switch between streams using input-selector

Eg Gloor egglue at gmail.com
Wed Apr 13 11:53:51 UTC 2022

Hi all,

I'm trying to switch between two streams and publish it to a RTMP server
using input-selector as follows:

from gi.repository import Gst, GObject
import time


pipelinelaunch = Gst.parse_launch("""input-selector name=i
            rtspsrc location=rtsp:// ! i.
            rtspsrc location=rtsp:// ! i.
            i. ! rtph264depay ! h264parse ! flvmux name=mux streamable=true
! rtmpsink sync=false async=false location='rtmp://""")

selector = pipelinelaunch.get_by_name('i')
new_pad = selector.get_static_pad('sink_1')
selector.set_property('active_pad', new_pad)
print(new_pad) # prints None


new_pad is None and the RTMP endpoint shows no stream. Does anyone know
what might be wrong?

Thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20220413/1eda43e3/attachment.htm>

More information about the gstreamer-devel mailing list