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.26k stars 1.11k forks source link

Raspberry Pi 3B : Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/libs6762512599666073353/libvideo.so: libjpeg.so.8: cannot open shared object file: No such file or directory #701

Open j1mmyx opened 5 years ago

j1mmyx commented 5 years ago

Hello sarxos.. I have problem while connecting USB webcam on Raspbian

OS : 2018-11-13-raspbian-stretch JRE on Raspbian : OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-2~deb9u1-b13) Hardware : Raspberry Pi 3B + USB Logitech C170 for testing

Coding using JDK 7 update 80 with netbeans 8.1 on windows 10

Library :

Error: sudo java -jar /home/pi/SvrFiles/RaspberryCamera.jar Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/libs6762512599666073353/libvideo.so: libjpeg.so.8: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1857) at java.lang.Runtime.loadLibrary0(Runtime.java:870) at java.lang.System.loadLibrary(System.java:1122) at com.github.sarxos.v4l4j.NativeUtils.loadLibraryFromJar(NativeUtils.java:98) at com.github.sarxos.v4l4j.V4L4J.init(V4L4J.java:50) at com.github.sarxos.webcam.ds.v4l4j.V4l4jDriver.(V4l4jDriver.java:33) at raspberrycamera.WebcamAccess.(WebcamAccess.java:11) at raspberrycamera.t.(t.java:23) at raspberrycamera.RaspberryCamera.main(RaspberryCamera.java:18)

My Code : package raspberrycamera;

import com.github.sarxos.webcam.Webcam; import com.github.sarxos.webcam.ds.v4l4j.V4l4jDriver; import java.awt.Dimension; import java.awt.image.BufferedImage;

public class WebcamAccess { public WebcamAccess() { Webcam.setDriver(new V4l4jDriver()); }
private boolean opened=false; private Webcam wc=null; public boolean open(){ try{ wc=Webcam.getDefault(); wc.setViewSize(new Dimension(640,480)); opened=wc.open(); }catch(Exception e){} return opened; } public BufferedImage getImage(){ if(opened)return wc.getImage(); else return open()?wc.getImage():null; } public void close(){ wc.close(); wc=null; opened=false; } } Note : This code work fine on windows without set driver "Webcam.setDriver(new V4l4jDriver());"

Any suggestion? Thank you...

pdelorme commented 2 years ago

I'm having the exact same issue. see discussion at https://github.com/pelrun/ugs-platform-plugin-camera/issues/7 Please advise...