Help with smart record issue - minor pause in most recorded files

In recorded files I find there is a small pause when playing them back. It’s always about 2 or 3 seconds into a file.
I have added smart record to my own app which is based on the deepstream-test3 sample.

I’d just like to know how I would go about debugging such an issue.? I don’t see any errors from the app. CPU usage is low, GPU utilisation is not high (using the standard resnet10 with interval 4). Memory usage it low. Files are recorded to a ram drive which should rule out any performance issues writing to the sdcard.

If I simply watch the stream (output it as rtsp again like deepstream-app does) I do not see any pauses.

I’m also wondering if its okay to call NvDsSRStart () from inside a buffer probe? I call it based on their being a detection. Maybe a blocking call like this in a probe takes too long and I should make it async (called via a glib timer for example)?

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) Jetson Nano
• DeepStream Version 5.0GA
• 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)

1 Like

Sorry for delay!

It’s always about 2 or 3 seconds into a file.

Is the pause in the start of the video or in the middle of the video?
Is it possible to share a video file so that we can understand the pause better?

I’m also wondering if its okay to call NvDsSRStart () from inside a buffer probe?

Will check and get back to you.

Thanks!

Yeah always at the start of a file and 2 to 3 seconds in regardless of whether I’m recording a 10 second file or 60 second file. The rest of the file plays back nice and smoothly.

Does not happen on every single recorded file, but about 3 out of every 5 files.

Can you show us you codes?

How can I send it? zip? From memory you have an ftp site?

Does github work for you? You can send by message.

Any update? Is this still an issue to support?

How can I send you code off the forum? alternatively I could add your github use to the repo?

Please try to send it through the private message. Thanks

Seems I can reproduce the pause even with deepstream-app tool. We will tracking this problem internally and be back to you once there is any progress.

That’s good to know. One of your colleagues was previously unable to duplicate it.

Hi @Fiona.Chen , any idea where the issue is coming from? Is it the elements inside the smart record bin?

The reproducing is because of the fakesink property sync=1, when I set it to 0, the pause does not appear. I know that you does not set fakesink sync property, but it is a possible reason that there is frame dropping in your pipeline. Can you check whether there is frame dropping with your scenario?

Can you run the same case with our sample deepstream-test5-app with the same RTSP sources? Can you see the pause with deepstream-test5-app?

I now specifically set sync to false on the fakesinks but it makes no difference. According to gstinspect-1.0 fakesink, sync is set to false by deafult anyway. Async however is set to true by default.

Have you got a sample config file to run deepstream-app5 with SR ?

Just adding SR configurations in your [sourcex] config. The following is a sample:

[source0]
enable=1
#Type - 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP
type=4
uri=rtsp://10.19.225.59/media/video1
#drop-frame-interval=2
gpu-id=0
cudadec-memtype=0
smart-record=2
smart-rec-video-cache=2
smart-rec-duration=4
smart-rec-container=0
smart-rec-interval=10
smart-rec-file-prefix=camera0
smart-rec-dir-path=/home/xxx/test_record

Don’t forget to run the command line with “deepstream-test5-app --no-force-tcp -c xxx”

Hi @Fiona.Chen what does --no-force-tcp do and why is it needed? I can’t seem to find it in the Deepstream SDK documentation? I do remember seeing some code in deepstream-app ages ago that did force tcp for some reason?!?

It is deepstream-test5 option because by default it will set rtspsrc protocols property as GST_RTSP_LOWER_TRANS_TCP. So we use the option to disable it.

You can see this option with “deepstream-test5-app -h”

For deepstream-app, you don’t have to do this.

So @Fiona.Chen for our custom deepstream programs we don’t need to worry about this -correct? Because we won’t have coded it to force TCP.

By the way - I’ve done a few tests and I cannot duplicate the issue in deepstream-test5 - but have only recorded 5 videos. Need to do more extensive testing.