Hello Everyone,
I’m back with something new, while exploring Java and this time the API is : Java Media Framework (JMF).
Well this time I’m going to share how you can create Video Capturing Application Or you can say a Webcam in Java using JMF API.
Here’s a cap :
No more words and without wasting more time. Lets get to the main point.
Here’s the code : Click Here
Comments on all main lines of code are provided in file.
More to come soon!..
hii
i see ur code but i want some modification in that code
i want video capturing and save to a file for every 10 seconds but in hidden
Yes you can do it by using sleep(10000);
Use a loop until the capturing is going and use delay of 10sec [ sleep(10000) ] and put the saved file to where JAVA is Installed. [ ../bin ] + use the save method in that fx()……
we r also makng this project but facing many problems
can u pls help us nd share some ideas regardng this topic
hw we can do chat in real time…
plsssss help us
its our minor project othr wise our hod is gong to kill us
Hey Ankita,
Sorry for late reply,
We’ll discuss it on Facebook as i have accepted your friend req. already.
Regards
Hi,
I installed JMF. Where I can get the javax.media.* library?
Hey friend i run this code.. but it gives
java.lang.NullPointerException
at newpackage.MyCam.(MyCam.java:42)
at newpackage.MyCam.main(MyCam.java:75)
error..
i dont know y, i properly connected my cam also
hi………
i want to make project on face recognition
could u please help me that how to use jmf for face recognition……..???????????
Hey guys i managed to fix it… u’ll have to configure jmf studio to list the capture devices…
great work guys……………
I am also a computer science student but pursuing my diploma from Center for Computers and Communication Technology, Chisopani, South Sikkim. I was really happy to see the code. I don’t know whether it may run or not, but I am heartily thankful to Puneet for his contribution to my knowledge.
hello sir i have taken a project to capture a video through webcam i read your code .when i run this code i m facing
java.lang.NullPointerException
at mycam.MyCam.(MyCam.java:42)
at mycam.MyCam.main(MyCam.java:75)
this error.
i am working on window vista.please give me guide because i have to submit this project in one week please sir help me.
mohit singhal
ok…i got soln…i m also facing same prob…null pointer exception at 45,73,41,74…this happens when u don’t configure ur video device through jmf registory….there firstly u have to go on setting optins->and then on capture device….if result came with vfw etx. i.e video for windows….then it rely that u can now run ur jmf program normally…otherwise….did same..at jmf registory….select cature devices….thnx 🙂
Hi Puneet,
Thanks for your post, but i am also getting the error java.lang.NullPointerException
at MyCam.(MyCam.java:40)
at MyCam.main(MyCam.java:73)
Can you help me about that plzz?
The problem u might be facing is because jmf works fine with a 32 bit jdk.. so be sure u are using a 32 bit java..
I also tried running the prog with a 64 bit java and found the same error…
I studied the code and found that the statement at line 30 does not get executed.. that means that there is problem with the capture device manager class.. I dont have the solution … if any one gets it pls reply..
Hi Puneet,
Thanks for your post,Its Working.i need to watch video stream and also record this video simultaneously.please help me and guide me..And also i need your help for to make internet calling to phone using java
Hii Thanx For the code it worked vary well…Now i want that there should a click button and when i click on This button the current image on webcam should be stored in the database .Plzz help me i need it for my project
Hi Puneet Thanx For the code it worked very well…Now i want that there should a click button and when i click on This button the current image on webcam should be stored in the database .Plzz help me i need it for my project
Hii Can u plzz tell me how to display the live video on my webpage .I am using eclipse IDE. Thanks
i m using window7 32bit
locator = cam.getLocator();
it return NullPointerException at run time
java.lang.NullPointerException
at MyCam.(MyCam.java:40)
at MyCam.main(MyCam.java:73)
Did you ever figure out what the problem was? I have the same errors
i need coding for capturing image using jmf software
Hey I tried your code. It let me to switch on my camera and I can see the picture. But I can not understand ho to capture image through it. Can you help me???????
is it possible to record video/audio without xuggler/ffmpeg/server side in java applet. I cannot use xuggler as it has 40 mb and takes tool long time for loading
could u help me to extend it to build a traffic control system based on image processing?
java.lang.NullPointerException
at MyCam.(MyCam.java:40)
at MyCam.main(MyCam.java:73)
what to do now?
Hello i am facing problem in your given url when i try to redirect to the source code page it shows me error 404