Error in adding RTSP with audio to nvurisrcbin

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) GPU
• DeepStream Version 6.3
• NVIDIA GPU Driver Version (valid for GPU only) 535
• Issue Type( questions, new requirements, bugs) question

I am facing an issue in adding RTSP source via nvurisrcbin. From the logs I can see some audio pads are being added. If I ignore them will it work?

newpad and child pad codes are as follows

    def cb_newpad(self, decodebin, pad, data):
        logger.info("In cb_newpad")
        caps = pad.get_current_caps()
        if not caps:
            caps = pad.query_caps()
        gststruct = caps.get_structure(0)
        gstname = gststruct.get_name()
        source_bin = data
        features = caps.get_features(0)
        logger.info(f"gstname=  {gstname}")
        if (gstname.find("video") != -1):
            logger.info(f"features=  {features}")
            if features.contains("memory:NVMM"):
                bin_ghost_pad = source_bin.get_static_pad("src")
                if not bin_ghost_pad.set_target(pad):
                    logger.error("Failed to link decoder src pad to source bin ghost pad")
            else:
                logger.error(" Error: Decodebin did not pick nvidia decoder plugin.")
        else:
            logger.error(f"features=  {features}")

    def decodebin_child_added(self, child_proxy, Object, name, user_data, ):
        logger.info(f"Decodebin child added: {name}")
        stream_obj = user_data
        if name == 'src':
            if stream_obj.username:
                Object.set_property('user-id', stream_obj.username)
            if stream_obj.password:
                Object.set_property('user-pw', stream_obj.password)

        if (name.find("decodebin") != -1):
            Object.connect("child-added", self.decodebin_child_added, stream_obj)
        if (name.find("nvv4l2decoder") != -1):
            if (is_aarch64()):
                Object.set_property("enable-max-performance", True)
                Object.set_property("drop-frame-interval", 0)
                Object.set_property("num-extra-surfaces", 0)
            else:
                Object.set_property("gpu_id", self.gpu_id)
        if "source" in name:
            source_element = child_proxy.get_by_name("source")
            if source_element.find_property("drop-on-latency") != None:
                Object.set_property("drop-on-latency", True)

following is the logs from the application:

2024-08-12 06:19:59,115 - INFO deepstream deepstream.py - decodebin_child_added - Decodebin child added: src
2024-08-12 06:19:59,115 - INFO deepstream deepstream.py - add_sourcebin - state change in adding 0 : <enum GST_STATE_CHANGE_SUCCESS of type Gst.StateChangeReturn>
2024-08-12 06:19:59,735 - INFO deepstream deepstream.py - decodebin_child_added - Decodebin child added: depay
2024-08-12 06:19:59,735 - INFO deepstream deepstream.py - decodebin_child_added - Decodebin child added: parser
2024-08-12 06:19:59,756 - INFO deepstream deepstream.py - decodebin_child_added - Decodebin child added: tee_rtsp_pre_decode
2024-08-12 06:19:59,756 - INFO deepstream deepstream.py - decodebin_child_added - Decodebin child added: dec_que
2024-08-12 06:19:59,756 - INFO deepstream deepstream.py - decodebin_child_added - Decodebin child added: tee_rtsp_post_decode
2024-08-12 06:19:59,756 - INFO deepstream deepstream.py - decodebin_child_added - Decodebin child added: decodebin
2024-08-12 06:19:59,756 - INFO deepstream deepstream.py - decodebin_child_added - Decodebin child added: queue
2024-08-12 06:19:59,756 - INFO deepstream deepstream.py - decodebin_child_added - Decodebin child added: nvvidconv
2024-08-12 06:19:59,757 - INFO deepstream deepstream.py - decodebin_child_added - Decodebin child added: src_cap_filter_nvvidconv
2024-08-12 06:19:59,758 - INFO deepstream deepstream.py - cb_newpad - In cb_newpad
2024-08-12 06:19:59,758 - INFO deepstream deepstream.py - cb_newpad - gstname=  video/x-raw
2024-08-12 06:19:59,758 - INFO deepstream deepstream.py - cb_newpad - features=  <Gst.CapsFeatures object at 0x7f444b7114c0 (GstCapsFeatures at 0x316c100)>
2024-08-12 06:19:59,759 - INFO deepstream deepstream.py - decodebin_child_added - Decodebin child added: h265parse0
2024-08-12 06:19:59,759 - INFO deepstream deepstream.py - decodebin_child_added - Decodebin child added: capsfilter0
2024-08-12 06:19:59,852 - INFO deepstream deepstream.py - decodebin_child_added - Decodebin child added: aparsebin
2024-08-12 06:19:59,856 - INFO deepstream deepstream.py - decodebin_child_added - Decodebin child added: atee
2024-08-12 06:19:59,857 - INFO deepstream deepstream.py - decodebin_child_added - Decodebin child added: aqueue
2024-08-12 06:19:59,857 - INFO deepstream deepstream.py - decodebin_child_added - Decodebin child added: adecodebin
2024-08-12 06:19:59,862 - INFO deepstream deepstream.py - decodebin_child_added - Decodebin child added: nvv4l2decoder0
2024-08-12 06:19:59,871 - INFO deepstream deepstream.py - decodebin_child_added - Decodebin child added: mulawdec0
2024-08-12 06:19:59,931 - INFO deepstream deepstream.py - decodebin_child_added - Decodebin child added: nvurisrc_bin_audioconvert
2024-08-12 06:19:59,932 - INFO deepstream deepstream.py - decodebin_child_added - Decodebin child added: nvurisrc_bin_audioresample
2024-08-12 06:19:59,932 - INFO deepstream deepstream.py - cb_newpad - In cb_newpad
2024-08-12 06:19:59,932 - INFO deepstream deepstream.py - cb_newpad - gstname=  audio/x-raw
2024-08-12 06:19:59,933 - ERROR deepstream deepstream.py - cb_newpad - features=  <Gst.CapsFeatures object at 0x7f444b7112e0 (GstCapsFeatures at 0x7f427c00db60)>

(python3:114): GStreamer-CRITICAL **: 06:20:26.742: gst_value_init_and_copy: assertion 'G_IS_VALUE (src)' failed

which sample are you testing or referring to? what is the whole media pipeline?
since I can’t reproduce this issue with unmodified test3, can you compare the code with deepstream_test_3.py?

The RTSP source is working fine with deepstream_test_3.py. However, for my implementation, I adopted an unconventional approach. I needed to add the source during runtime and use a demux to pass the data to different appsinks. Since I cannot request a pad from the demux during runtime, I start the pipeline with a fake source before runtime and later replace the fake source with the actual source during runtime.

This approach has worked well for most cases, but I’ve encountered issues with a Hikvision camera that includes audio, which I recently received. In this case, the pipeline fails

  1. did you test it? If that error happened, will the app exit?
  2. can you simplify the app, if using streammux +fakesink, will the issue remain?

the app didnt exit.

I dont have the camera with me right now, i shall update the results once i test it

Sorry for the late reply, Is this still an DeepStream issue to support?

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.