Button to start and stop recording

Hi,

I am planning to add two push buttons which going to interface with Jetson Nano. Functionality of buttons is to start and another one to stop recording. I started exploring GPIO library, but dont see any concrete example related to what I am looking for. I am currently using DeepStream5 for recording video. Could you please direct me with viable options.

Hi,
deepstream-test5 and deepstream-app have some common code and there is key events implemented:

Runtime commands:
        h: Print this help
        q: Quit

        p: Pause
        r: Resume

You may consider to customize the application to add key events.

Hello @karunakar.r

Here, you can find NVIDIA Jetson gpio library. You can perform your project by using it.

Here is the example of using GPIO library.

Best wishes.

Thanks @ozguryildiz and @DaneLLL for quick response.

As we are going to deal with single process which is camera, how can we invoke start and stop of camera recording from two GPIO events. To elaborate, we would be having two programs which would be invoked from two GPIO events. How can I stop the camera recording of the one which got triggered using first GPIO event.

hello karunakar.r,

please check the video record behavior of argus_camera sample application.
it’s a single click to enable recording, click again to stop the recording.
please refer to the sources,
for example, /usr/src/jetson_multimedia_api/argus/apps/camera/modules/tasks/VideoRecord.cpp

you may also check the example of Jetson-GPIO to implement the event trigger for doing toggleRecording()
thanks

Thanks @JerryChang

Do you have similar example using DeepStream ?

hello karunakar.r,

I did not have much experience with DeepStream,
however, according to Smart Record - Event based recording, it’s expected an event to trigger start / stop of video record.
thanks