Hello,
I’m trying to use my camera with Capture for the first time and I got some issues… I’m on a MacBook Pro with the M1 chip.
I’ve downloaded the “Video Library for Processing 4” developed by The Processing Foundation and based on GStreamer.
I’m trying to run the most basic example of code:
import processing.video.*;
Capture cam;
void setup() {
size(640,480);
background(200,0,0);
String[] cameras = Capture.list();
cam = new Capture(this,cameras[0]);
cam.start();
}
void draw() {
if (cam.available() == true) {
cam.read();
}
image(cam, 0, 0);
}
And every time I run it, or another one, I got this error:
(Processing core video:9266): GStreamer-CRITICAL **: 18:23:28.932: gst_bin_add_many: assertion 'GST_IS_ELEMENT (element_1)' failed
(Processing core video:9266): GStreamer-CRITICAL **: 18:23:28.945: gst_element_link_pads_full: assertion 'GST_IS_ELEMENT (dest)' failed
and sometimes:
Could not run the sketch (Target VM failed to initialize).
For more information, read Help → Troubleshooting.
Sometimes it gets even worse and Java crashes, then I got an error report.
I’ve updated Java, and even downloaded GStreamer from the official website, but I still get this error.
I tried to debug it with printing things to know what could go wrong, and the error seems to appear by the line:
cam = new Capture(this,cameras[0]);
So I guess that’s here we load the camera informations, but I still couldn’t fix the issue since I don’t find any answers on the web…
I thought the issue was about the mac built-in camera, but I also tried with another USB-logitech-camera and it still doesn’t work.
Could you help me please ?