Missing Video Outputs for Consecutive Smart Record Triggers in DeepStream

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) 4090
• DeepStream Version 7.0
• JetPack Version (valid for Jetson only)
• 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 an RTSP source and have set up the DeepStream test5 example to use smart video recording in DeepStream. It works fine, but it seems that when it receives a message from the Kafka broker, each input source processes only one message at a time until the recording is successfully saved.

This means that if I have four input sources and send four messages to Kafka—each targeting a different source ID at the same time—it works correctly and outputs four videos.

However, when I send four messages simultaneously for the same source ID, like this:

message = {
    "command": command,  # "start-recording" or "stop-recording"
    "start": start_time.isoformat() + "Z",
    "end": current_time.isoformat() + "Z",
    "sensor": {
        "id": "0"
    }
}

DeepStream receives all four messages and prints them, but only one video is output. The recordings for the other three messages are ignored.

How can we avoid this issue? Can we modify the pipeline or configuration to solve it?
Is there a function where I can confirm that the video has been successfully saved? If so, I can add code to send a Kafka message upon successful recording, allowing the Kafka producer to know when to send the next message for the same source ID.

Thanks.

please refer to this faq are-multiple-parallel-records-on-same-source-supported.

Why is it not supported to have multiple parallel records on the same source? Is there a way to know when the NvDsSRStart function finishes so that the producer can be notified to send the next message?

I modified the code like this, using a do-while loop. Should I use it this way to process 4 messages for the same sensorId? But it look like too many video compare to messages
do {
if (srCtx->recordOn == 0 && srCtx->resetDone == 1){
NvDsSRStart (srCtx, &sessId, msgSR->startTime, msgSR->duration, NULL);
}
} while(srCtx->recordOn == 1 || srCtx->resetDone == 0);

or

      NvDsSRStatus statusCode;  // Declare the statusCode variable before the loop

      do {
          statusCode = NvDsSRStart(srCtx, &sessId, msgSR->startTime, msgSR->duration, NULL);  // Assign the statusCode
      } while (statusCode != NVDSSR_STATUS_OK);  // Check the statusCode in the loop condition

it look like solution 2 work, same videos as messages
Thanks

Since smart record is not opensource, I can’t share more details. please refer to the following callback in NvDsSRInitParams, which is called by NvDsSRCreate.

  /** callback function gets called once recording is complete */
  NvDsSRCallbackFunc callback;

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