Processing can't find the camera - Video Libraries don't work

Hey!
For some reason whenever I try an example from a library, it doesn’t work.
It opens a gray window and after it freezers for a while and then reports an error.

For example when I run GettingStartedCapture I get:

Processing video library using GStreamer 1.16.2
There are no cameras available for capture.
WARNING: no real random source present!

When I try multiMarker from NyAR4psg:

NyAR4psg/3.0.7;NyARToolkit/5.0.9
Processing video library using GStreamer 1.16.2
IllegalStateException: Could not find any devices

I run it on Windows 10.

Thanks in advance,
fozon

Is your camera build-in or on usb?

Did you try this : https://processing.org/reference/libraries/video/Capture_list_.html

Please also show your code

1 Like

hey Chrisir

my camera is inbuilt and the code you suggested gave me also something like no cameras found.

Actually, I’ve found the strangest solution to my problem:
i had to open processing in different architecture than my pc has and also i had to change the path to sketchbook folder…

so like my pc is 64x but i opened processing for x32 and i have 0 idea why that worked …
im so afraid it gonna blow up somehow later

1 Like

I am also having trouble with the webcam. I used the code found on the example by @Chrisir and also am using processing for x32 on my x64 windows 10. am I missing something?

the error i get is this:

WARNING: no real random source present!










can't load library libcrypto-1_1-x64 (libcrypto-1_1-x64|liblibcrypto-1_1-x64|liblibcrypto-1_1-x64-0) with -Djna.library.path=C:/Users/User/Documents/Processing/libraries/video/library/windows32. Last error:java.lang.UnsatisfiedLinkError: Unable to load library 'libcrypto-1_1-x64':
The specified module could not be found.

The specified module could not be found.

The specified module could not be found.

Native library (win32-x86/libcrypto-1_1-x64.dll) not found in resource path ([file:/C:/Users/User/AppData/Local/Temp/sketch_201105a7376270401895390455temp/, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/core/library/core.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/core/library/gluegen-rt-natives-linux-aarch64.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/core/library/gluegen-rt-natives-linux-amd64.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/core/library/gluegen-rt-natives-linux-armv6hf.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/core/library/gluegen-rt-natives-linux-i586.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/core/library/gluegen-rt-natives-macosx-universal.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/core/library/gluegen-rt-natives-windows-amd64.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/core/library/gluegen-rt-natives-windows-i586.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/core/library/gluegen-rt.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/core/library/jogl-all-natives-linux-aarch64.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/core/library/jogl-all-natives-linux-amd64.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/core/library/jogl-all-natives-linux-armv6hf.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/core/library/jogl-all-natives-linux-i586.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/core/library/jogl-all-natives-macosx-universal.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/core/library/jogl-all-natives-windows-amd64.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/core/library/jogl-all-natives-windows-i586.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/core/library/jogl-all.jar, file:/C:/Users/User/Documents/Processing/libraries/video/library/gst1-java-core-1.2.0.jar, file:/C:/Users/User/Documents/Processing/libraries/video/library/jna.jar, file:/C:/Users/User/Documents/Processing/libraries/video/library/video.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/lib/, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/lib/pde.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/core/library/core.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/lib/jna.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/lib/jna-platform.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/lib/antlr.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/lib/ant.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/lib/ant-launcher.jar])
can't load library libssl-1_1-x64 (libssl-1_1-x64|liblibssl-1_1-x64|liblibssl-1_1-x64-0) with -Djna.library.path=C:/Users/User/Documents/Processing/libraries/video/library/windows32. Last error:java.lang.UnsatisfiedLinkError: Unable to load library 'libssl-1_1-x64':
The specified module could not be found.

The specified module could not be found.

The specified module could not be found.

Native library (win32-x86/libssl-1_1-x64.dll) not found in resource path ([file:/C:/Users/User/AppData/Local/Temp/sketch_201105a7376270401895390455temp/, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/core/library/core.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/core/library/gluegen-rt-natives-linux-aarch64.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/core/library/gluegen-rt-natives-linux-amd64.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/core/library/gluegen-rt-natives-linux-armv6hf.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/core/library/gluegen-rt-natives-linux-i586.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/core/library/gluegen-rt-natives-macosx-universal.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/core/library/gluegen-rt-natives-windows-amd64.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/core/library/gluegen-rt-natives-windows-i586.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/core/library/gluegen-rt.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/core/library/jogl-all-natives-linux-aarch64.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/core/library/jogl-all-natives-linux-amd64.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/core/library/jogl-all-natives-linux-armv6hf.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/core/library/jogl-all-natives-linux-i586.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/core/library/jogl-all-natives-macosx-universal.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/core/library/jogl-all-natives-windows-amd64.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/core/library/jogl-all-natives-windows-i586.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/core/library/jogl-all.jar, file:/C:/Users/User/Documents/Processing/libraries/video/library/gst1-java-core-1.2.0.jar, file:/C:/Users/User/Documents/Processing/libraries/video/library/jna.jar, file:/C:/Users/User/Documents/Processing/libraries/video/library/video.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/lib/, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/lib/pde.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/core/library/core.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/lib/jna.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/lib/jna-platform.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/lib/antlr.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/lib/ant.jar, file:/C:/Users/User/Desktop/Processing%2032/processing-3.5.4/lib/ant-launcher.jar])

