Linux UVC driver bandwidth issues

  1. Where did you get the camera module(s)?
    Amazon

  2. Model number of the product(s)?
    https://www.arducam.com/product/8mp-imx179-mini-usb-ub0240/

  3. What hardware/platform were you working on?
    Armbian bullseye

  4. Instructions you have followed. (link/manual/etc.)

  5. Problems you were having?
    Trying to run multiple cameras MJPEG streams, they over-report the bandwidth needed, and so UVC Linux drivers don’t allow usage of more than one camera. This is a KNOWN issue that most UVC cameras over-report the bandwidth that they need, and so don’t make room for multiple cameras on the same USB 2.0 bus.

  6. The dmesg log from your hardware?

  7. Troubleshooting attempts you’ve made?

  8. What help do you need?
    Arducam to help with setting the firmware for MJPEG streams to request the actual bandwidth needed. Or for them to keep the UVC drivers up to date with their USB types in static const struct usb_device_id uvc_ids struct in uvc_driver.c « uvc « usb « media « drivers - kernel/git/torvalds/linux.git - Linux kernel source tree, so that it will use the UVC_QUIRK_FIX_BANDWIDTH quirks so that MJPEG compressed streams will be separately calculated to (see uvc_video.c?h=v6.9-rc3, line 203->238) based on estimates, overriding what comes in from the firmware.

Nothing? Arducam doesn’t want to fix their firmware? Or do I need to just not buy from them ever again, since they won’t do things correctly?

In my case I needed to use 4 B0202 Arducam USB cameras at the same time. As a solution, to avoid bandwidth issues, I took the image from the camera in MJPEG format, but this time the cameras could work with 10 FPS at 1920x1080 resolution. To solve this problem, I used 848x480 resolution, which has an FOV equivalent to 1920x1080, so I was able to get images from 4 cameras at the same time in 848x480 and MJPEG format.

I would like to add an additional note. I was able to successfully work with up to 2 cameras at 1920x1080 resolution and MJPEG format.

@arducam-support-team can you please help us out here? I’m running into the same issue. seems to over-report bandwidth on linux and as a result, I can only have one camera per usb hub, when in reality, my usb hubs can easily handle multiple cameras sending 1080p 30fps mjpg video. Please help

Hi,
Can you get multiple camera working at one USB hun at a lower resolution?

Hello, unfortunately not from one USB port due to isochronous bandwidth limitations. I barely got it to work at a lower resolution using a hack where I modified the UVC drivers on my Linux device. It’s frustrating that Arducam doesn’t have firmware that would allow me to connect to cameras to one USB port. Here is my stackoverflow post: How can I get two UVC cameras to stream through one USB port on a Linux device? - Stack Overflow

@arducam-support-team really? Still nothing? Over 2 years later?

Hi there,
To limit the bandwidth this camera reports to the system, a customized firmware is required.

I’m not sure if it refers to something like NRE. I’ll take a look at this case in the coming three working days. Will update you if I have some good news.

Huh, a reply, finally, wow. However, why is it a custom firmware? Shouldn’t your firmware, depending on mode, ask for the relevant reservation based on it’s own calculations of what it should need? Obviously running in a YUY2 won’t work with multiple cameras, that’s fine. But you seem to just send the YUY2 value when MJPEG is what is actually configured to be sent. Insane. Your firmware should always send ONLY what the requested mode determines as the required bandwidth.

And don’t just say use a USB3 camera. Those are WAAAAY too expensive and WAAAAY more than I need. These little 8MP modules are perfect and more than fit my need, I just want more than 1 to monitor my 3D printer from multiple angles. Come on…