How Deepstream uses Python to read two USB cameras at the same time

Please provide complete information as applicable to your setup.

**• Hardware Platform (Jetson / GPU) Jetson
**• DeepStream Version 5.1
**• JetPack Version (valid for Jetson only) 4.5.1

How can I use deepstream’s Python demo code to read two USB camera modifications at the same time, but I don’t know how to modify my code. I refer to deepstream-test1-usbcam.

please refer to python sample deepstream-imagedata-multistream, you can add more v4l2src to nvstremmux.

Error: gst-resource-error-quark: Invalid URI “/dev/video0”. (3): gsturidecodebin.c(1384): gen_source_element (): /GstPipeline:pipeline0/GstBin:source-bin-00/GstURIDecodeBin:uri-decode-bin

This method is not working. He uses uri-decode-bin element,not v4lsrc

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

  1. use v4l2-ctl --list-devices to check the device name.
  2. two cameras will have different device name, please refer to this command: gst-launch-1.0 v4l2src device=/dev/video0 ! videoscale ! video/x-raw, width=320, height=240 ! imagefreeze ! videomixer name=m sink_1::xpos=320 ! autovideosink v4l2src device=/dev/video2 ! videoscale ! video/x-raw, width=320, height=240 ! imagefreeze ! m.

I’ve done a directory based on python’s code, if anyone needs it, I’ll upload it to this section