sarxos / webcam-capture

The goal of this project is to allow integrated or USB-connected webcams to be accessed directly from Java. Using provided libraries users are able to read camera images and detect motion. Main project consist of several sub projects - the root one, which contains required classes, build-in webcam driver compatible with Windows, Linux and Mac OS, which can stream images as fast as your camera can serve them (up to 50 FPS). Main project can be used standalone, but user is able to replace build-in driver with different one - such as OpenIMAJ, GStreamer, V4L4j, JMF, LTI-CIVIL, FMJ, etc.
http://webcam-capture.sarxos.pl
MIT License
2.27k stars 1.11k forks source link

Webcam Capture API not working in Mac with Arm architecture #930

Open namrathalokesh19 opened 5 months ago

namrathalokesh19 commented 5 months ago

On using default driver of Webcam Capture API, not able to access the webcam of Macbook pro with M1 architecture. It is failing to initialise the BridJ with below error.

java.lang.RuntimeException: Failed to initialize BridJ (java.lang.UnsatisfiedLinkError: Can't load library: /var/folders/xf/t03s0z0n0f39m0rqld70wf380000gn/T/BridJExtractedLibraries16145624487360412057/libbridj.dylib) at org.bridj.Platform.initLibrary(Platform.java:444) at org.bridj.Platform.(Platform.java:228) at com.github.sarxos.webcam.ds.buildin.natives.OpenIMAJGrabber.(OpenIMAJGrabber.java:59) at com.github.sarxos.webcam.ds.buildin.WebcamDefaultDriver$WebcamNewGrabberTask.handle(WebcamDefaultDriver.java:55) at com.github.sarxos.webcam.WebcamProcessor$AtomicProcessor.run(WebcamProcessor.java:81) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) at java.base/java.lang.Thread.run(Thread.java:1589) Caused by: java.lang.UnsatisfiedLinkError: Can't load library: /var/folders/xf/t03s0z0n0f39m0rqld70wf380000gn/T/BridJExtractedLibraries16145624487360412057/libbridj.dylib at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2408) at java.base/java.lang.Runtime.load0(Runtime.java:785) at java.base/java.lang.System.load(System.java:2009) at org.bridj.Platform.initLibrary(Platform.java:420)

eduramiba commented 5 months ago

I would recommend you try https://github.com/eduramiba/webcam-capture-driver-native

El mar, 4 jun 2024 a las 13:58, namrathalokesh19 @.***>) escribió:

On using default driver of Webcam Capture API, not able to access the webcam of Macbook pro with M1 architecture. It is failing to initialise the BridJ with below error.

java.lang.RuntimeException: Failed to initialize BridJ (java.lang.UnsatisfiedLinkError: Can't load library: /var/folders/xf/t03s0z0n0f39m0rqld70wf380000gn/T/BridJExtractedLibraries16145624487360412057/libbridj.dylib) at org.bridj.Platform.initLibrary(Platform.java:444) at org.bridj.Platform.(Platform.java:228) at com.github.sarxos.webcam.ds.buildin.natives.OpenIMAJGrabber.(OpenIMAJGrabber.java:59) at com.github.sarxos.webcam.ds.buildin.WebcamDefaultDriver$WebcamNewGrabberTask.handle(WebcamDefaultDriver.java:55) at com.github.sarxos.webcam.WebcamProcessor$AtomicProcessor.run(WebcamProcessor.java:81) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) at java.base/java.lang.Thread.run(Thread.java:1589) Caused by: java.lang.UnsatisfiedLinkError: Can't load library: /var/folders/xf/t03s0z0n0f39m0rqld70wf380000gn/T/BridJExtractedLibraries16145624487360412057/libbridj.dylib at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2408) at java.base/java.lang.Runtime.load0(Runtime.java:785) at java.base/java.lang.System.load(System.java:2009) at org.bridj.Platform.initLibrary(Platform.java:420)

— Reply to this email directly, view it on GitHub https://github.com/sarxos/webcam-capture/issues/930, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABQFJJB5MHC64WF5V2QFJTZFWTX5AVCNFSM6AAAAABIYLQIW2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGMZTGMZUGMYDIOA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

YoussefHachicha commented 3 months ago

dosent web campture support all desktop platffroms ??

SWSpratlin commented 2 months ago

Confirming the NativeDriver works on Mac M1