How to add motion detection in deepstream python?

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) - Jetson Nano
• DeepStream Version - 6.0
• JetPack Version (valid for Jetson only) - 4.6.1-b110
• TensorRT Version -
• NVIDIA GPU Driver Version (valid for GPU only) - 10.2
• 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)

I need to add motion detection to record and store in .mp4 format in deepstream python?

what is your model used to do? is it similar to this sample? GitHub - NVIDIA-AI-IOT/deepstream_pose_estimation: This is a sample DeepStream application to demonstrate a human pose estimation pipeline.

I am using yolov7-tiny model, GitHub - marcoslucianops/DeepStream-Yolo: NVIDIA DeepStream SDK 6.1.1 / 6.1 / 6.0.1 / 6.0 configuration for YOLO models

you can modify the configuration file deepstream_app_config.txt to save mp4, please refer to opt\nvidia\deepstream\deepstream-6.1.1\samples\configs\deepstream-app\source4_1080p_dec_infer-resnet_tracker_sgie_tiled_display_int8_gpu1.txt
like this:

#1=mp4 2=mkv
#1=h264 2=h265
#encoder type 0=Hardware 1=Software
#H264 Profile - 0=Baseline 2=Main 4=High
#H265 Profile - 0=Main 1=Main10

no problem in saving, but need save only if motion detected

Smart Video Record is a C lib, it is used to record mp4 clips, please refer to Smart Video Record — DeepStream 6.1.1 Release documentation
it can’t be used in python directly, you need to do python-binding, please refer to deepstream_python_apps/bindings at master · NVIDIA-AI-IOT/deepstream_python_apps · GitHub

using tee and valve component with dynamic pipeline, i can able pause the recording using probe function but the empty buffers are there in recorded video,

example, I skip the frame between 20 to 30 seconds, in recorded video,

in recorded video there is an empty buffers between 20 to 30 seconds

could please help me to resolve this issue

please refer to valve 's “drop-all” property.

I tried but didn’t work.

when I use ‘avimux’ muxer component it works, but if use ‘matroskamux’ it doesn’t work.

l have a pause in the resulting video. when using ‘matroskamux’

do you still need to support? avimux can work but matroskamux can’t, it seemed a gstreamer issue.

which is the correct way to store videos using valve component

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks

there is no ready-made deepstream sample, please refer to gstreamer code samples.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.