JMF Registry could not add item (Vista) - java

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.

Related

How to detect and capture video from webcam in java?

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.

Can't get VLCJ CaptureTest to work

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

Java captureDeviceManager.getDevice returns no find any capture device on ubuntu

I want to capture a image from laptop's webcam.
The webcam works correctly when runs skype or any webcam application.
My workstation is ubuntu 11.10.
My webcam locate /dev/v4l and this path include by-id by-path.
Vector deviceList = CaptureDeviceManager.getDeviceList(new YUVFormat());
2 types of format of the webcam RGB and YUV.
i run v4l-info and i know format YUV.
returns No find capture device
Manually i added jmf.jar in reference libraries.
Please help me.
I just want to capture a image using java in ubuntu 11.10.
Can you recommend me any other methods if you can't find solutions for the problem above.
Thank you for any helping

Android: Installing Wikitude on Android Emulator

I'm trying to write some apps using wikitude, and I'm having some problems running even the example.
I've put the sample ( BasicOpenARDemo ) that comes with the SDK inside eclipse and tried to run it, where I encountered the next error: "wikitude was not found on the system. Please press the ok-button to access the Android market and download wikitude."
First question- I don't understand- Why am I approached to download the utility when I have a standalone sample inside my eclipse? Doesn't the core files behind Wikitude come with the SDK or the sample itself?
The next question will be - after some googling, I've found that in order to install this "Android market" I need to follow the manual that comes in the 9th message in the next thread (the message that was written by ronni.rasmussen) -
http://forum.xda-developers.com/archive/index.php/t-529170.html
Well, I've followed it, and now when I try to press the OK button that comes after the "wikitude was not found on the system..." message, I get redirected to the Android market, where I find Wikitude, but when I try to download it- I get a "Download was unsuccessful. Please try again" error message. How do I fix that?
One more thing that I don't understand- How come it's written in this offline Android market that the available wikitude version is for android 1.5 and no longer maintained?
As you can see- I'm quite baffled here. Hope someone could clear this up for me.
I was with the exact same problem. The problem was that installing Wikitude from the market (following the link you provided) does not guarantee to have the system requirements supported in the virtual device, therefore it gives an error when you run the BasicOpenARDemo, if it let you install it at all.
The solution was creating an AVD with an GoogleAPI (it includes maps support, I used the level 10 API for Android 2.3.3, it didn't work for the level 8 API), adding the camera, accelerometer, compass, GPS, etc., support to the virtual device (I did this via Eclipse). Then I downloaded the .apk for Wikitude and installed it via command line (.adb).

What can I use to connect Java to Video4Linux?

I need to talk to Video4Linux (to capture output from a webcam) on a debian system running on an armel system (OpenMoko). JavaMediaFramework won't work in this case as it only have x86 and AMD versions. The linux kernel is 2.6.24 (with the v4l drivers compiled in separatly) and I cannot upgrade it (as it is not available on my hardware.
I have been following closely a project called video4linux4java . I now works with a lot of drivers (therefore a lot of webcams & capture cards), and produces a JPEG-encoded stream of images captured from a video device. Recently, the author has added classes to report information on the video device itself (webcam, TV tuner, ...). It is simple to use and comes with some examples. One of them (used to test v4l4j) displays a video stream in a JFrame. I use v4l4j in my own app to capture frames from my Logitech Quickcam Sphere AF, and control the pan and tilt. Works Great !
Video 4 Linux devices should be accessible through a device file (like /dev/video).
So I think you can open the device you want to access as you would do with a normal file and then read the stream coming from it.
To have more info about the devices, the video format etc... just check V4L web site

Categories

Resources