How to stop the CSI camera from video recording using gstreamer in jetson nano?

Hi,
Is there any way to stop the CSI camera from recording the video using GStreamer in jetson nano.I am using python language.I have a button to start and stop recording video.When I press the button,it should atomatically stop recording the video.

Hi,
You can set num-buffers property to nvarguscamerasrc plugin. For dynamically stopping recording, you would need to send EoS to the pipeline, wait for GST_MESSAGE_EOS, and switch pipeline to GST_STATE_NULL.