Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't open on Raspberry Pi install of UGS #7

Open
BMX1253 opened this issue Aug 19, 2021 · 12 comments
Open

Can't open on Raspberry Pi install of UGS #7

BMX1253 opened this issue Aug 19, 2021 · 12 comments

Comments

@BMX1253
Copy link

BMX1253 commented Aug 19, 2021

I was able to install the plugin file on my Windows laptop, and was able to use the USB webcam.

When I installed the nbm file on my Raspberry Pi that I have at my CNC Router, I was not able to get the Camera plugin to load into the main UGS screen. I was able to see the camera plugin on the plugin slide out under the Window dropdown tab. But after I selected it, nothing showed in the main screen and when I went back to try again, it was like the Camea plugin was already selected.

This plug in could be super useful for supervising my router while I am not in the garage going deaf next to the router. HAHA

Thanks for all the work you put in!

@pelrun
Copy link
Owner

pelrun commented Aug 21, 2021

So I used sarxos/webcam-capture to handle cross-platform camera access, and it has a current issue with RPi, that at a minimum will require me to rebuild the npm to resolve. Unfortunately that's a bit of an undertaking and I keep forgetting about it, but you're not the first to ask. I'll try harder to make the time.

@pdelorme
Copy link

pdelorme commented Jan 4, 2022

Did you get a chance to work on it? It's a pitty that your camera plug in doesn't work on rpi. That would be great... Thanks.

@pelrun
Copy link
Owner

pelrun commented Jan 4, 2022

I set up github to build it a couple of weeks ago, although I personally haven't tested the result. It's got the latest versions of the dependencies, so I'm hoping it'll work better on the Pi: https://github.com/pelrun/ugs-platform-plugin-camera/releases/tag/v1.2

@pdelorme
Copy link

pdelorme commented Jan 4, 2022

Hi. I actually just compiled and check your new version with the latest dependencies and it still doesn't work on my rpi3/raspian. nothing is displayed when going to /windows/plugin/camera. anyway to have some logs so I can investigate ?

@pelrun
Copy link
Owner

pelrun commented Jan 4, 2022

The relevant information is probably here: https://github.com/sarxos/webcam-capture/wiki/How-To-Configure-Raspberry-Pi

@pdelorme
Copy link

pdelorme commented Jan 4, 2022

thnx, i'll have a look tonight and let you know.

@pdelorme
Copy link

pdelorme commented Jan 5, 2022

I did try adding all the recommanded libraries and added the folowing code

    static {
        Webcam.setDriver(new V4l4jDriver()); // this is important
    }

but what ever I do I keep having the following error in the logs :

SEVERE [global]
java.lang.UnsatisfiedLinkError: /tmp/libs4186288210078880747/libvideo.so: libjpeg.so.8: Ne peut ouvrir le fichier d'objet partag▒: Aucun fichier ou dossier de ce type
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1934)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1850)
        at java.lang.Runtime.loadLibrary0(Runtime.java:871)
        at java.lang.System.loadLibrary(System.java:1124)
        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.<clinit>(V4l4jDriver.java:33)
        at net.pelrun.ugs.nbm.cameraTopComponent.<clinit>(cameraTopComponent.java:153)
        ...

@pelrun
Copy link
Owner

pelrun commented Jan 6, 2022

Sounds like you just need to install libjpeg8. sudo apt install libjpeg8 perhaps?

@pdelorme
Copy link

pdelorme commented Jan 6, 2022

didn't find where to get libjpeg8 for raspbian.
installed libjpeg9
updated dependencies to latest version.
still same error.

sudo apt-get install libjpeg8
>> cannot find packet libjpeg8
sudo apt-get install libjpeg9
>> installing ok.

@pelrun
Copy link
Owner

pelrun commented Jan 7, 2022

Wow, there's a real mess there. In short, I think the package you want is libjpeg-turbo, which apparently provides libjpeg8 support. I'm not in a position to test it atm. libjpeg9 is mostly useless and you may as well get rid of it.

@pdelorme
Copy link

pdelorme commented Jan 8, 2022

this is the libjpeg packages I have available :

sudo apt search libjpeg
En train de trier... Fait
Recherche en texte int▒gral... Fait
gem-plugin-jpeg/stable 1:0.94-3 armhf
  Graphics Environment for Multimedia - JPEG support

guetzli/stable 1.0.1-1 armhf
  perceptual JPEG encoder

imgsizer/stable 2.10-0.1 all
  Adds WIDTH and HEIGHT attributes to IMG tags in HTML files

jp2a/stable 1.1.0-1 armhf
  converts jpg and png images to ascii

libjpeg-dev/stable 1:2.0.6-4 armhf
  Development files for the JPEG library [dummy package]

libjpeg-progs/stable 1:9b-1 armhf
  Programs for manipulating JPEG files

libjpeg-tools/stable 0.0~git20210129.91985dc-1 armhf
  Complete implementation of 10918-1 (JPEG)

libjpeg-turbo-progs/stable,now 1:2.0.6-4 armhf  [install▒]
  Programs for manipulating JPEG files

libjpeg62-turbo/stable,now 1:2.0.6-4 armhf  [install▒]
  libjpeg-turbo JPEG runtime library

libjpeg62-turbo-dev/stable,now 1:2.0.6-4 armhf  [install▒]
  Development files for the libjpeg-turbo JPEG library

libjpeg7/stable 7-2 armhf
  The Independent JPEG Group's JPEG runtime library (v7)

libjpeg7-dbg/stable 7-2 armhf
  Debugging files for the IJG JPEG library (v7)

libjpeg9/stable 1:9b-1 armhf
  Independent JPEG Group's JPEG runtime library

libjpeg9-dbg/stable 1:9b-1 armhf
  Development files for the IJG JPEG library

libjpeg9-dev/stable 1:9b-1 armhf
  Development files for the IJG JPEG library

libturbojpeg0/stable,now 1:2.0.6-4 armhf  [install▒, automatique]
  TurboJPEG runtime library - SIMD optimized

libturbojpeg0-dev/stable 1:2.0.6-4 armhf
  Development files for the TurboJPEG library

I did try with with libjpeg-turbo-progs, libjpeg62-turbo, libjpeg62-turbo-dev and libjped-tools.
I still have the same error java.lang.UnsatisfiedLinkError: /tmp/libs1908031935922643770/libvideo.so: libjpeg.so.8: Ne peut ouvrir le fichier d'objet partag▒: Aucun fichier ou dossier de ce type when doing Webcam.setDriver(new V4l4jDriver());

an issue on this is open on sarxos/webcam-capture since 2019 with no answer... sarxos/webcam-capture#701

this is not smelling good...

@pdelorme
Copy link

previous attemps where on raspbian bullseye.
I did reinstall with "Raspbian buster"
now libjpeg8 is installing ok.
no more libjped.so.8 error.
but : GUI is freezing and i get the folowing logs :

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

looks like this package is deprecated...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants