Arducam 64MP USB camera autofocus/manual focus control via Python instead of PotPlayer

Hi everyone. I’ve got an Arducam 64 MP USB camera with the motorized focus lens. Right now the only way I can get the focus right is by opening PotPlayer and adjusting it there every single time. That’s getting really annoying. Is there any way to enable autofocus on this camera, or at least control the focus myself from a Python script instead of always relying on PotPlayer?

Thanks for posting. To point you in the right direction, can you confirm a few things? Which OS are you on (sounds like Windows?), and have you tried controlling the camera from Python at all yet? Also, when you say autofocus, do you mean the camera itself or are you just looking for any way to set focus programmatically? Any error messages or logs from your current setup would help too.

Yeah, it’s a Windows machine. I haven’t actually written any Python for it yet — I’ve just been using PotPlayer to move the focus. No error logs or code to share, I was hoping to figure out the right approach before writing anything. And honestly I’d take autofocus if it exists, but if not, manual control from Python would be totally fine.

Got it, thanks. I checked the details for this module. Unfortunately, the Arducam 64 MP USB camera with motorized focus does not support autofocus — there’s no autofocus function on this module, so it can’t be enabled. The motorized lens can still be driven manually though, and there is a way to control focus from Python instead of using PotPlayer.

That’s a bummer about autofocus, but honestly manual control from Python is what I really need. Is there a library or a demo I can use to drive the focus motor? I’d like to move away from PotPlayer completely.

Yes — Arducam has a UVC Python demo that handles focus control over USB. You can find it on GitHub: GitHub - ArduCAM/ArducamUVCPythonDemo · GitHub. It should let you send focus commands from your script rather than using PotPlayer. If you run into issues with the demo on Windows, post back what you’re seeing and we can go from there.

Perfect, that’s exactly what I was looking for. I’ll pull the repo and try it out. Thanks for the help!

Just to summarize for anyone else who lands here: this 64 MP USB module doesn’t support autofocus — that’s a module limitation and it can’t be turned on. The workaround is manual focus control through Python using the Arducam UVC Python demo, which replaces the PotPlayer approach. Let us know how the demo works out.