Java webcam ( hardware ) access

Is there a way in java to access a webcam?

  • More precisely, is there a generic way to capture video using the JMF?
  • I’ve seen tutorial for specific logitech webcams, but I’m looking for a method that capture video in a generic way.

Yes - IF there are ‘preformance packs’ for your java platform. so capturing on Windows works, and I think Linux… Mac OS X doesn’t have the plugin needed to get to the camera hardware.

It’s all there in the JMF pages on java.sun.com. There is a capture example I think.

You do need to hard code a little bit about choosing the device name for the camera I think. eg. on windows vfw:0 or something.

ya, sun has a great capture example. I’m working on a project with this also. The one thing I’m struggling with is adding the code that will detect the capture devices and let the user select rather than going through JMF Registry.

~TJ

Unfortunately JMF is full of holes & bugs. It gets no support from Sun it seems, which is too bad because it could be awesome. I was thinking of writing a high quality video editor (similar to Adobe Premier, but of course high quality instead of crap:)) based on JMF… but I gave up the idea after playing with it for a bit. It was very disappointing. If it works for you great if it doesn’t, good luck.