Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSX 14.4.1 Sonoma upgrade breaks USB webcams - seems to be an issue with Java/Processing video library #829

Open
SimonBiggsUK opened this issue Mar 29, 2024 · 2 comments

Comments

@SimonBiggsUK
Copy link

Hi all

Recently upgraded an M3 Macbook Pro from Sonoma 14.4 to 14.4.1. I am also working on projects that employ the Processing video library and external webcams (camera needs to be 10 metres away from computer, thus external). I've been very familiar with the warning message that appears in the Processing Console since Monterey

"java[13308:647912] WARNING: AVCaptureDeviceTypeExternal is deprecated for Continuity Cameras. Please use AVCaptureDeviceTypeContinuityCamera and add NSCameraUseContinuityCameraDeviceType to your Info.plist."

I understand that there is no fix for this at the moment (requires a rewrite of the video library). I also understand this issue affects people using OpenCV in other development environments (eg: Python). However, whilst I've been getting this warning for a couple of years the issue has not been fatal. With the OSX upgrade to 14.4.1 it does appear to be fatal, as Processing will no longer recognise an external webcam (have tested with a couple of different models), and simply displays a black screen and generates the following error:

"BaseSrc: [avfvideosrc0] : Internal data stream error."

Note that Processing is still working with the internal webcam and with Continuity Camera and that the external webcams still work with software such as Zoom, Facetime and Skype. The issue only seems to exist when addressing the cameras with Processing/Java.

I really need to be able to work with a remote video source in Processing and this is very annoying. I can use Continuity Camera and an iPhone for development, but this is not sustainable, especially when exhibiting works. The iPhone is also less controllable than higher end webcams and proves difficult in low-light environments, such as I work in (will not keep manual focus or shutter settings over periods of time).

Is anybody else having these issues? Has anyone found a work around? If not is there any expectation that Processing's video library will be updated for newer Mac's?

FYI, this is the function I use for initialising a video source:

void videoSetup(){ //initialise camera
vidX=width; //set camera resolution to monitor resolution (usually HD)
vidY=height;
FPS=30;
String[] cameras=Capture.list();
println(Capture.list());
if(cameras.length==0){
println("No cameras available for capture.");
exit();
} else {
video=new Capture(this,vidX,vidY,Capture.list()[0],FPS); //using continuity camera (iPhone)
video.start();
}
}

@jaegonlee
Copy link

I have similar issue with external usb webcam(no problems with my iphone).
work around:
video = new Capture(this, "pipeline:avfvideosrc device-index=0");

@SimonBiggsUK
Copy link
Author

Thanks jaegonlee
Yes - your solution works. However, I've tried it before and the video frame rate becomes too slow to be useful. Still the same with your solution. After a few frames the video doesn't seem to update anymore. Have you found this? Or do you update the video differently? I have the following (simple version):

void captureEvent(Capture video){ //automatically capture video
video.read();
image(video,0,0);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants