Deepstream Python How to rotate USB camera 180

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) Jetson Nano
• DeepStream Version 5.1
• JetPack Version (valid for Jetson only) 4.5.1
• TensorRT Version 7.1.3+cuda10.2
• Issue Type( questions, new requirements, bugs) Question

How can I flip usb cam with python?

For 180-degree rotation, you can use dsexample plugin. Please refer to


For USB camera source, please check
deepstream_python_apps/apps/deepstream-test1-usbcam at master · NVIDIA-AI-IOT/deepstream_python_apps · GitHub

A possible solution:

  1. Make sure you can run deepstream-test1-usbcam with your camera
  2. Implement 180-degree rotation in dsexample with NvBufSurface APIs
  3. Customize deepstream-test1-usbcam to link with dsexample:
... ! nvvideoconvert ! dsexample ! nvstreammux ! ...

This uses hardware engine for rotation and requires much customization.

For software solution, you can use videoflip plugin: videoflip
It should work by linking like:

... ! videoconvert ! videoflip ! nvvideoconvert ! nvstreammux ! ...

Thank you. I will try as soon as possible.

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