How to trigger Smart Record and Automatic linkage popup based on detection of a particular Object

• Hardware Platform (Jetson / GPU) GeForce GTX 105
• DeepStream Version 5.0
• TensorRT Version 7.1
• NVIDIA GPU Driver Version (valid for GPU only) 440.100


We are trying to trigger Smart Record and Automatic linkage popup based on detection of a particular Object. For example, we hope it start save .mp4 file when it detect person and the samr time, popup also appears.

We are not an expert in Gstreamer and we are new to DS, so we wonder if there is any relevant code can provide to us to learn.

We have smart record introduction and architecture, please check below documentation, and you can refer to gst-nvdssr.h for API provided, also you can check deepstream_source_bin.c for more details on usage of this module. In existing deepstream-test5-app only RTSP sources are enabled for smart record. To enable smart record in deepstream-test5-app set the following under [sourceX] group:



I have set smart-record=1 and it works. However, I want trigger Smart Record by detecting a particular Object like person. But I am not familier with either C++ or DS, so would you please tell me how to trigger Smart Record in test5. Just use NvDsSRStart? How to call this function?


You can refer to sample deepstream-test5, there you’ll see how smart record is used.
You can have a probe somewhere after your nvinfer element. In this probe you have access to all the metadata and can check if detections have been made and for what classes etc. in here you can call NvDsSRStart().

Hi, amycao,

I have set a probe and when it detect a person it would print something to the screen. But I am not clearly how to use NvDsSRStart(). Maybe like this? I am not sure.

if (obj_meta->class_id == 2) {
g_print (“Source %d:\tFind a person!\n”, stream_id);

Hi @yohoohhh,
Some parameters are needed for NvDsSRStart().
you can refer to the sample code in /opt/nvidia/deepstream/deepstream-5.0/sources/apps/apps-common/src/deepstream_source_bin.c and API doc in