I did two things, but I don’t know if you need to do both or just one. At least just doing the first set of instructions didn’t work for me.
My mac version is Catalina 10.15.5 and my Processing version is 3.5.4
First:
Install the new version of the library:
- replace the video folder you have under the libraries folder (~/Documents/processing/libraries/video) with “video” folder from this url: https://github.com/processing/processing-video/releases/tag/r6-v2.0-beta4
- open the terminal cd to ~/Documents/processing/libraries/video/library/macosx
if you haven’t used the terminal before, this means: typecdleave an space and then copy~/Documents/processing/libraries/video/library/macosxand press ENTER - now, $ xattr -p com.apple.quarantine libavcodec.58.35.100.dylib
this means copy and pastexattr -p com.apple.quarantine libavcodec.58.35.100.dyliband press ENTER
This step will return string like this: 0081;5dc1bfaa;Chrome;78F18F7D-3F71-4E55-8D58-BAB946AB4707
use a text editor or other software to copy this string and replace 0081 with 00c1 and copy string. - Then replace STRING in the following command with your string $ xattr -w com.apple.quarantine “STRING” *.dylib
You might paste something like this in your terminal:xattr -w com.apple.quarantine "00c1;5dc1bfaa;Chrome;78F18F7D-3F71-4E55-8D58-BAB946AB4707" *.dyliband press ENTER
it will fix all libraries in this folder - Now cd to gstreamer-1.0/ and run command again:
This means: type cd gstreamer-1.0/ and press ENTER
now paste the same line you pasted previously:xattr -w com.apple.quarantine "00c1;5dc1bfaa;Chrome;78F18F7D-3F71-4E55-8D58-BAB946AB4707" *.dyliband press ENTER
Second:
- Install “processing-java” so you can run a sketch from terminal.
From the processing tools menu select – install processing-java. Select For all users when prompted. - Open terminal and run the gettingStartedCapture sketch or any sketch that tries to use the camera. Copy and paste the next line in the terminal (make sure you change “mg3273” for the name of your computer user):
processing-java --sketch=/Users/mg3273/Documents/Processing/libraries/video/examples/Capture/GettingStartedCapture --run
running the “GettingStartedCapture” sketch from terminal Catalina prompts you to allow permission!
You will get something like this:
Click OK and that will make your camera work from now on.
* this solution was compiled from this website: https://github.com/processing/processing-video/issues/134
Now the way you open the camera in processing should be like this:
import processing.video.*;
static final String CAMERA_NAME = “FaceTime HD Camera (Built-in)”;
Capture cam;
void setup() {
size(640, 480);
cam = new Capture(this, width, height, CAMERA_NAME);
cam.start();
}
void draw() {
if (cam.available()) {
cam.read();
}
image(cam, 0, 0);
}
or this:
import processing.video.*;
String[] cameras = Capture.list();
Capture cam;
void setup() {
size(640, 480);
cam = new Capture(this, cameras[0]);
cam.start();
}
void draw() {
if (cam.available()) {
cam.read();
}
image(cam, 0, 0);
}

Leave a Reply
You must be logged in to post a comment.