I have been trying to display a video-stream that I get from IP camera. So, I am having some problems with connecting source to a pipeline. Here is the part of the code:
print("Creating source n")
source = Gst.ElementFactory.make('rtspsrc', 'rtspt-source')
if not source:
sys.stderr.write("Unable to create source n")
print("Creating depay n")
depay = Gst.ElementFactory.make('rtph264depay', 'depay')
if not depay:
sys.stderr.write("Unable to create depay n")
e to create converter n")
source.set_property('latency', 0)
source.set_property('location', uri_name)
def on_pad_added(source, pad, depay):
print("Linking source and depayloader n")
sink_pad = depay.get_static_pad('sink')
if not sink_pad.is_linked():
pad.link(sink_pad)
rint("Source has been succefully linked to depayloadern")
source.connect('pad-added', on_pad_added, depay)
And I am getting this error:
Error: gst-stream-error-quark: Internal data stream error. (1): ../gst/rtsp/gstrtspsrc.c(6252):
gst_rtspsrc_loop (): /GstPipeline:pipeline0/GstRTSPSrc:rtspt-source:
streaming stopped, reason not-linked (-1)
Obviosly, I can’t just link source to depay, so I don’t really know how I should resolve this.
New contributor
Wh Hll is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.