-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Webcam input keeps failing - OS X #471
Comments
Try FFmpeg instead. OpenCV is known to have various issues grabbing from cameras. |
I haven't tested it, but according to this page, the following should work: FrameGrabber grabber = new FFmpegFrameGrabber("");
grabber.setFormat("avfoundation");
grabber.start(); |
Besides also needing to add that to Gradle (v3.0.2-1.2, rest of the configuration should look like this Is there any other solution - OpenCV works for Linux and VideoInputFrameGrabber works for Windows, I guess we just need a solution for OS X. |
FFmpeg 3.1.1 is the latest version. Maybe you could try that and see? |
I tried looking into FFmpeg 3.1.1 and that seemed to return some weird errors with grade. However, I started looking into it some more and found that the code that we have appears to be using a device number to identify the camera - which worked very well as far as OpenCVFrameGrabber was concerned. However, FFmpegFrameGrabber isn't configured to the webcam as the device number - so our current system is out of the question. I ended up attempting a StringBuilder system, which while that gets around the issue it won't be able to connect to the webcam built into the Macbook Pro while running macOS and device number '1' resolves to the monitor on macOS. (The entire desktop was displayed.) The dependency stuff I used for FFmpeg 3.1.1 was: Any ideas? Thanks for the help thus far 😄 |
If you want to use FFmpeg4Java, please post your questions there, not here, thank you. |
I didn't see ffmpeg version 3.1.1 connected to bytedeco while looking at maven. Is there somewhere else that I should be looking for the source for Gradle instead of FFmpeg4Java? |
Build from source. |
Hello, I'm trying to load a webcam using JavaCV (which appears to be OpenCV with Java bindings - please correct me if I'm wrong, or on the wrong repo) but after 2 to 3 minutes of continuously grabbing images off of the webcam we get an exception:
Our GrabberService code (lines 59 to 100):
Is there something on our side that needs to be changed or does it look like a JavaCV issue?
The text was updated successfully, but these errors were encountered: