We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hy guys I'm new here and I have a little question about a IP camera.
I'm constructing a ROV (submarine) and programming a "control center" with Processing. In the ROV is an IP camera who witch I would like to use as a live stream. I can already see the live stream when i tap in Safari the IP address and make the login to the camera. Now i would like that the picture were directly in the Processing window. Do someone know how I have to do this? :)
Thanks!!
(sorry about my english, it is terrible) :(
Answers
Check out the IPcapture lib: https://code.google.com/p/ipcapture/
it works just like the built in Camera library, but you put in an IP address for the source.
Here's an example:
Hope this helps! ak
Thank you!
I have alredy seen this library. but I can't use it, because it dosen't work.. :
But I have installed it in this folder. And my other libraries work like this. Have you managed to install this library?
Please, give the exact path to the jar file (including it) starting from your sketchbook location.
the path is: MacintoshHD; Users; Me; Documentes; Processing; libraries; IPCapture-0; library; IPCapture.jar;
:)
Remove the -0 part of the folder. Folder and jar must have the same name.
Thank you! now processing accepts the library :) But i have still some problems: i cant see the stream... as code i use the following:
it is the java example of the library
because the function cam.draw() (akiersky proposed) dosen't exist..
PS.: the stream is a M-JPEG stream :)
I don't know IPCapture, alas. But I don't see a cam.draw() call in your code.
the problem is when i try to built in a cam.draw() Processing says: the function draw() dosen't exist...
Where have you seen there is a draw() method for an IPCapture object?
Are you sure you have the version of the library corresponding to this source?
the code i have posted is exactly the example code of the library. so i thought it should work like this..
I fear we don't understand each other. As I said, the code you have posted has no cam.draw() in it, so what makes you think it can work? (As said, I don't know the library, I have no idea if it exists or not.)
Note that the captured image is actually drawn on screen with the image(cam,0,0) call.
It worked for me thank you
import ipcapture.*;
IPCapture cam;
void setup() { size(640,480); cam = new IPCapture(this, "http://188.188.0.18:8556//videofeed", "", ""); cam.start();
On the subject of IPCapture... I'm running into problems when running it with P3D in Processing 3. It runs fine with P3D in Processing 2 but not Processing 3. It always goes "ArrayIndexOutOfBoundsException: 0" "The pixel array has a length of 0, but it should be at least 76800"
Any ideas for workarounds besides just using Processing 2?
Hey Azu,
I have seen other people reporting that IPCapture works, but I'm not having any luck. I've tried Processing 2 and 3 on a Mac, and keep getting this error:
Unable to open I/O streams: Server returned HTTP response code: 401 for URL: http://192.168.0.14/videostream.cgi
I used your code and only changed this:
cam = new IPCapture(this, "http://192.168.0.14/videostream.cgi", "admin", "");
Are you on Mac? What cam are you using?
That error is a HTTP error and has little to do with Processing: http://www.checkupdown.com/status/E401.html
"Unauthorized"... might be some firewall setting or similar. Are you sure your password is correct? That kind of thing.
Hey, i am also a fairly new processing user. I am trying to to open a stream from a smartphone camera in Processing 3. I can open a web browser and see the stream using the IP address given from the Android app 'camera stream'. But when I run the code in processing, I get nothing, no error or anything either..(?).
@reelingreel Does it work if you use the example provided by the library itself aka. accessing the external link?
Kf
That's good info so far. Glad to get this. Thanks!