Question: How to record and save video from DeepStream SDK 5.1 Python bindings

My setup is as follows:

  • DeepStream SDK 5.1 (Python bindings)
  • JetPack 4.5.1
  • Jetson Nano
  • USB camera

I am using the Python bindings to build my first DeepStream app. I combined examples from the NVIDIA-AI-IOT Github page to stream from my USB webcam and save images to a given folder. You can find my code here. Please feel free to point out bugs / problems in my code.

I am trying to build in functionality to toggle (on/off) video recording of the stream. Ideally this is based on some keyboard input or some detection of a human in the input video. Is there demo Python demo code to accomplish this?


What on earth is the problem? It is not reasonable for us to debug your code or do any code review.

No. There is only such sample in c/c++. Please refer to /opt/nvidia/deepstream/deepstream/sources/apps/sample_apps/deepstream_test5

The code I provided runs properly and I did not expect anyone to debug or review my code. I linked to it to provide context for any reader who was trying to accomplish something similar. If someone found something odd, I invited them to comment if they desired.

Thank you. I will take a look at this.