• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 752
  • Last Modified:

Capturing multiple USB cameras

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
t_k_m
Asked:
t_k_m
  • 9
  • 6
1 Solution
 
Mayank SAssociate Director - Product EngineeringCommented:
Does the OS have a driver installed for both and is it able to recognize them separately?
0
 
t_k_mAuthor Commented:
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
 
Mayank SAssociate Director - Product EngineeringCommented:
>> 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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
t_k_mAuthor Commented:
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
 
Mayank SAssociate Director - Product EngineeringCommented:
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
 
t_k_mAuthor Commented:
Hi Mayank,

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

Regards,
Tushar
0
 
Mayank SAssociate Director - Product EngineeringCommented:
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
 
Mayank SAssociate Director - Product EngineeringCommented:
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
 
t_k_mAuthor Commented:
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
 
Mayank SAssociate Director - Product EngineeringCommented:
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
 
Mayank SAssociate Director - Product EngineeringCommented:
Probably this guy wanted to do the same thing as you:

http://forum.java.sun.com/thread.jspa?threadID=283605&messageID=2078570
0
 
t_k_mAuthor Commented:
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
 
Mayank SAssociate Director - Product EngineeringCommented:
Try JTwain, the link I'd posted earlier.
0
 
t_k_mAuthor Commented:
I will wait for comments from some more experts if there is an easy solutions using JMF.
0
 
Mayank SAssociate Director - Product EngineeringCommented:
Yeah
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

  • 9
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now