Comments (17)
Ah, if I shut the window an exception is raised:
(java.exe:7388): GStreamer-CRITICAL **:
Trying to dispose element Video Capture, but it is in READY instead of the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
This problem may also be caused by a refcounting bug in the
application or some element.
Other people appear to have sorted by installing gstreamer. Interesting neither the Capture nor Video pages actually tell you that you might need to install a separate driver package.
Upshot, however, is installing gstreamer from gstreamer site does not fix the problem with the display not drawing (capture event not happenning?), however, it appears to have fixed the problem with the exception being raised when one closes the window.
from processing-video.
So I have verified the camera is fine when using another Java based library (https://github.com/sarxos/webcam-capture). I will play with using that library in Processing instead.
from processing-video.
Hi there,
I'm having the same problem with a Lenovo Yoga and with a Dell windows tablet.
Tried a lot of Processing versions 2.0.3, 2.2.1, and all the 3 betas.
As you I get available cameras, but seems not capture event happening.
Funny thing if I connect a usb camera to any of the devices that camera works...
Did you solve it?
Are you using that other library?
If so, could you post a little example, I don't really know how to start with it...
Thanks!
from processing-video.
@txeni yes. I will post something this weekend. Stay tuned.
from processing-video.
@Bazmundi thanks soooo much!
Please, please, please do as soon as you can, it's driving me crazy and I'm in deep deadline shit!
from processing-video.
Notes on my blog for you at:
https://organicmonkeymotion.wordpress.com/2015/08/22/getting-webcams-working-in-processing/
from processing-video.
Thank you so much!!!
I'll have a look :)
from processing-video.
Got the mini-screen working!
I'll keep at it to see if I can actually get the frames, basically that's what i need from the camera each individual frame to play with it.
I should be able to find a way to get them and then transform them to PImage, looking at the library examples right now.
Thank you soooooo much!
from processing-video.
@txeni I only poked around on the Internet, thank Bartosz Firyn who wrote the library ;) Good luck with your deadline.
from processing-video.
In case anyone else is going this route this is how I converted BufferedImage to PImage:
BufferedImage cap = webcam.getImage();
PImage screen = new PImage(cap.getWidth(),cap.getHeight(),PConstants.ARGB);
cap.getRGB(0, 0, screen.width, screen.height, screen.pixels, 0, screen.width);
screen.updatePixels();
from processing-video.
And this is how I imitated the camera example using this library:
import com.github.sarxos.webcam.Webcam;
import com.github.sarxos.webcam.WebcamPanel;
import com.github.sarxos.webcam.WebcamResolution;
import java.awt.Dimension;
import java.awt.Image;
import java.awt.image.BufferedImage;
Webcam webcam;
void setup()
{
size(displayWidth, displayHeight);
imageMode(CENTER);
for (Webcam camlist : Webcam.getWebcams ()) {
println(camlist.getName());
for (Dimension res : camlist.getViewSizes()) println(res.toString());
}
webcam = Webcam.getDefault();
//webcam = Webcam.getWebcamByName("iLook 300 0");
webcam.setViewSize(WebcamResolution.VGA.getSize());
webcam.open(true);
}
void draw()
{
BufferedImage cap = webcam.getImage();
PImage screen = new PImage(cap.getWidth(),cap.getHeight(),PConstants.ARGB);
cap.getRGB(0, 0, screen.width, screen.height, screen.pixels, 0, screen.width);
screen.updatePixels();
image(screen, width/2, height/2);
}
from processing-video.
@txeni Good job! If you need any image processing BoofCV is looking very good. Infact, it turns out in the Java examples they actually use the sarxos webcam-capture library 0.3.10 so there are examples of how to get the camera image into BoofCV shenanigans.
from processing-video.
hey guys, I just saw this thread. The webcam-capture library looks really amazing, and I'm happy to know it solves the capture issues for people. I wonder if it would make sense to internally replace gstreamer for the Capture class and use webcam-capture instead.
from processing-video.
Hey, the library works fine for a lot of cameras, but some of them don't go over 640x480, i think because they use h264 compression after that, but i'm not sure, just my theory after reading this by the creator of the library:
"most of these fancy cameras with UHD resolutions comes with the dedicated software that integrates with Windows and works on top of the h.264 that is natively supported by webcam, but Java API is not able to use it (usually RGB24 format is used, or YUV, no h.264 support)." sarsox here: sarxos/webcam-capture#380
Getting newer versions of gstreamer to work with processing's video library would be amazing...
from processing-video.
So I am here from searching for solution to my camera issues with Processing.
Having similar problems , camera in list but not capturing, using 640x480 , still no luck
Did this integration ever happen in newer version of Processing? or is it still the same ?
Has there been any update of the video library in Processing to solve these issues?
I have tryed 4 cameras, the ones that show up as Image devices in Device manager and are UVC work up to 5MP no problem!
But other cameras that install under Sound, Video and Game controllers in Device Manager do not.
I also have a Sentech 5MP camera that uses USB3.0Vision, it installs under Sentech in Device manager and does not show up in camera list at all.
Is there any other library that would integrate with Processing for USB3 Vision support?
Thanks!
from processing-video.
@jeffmarc10 @txeni @Bazmundi Returning to this old issue, in case it is still relevant, the latest beta of the video library uses GStreamer 1.x so it might have better support for capture devices. It also has some preliminary support for custom pipelines, which could help with more specialized capture hardware, as discussed here. The beta is not available through the Contributions Manager, so you have to install it manually, but the upcoming stable v2.0 release will be.
from processing-video.
No updates on this issue, closing.
from processing-video.
Related Issues (20)
- Capture examples crash on Apple Silicon HOT 2
- Can't capture webcam pixel when switch to P3D, everything turns black HOT 7
- video capture causes `GStreamer-CRITICAL` error on Apple Silicon (M1) HOT 6
- video library HOT 3
- myMovie.time() returns incorrect value HOT 1
- camera on macOS HOT 1
- Can not use in RPI4? HOT 2
- Gstreamer shared libraries not found; Ubuntu HOT 2
- linux: no symlinks for libraries HOT 2
- Need to seek a movie using the scroll wheel
- Video library(capture) not working when exporting the application (Windows)
- GstBus infinite threads can lead to crash
- movieEvent bug in combination with mipmaps HOT 1
- libffi.so.7 missing from linux libs
- Processing exits without error message on invalid file name with P2D or P3D HOT 2
- video library not working on debian 12: "Unable to load library 'avresample'" and other error messages HOT 8
- importing existing gst library in library folder produce Error HOT 1
- Using the video library outside the pde
- bug in parseCaps
- OSX 14.4.1 Sonoma upgrade breaks USB webcams - seems to be an issue with Java/Processing video library HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from processing-video.