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
GObject.threads_init()
Gst.init(None)
pipelinelaunch = Gst.parse_launch("""input-selector name=i
rtspsrc location=rtsp://192.168.100.60/stream1 ! i.
rtspsrc location=rtsp://192.168.100.61/stream1 ! i.
i. ! rtph264depay ! h264parse ! flvmux name=mux streamable=true
! rtmpsink sync=false async=false location='rtmp://192.168.100.55/app""")
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
time.sleep(30)
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