**• Hardware Platform (Jetson / GPU) Jetson
**• DeepStream Version 6.0
**• JetPack Version (valid for Jetson only) 4.6.3
*• TensorRT Version * 8.2.1.32
• NVIDIA GPU Driver Version (valid for GPU only)
*• Issue Type( questions, new requirements, bugs) * question
**• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing) **
**• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description) GLib, Gst
Hello, I’m trying to create a pipeline which execute an object dectector, but I want to be able to deactivate it when I want and keep the streaming video working, but without the object detector.
My idea was to use a tee element to duplicate the streaming flow and then link each flow to a valve element that I activate and deactivate with an Observer Pattern class that I access through another thread and send both flows by udpsink to the same port, so I can see the result in the same window.
I’m creating the pipeline using Python, but the pipeline structure should be something like this.
gst-launch-1.0 -e
filesrc location=sample_720p.h264 ! h264parse ! nvv4l2decoder ! nvstreammux ! tee name=t \t. ! valve name=valve_1 drop=0 ! nvinfer ! nvvideoconvert! nvdsosd ! 'video/x-raw(memory:NVMM), format=I420' ! nvv4l2h264enc ! rtph264pay ! udpsink host=127.0.0.1 port=5000 \ t. ! valve name=valve_2 drop=1 ! 'video/x-raw(memory:NVMM), format=I420' ! nvv4l2h264enc ! rtph264pay ! udpsink host=127.0.0.1 port=5000
However, I keep getting the same error no matter what I try
Error: gst-stream-error-quark: Internal data stream error. (1): gstbaseparse.c(3611): gst_base_parse_loop (): /GstPipeline:pipeline0/GstH264Parse:h264-parser:
And I don’t know how to adress it. My code is based on deepstream_test1_rtsp_out.py (I’m working via SSH and remote Desktop) and that works fine for me, but I didn’t modify any part related to the h264parse element in my code.
Running it in debug mode 3, I get a lot of errors telling
v4l2 gstv4l2object.c:2388:gst_v4l2_object_add_interlace_mode:0x2d30bc0 Failed to determine interlace mode
v4l2 gstv4l2object.c:4476:gst_v4l2_object_probe_caps:<encoder_siam:src> Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Unknown error -1
and this one with red mark
GST_PADS gstpad.c:4226:gst_pad_peer_query:<nvv4l2-decoder:src> could not send sticky events
The part I added to the code is quite simple, I just create a tee element and asign each src to a Valve. One is connected to the same flow as the deepstream_test1_rtsp_out.py and the other is conected to a similar flow, but without the nvinfer and the nvosd elements.
Aside from creating the new elements and set their properties, the only code I add to modify the pipeline is the linking process:
source.link(h264parser)
h264parser.link(decoder)
sinkpad = streammux.get_request_pad("sink_0")
if not sinkpad:
sys.stderr.write(" Unable to get the sink pad of streammux \n")
srcpad = decoder.get_static_pad("src")
if not srcpad:
sys.stderr.write(" Unable to get source pad of decoder \n")
srcpad.link(sinkpad)
streammux.link(tee)
sink_pad = self.valve_object_detector.get_static_pad("sink")
tee_object_detector=tee.get_request_pad("src_0")
if not tee_object_detector :
sys.stderr.write("Unable to get tee_object request pads\n")
tee_object_detector.link(sink_pad)
tee_deact=tee.get_request_pad("src_1")
if not tee_deact :
sys.stderr.write("Unable to get tee_siam request pads\n")
sink_pad = self.valve_deactivate.get_static_pad("sink")
tee_deact.link(sink_pad)
self.valve_object_detector.link(pgie)
pgie.link(nvvidconv)
nvvidconv.link(nvosd)
nvosd.link(nvvidconv_postosd)
nvvidconv_postosd.link(caps)
caps.link(encoder)
encoder.link(rtppay)
rtppay.link(sink)
self.valve_deactivate.link(caps_deactivate)
caps_deactivate.link(encoder_deactivate)
encoder_deactivate.link(rtppay_deactivate)
rtppay_deactivate.link(sink_deactivate)
Can anyone assist me with this issue?
PD:
I also get this errors related to the RSTP server. They are not my main concern at the moment, I haven’t checked yet why that happens, but I anyone knows a solution, I would apreciate it.
rtspserver rtsp-server.c:929:gst_rtsp_server_create_socket:<GstRTSPServer@0x3241f70> failed to create socket
rtspserver rtsp-server.c:1342:gst_rtsp_server_attach:<GstRTSPServer@0x3241f70> failed to create watch: Error binding to address: Address already in use