?
Solved

Capturing multiple USB cameras

Posted on 2006-04-17
18
Medium Priority
?
748 Views
Last Modified: 2007-12-19
Dear Experts,

      I am trying to capture multiple USB cameras using JMF. But detect capture devices in jmfregistry utility returns only one device "Microsoft WDM Image Capture Driver", even though I have two Logitech QuickCam Express connected in the USB.

Please help me solve this problem.

Regards,
t_k_m
0
Comment
Question by:t_k_m
  • 9
  • 6
15 Comments
 
LVL 30

Expert Comment

by:Mayank S
ID: 16468244
Does the OS have a driver installed for both and is it able to recognize them separately?
0
 

Author Comment

by:t_k_m
ID: 16468370
Hi Mayank,

      The OS is Windows XP. It has a driver installed. It is able to recognize them separately but cannot play them simultaneously.
The intent of java program that I am trying out is to get the list of Cameras connected in USB and play the video of the selected cameras.

Regards,
Tushar
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 16468377
>> It is able to recognize them separately but cannot play them simultaneously.

If the OS does not support it, then I doubt if Java will do it simultaneously.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:t_k_m
ID: 16468398
Hi Mayank,

How do I make sure that OS does not support it. In Windows XP, is it not possible to get media from two cameras simultaneously.

About my other question, how do I get the list of the connected USB cameras?

Regards,
Tushar
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 16468455
Since you said "It is able to recognize them separately but cannot play them simultaneously. " I assumed you mean that it is not able to play 2 videos (one from each) simultaneously.

What code are you currently using for getting the device list?
0
 

Author Comment

by:t_k_m
ID: 16468486
Hi Mayank,

I was doing "detect capture devices" in jmfregistry application which comes with jmf.

Regards,
Tushar
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 16468527
As far as I know, people have faced problems trying to use multiple USB cameras on the same machine simultaneously. You might need to use some 3rd party API like JTwain - http://asprise.com/product/jtwain. I'm sorry but this is beyond my knowledge here. Wait till some other experts on this. Meanwhile, I'll look around if somebody's done videos with 2 cameras in 2 USB ports simultaneously using Java.
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 16468583
Looks like "Using Multiple Video Cameras with JMF" is a reported bug with JMF:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4890873
0
 

Author Comment

by:t_k_m
ID: 16468751
Hi Mayank,

    I saw that bug today. Basically I want to get around with that bug with some solution. If it is possible in C/C++, then it should be possible using java too.  JMF internally uses vfw libraries which calls capGetDriverDescription. I am wondering why it is returning only one device.

Do I need to do some hardware changes. Is it possible that this works with mutiple different cameras but not with multiple same type of cameras.

Regards,
Tushar
0
 
LVL 30

Accepted Solution

by:
Mayank S earned 500 total points
ID: 16468772
Not sure. I wouldn't want to give any wrong advice so its better to wait if other experts know about it. Otherwise, one crude work-around could be to JNI a call to some C++ method (perhaps the last resort). Otherwise see if there are any 3rd party APIs. If you don't know about JNI:

http://java.sun.com/developer/onlineTraining/Programming/JDCBook/jni.html 
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 16468789
Probably this guy wanted to do the same thing as you:

http://forum.java.sun.com/thread.jspa?threadID=283605&messageID=2078570
0
 

Author Comment

by:t_k_m
ID: 16468891
One of the links mentioned in the above link is not valid now. So I am not able to get the code.

http://www.manning.com/getpage.html?project=barrilleaux&filename=source.html
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 16468933
Try JTwain, the link I'd posted earlier.
0
 

Author Comment

by:t_k_m
ID: 16469410
I will wait for comments from some more experts if there is an easy solutions using JMF.
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 16469503
Yeah
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Suggested Courses
Course of the Month15 days, 2 hours left to enroll

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question