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!

assylias
  • 321,522
  • 82
  • 660
  • 783
Do Manh
  • 144
  • 2
  • 9
  • 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: http://stackoverflow.com/questions/2570944/unable-to-detect-capture-device-webcam-through-jmf – mikera Aug 19 '12 at 03: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 '12 at 06:31
  • This might help. http://puneetk.com/http://puneetk.com/wp-content/uploads/2010/02/MyCam.txt He uses JMF too. Its the code directly. – praxmon Sep 09 '12 at 03:45
  • thank you, but JMF does not support a 64bit JDK/JRE – Do Manh Sep 09 '12 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 '12 at 12:36
  • Have you installed webcam driver? You should make sure your webcam can work first. Otherwise your framework interface may get nothing. – yushulx Sep 23 '13 at 01:50

2 Answers2

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.

bincob
  • 859
  • 1
  • 9
  • 13
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.

roger_that
  • 9,493
  • 18
  • 66
  • 102