MILIND_JOG
asked on
CaptureDeviceManager.getDeviceList not returning any value
Dear Expert,
I am new in javax media. I am trying to make an application to capture photograph from USB camera. The problem is CaptureDeviceManager.getDe viceList not returning any value.
Please help. I have already downloaded JMF2.1.1 and included jar file in my NetBeans system to compile. The compilation is successful.
Please help.
Regards
captcam.java
I am new in javax media. I am trying to make an application to capture photograph from USB camera. The problem is CaptureDeviceManager.getDe
Please help. I have already downloaded JMF2.1.1 and included jar file in my NetBeans system to compile. The compilation is successful.
Please help.
Regards
captcam.java
ASKER
Thanks for your comments. I think there is an setup issue. I am unable to fix. Setup from Download of correct version,NetBeans liabrary to CLASSPATH & PATH etc...
Can you please guide me.
Regards
Can you please guide me.
Regards
Sorry, not on the setup issue, no - I don't use Netbeans.
ASKER
Ok. No problem. Forget about NetBeans. Otherwise.
Regards
Regards
ASKER
I am observing that CaptureDeviceManager.getDe viceList(n ull); not returning any device.
Regards
Regards
You can post some code, perhaps? (If so, please use the code tags here). Thanks.
ASKER
Dear Krakatoa,
Thanks for taking efforts to resolve my issue. I have already attached the code. If you want I can repost the same.
Regards
Thanks for taking efforts to resolve my issue. I have already attached the code. If you want I can repost the same.
Regards
OK well I compiled and ran your class. I got a long list of devices in a window. I didn't make a selection, but dismissed the window, and was presented with a jframe or smthg asking me if I wanted to make a capture, and an OK button. I pressed that, got some shutter clicking sounds from my machine, then there was a NullPointerException, and things closed.
Does that help?
BUT - my camera is built-in - it's *not* attached via USB.
Does that help?
BUT - my camera is built-in - it's *not* attached via USB.
ASKER
I am also working in LAPTOP and camera is builtin. I do not understand what is the issue. I suspect the issue is with Setup
Regards
Regards
But *do you* get as far as being offered a 'capture'?
ASKER
No I struck at the line CaptureDeviceManager.getDe viceList(n ull); . Unable to move further
ASKER
The line not detecting any device
ASKER
Can you please advice me the currect version of JMF, the URL to download and the setup steps in local machine no matter NetBeans.
Regards
Regards
Your code works - for me - up until trying to do the capture. The NPE is on this line :
Buffer buf = fgc.grabFrame();
Buffer buf = fgc.grabFrame();
You should find it all explained and available here :
http://www.oracle.com/tech network/ja va/javase/ download-1 42937.html
http://www.oracle.com/tech
ASKER
Ok. Let me see. I will come back to you. By the I am in India and it is already 10:30PM. What is your local time and what time generally you available. I am asking you for the reason that I am getting very very good support from you and I do not want to break the link
Regards
Regards
You won't break the link. I can't promise I can help however.
Try to get a list of the devices that your machine has. I thought I saw a list of audio capture devices returned by your code, not video capture devices, but I could be wrong.
Try to get a list of the devices that your machine has. I thought I saw a list of audio capture devices returned by your code, not video capture devices, but I could be wrong.
ASKER
Good morning krakatoa,
I am extremely sorry. Before I read your message, I moved out of link. I hope you wouldn't mind.
Now I am able to see devices but all are Audio as you also observed. Till you are available, I am trying to resolve by different means but definately require your support as soon as possible.
Thanks & Regards.
I am extremely sorry. Before I read your message, I moved out of link. I hope you wouldn't mind.
Now I am able to see devices but all are Audio as you also observed. Till you are available, I am trying to resolve by different means but definately require your support as soon as possible.
Thanks & Regards.
1) :
2) : Start, Programs, JMedia Framework, JMF Registry, Capture Devices.
See what these tell you.
Vector deviceList =CaptureDeviceManager.getDeviceList(new VideoFormat("yuv"));
2) : Start, Programs, JMedia Framework, JMF Registry, Capture Devices.
See what these tell you.
ASKER
Sir, I got the device now. I am now facing next problem as an exception on line
player = Manager.createRealizedPlay er(ml);
Exception in thread "VFW Request Thread" java.lang.UnsatisfiedLinkE rror: JMFSecurityManager: java.lang.UnsatisfiedLinkE rror: C:\Windows\System32\jmvfw. dll: Can't find dependent libraries
at com.sun.media.JMFSecurityM anager.loa dLibrary(J MFSecurity Manager.ja va:206)
at com.sun.media.protocol.vfw .VFWCaptur e.<clinit> (VFWCaptur e.java:19)
at com.sun.media.protocol.vfw .VFWSource Stream.doC onnect(VFW SourceStre am.java:24 1)
at com.sun.media.protocol.vfw .VFWSource Stream.run (VFWSource Stream.jav a:763)
at java.lang.Thread.run(Threa d.java:662 )
Regards
player = Manager.createRealizedPlay
Exception in thread "VFW Request Thread" java.lang.UnsatisfiedLinkE
at com.sun.media.JMFSecurityM
at com.sun.media.protocol.vfw
at com.sun.media.protocol.vfw
at com.sun.media.protocol.vfw
at java.lang.Thread.run(Threa
Regards
Which version JMF are you running?
ASKER
JMF2.1.1e
Regards
Regards
You need to look in JMF registry to see which video capture devices are available.
ASKER
Ok. I will check and confirm.
Regards
Regards
ASKER
Dear krakatoa,
It is YUV Video Format
Regards
It is YUV Video Format
Regards
I don't get that error when I run your code. For me the webcam runs fine and showing in your app. Are you sure you changed the line of your code to handle yuv?
I would say that a DLL is missing from your System file, as the error report says. Look for C:\Windows\System32\jmvfw. dll in your system somewhere.
ASKER
the jmvfw.dll is present in system32 still I am facing the same problem. In net it is sugested to install jre 32 bit and not 64 bit. I am not sure whether it will solve the problem or further escalate to other.
Regards
Regards
That was something I was going to suggest also. Best if you can try it on another machine - which in a sense you already have, since I have run it successfully.
ASKER
No Krakatoa. I do not have any other machine ufortunately. But I think it's time to take risk to go for that if no other option left.
Regards
Regards
I am not an OS person, but it would surprise me if there were no way to enforce 32-bit mode, if not per-app, then system-wide. It could be worth opening another Q here in the Operating System TA about that. In the meantime, I will do a bit more research myself.
ASKER
Ok, I will do that. Let me first install JRE 32 bit and try. Let's se what it results. Other wise we may revert back.
Regards
Regards
ASKER
please refer https://forums.oracle.com/forums/thread.jspa?threadID=1276920
At the bottom
http://forums.oracle.com/forums/thread.jspa?threadID=2132405&tstart=0
gives the suggestive steps.
Regards
At the bottom
http://forums.oracle.com/forums/thread.jspa?threadID=2132405&tstart=0
gives the suggestive steps.
Regards
ASKER
Dear krakatoa,
Good news to say that we have achieved to capture photo. I have uninstall JRE 64 bit and install 32 bit. I am really happy to say that without your help it could not happen. I am still keeping the issue open because there are still some issue to resolve.
Regards
Good news to say that we have achieved to capture photo. I have uninstall JRE 64 bit and install 32 bit. I am really happy to say that without your help it could not happen. I am still keeping the issue open because there are still some issue to resolve.
Regards
MILIND_JOG, yes, I know those posts. I was not convinced 100%, (which means no more than I hesitated to mention them as it didn't look as if it would resolve your issue without compromise). But this seems the most likely reason at the moment, and relatively unsatisfactory in any case.
I just posted the above, and then saw your latest post. That's good. At the very least it shows that your code is good, which is the most important thing of course.
I just posted the above, and then saw your latest post. That's good. At the very least it shows that your code is good, which is the most important thing of course.
ASKER
Thanks Krakatoa. We will again discuss tomorrow. I hope you wouldn't mind.
It's 11:30PM India time. Good nitght. See you tomorrow.
Bye for now.
Thanks & Regards
Milind
It's 11:30PM India time. Good nitght. See you tomorrow.
Bye for now.
Thanks & Regards
Milind
As I said in a previous comment, there is a very high likelihood that 32 bit can be configured for 64 environment. The key may be in where the 32-bit libraries are then meant to reside.
ASKER
Dear Krakatoa,
I am trying to occomadate the media output in a small panel size. The image is not shrinking. I have tried a lot by putting efforts in the dark. Will you please help.
Regards
I am trying to occomadate the media output in a small panel size. The image is not shrinking. I have tried a lot by putting efforts in the dark. Will you please help.
Regards
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Dear krakatoa,
I would like to make more clearity. When ever I execute the java program, it displays the video stream on screen with designed optimum size. When I capture, the image gets saved in .jpg file.
The main issue is resolved to get stream and capture the image. I want to implement it in my main application form. The size designated to this image screen is too less and the issue is to fit the streaming image on that without compromizing on image view. I am unable to shring the streaming video size.
The original issue is resolved. If you advice, I can close this issue and open another as a fresh issue.
Regards
I would like to make more clearity. When ever I execute the java program, it displays the video stream on screen with designed optimum size. When I capture, the image gets saved in .jpg file.
The main issue is resolved to get stream and capture the image. I want to implement it in my main application form. The size designated to this image screen is too less and the issue is to fit the streaming image on that without compromizing on image view. I am unable to shring the streaming video size.
The original issue is resolved. If you advice, I can close this issue and open another as a fresh issue.
Regards
ASKER
Dear krakatoa,
Thanks for resolving my issue. I am closing this request and opening another. Please help.
Thanks a ton for helping.
Regards
Milind Jog
Thanks for resolving my issue. I am closing this request and opening another. Please help.
Thanks a ton for helping.
Regards
Milind Jog
1.
2.
3.
it displays the video stream on screen with designed optimum size<1> So the size of the streaming vid display is fine. Tick.
2.
When I capture, the image gets saved in .jpg file.<2> And now you have your snapshot in a file. Tick.
3.
The size designated to this image screen is too less and the issue is to fit the streaming image on that without compromizing on image view. I am unable to shring the streaming video size.<3> This comment I do not understand, in light of your two comments above, where everything seemed to be satisfactory. Cross.
ok. thankx.
ASKER
Dear krakatoa,
I have raised fresh question for the same. Please help.
Regards
I have raised fresh question for the same. Please help.
Regards
If I could I would - unfortunately I do not have any useful experience with video, and I imagine there is going to be a requirement for some manipulation of the image, which I am not versed in. Sorry about that.
ASKER
Ok Krakatoa. Thanks for response. I will see some other option.
Regards
Milind
Regards
Milind
You might find a couple of useful comments amongst these :
http://stackoverflow.com/questions/1244517/resize-video-with-jmf
http://www.coderanch.com/t/272326/java/java/JMF-FormatControl
Obviously,you will have looked at the API too :
http://docs.oracle.com/cd/E17802_01/j2se/javase/technologies/desktop/media/jmf/2.1.1/apidocs/javax/media/SizeChangeEvent.html
http://stackoverflow.com/questions/1244517/resize-video-with-jmf
http://www.coderanch.com/t/272326/java/java/JMF-FormatControl
Obviously,you will have looked at the API too :
http://docs.oracle.com/cd/E17802_01/j2se/javase/technologies/desktop/media/jmf/2.1.1/apidocs/javax/media/SizeChangeEvent.html
ASKER
Yesss. I will go through this. It is a great help for me. I will come back to you once I go through these link.
Regards
Regards
This - although I think it is for an applet - seems to have code in it which is tackling the issue and how the container renders the image concerning size. Even if the code is not directly useful, it looks - at a glance - as if it has useful concepts about what you should be doing. ;)
Oops, nearly forgot the link :
http://jcs.mobile-utopia.com/jcs/64912_MediaPlayer.java
Oops, nearly forgot the link :
http://jcs.mobile-utopia.com/jcs/64912_MediaPlayer.java
ASKER
Regards