Skip to content

video capture causes GStreamer-CRITICAL error on Apple Silicon (M1) #208

@SableRaf

Description

@SableRaf

Description

Attempting to initialize camera capture on Apple Silicon causes a critical error in GStreamer. On an Intel Mac, the same issue does not happen. Note: this issue has been mentioned on the forum here.

Expected Behavior

The camera capture should be initiated without errors.

Current Behavior

A critical error is raised and the camera capture can not be initiated. See below:

Processing video library using bundled GStreamer 1.20.3
Scanning GStreamer plugins... Done.
Available cameras:
FaceTime HD Camera

(Processing core video:4365): GStreamer-CRITICAL **: 13:31:26.506: gst_bin_add_many: assertion 'GST_IS_ELEMENT (element_1)' failed

(Processing core video:4365): GStreamer-CRITICAL **: 13:31:26.513: gst_element_link_pads_full: assertion 'GST_IS_ELEMENT (dest)' failed

Steps to Reproduce

  1. Use an M1 MacBook Pro
  2. Try running the capture example from the reference
  3. See errors in the console

Below is a stripped down version of the example that still triggers the error. The error doesn't happen if you comment out cam = new Capture(this, cameras[0]);

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

    cam = new Capture(this, cameras[0]);
    //cam.start();     
  }      
}

Your Environment

  • Processing version: 4.0.1
  • Operating System and OS version: MacOS 12.5.1 Monterey
  • Other info: M1 Max CPU

Possible Causes / Solutions

Unknown

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions