How to save frames with test app 1

Hi, I’ve seen some posts about saving frames such as here. I’m currently trying to do this on deepstream python and I’m having trouble understanding what’s going on. I’ve managed to install the example plugin “dsexample”, and I’ve been able to add it into the pipeline:

v4l2src -> jpegdec -> nvvideoconvert -> streammux -> nvinfer -> dsexample -> nvvideoconvert -> nvosd -> sink

I’ve also added the following into the pgie config file:

#batch-size for batch supported optimized plugin

Although it doesn’t give any errors, I’m slightly confused as to how to actually save the frames in which an object was detected, as I assume you would have to create a function which does the saving. I want to be able to save the frames which contains and object, I’m not using openCV in order to do this. Which from the majority of the code examples I’ve seen are all using opencv in order to save the RGBA. Is there a way to do this via deepstream and python?

Can anybody help?

Thank you.

Please provide complete information as applicable to your setup.

• Hardware Platform (Xavier/NX)
• DeepStream 5.0
• JetPack Version 4.4

Please check the source code of dsexample in


You would need to apply the modification and rebuild/replace