Repository navigation
OSX 14.4.1 Sonoma upgrade breaks USB webcams - seems to be an issue with Java/Processing video library #226
Description
Activity
I have similar issues with a Macbook M1 chip and Sonoma 14.5 . :/
Reacted by rodolfoacostacastroI have not been able to fix this problem. My solution has been to use Continuity camera with my iPhone as a webcam and/or the Canon EOS webcam Utility with a Canon EOS 6D DSLR camera. Both work. The Canon solution is great as it allows you to use a professional level camera with a serious lens of your own choice, and to have everything set to manual (very good if you require a stable image for image processing, such as background removal). A webcam is much easier to use, and small, but it doesn't allow for this level of control. So, it's a trade-off. The iPhone gives good image quality and is really easy to use (wireless and everything) but like a webcam it doesn't offer as much control as a professional DSLR - so if you require that control I'd recommend using the Canon solution. Of course that requires you have a compatible Canon DSLR lying around.
I'd hoped that OS14.5 might fix the issue - but sounds like that was too much to wish for...
Ey thanks for the alternative. I will try also the Continuity Camera. This was my workaround: I used OBS to start a virtual camera and then I changed the code to initiate the camera in processing to:
cam = new Capture(this, "pipeline:autovideosrc" );This change also work if you are using Windows 11 and you are having the same issue, only difference is that in windows you don’t need the virtual camera. In OS14.5 I had problems with 3 different external webcams. It took a while to figure it out and yeah, it’s an ugly solution. I hope this gets fixed soon.
- You are right - this worked for me too - but it was very slow. Too slow to be useful for my purposes. best wishes Simon Biggs http://www.littlepig.org.uk ***@***.*** http://amazon.com/author/simonbiggs https://people.unisa.edu.au/Simon.Biggs…On 17 May 2024, at 16:46, rodolfoacostacastro ***@***.***> wrote: Ey thanks for the alternative. I will try also the Continuity Camera. This was my workaround: I used OBS to start a virtual camera and then I changed the code to initiate the camera in processing to: cam = new Capture(this, "pipeline:autovideosrc" ); This change also work if you are using Windows 11 and you are having the same issue, only difference is that in windows you don’t need the virtual camera. In OS14.5 I had problems with 3 different external webcams. It took a while to figure it out and yeah, it’s an ugly solution. I hope this gets fixed soon. — Reply to this email directly, view it on GitHub <#226 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AARAAVVKFWB77WI5QYWAVK3ZCWVFHAVCNFSM6AAAAABFPAWWCSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJWHEYDMOJSHE>. You are receiving this because you authored the thread.
Yeah this is becoming a quite frustrating problem for the students who are not using touch designer.
After installing the latest version(1.26.8) of the gstreamer library on my system(macos 26), capture works now.
I tested several different versions of gstreamer, and the framerate caps returned different values. In particular, for 30 fps, 1.26.8 reports 30/1, while 1.20.3 (the version currently used by the video library) reports 10000000/333333.Thanks jaegonlee!
That's very interesting. I am currently using a Macbook M3 running OSX14.4.1 and Processing 4. I am having good results using Canon's webcam utility, being able to use good quality cameras and lenses and well integrated with Processing 4. If I was to try updating my GStreamer library to 1.26.8 do you think it would work in OSX14.4.1? I ask, as the Canon webcam utlility has not been updated to work beyond OSX14 and I do not want to break that by updating my OS.
Also, could updating GStreamer potentially break any other bits of Processing? Have you had any secondary issues since updating?
Look forward to your response.
SimonAfter installing the gstreamer library system-wide, you can test it directly with Processing. If you rename or temporarily move the macos-aarch64 folder inside Processing’s Video library directory, Processing fall back to using the system-installed gstreamer instead of the bundled one.
Some of the gstreamer components may have version-compatibility issues, but in my case both of the webcams I’m using work fine with this approach.
If anything goes wrong with the newer gstreamer, you can simply restore the original macos-aarch64 folder and Processing will use it.By the way, I also tested the canon webcam utility with video library(gstreamer 1.20.3/1.26.8) on my system (macOS 26.1), and it works.
OS does show a warning saying that the utility’s extension has some issues, but despite the warning it still works on my system.
Thanks again jaegonlee!
I will try to do a temporary install of the new GStreamer library, as you suggest. If it works it at least restores the flexibility of being able to work with a range of USB cameras, although now that I am using the Canon webcam utility its general superority, in respect of image quality and control, means I will continue using it for most of my work.
Very interesting that the EOS webcam is working in OS26. My understanding is that since OSX15 the EOS webcam no longer worked as Canon had not updated the utlility. This is very good news. Sounds like when I do upgrade to OSX26 (probably when I also upgrade my hardware in a year or two) the webcam utility will work. That is reassuring.
May I ask which camera you were using with the webcam utility?
Many thanks
SimonHi Jaegonlee
Just a quick update. I tried running your code on my current system (without updating GStreamer, but using import processing.video.Capture;) and got the following message:We could not find a system-wide or bundled installation of GStreamer, but video might still work if GStreamer was placed somewhere else
UnsatisfiedLinkError: Could not load library: gstreamer
A library relies on native code that's not available.
UnsatisfiedLinkError: Could not load library: gstreamer
UnsatisfiedLinkError: Could not load library: gstreamer
Or only works properly when the sketch is run as a 32-bit application.
UnsatisfiedLinkError: Could not load library: gstreamer
Could not run the sketch (Target VM failed to initialize).
For more information, read Help → Troubleshooting.Strangely, when I run my own code I am getting the same error, which is new. Looks like my system is broken, which is a bit of a problem. Back to the drawing board!
best wishes
SimonHi Jaegomlee
I've tested running the same version of GStreamer as you have (1.20.3) with Processing 4 in Mac OSX14.4.1 on a Macbook Pro M3. It does not seem to have broken the Canon Webcam Utility and it works with the inbuilt Facetime camera of the laptop, but it does not work with a third part USB webcam (Logitech Brio 500). You can see the result below (running the capture example that is included with GStreamer):

Hi Jaegomlee
I've tested running the same version of GStreamer as you have (1.20.3) with Processing 4 in Mac OSX14.4.1 on a Macbook Pro M3. It does not seem to have broken the Canon Webcam Utility and it works with the inbuilt Facetime camera of the laptop, but it does not work with a third part USB webcam (Logitech Brio 500). You can see the result below (running the capture example that is included with GStreamer):
Try setting the framerate like 20, or 10
cam = new Capture(this, "Brio 500", 20);I have a Logitech C920, and it fails to capture at 30fps(default) with 1.20.3.
It looks like the video library and gstreamer (1.20.3) fail to properly negotiate the capture framerate on macOS, with 30 fps being especially problematic.Hi Jaegonlee
You are right. Changing the framerate to 20fps allows the webcam feed from the Logitech Brio 500 camera to work. Weird the protocol is so sensitive. Thanks so much for your assistance on this. I know quite a few people have been struggling with the seemingly broken Java video libraries for a couple of years. You have found a clear fix. Brilliant!
Simon
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();
}
}