External webcam not working on Apple Silicon (M4) Mac Mini

Hi everyone,

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)?

Is there a known workaround or recommended setup?

Thanks in advance.

There is a fix here: How to fix "Internal d... | Creative Technology Lab Wiki

Works on my Mac M2.

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);
}

Hello @Dulce_Criatura,

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 *** :sparkles:Related topics*** at the of this topic.

:)

Hi all, thanks for the links — they helped a lot.

I wanted to share what worked reliably on my setup
Mac mini M4 (Apple Silicon) + Logitech Brio 300 + Processing 4.x.

The main issue seems to be forcing FPS or the full Capture constructor, which often triggers:

BaseSrc: [avfvideosrc0] : Internal data stream error

Safe workaround

This works immediately and consistently:

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

It lets GStreamer handle device and format negotiation. The resolution is usually low, but it’s very stable.

Better quality (works so far)

cam = new Capture(
  this,
  "pipeline:autovideosrc ! video/x-raw,width=1280,height=720 ! videoconvert"
);

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!

1 Like