(java.exe:13288): GStreamer-WARNING **: 17:16:13.272: Failed to load plugin 'C:\Users\User\Documents\Processing\libraries\video\library\windows32\gstreamer-1.0\libgstdtls.dll': 'C:\Users\User\Documents\Processing\libraries\video\library\windows32\gstreamer-1.0\libgstdtls.dll': The specified module could not be found.
Processing video library using GStreamer 1.16.2
There are no cameras available for capture.
WARNING: no real random source present!

I’ve been experiencing the same problem with Processing’s video library.

I get the webcam to work by repeatedly clicking Run and encountering the ‘No Devices Found’ error until it eventually works.

I also have the same problem. Before, I could run it by tapping it several times, but now it’s getting more and more difficult.I have never encountered this situation before.

I have same problem, when I use printArray(Capture.list()), there is a camera but when I use that as a cameraName I have an error: ArrayIndexOutOfBoundsException: 0
How can I fix this problem?

Possibly try using pipeline:autovideosrc as the camera name.

4 Likes

Thanks a lot @neilcsmith !!! I’ve suffered during long hour on Windows 10 trying to solve this…

1 Like

Glad it worked. For a variety of reasons, that should really be the default behaviour. The Video library needs someone to take a serious look at it. There’s a bunch of stuff that has not been correctly updated for GStreamer 1.x. I can provide guidance on that if someone takes it on.

2 Likes

Excuse me!
i have the same problem.
how can i do this ( using pipeline:autovideosrc as the camera name) for solving my problem.
thancks alot

I think you want to try removing all the capture list stuff and just use -

cam = new Capture(this, "pipeline:autovideosrc");
7 Likes

Thank you very much for that workaround. I also had the problem that gstreamer was already installed (for development) and processing did not use the pre-bundled one, but the one in C:\gstreamer\1.0\x86_64\bin. Fixed this by renaming the folder (changing env variables did not help).

Yeah it would be great to fix the video plugin for Processing. I already thought about creating a new lib based on FrameGrabber to not be dependent on processing-video…

1 Like

Well, it would be better if Processing Video didn’t bundle GStreamer at all, and just pointed at the upstream installers. A FrameGrabber library might be interesting, but a properly complete GStreamer-based library could offer so much more! So, why not fork / fix Processing Video instead? Far easier, and I’m happy to advise on that - does the FrameGrabber developer know Processing?! :wink:

From my experience with gstreamer (at least on the C++ dev side), it was quite a hustle to setup the prerequisites on all major platforms. I guess it makes sense to ship gstreamer bundled, because people using Processing (not library devs) are usually not happy to install any more dependencies.

To be honest, most of the time I am not using most of the gstreamer features, but just a simple pipeline for capturing a webcam. Why do we need the full gstreamer collection for that? Thats why in my opinion it makes sense to have a very simple webcam library, which can be used in these “simple” project.

If Samuel knows Processing? :man_shrugging:t2: But I know the FrameGrabber structure from implementing the RealSense2 binding for it. And I already wrote something similar for a project where I used Processing & JavaCV together.

The question is more, if it makes sense to replace gstreamer with opencv (which is quite bloated as well). It may make more sense to create a binding to webcam-capture.

GStreamer was a hassle to set up multi-platform, but a lot of work went in upstream on this, and the installers are fairly hassle free these days. Up to you what you use - I disagree the other options are particularly better. As the lead on GStreamer’s Java bindings in use in Processing Video I’m happy to help anyone out who wants to take on the work.

Why would you disagree on the other options? I quickly built a proof of concept Capture device with webcam-capture as the underlaying technology. It works pretty well on my Windows and Ubuntu (MacOS is currently a bit more difficult as you know too), and is only 1.8 MB in size.

https://github.com/cansik/webcam-capture-processing

That’s enough for most of my use-cases and I think for most of the Processing users, a simple library for video capture would be sufficient.

Going on the number of questions I’ve answered on various aspects of the video library. Yes, webcam-capture library covers a proportion of cameras, although potentially less efficiently, and on some systems by the look of it (no Pi support?). However, to be fair, I hadn’t looked at that library for a long time, and hadn’t realised there was now built-in native defaults.

Still, the more options the better - there are lots of ways people want to use video with Processing, including playback, capture, recording and streaming. All that could be exposed via GStreamer in one library if someone wanted to take it on - the bindings support is all there for it. Processing Video is most of the way there, just needs a little love from someone.

2 Likes

At first I was having problems with the plugin. It kept saying the plugin didn’t exists so I delete and redownload the application and now its say this…

WARNING: no real random source present!
Processing video library using GStreamer 1.16.2
IllegalStateException: Could not find any devices
IllegalStateException: Could not find any devices
IllegalStateException: Could not find any devices
IllegalStateException: Could not find any devices

do anybody have any ideas how to fix this?