I’m trying to use an external Logitech webcam (Brio 300) in Processing on a Mac Mini M4 (Apple Silicon).
Processing detects the camera (it appears in the device list), but it fails to actually capture video. I get GStreamer / AVFoundation errors and the stream never starts.
After testing different Processing versions and libraries, it seems there might be a compatibility issue between Processing’s video stack (OpenGL / GStreamer / JOGL) and newer Apple Silicon Macs.
Has anyone managed to reliably use an external USB webcam with Processing on Apple Silicon (M1/M2/M3/M4)?
import processing.video.*;
Capture cam;
void setup() {
size(640, 480);
String[] cameras = Capture.list();
if (cameras.length == 0) {
println("There are no cameras available for capture.");
exit();
} else {
println("Available cameras:");
for (int i = 0; i < cameras.length; i++) {
println(cameras[i]);
}
// The camera can be initialized directly using an
// element from the array returned by list():
cam = new Capture(this, width, height, "pipeline:avfvideosrc device-index=0", 30);
cam.start();
}
}
void draw() {
if (cam.available() == true) {
cam.read();
}
image(cam, 0, 0);
// The following does the same, and is faster when just drawing the image
// without any additional resizing, transformations, or tint.
//set(0, 0, cam);
}
You can often find helpful answers in the Processing GitHub issues.
Try searching both open and closed issues with different keywords like video, GStreamer, or the exact error message.
This thread looks relevant:
Following links inside issues often leads to newer or related solutions and you will certainly learn a lot along the way.
Don’t get lost in there! I just did…
Also check out *** Related topics*** at the of this topic.
This improves image quality on my machine. I recommend keeping the first version as a safe fallback in case macOS or driver updates affect the pipeline.
Hope this helps others on newer Apple Silicon Macs. Thanks!