USB Camera Issue on M1 Mac

287 views
Skip to first unread message

Sergii Ovcharenko

unread,
Jul 2, 2022, 6:08:24 AM7/2/22
to OpenPnP

Hey,

Im seeing a weird issue with Camera properties greyed out not allowing me to adjust exposure, color temp, saturation etc after i switched from intel mac to m1 mac.

Screenshot of OpenPnP (02-07-2022, 10-59-54).png

  • M1 Mac Studio
  • Latest version of Openpnp
  • Cameras are connected to individual ports ( i even tried to connect only one camera with other USB devices completely disconnected)
  • 720p ELP cameras from Aliexpress that I tried to connected directly to Mac's USB-A ports, through USBA to USBC adapter and through Thunderbolt 4 to 4xUSB-A hub.

There is nothing in the logs other than

2022-07-02 10:52:55.592 Main INFO: Bienvenue, Bienvenido, Willkommen, Hello, Namaskar, Welkom, Bonjour to OpenPnP version 2022-06-19_21-15-55.af43024.

2022-07-02 10:52:55.593 Scripting TRACE: Scripting.on Startup

2022-07-02 10:53:14.586 CameraView DEBUG: Failed to load camera specific reticle, checking default.

2022-07-02 10:53:14.589 CameraView DEBUG: No reticle preference found.

2022-07-02 10:53:29.322 AbstractBroadcastingCamera TRACE: Camera OpenPnpCaptureCamera thread 34 started.


USB devices:

Screenshot of System Information (02-07-2022, 11-06-21).png

There are 2 cameras in the list but only one is physically connected.

Same cameras are working correctly with Intel based Mac and all properties are available.

Does anyone have an idea how to fix this?

--

Thanks,

Sergii

Mike Menci

unread,
Jul 2, 2022, 6:27:50 AM7/2/22
to OpenPnP
So you have TWO exactly the same  720p ELP cameras?

Sergii Ovcharenko

unread,
Jul 2, 2022, 6:32:25 AM7/2/22
to ope...@googlegroups.com
I do, yes.

None of them have properties enabled even if I connect only one of them with all other USB devices disconnected.


--
Best regards,
Sergii Ovcharenko 

On 2 Jul 2022, at 11:27, Mike Menci <mike....@gmail.com> wrote:

So you have TWO exactly the same  720p ELP cameras?
--
You received this message because you are subscribed to a topic in the Google Groups "OpenPnP" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openpnp/wibrvh1Omb4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openpnp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/ee00099a-a5f1-4a1e-b9e8-83737f1b7c65n%40googlegroups.com.

Mike Menci

unread,
Jul 2, 2022, 6:54:13 AM7/2/22
to OpenPnP
I see you have Buss 3.1 ??  USB 3 Gen 2 Hub - Try direct USB 2.0 ??
Mike

Sergii Ovcharenko

unread,
Jul 2, 2022, 7:18:52 AM7/2/22
to ope...@googlegroups.com
There are 4xthunderbolt 4 ports, 2x USBC ports, and 2 USB A ports on my mac, ive tried to connect to each one of them directly, through adapters and through powered usb hubs to no avail.

Im wondering if I should try some other USB A hub.

Also I put a breakpoint in the code and the reason the properties are greyed out is

2022-07-02 11:44:51.277 OpenPnpCaptureCamera$CapturePropertyHolder ERROR: org.openpnp.capture.CaptureException: Property Not Supported
at org.openpnp.capture.CaptureStream.getPropertyLimits(CaptureStream.java:48)
at org.openpnp.machine.reference.camera.OpenPnpCaptureCamera$CapturePropertyHolder.isSupported(OpenPnpCaptureCamera.java:514)
at org.openpnp.machine.reference.camera.OpenPnpCaptureCamera$CapturePropertyHolder.setStream(OpenPnpCaptureCamera.java:435)
at org.openpnp.machine.reference.camera.OpenPnpCaptureCamera.setPropertiesStream(OpenPnpCaptureCamera.java:266)
at org.openpnp.machine.reference.camera.OpenPnpCaptureCamera.open(OpenPnpCaptureCamera.java:198)

Could the property ids change?

--
Best regards,
Sergii Ovcharenko 

On 2 Jul 2022, at 11:54, Mike Menci <mike....@gmail.com> wrote:

I see you have Buss 3.1 ??  USB 3 Gen 2 Hub - Try direct USB 2.0 ??

Sergii Ovcharenko

unread,
Jul 2, 2022, 8:45:08 AM7/2/22
to OpenPnP
What's even more interesting is that I've tried CameraController and it can change camera properties while OpenPNP has these settings greyed out.

Screenshot of CameraController (02-07-2022, 13-37-26).png

mark maker

unread,
Jul 2, 2022, 5:32:59 PM7/2/22
to ope...@googlegroups.com

I guess @vonnieda or others would have to help here. Jason mentioned that native M1 support is not yet there, and I guess the restrictions come from there. The web cam drivers probably being somehow "proxied" by "virtual drivers" inside the Rosetta 2 abstraction.

Unfortunately, I know almost nothing about the native code and JNI side of OpenPnP, and Mac OS X, M1, Rosetta 2 etc.

_Mark

You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/bb6c5327-067c-4222-ad65-c4380f374afen%40googlegroups.com.

Sergii Ovcharenko

unread,
Jul 2, 2022, 5:37:28 PM7/2/22
to ope...@googlegroups.com
Thanks for the hint - ill try to run openpnp with java 17 that can run naively on m1


--
Best regards,
Sergii Ovcharenko 

On 2 Jul 2022, at 22:33, mark maker <ma...@makr.zone> wrote:



mark maker

unread,
Jul 2, 2022, 5:59:42 PM7/2/22
to ope...@googlegroups.com

Like I said, my knowledge is limited, but I think changing the Java version is not enough, because underneath the  OpenPnpCaptureCameras  there is the OpenPnP Capture library, which is a piece of C/C++ software, that is bound via JNI to Java. It is still currently packaged as X86 code, and it will tie into the OS X webcam driver using X86 API. My admittedly wild guess is that this API is only a limited-functionality proxy to the real native M1 webcam driver API.

A similar thing is true for all the OpenCv code, which is highly optimized, which I guess does not translate all that well with Rosetta 2. Don't expect best performance.

I hope somebody knowledgeable in these matters can port these native libs over.

_Mark

Sergii Ovcharenko

unread,
Aug 4, 2022, 9:51:58 AM8/4/22
to OpenPnP
Ok - it wasn't M1 related issue. It was the issue with openpnp-capture not working correctly on macOS 12

Luckily - the fix has been implemented a while ago (PR) but newer version wasn't plugged in.

I created a PR to bump openpnp-capture in openpnp-capture-java. If approved will bump in openpnp as well. PR

Reply all
Reply to author
Forward
0 new messages