Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU) Jetson
• DeepStream Version 7.0
• JetPack Version (valid for Jetson only) 6.0
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs)
• 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)
I am using a deepstream-imagedata-multistream sample application on rtsp cameras and I was getting the pixelated frame issue which was fixed by these two methods
def decodebin_child_added(child_proxy, Object, name, user_data):
print("Decodebin child added:", name, "\n")
if name.find("decodebin") != -1:
Object.connect("child-added", decodebin_child_added, user_data)
if "source" in name:
Object.set_property('latency',0)
Object.set_property("drop-on-latency", True)
Here I have set the latency to 0
Another way that I used was to replace the uridecodebin element with these ones
def on_pad_added(element, element_src_pad, data):
print("In cb_newpad\n")
caps = element_src_pad.get_current_caps()
str = caps.get_structure(0)
name = str.get_name()
depay_elem = data
media = str.get_string("media")
is_video = media == 'video'
if 'x-rtp' in name and is_video is True:
print('Start binding RTSP')
sinkpad = depay_elem.get_static_pad("sink")
state = element_src_pad.link(sinkpad)
if state != Gst.PadLinkReturn.OK:
print('Unable to link depay loader to rtsp src')
else:
print('Binding RTSP successfully')
else:
print('Cannot be bound,get_name=', name, ' , media=', media)
for idx, camera in enumerate(self.cameras_list):
logger.info(f"Creating source_bin {idx} \n")
uri_name = camera.camera_uri
if "rtsp://" in uri_name:
is_live = True
# source_bin = create_source_bin(uri_name, idx)
# if not source_bin:
# logger.error("Unable to create source bin \n")
# raise Exception("Unable to create source bin")
# self.pipeline.add(source_bin)
source = Gst.ElementFactory.make("rtspsrc", f"rtspsrc{idx}")
source.set_property("latency", 0) #
source.set_property("protocols", "tcp")
source.set_property("location", uri_name)
depay = Gst.ElementFactory.make("rtph264depay", f"depay{idx}")
source.connect('pad-added', on_pad_added, depay)
h264parser = Gst.ElementFactory.make("h264parse", f"h264parse{idx}")
decoder = Gst.ElementFactory.make("nvv4l2decoder", f"decoder{idx}")
self.pipeline.add(source)
self.pipeline.add(depay)
self.pipeline.add(h264parser)
self.pipeline.add(decoder)
source.link(depay)
depay.link(h264parser)
h264parser.link(decoder)
padname = "sink_%u" % idx
sinkpad = streammux.get_request_pad(padname)
if not sinkpad:
logger.error("Unable to create sink pad bin \n")
raise Exception("Unable to create sink pad bin")
srcpad = decoder.get_static_pad("src")
if not srcpad:
logger.error("Unable to create src pad bin \n")
raise Exception("Unable to create src pad bin")
srcpad.link(sinkpad)
If I set the latency value other than 0. I am getting pixelated frames in all cases.
As I am running the pipeline on 16 cameras with 0 latency, after sometime (5 to 10 mins), the FPS of camera starts dropping to 0 and at the end only 2 camera are working.