2 Cameras Bandwidth issues in Java

My team this year wants to have two cameras streaming simultaneously to shuffleboard. We want to use megapixel usb cameras over lifecams. We can stream two lifecams simultaneously to the shuffleboard, but we get ERROR: : could not start streaming due to USB bandwidth limitations when we try streaming two megapixel cams even after reducing resolution to the lowest supported. The weird thing is that we can stream two megapixel cam in labview code, but not in java code.

This is our code in robotInit()

CameraServer camera1;
CameraServer camera2;
UsbCamera usb1 = new UsbCamera(“front camera”, 0);
usb1.setResolution(160, 120);
camera2 = CameraServer.getInstance();
UsbCamera usb2 = new UsbCamera(“back camera”, 1);

Is 5 fps supported by your camera? If not it’s probably falling back to 30 fps.

yeah it only supports 30 fps for mjpg pixels. Currently with only one camera at the above settings it’s running a little under 2 Mbps

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