max/msp/jitter and IP Cameras ?

Paul Sellis's icon

Hi,

is there a way to connect IP Cameras to max/msp/jitter ?

Thanks for your help
Paul

sylvain's icon

This depends on the IP-camera of course, if it has an MPEG4 stream (not a JPEG stream) then is quite easy usually.

Otherwise you have to retrieve static frames from the camera. Framerate is very low then.

It is possible to grab the image from jitter itself but your whole patch will wait for the camera to return an image. I did it with the help of some JAVA-code I found on this forum and modifying that. I can look up the code if you want to.

Paul Sellis's icon

Sylvain, in fact I'd like to use 4 or 6 IP Cameras and use max/msp/jitter to switch live from them and finally export the resulting video to a videoprojector.

If it's easy with MPEG4 IP cams : I'll take such cameras !

But (I am a newbie) how do you proceed to :
- grab multiple MPEG4 IP cameras streams ?
- open/close the video streams ?
I am not sure it could be possible with some jit.qt.grab, as I don't think that IP cameras are QuickTime-compatible...

Thanks for your help !
PAul

sylvain's icon

I had a setup with 5 cameras that were hundred metres apart

An mpeg4 stream can be 'captured' with a jit.qt.movie object. For multiple movies you use multiple objects. Just do a 'read http://url-here' message to it and it should show the stream.

I wouldn't open and close them during runtime, because it needs some time to sync/buffer.

Just switch between the source with a switch or alike, they are all running and with the switch you choose which one you want to view.

Paul Sellis's icon

Great !

- Is it not too CPU intensive to have 4 or even 6 IP cameras always opened ? (I have a 2.4GHz Intel Core Duo MacBook Pro)

> I can look up the code if you want to.
Waoh... of course yes ! That would help me a lot...
;-)

- What kind of IP cameras do you advise ?
(a good quality and reasonably cheap wireless Pan/Tilt/Zoom IP Camera would be great !)

- I'll need one WiFi routeur like Linksys WRT54G to receive wireless IP cameras streams, no ? (or one per camera ?)
http://www.linksys.com/servlet/Satellite?c=L_Product_C2&childpagename=US%2FLayout&cid=1149562300349&pagename=Linksys%2FCommon%2FVisitorWrapper

Thank you for your help and advises !
PAul

sylvain's icon

* It is a bit intensive yes, but if you are planning on switching between streams it is necessary i guess.

* I used a camera from which i had to grab the images one by one resulting in very low framerate. I would suggest looking around and finding one with a MPEG4-stream. Note: the tilting and panning might not directly from Max/MSP. But if it has a webinterface you can probably load the URLs which trigger it normally.

* You need 1 router which creates a (wireless) network to which all cameras and your computer connect.

*update*
Maybe something like this: http://panasonic.co.jp/pcc/products/en/netwkcam/lineup/bl-c111/index.html although i think it costs money..

sylvain's icon

Here is a simple example of the static network frame grabber. It is a Max5 patch that opens in presentation mode and automatically starts loading a network camera. I put two random urls in there, try them. The framerate of course is better on a local network, but still has some troubles.

I hope this helps.

The java component was taken from this forum somewhere and i made some small improvements to it. For example seeing of it was busy.

Paul Sellis's icon

> * It is a bit intensive yes, but if you are planning on switching between streams it is necessary i guess.

Not sure (?). I have been told that with analog cameras you could use DFG13941e digitizers with ASC drivers and 6 jit.qt.grabs and open/close them as needed. There's just a delay : the switch takes 1/25 second on Pal.

In an another post Dan said :
"If the cameras send an rtsp stream, you can receive them with jit.qt.movie."

Thanks a lot for your attachment: network_camera.zip
What are the framerate problems ?

sylvain's icon

> What are the framerate problems ?

The problem lies that the cameras i used didn't provide a stream, so i had to grab an static image over the network, you can imagine that that isn't as fast as a stream. Usually these static images don't refresh as often as well..

Paul Sellis's icon

Sylvain,

what kind of modification to your code do I have to do to switch from different 25 fps IP cameras ?
(sorry as you see I am a newbie...)

Paul Sellis's icon

Oops… any help ?

esther vazquez's icon

Hi Paul,

I wonder if you found a solution for working with live multiple video feeds. I'm interested in working with analog industrial type cameras and working with 5 feeds in real time. I was looking into the DFG13941e digitizers and a spectra 8 video capture card. Some advice would be great.

Thanks!
E

StvDee's icon

I also could use some advice on this topic!

Thanks

dafnanaphtali's icon

Having trouble with this very issue (though the thread is old..), and can really use some guidance..

Using one IP camera (Messoa0), MPEG4, and successfully reading into jit.qt.movie
with the "read rtsp:///mpeg4".     Frame rate set to 15fps and resolution 1280x960.

Problem is:   Its pretty unreliable (stops and starts, delays), and though I am not really doing that much to the stream (just a little jit.rotate and one matrix doing source/destination remapping), there seems to be quite a bit of CPU usage from the IP camera coming in.

Questions:   Are there additional messages I can send with rtsp messages to jit.qt.movie that will make it more efficient or work better ?

dafnanaphtali's icon

oops.   The message I am sending is really "read rtsp:///mpeg4"

umma08's icon

does anybody know any sites that have a list of url's for public web streaming cameras?
thanks in advance!

ygreq's icon

Check vade's Security Player tool and you will find a camera there still showing live pics.

Did you find a way to connect to ip cameras, UMMA08?

umma08's icon

no not yet, i was really looking for a collection of ip cameras first, with their address:port id's so that i could experiment with a few things. Have yet to find a list ;-(

ygreq's icon
moali's icon

hey,
i have some problems with getting a stream into max.
i can view the picture of the camera in the browser with the url: "http://10.0.0.3/video.cgi".
in max i sent a "read http://10.0.0.3/video.cgi" message to an jit.qt.movie object and then i got a window to enter the username and the password for the camera as it is in the browser but nothing happened. today i called the support of the camera and they said that the camera has no streaming function.
and has anybody experience with setting up 8 cameras? when i'm opening all the videos in 8 tabs in safari everything is getting pretty slow.
mabybe someone can help me with this.
thanks a lot!

JB Merland's icon

Hi everybody,

Did you try to stream many IP camera with Jitter (Max 7 Windows 64 bits) ? For me, it doesn't work with the viddll engine. I didn't try with quicktime 32 bits engine. The only way to have a video stream into Max 64bits is to use the plugin Newtek NDI plugin for VLC et then, use NDItoSpout.exe and the Jitter object . But the number of stream with NDItoSpout is limited to 1. It would be very useful if we have many ip camera directly into Jitter with !

Any ideas ?
Thanks a lot

Stefano Scarani's icon

Hi, some time is passing from the last message: there is some news about the us of IP cam in Max?