This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes WebCam Through Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "WebCam Through Java" Watch "WebCam Through Java" New topic

WebCam Through Java

suraj kurumkar

Joined: Feb 20, 2007
Posts: 5
How we can access webcam through java..???
naga raaju

Joined: Mar 14, 2008
Posts: 29
hi suraj,

in java we have one good frmaework ie JavaMediaFrameWork(JMF).
so first you download that software and set path .

and run this program

public class TestJMF4 {
CaptureDeviceInfo device;
MediaLocator ml;
Player player;
Component videoScreen;
public static void main(String args[]){
new TestJMF4();

//gets a list of devices how support the given videoformat
Vector deviceList = CaptureDeviceManager.getDeviceList(new YUVFormat());

device = (CaptureDeviceInfo) deviceList.firstElement();

ml = device.getLocator();

player = Manager.createRealizedPlayer(ml);


videoScreen = player.getVisualComponent();
Frame frm=new Frame();


catch(Exception e)

ans my advice is study the JMF API. so you can understand the concepts.

ok na
have a nice day.

jQuery in Action, 2nd edition
subject: WebCam Through Java
Similar Threads
java 6 question
Applets to display webcam
USB interactivity with Java!!??
I want to pick pictures from a webcam
Camera feed