Question about nvurisrcbin smart recorder filename and inconsistent duration in python

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU): GPU
• DeepStream Version: 7.0
• Issue Type( questions, new requirements, bugs) Questions

Hi, I’m implementing nvurisrcbin smart-recorder into my pipeline and I’m wondering if it’s possible to modify the recording’s entire filename instead of just its prefix. If so, can I do it with existing python API or do I need to create custom bindings for that?

I have also noticed some inconsistency with recording’s duration.
Here’s what I tested:
Sources: 0, 1

Source 0 started recording with startTime=15, duration=60
- Source 0 finished recording with a duration of 70 seconds

Wait 20 seconds to start recording for Source 1 (before Source 0 has finished recording)

Source 1 started recording with startTime=15, duration=60
- Source 1 finished recording with a duration of 73 seconds

Wait for both recordings to finish

Source 0 started recording with startTime=15, duration=60
- Source 0 finished recording with a duration of 60 seconds

Wait 20 seconds to start recording for Source 1 (before Source 0 has finished recording)

Source 1 started recording with startTime=15, duration=60
- Source 1 finished recording with a duration of 63 seconds

These are my configs:

            uri_decode_bin.set_property("smart-record", 2)
            uri_decode_bin.set_property("smart-rec-cache", 120) 
            uri_decode_bin.set_property("smart-rec-container", 1)  
            uri_decode_bin.set_property("smart-rec-mode", 1)  
            uri_decode_bin.set_property("smart-rec-default-duration", 60)  
  1. Currently you can only modify prefix. the other parts of full name can’t be removed, and the format is fixed.
  2. about time length issue, smart recording will start recording only after finding the first I frame. there will be some frames lost when finding I frame. to improve this issue, you can decrease the I frame interval of encoder.

I see. Given it’s not possible to modify the file name, is it possible to know what file name each recording will have?

you can try sample deepstream-testsr to see the record files.
here are a filename samples With_BBox_00001_20240903-145433_532370.mp4, With_BBox_00002_20240903-145447_532370.mp4. the filename includes prefix, id, time and process id.

Thank you so much for your support, @fanzh.
I have the same question.
I need control over the process. An event will trigger the recording process. However, I also need the metadata to associate it with the event that initiated the process. One of these metadata elements is the filename that nvurisrbin is generating. This way, I can have better control over the event and its metadata in a single, cohesive process.
Can I access this metadata using Python?

currently there is no interface to get the video file name that smart record is recording. for a workaround, you can find the new file under the path.

1 Like