AMCap still capture times out/closes on Sony IMX291; M12 4mm/2.1mm lenses won't screw in

Hi all, I’m testing a 2MP Sony IMX291 USB camera and I’ve run into two separate problems I can’t figure out.

First, in AMCap, when I try to grab a still image the program either times out or just shuts down on me. The live preview works fine, it’s only the still capture that fails.

Second, I have three M12 lenses: a 4.0mm, a 2.1mm, and a 3.6mm. The 3.6mm screws in and reaches the focus point with no problem. The 4.0mm and the 2.1mm won’t screw in to the focus point at all - they thread in partway and then stop.

Has anyone run into either of these?

Welcome to the forum. Let’s tackle these one at a time since they’re most likely unrelated.

For the AMCap still capture: does it time out/shut down every single time you try, or only sometimes? Does an error dialog appear before it closes, or does it just disappear? Also, what version of AMCap are you running and what OS? Knowing the capture format (JPEG, BMP, etc.) would help too.

For the lenses: when you say the 4.0mm and 2.1mm won’t screw in to the focus point, do you mean the threads stop physically before the image comes into focus, or that the threads themselves won’t engage properly? A short video showing each lens threading in, and one showing the AMCap failure, would really help me see what’s happening.

Also, could you confirm the exact product you purchased? I want to verify the camera module and its lens holder specs before we go further.

Thanks for the reply.

AMCap fails pretty much every time I try to grab a still. There’s no error message - it either locks up and I have to force-close it, or it closes by itself. I’m on Windows and saving as JPEG. Live video is totally fine, it’s literally just the still grab that breaks.

For the lenses, the 4.0mm and 2.1mm threads engage fine at first, but they stop before the image reaches focus. The 3.6mm keeps threading further in and gets to the focus point cleanly. Is there a reason the 4.0mm and 2.1mm can’t reach focus when the 3.6mm can?

That’s helpful. On the AMCap side, live preview working but still grab failing usually points at the capture negotiation rather than the sensor itself. When you trigger a still, AMCap can momentarily re-negotiate the stream to grab a full-res frame, and some UVC cameras choke on that. A video of what happens on screen when you click the button would let me see the exact failure mode.

On the lenses, M12 lenses don’t all have the same back focal length. A 4.0mm and a 2.1mm often need to sit at a different distance from the sensor than a 3.6mm. If the thread runs out before the lens reaches the required distance, it physically can’t get to the focus point - which matches what you’re describing. Whether a different holder or a shim helps depends on the exact module and the specific lenses.

Could you send a short video covering both issues? And can you confirm the exact product you purchased - the model name or a link to the product page? I’d like to check the holder spec for your module.

I’ll get a video recorded and uploaded. Just to be clear on the lens side: the 3.6mm reaches the focus point and the image is sharp. The 4.0mm and 2.1mm stop before the image is in focus, so it stays blurry. If it’s a back focal length thing, is there a way to make those two lenses work, like a spacer or a different lens holder?

Right, that matches what I suspect - the 3.6mm’s back focal length lines up with the holder, while the 4.0mm and 2.1mm need a different sensor-to-lens distance and run out of thread first. Whether a spacer or a different-height M12 holder fixes it depends on the exact module and lenses, so I don’t want to guess at a workaround until I’ve confirmed which product you have.

So here’s where things stand: both issues are still open. The lens problem looks like a back focal length vs holder travel mismatch, but I can’t say what the fix is yet. For AMCap, I still need to see the failure in action.

Whenever you can, please send a short video recording the AMCap still-grab problem (and the lens threading if possible), and confirm the exact product you purchased - model name or product page link. Once I have those, I’ll be able to give you a proper next step instead of guessing.