I would like to write a program in Java which takes pictures from an IP camera and sends (over ftp) it to a website, replacing an old image.
Does anyone know any libraries I can use for that task?
I think the main problem will be grabbing an image from IP camera and saving it as a JPEG.
Basically I have never worked with cameras before. So I will be really grateful if someone can give me some tips.
First you would have to figure out how to get the data from IP Camera you will be using. Good starting point can be found here: http://dragosc.itmcd.ro/uncategorized/java-media-framework-vs-ip-camera-jpegmjpeg-complete-overview-sources/
Second, you should choose the library for ftp communication, this topic was discussed here:
What Java FTP client library should I use?
Once you'll write smth which actually does something you can get back to SO and ask more specific questions.
Related
I have developed an android application which is connected through LAN. In my application whatever the data scanned, all that data should export in excel on the desired network PC.
Is there any way to send the data using LAN?
if any one has the related solution, please provide the code, link or any other solution which would be appreciated.
I found that link that could help you, it even provides a full example code in JAVA :
JAVA Simple File Tranfer over LAN
But as others pointed right, you should spend some time on Google, and find a code example to have a start. Then come back with your code when something is not working.
I am trying to create a low latency method to use an android device as a secondary display for a PC. So far all I have found has been either wireless streaming, or a slow usb connection (i.e. using iDisplay).
However, I found a DSLR camera contoller app (https://play.google.com/store/apps/details?id=com.dslr.dashboard/) that is able to stream a live feed of the camera to an android display via USB. Would it be possible to edit the source code of this application so it can read the video output of PC via USB? If so, how would you go about this? Do you think that this would be a low latency alternative?
Thank you!
Lots of fantasy in your question. Have you ever seen a PC outputting data from one of its USB ports to another device? How are you supposed to do that? With a plain male-to-male USB cable, in case you find one? Sorry but things don't go that way. To transfer data (files, or a network) via USB between two computers you'd need some propietary/specific software. Of course, once you have acomplished that is technically possible to transfer files with the screen content. Buy you'd need to develop a software that would capture the computer screen, compress it in real time, and send it through USB with enough low latency to be usable. That's going to be resource intensive.
A better, easier approach would be, maybe, using some sort of remote desktop or VNC on the Android machine, with the computer acting as a server. At least far more feasible than trying to implement a similar protocol by yourself.
Sorry but what you are trying to achieve is flawed from the beginning.
i have a project to do recently. what i have to do goes like following:
obtain the realtime video from the camera on the client side
stream and forward it to the server
play it on the server side
i've done some research about this and i know jmf and webcam-capture can do 1 and 3 for me. the real point that makes me stuck is the second point.
i didn't do networking programming as much as i should and i could not find the right idea to achieve this. how can i convert a captured video clip to a videostream(no sound needed by the way) and send it to the server in realtime?
all i need is just a guide to the proper api.
thanks in advance.
You need to use a Socket to connect the client and server. You can find examples in the Java Tutorials, try using an ObjectStream
Its very easy indeed. Use Windows Media Encoder to capture and stream your webcam to any other computer.
When your encoder starts, you will get a URL to view your stream, which you can use to view the stream (With audio and video) from anywhere with internet.
I have to connect three usb webcams in my system. I wrote code that is able to find only one camera. Others are not being showed. Please anyone help me. How can I detect all usb webcam?
Unfortunately you did not show us your code, so I have no idea how are you trying to connect to the camera.
But my short investigation shows the following. Class CaptureDeviceManager has method getDeviceList(Format format) that should return you all devices that support specified format. It seems that you should use this method, then iterate over resulted vector and user the cameras. I hope this will work for you if you specify correct format.
I need to set up live streaming from a number of web-cameras to the internet (in browsers), and the streams should be visible only to particular users. I.e. user A logs in to my system with his or her login/password, goes to the video stream page, and sees the stream from a particular cam, and other users cannot see that video, even if they know the url to that stream.
I've looked at a number of solutions so far, but some of them are obsolete, most of them are for image processing, recognition and the like, and some are just a bit too cumbersome, like Red5, for example.
Is there a relatively simple solution for that, that would just allow me to get a videostream from a particular cam connected to my computer?
Thanks in advance.
If you are using Linux I have had success with V4L4J (Video 4 Linux 4 Java) which is small and really quite cool. You would need to do quite a bit of work to get streaming working for a low bandwidth connection but if it is over LAN playing back an MJPEG stream over a TCP socket is easy beans :-)
http://code.google.com/p/v4l4j/
Good luck.
Have a look at Java Media Framework to communicate with your cam.