Unknown signal name: start-sr for Gst-nvmultiurisrcbin

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) GPU
• DeepStream Version 7.1

I’m trying to use nvmultiurisrcbin for smart recorder and when I try to start recording I get the following error:

element.emit('start-sr', sessionid, actual_start_time, SMART_RECORDER_DURATION, sr_user_context_buf)
TypeError: <__gi__.GstDsNvMultiUriBin object at 0x7f73927d5080 (GstDsNvMultiUriBin at 0x561ca4003b70)>: unknown signal name: start-sr

This is how I’m creating the smart recorder bin:

    def create_smart_recorder_bin(self, index, uri, camera_id_list):
        bin_name=f"source-bin-{camera_id_list[index]:02d}"
        nbin=Gst.Bin(bin_name)

        if not os.path.exists(os.path.join(SMART_RECORDER_DIR, f"camera_{camera_id_list[index]}")):
            print("Creating smart_recorder directories")
            os.makedirs(os.path.join(SMART_RECORDER_DIR, f"camera_{camera_id_list[index]}"))

        smart_recorder_dir_path = os.path.join(SMART_RECORDER_DIR, f"camera_{camera_id_list[index]}")
        smart_recorder_file_prefix = f"camera_{camera_id_list[index]}"
        if not nbin:
            sys.stderr.write(" Unable to create source bin \n")

        uri_decode_bin=Gst.ElementFactory.make("nvmultiurisrcbin", "nvmultiurisrcbin")
        uri_decode_bin.set_property("cudadec-memtype", 0)
        uri_decode_bin.set_property("smart-record", 2)
        uri_decode_bin.set_property("smart-rec-cache", SMART_RECORDER_BUFFER_SIZE) 
        uri_decode_bin.set_property("smart-rec-container", 0)  
        uri_decode_bin.set_property("smart-rec-mode", SMART_RECORDER_CONTAINER)  
        uri_decode_bin.set_property("smart-rec-default-duration", SMART_RECORDER_DEFAULT_DURATION)  
        uri_decode_bin.set_property("smart-rec-file-prefix", smart_recorder_file_prefix)
        uri_decode_bin.set_property("smart-rec-dir-path", smart_recorder_dir_path)
            
        if not uri_decode_bin:
            sys.stderr.write(" Unable to create uri decode bin \n")
        
        uri_decode_bin.set_property("uri-list",uri)
        uri_decode_bin.connect("pad-added",self.cb_newpad,nbin)
        uri_decode_bin.connect("child-added",self.decodebin_child_added,nbin)

        Gst.Bin.add(nbin, uri_decode_bin)
        bin_pad=nbin.add_pad(Gst.GhostPad.new_no_target("src",Gst.PadDirection.SRC))
        if not bin_pad:
            sys.stderr.write(" Failed to add ghost pad in source bin \n")
            return None

The start-sr signal can only emit by nvurisrcbin not nvmultiurisrcbin.

You can find their differences using gst-inspect-1.0

gst-inspect-1.0 nvurisrcbin

In general, nvurisrcbin is suitable for you to customize smart recording more freely.

Would it work by sending a start/stop message through kafka or is it only possible with nvurisrcbin?

Subscribe to Kafka messages, provided by msgbroker, this is not a feature of nvurisrcbin, you can refer to the start_cloud_to_device_messaging / subscribe_cb function in deepstream_c2d_msg.c.

https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_Smart_video.html#smart-video-record-configurations

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