Multiple video streams

Good day

I am trying to use 6 AR0135 cameras each connected to a USB shield streaming to a PC. I can successfully use all 6 simultaneously with the external trigger demo (https://github.com/ArduCAM/ArduCAM_USB_Camera_Shield/tree/master/Linux_x86/Python/External_trigger_demo), but when I modify the streaming demo (https://github.com/ArduCAM/ArduCAM_USB_Camera_Shield/tree/master/Linux_x86/Python/Streaming_demo) to open all 6 cameras and stream from each simultaneously, the first 1 or 2 frames can be captured, but thereafter multiple errors are returned about USB data length from the API. So my question is, is opening multiple streams simultaneously at all possible with the API provided?

@johan-henry

I’m not sure what is your setup, are you using USB2 camera shield or USB3 camera shield.

Can you show me the hardware setup photos?

Do you have any error messages?

Thanks.

Hi Lee, thanks for the reply. I am using the AR0135 connected to the UC-391 revD USB2 shield.

The setup is quite simple, it is 6 of these AR0135 - UC-391 revD combos connected via USB to a PC running Ubuntu 19.10.

Yes, I am getting error messages, I can initialise all the cameras successfully, but as soon as I open the video streams of more than one camera {ret,handle,rtn_cfg = ArducamSDK.Py_ArduCam_open(cfg, index_of_cam)}, the first few frames comes in successfully from the different cameras, but after a second or two I get ‘USB_CAMERA_DATA_LEN_ERROR’ (Error capture image, rtn_val = ', 65316) from the rtn_val = ArducamSDK.Py_ArduCam_captureImage(handle) call

 

@johan-henry

It is no strange to have lens error that the USB2 bandwidth is limited to 40MB/s max.

If you want to use multiple cameras, you’d better to use external trigger mode and reduce the frame rate in order not to overflow the bandwidth.