1

I tried programming a application that detects and captures video from webcam. I use JMF 2.1 and JDK 1.7u5 but when I compile and run my application, it couldn't detect any devices. And then, I tried with JMyron but it is not supported in x64 (My OS is Win 7 x64).

Can you tell me why? and how to capture video from webcam in my java application?

Thanks for your help!

6
  • No idea why but two suggestions: a) post the code you are using to try and detect the webcam b) check out this question, it may help: stackoverflow.com/questions/2570944/…
    – mikera
    Aug 19, 2012 at 3:17
  • Thanks for your answer. I found a reason for this. JMF is too old and does not support a 64bit JDK/JRE.
    – Do Manh
    Aug 19, 2012 at 6:31
  • This might help. puneetk.com/http://puneetk.com/wp-content/uploads/2010/02/… He uses JMF too. Its the code directly.
    – praxmon
    Sep 9, 2012 at 3:45
  • thank you, but JMF does not support a 64bit JDK/JRE
    – Do Manh
    Sep 9, 2012 at 19:16
  • @Do Manh could you please edit your question or close it, if you don't want any more answers about jmf?
    – Hachi
    Sep 20, 2012 at 12:36

2 Answers 2

0

JMF 2.1.1e works with a 64 bit JDK/JRE. I tested it on Windows 7 x64. Assuming the webcam drivers are installed properly and you could also test it with an alternative application such as Skype just to make sure it works, then you are set to verify your JMF installation.

Start JMStudio and go to the 'File->Preferences' menu. That brings up the JMF registry editor. Go to the 'Capture Devices' tab and click on 'Detect Capture Devices'. That should bring up your webcam in the list. It would be listed as 'WDM Image Capture' or something similar. Please note that if you want to commit something then you should have launched JMStudio with administrative privileges.

You can capture videos or take snapshots using your webcam by selecting the 'File->Capture' menu (Ctrl-P).

Your application should be able to use JMF and work with your webcam if the above works unless you forget to include the correct libraries or miss something in your code.

0

I know you might not want this, but I would recommend using HTML5 instead for capturing, recording or streaming videos. Have a look at http://www.html5rocks.com/en/tutorials/getusermedia/intro/ and hopefully you could make it out iff your requirement allows. HTML5 has a lot of things to offer which can easily be achievable.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.