Hi,
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: *PIPELINE = """ rtspsrc location=rtsp://10.64.0.5:554/stream0 is-live=true latency=0 ! selector. rtspsrc location=rtsp://10.64.0.5:554/stream1 is-live=true latency=0 ! selector. 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") else: new_pad = self.selector.get_static_pad("sink_0") print("switching from %s to %s" % (active_pad.get_name(), new_pad.get_name())) self.selector.set_property("active-pad", new_pad)* -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi
the input-selector will switch in the middle of the compressed h265 stream. I'd recommend decoding each of the two streams individually and then feed tgem into a compositor element. there you can set the opacity of one of the two streams to 1 and the oter to 0. Something like rtspsrc location=rtsp://10.64.0.5:554/stream0 is-live=true latency=0 ! rtph265depay ! libde265dec ! mix. rtspsrc location=rtsp://10.64.0.5:554/stream1 is-live=true latency=0 ! rtph265depay ! libde265dec ! mix. compositor name=mix ! x265enc ! rtph265pay name=pay0 pt=96 On 21.12.19 09:46, nimaaghli wrote: > Hi, > 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: > > *PIPELINE = """ > rtspsrc location=rtsp://10.64.0.5:554/stream0 is-live=true latency=0 ! > selector. > rtspsrc location=rtsp://10.64.0.5:554/stream1 is-live=true latency=0 ! > selector. > 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") > else: > new_pad = self.selector.get_static_pad("sink_0") > > print("switching from %s to %s" % (active_pad.get_name(), > new_pad.get_name())) > > self.selector.set_property("active-pad", new_pad)* > > > > -- > Sent from: http://gstreamer-devel.966125.n4.nabble.com/ > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel > gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |