Smart Record videoCacheSize - how to choose a value?

When setting up smart record with NvDsSRCreate() you must specify the video cache size. How should users choose a value here. The example app just uses 30 seconds but if pre-record time is just 3 seconds for example then should the cache size be set to 3 seconds or maybe a little bit more to be safe, like 5 seconds.
Having a large cache size just takes up memory for no benefit from what I can tell ?

• Hardware Platform (Jetson / GPU) ANY
• DeepStream Version DS5.0

Hi
Default video cache size is 30s, but you can change it.

Following fields can be used under [sourceX] groups to configure these parameters.
•smart-rec-video-cache=

we have smart record documentation, please see here,
https://docs.nvidia.com/metropolis/deepstream/plugin-manual/index.html#page/DeepStream%20Plugins%20Development%20Guide/deepstream_plugin_details.3.14.html#wwpID0E0CD0HA

Hi @amycao,
I have read all the documentation over and over and it does not answer my question.

Why have 30 seconds in the cache if the pre-record start time will be only 3 seconds for example?

Does change video cache size not solve the issue?
30s is the default value.
seems we are not in same page?
what do you mean pre-record? video cache start time?

If using the deeepstream test5 app you can see a sample of smart-record with the following parameters:

smart-record=1
smart-rec-video-cache=30
smart-rec-duration=10
smart-rec-start-time=3
smart-rec-interval=60
smart-rec-file-prefix=<file name prefix>
smart-rec-dir-path=<path of directory to save the file> 

When I say “pre-record” it means that buffered video will be record x seconds before now, where x is specified by smart-rec-start-time.

If the smart-rec-start-time is 3 seconds. What is the point of having a cache size of 30 seconds. Is that just wasting memory? Should the cache size also be 3 seconds for best efficiency ?

Hi,
the property can be changed, smart-rec-video-cache=**, you can change to a smaller value, but to make recording work, it should be greater equal 3 in your case.
smart-rec-start-time is 3 seconds

•smart-rec-video-cache=

Size of video cache in seconds. This parameter will increase the overall memory usages of the application.