Smart Record issues - long pauses / freezes in recorded files

I’m using smart record in my own app based on deepstream-test3 and copying the way that deepstream-app uses it. i.e. with rtsp and tee off before decoding.
I use an event detection to trigger smart record. A duration of 30 seconds.

I find that recorded files seem to freeze every couple of seconds for a few seconds each time. It makes them pretty much useless as you lose a lot of movement in the few seconds that they are frozen. I don’t see any errors or warnings about buffers being dropped on the console.

My approx pipeline is as follows:

rtspsrc ! rtph265depay ! h265parse ! tee ! queue ! decodebin ! queue ! nvvideoconvert ! "video/x-raw(memory:NVMM)"
                                       \ ctx->recordBin
rtspsrc ! rtph265depay ! h265parse ! tee ! queue ! decodebin ! queue ! nvvideoconvert ! "video/x-raw(memory:NVMM)"
                                       \ ctx->recordBin
rtspsrc ! rtph265depay ! h265parse ! tee ! queue ! decodebin ! queue ! nvvideoconvert ! "video/x-raw(memory:NVMM)"
                                       \ ctx->recordBin
rtspsrc ! rtph265depay ! h265parse ! tee ! queue ! decodebin ! queue ! nvvideoconvert ! "video/x-raw(memory:NVMM)"
                                       \ ctx->recordBin

All piped into ! streammux ! nvinfer ! tracker ! nvdsanalytics ! tiler ! fakesink.

Note this is just the same way that deepstream-app is linking the elements when using smart record.

If you can provide me a way… I can send you some sample files.

• Hardware Platform (Jetson / GPU) Jetson Nano, Xavier NX
• DeepStream Version DS5.0GA

Can you reproduce the same problem with deepstream-app when enable “smart-record” with RTSP source?

I think the problem was resolved by removing this:

g_object_set (G_OBJECT (arg0), "drop-on-latency", TRUE, NULL);

I had that on the rtspsrc element - strangely deepstream-app does this though?!? I think this issue can be closed. ;-)