Arducam select() timeout capturing frames via OpenCV on Ubuntu with 4 cameras

Been banging my head against this for a bit. We have several Arducams in a project and they’re all throwing the same warning when I try to grab frames with OpenCV. Right now there are 4 cameras hooked up to a single machine running Ubuntu 20/22, Python 3, using cv2 to capture. The capture basically stalls and I see this in the logs:

Apr 16 17:14:33 zydus-ui python3[644]: [ WARN:[email protected]] global cap_v4l.cpp:1134 tryIoctl VIDEOIO(V4L2:/dev/video2): select() timeout.

It’s pointing at /dev/video2, but the same kind of timeout happens on the others too. Anyone seen this?

Thanks for the report. To narrow this down, which Arducam models are these, and are the cameras connected directly to USB ports or through a hub? Does the timeout happen right away or only after streaming for a while? Also, could you run v4l2-ctl --list-devices and paste what you see for /dev/video2? That warning is coming from OpenCV’s V4L2 backend (cap_v4l.cpp:1134), where it calls select() waiting for the device to be readable and it times out.

They’re all Arducams, 4 of them on the one computer. Honestly haven’t checked if it’s right away or only after a while yet - the log line I have is from the 16th. I’m capturing with cv2, no custom code beyond that. I’ll grab the v4l2-ctl output once I’m back at the machine. Just wanted to see if this warning is a known thing.

That warning means the V4L2 device didn’t signal ready-to-read within OpenCV’s select() timeout. With 4 cameras on one host, the first thing I’d suspect is USB bandwidth or the device getting reset, but it can also be an OpenCV-specific issue. A few quick checks when you’re at the box:

  • dmesg | grep -i usb to look for resets/disconnects
  • v4l2-ctl --list-devices and v4l2-ctl -d /dev/video2 --all
  • Try a single camera by itself and see if the timeout still occurs
  • Lower the resolution/fps in cv2 (e.g., 640x480 @ 30) to rule out bandwidth saturation

Also let me know the exact models and whether a USB hub is involved.

Will run those and post back. I can say the error is showing up across all the Arducams, not just video2, and it’s the same select() timeout each time. Haven’t been able to isolate it to a single camera yet. The setup is just the 4 cameras on the one Ubuntu box.

Quick summary of where we are: the error is a V4L2 select() timeout coming from OpenCV’s VideoIO (cap_v4l.cpp:1134) while reading /dev/video2, with 4 Arducams on a single Ubuntu 20/22 machine using Python3 + cv2. Root cause isn’t pinned down yet and there’s no fix at this point. Main suspicion is the camera not delivering frames in time - possibly USB bandwidth/contention with 4 devices - but we still need the diagnostics above (dmesg for USB resets, single-camera test, lower resolution/fps, and model details) to confirm. Post back with those results and we can dig further.