I need to be able to record from my webcam in the Java application I'm programming. I've tried JMF but couldn't get the Capture Device (it only saw the audio devices). Right now I'm trying with VLCJ and it just doesn't work. If I open the VLC Player I can access the camera with no problem at all, so I know my webcam works because and that I should be able to make it work through VLCJ. I just don't know how.
The code is the same in the CaptureTest.java file available here:
http://code.google.com/p/vlcj/wiki/SimpleExamples
all I did was try it with a String "dshow://" as mrl.
Im on Windows 7, JDK 1.6, VLC 2.1 and Netbeans 7.1
Any ideas?
Thank you very much to anyone who can help me out here.
Are all of the components 32-bit? (Windows, Java 6, & VLC). It should also work if all components are 64-bit, but this user was only able to get things working after after switching everything to 32-bit:
Device Capture with VLCJ
Related
Well I'm trying to setup libgdx. I used the setup-ui and installed everything on eclipse, but I get this error when I try to run my desktop project : http://pastie.org/8399448
I'm running ubuntu, and I think this might have something to do with why my android emulator won't work in eclipse, but I don't really need it because i'm not planning to make it into an android app. Thanks for taking time to read this/help me. I really appreciate it.
I think you're missing some basic OpenGL setup on your system. Its not Libgdx-specific. For example does glxgears run?
See OpenGL GLX extension not supported.
The answer is probably going to be very to Ubuntu and the video card your machine is using. You might have more luck at askubuntu.com.
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!
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.
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.
I am an average java developer and i am trying to come up with a browser that is developed entirely in java. I want that my browser must be able to play youtube videos, and for that i was planning to use JMF.
Here are my questions:
1) can JMF be used to stream and play videos from links like youtube. If yes, can Some one please point to a demo link(a basic one will do, rest i will develop)
2) If that is possible, should we use JMF or VLCJ? If you recommend VLCJ, where can i find "libvlc"? I had a hard time looking for it.
Thanks to everyone for their help in advance
JMF seems to be abandoned, so VLCJ is a better choice
you can find libvlc.dll here . Pick the biggest. Or just install VLC player.
JMF is quite obsolete right now. It's so old that its player won't open any of the video files used nowadays and if you're trying to capture webcam video you won't be able to detect your camera if you're running on Windows 7.
I heard Xuggler is fine but I really couldn't get it to work after trying hard for a few days so I would recommend VLCJ, which works great and its really easy to set up.
The libraries used in VLCJ are included in VideoLAN's folders when installing VLC. Just install VLC's last version and go to C:/Program Files/VideoLAN/VLC/ and there you'll find both libvlc.dll and libvlccore.dll
VLCj will play Youtube videos easily, JMF won't and is long dead - I wouldn't touch it for any new projects personally. If you're going down the VLCj route though you'll want to look at out of process players, you can't reliably include multiple players in process.
You cant do youtube with JMF. Also check out Xuggler
What actually exist to solve Java Video ? It does not work in my linux box, JMF cant detect even my webcam. ex: http://i.stack.imgur.com/Vic0o.png
JMF - works in Mac, i guess no ? Cause in CentOS/Fedora it does not detects my Video camera.
FMJ - ? Does those requires native separate installation ?
LTI-civil ? Does those requires native separate installation ?
Xuggler ? Does those requires native separate installation ?
My most important feature is: Can i use other java video libraries to make eye contacts video frame, means 1 screen from (Sender, Receiver, Third party) 3 to 4 participant in 1 video screen.
Follow up:
Java video does not work: http://i.stack.imgur.com/d6f5V.png
I am now wondering so many years Java remains but Video they didnt completed yet.
Where Adobe Flex/Air is just a few lines of code and its done (still experts dont belive in Flex/Air, i must research why, maybe quality issue and restricted raw access).
Cant figure it out in my small brain about Java and its Video solution.
Many more reason ... researching...
Will, Appreciate more advise!
JMF is sadly neglected from Sun, and FMJ was started to rectify this. I would start with FMJ and see how it works for you.
dsj - DirectShow is also a good choice and dont need a separate installation.
http://www.humatic.de/htools/dsj.htm
I'm using JMF to capture video stream (webcam) on my Java project.
The camera I'm using is recognized by JMF (JFMStudio) and I manage to get the video stream.
However, on JMF Registry Editor - there's a list of available capture devices, when I click "Add" on one of the items (including the one I need) I get a "Could not add item" error.
Therefore this camera is not set in the registry of it (god know where) and later on it is not recognized by my project:
RGBFormat fmt = new RGBFormat(); // could be YUV - doesn't matter
Vector v = CaptureDeviceManager.getDeviceList(fmt);
v is empty (while I know the video source is recognized by Java , since I manage to get video on JMF Studio).
Now, this happens only on Vista (where else) and not on XP.
I have a suspiction that somehow Vista security blocks Java from writing the registry file, but of course, I might be wrong.
One more comments: this is vfw:Microsoft WDM Image Capture(Win32):0 device.
Any idea ?
Directed at anyone else in future who encounters the same issue
i had the same problem and i realized that it was because my Java Media Framework was installed under "C:\Program Files" by default.
When I ran "jmfinit.exe" in \bin, I noticed I couldn't update the "jmf.properties" file
Error replicated below
Found device Microsoft WDM Image Capture (Win32)
Querying device. Please wait...
Exception on commit = java.io.FileNotFoundException: C:\Program Files\JMF2.1.1e\bin..\lib\jmf.properties (Access is denied)
I changed the security settings for the the JMF2.1.1e folder and everything works fine.
I'm pretty sure installing it somewhere else works too
Well I've used JMF on Vista to capture a webcam image, and it worked. I did not use the JMF Studio though, so can't be of much help on there.
I posted some sample code in this post, you might take a look and see if it'll run for you.