processing / processing-video

GStreamer-based video library for Processing
274 stars 130 forks source link

NullPointerException and RuntimeException: Could not find device on Ubuntu 19.10 #150

Open omortie opened 4 years ago

omortie commented 4 years ago

I've had problem with old GStreamer deprecation on new Ubuntu versions, then I've came up with the solutions provided in this repo to download latest release v2 beta 4 and installed it manually on sketchbook/libraries, then I will see the library name in the Processing IDE -> Sketch -> Import Library -> Contributed -> Video now when I just try to play one the examples that have been shipped with the library itself, in the Capture part I will get the following output:

Code:

import processing.video.*;
Capture video;

void setup() {
size(640, 480);
printArray(Capture.list());
video = new Capture(this, Capture.list()[0]);

video.start();
}
void draw() {
image(video, 0, 0);
}
void captureEvent(Capture video) {
video.read();
}

Output:

Processing video library using GStreamer 1.16.1
[0] "USB2.0 0.3M UVC WebCam: USB2.0 "
RuntimeException: Could not find device USB2.0 0.3M UVC WebCam: USB2.0
RuntimeException: Could not find device USB2.0 0.3M UVC WebCam: USB2.0
RuntimeException: Could not find device USB2.0 0.3M UVC WebCam: USB2.0
RuntimeException: Could not find device USB2.0 0.3M UVC WebCam: USB2.0
RuntimeException: Could not find device USB2.0 0.3M UVC WebCam: USB2.0

or if I just try to run 'AsciiVideo' example of the video library beta4 version 2 I will get the following error:

Processing video library using GStreamer 1.16.1
NullPointerException
NullPointerException
NullPointerException
NullPointerException

also a gray window will appear and the camera will not be activated of course and no output.

System Info: OS: Ubuntu 19.10 KDE desktop GStreamer Version : 1.16.1 Processing IDE Version: 3.5.4

I've seen some people had this problem in the comments without any solution then I decided to open it's own issue.

mnovoa commented 4 years ago

same issue