Hi everyone, I’m using an Arducam 108MP Motorized Focus USB 3.0 Camera Module (b0494) with OpenCV on both Linux and Windows, and I keep getting this warning on frame 2:
The warning slows the code down a lot and the camera becomes really hard to use in our manufacturing environment. It works intermittently and is quite unstable. I followed the quick start guides for Windows and Linux:
Thanks for the detailed log. The important detail is that the capture does succeed at the end — save success, file name: 108MP_2024-07-11_09_24_28.jpg — so this looks like an intermittent frame grab failure rather than a complete capture failure. The -2147483638 error in CvCapture_MSMF::grabFrame is an MSMF-level grab failure, and that’s why your wait counter keeps incrementing while it retries.
The warning hitting at frame 2 and then taking several retries before recovering would explain the slowdown you’re seeing in production.
Let me reproduce this on our side and check what’s happening with the frame grabbing. I’ll get back to you.
Thanks, that matches what I’m seeing — it does eventually save a frame, but the retries are what kills the speed. Let me know what you find, or if you need me to run anything on my end.
Okay, I reproduced the issue on a Jetson Orin Nano. I can see the same warning there, though on that platform it shows up through V4L2: global cap_v4l.cpp:1136 .... I could not reproduce the case where the device fails to open unless the camera is physically reconnected.
The root cause turned out to be the ISP function operations running on the host side. That adds performance overhead and increases capture time, which is what’s triggering the grab warning. I’ve made changes to both the firmware and the Python demo code:
The latest firmware streams YUV video directly from the 108MP camera.
The ISP operations on the host have been removed, which reduces overhead, shortens capture time, and eliminates the warning.
I’ve sent you the latest firmware package and a test video through private message — please check your messages and update the camera firmware first.
That did it — after the firmware update and the new demo code, the warning is gone and everything works at the other resolutions. One more thing: I can’t capture video at 12000x9000. When I try it in AMcap on Windows, I just get a black screen. Is there a way to record at that resolution?
Glad the warning is gone. For 12000x9000, I’d use OBS instead of AMcap — AMcap just shows a black screen at that resolution, and storing video at the full 108MP resolution (12000x9000) is problematic anyway.
Set these OBS settings:
Base Resolution: 12000 x 9000
Output Resolution: 4000 x 3000
Don’t store the video at the full 108MP resolution, or it will eat up all available memory. Outputting at 4000x3000 keeps it manageable. I’ve shared a sample captured video privately so you can see what the output should look like.