Hi,
is there a way that (master) ZM machine would be recording stream/images (1-2 fps) from several other (client) ZM machines which havelocal cameras connected?
Thank you,
Darko
How can ZM record another ZM (client-server) ?
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Re: How can ZM record another ZM (client-server) ?
Hi Darko,
Are the slave machines actually being used as ZM machines and doing their own motion detection and capture etc? If not you could just use some noddy webcam software on them to write to a web accessible directory.
Otherwise I'm not really sure what the best way is. Generally ZM doesn't write images to disk unless it has to because it's tediously slow and unnecessary. The exception is when viewing still images in which case they get written to the images directory and so would become accessible that way but for this you would need a web client running on each machine which is not desirable either.
I think you have two realistic options.
1) Write a small script (maybe perl) what loops and calls zmu -m <n> -i which will dump the current image to the current directory with the name of the monitor as the name, e.g. FrontDoor.jpg. This can be put in a web accessible directory (probably not the ZM one or you'd have to log in) somewhere on the server. The advantages of this are that it would probably take you 5 minutes to write, the disadvantages are that it might impact your slave machine and isn't particularly neat as a solution.
2) Write a larger script which listens on a port and acts as a mini web server and which reads the image directly from the shared memory and serves it up over the network. This is a much neater solution but somewhat more complicated to implement.
I would recommend (1) to get you going for now and (2) as a proper solution if you need one for the long term. Even (2) should not take more than a few hours to and if you need any help with it, or want me to knock one up for you then let me know.
Cheers,
Phil,
Are the slave machines actually being used as ZM machines and doing their own motion detection and capture etc? If not you could just use some noddy webcam software on them to write to a web accessible directory.
Otherwise I'm not really sure what the best way is. Generally ZM doesn't write images to disk unless it has to because it's tediously slow and unnecessary. The exception is when viewing still images in which case they get written to the images directory and so would become accessible that way but for this you would need a web client running on each machine which is not desirable either.
I think you have two realistic options.
1) Write a small script (maybe perl) what loops and calls zmu -m <n> -i which will dump the current image to the current directory with the name of the monitor as the name, e.g. FrontDoor.jpg. This can be put in a web accessible directory (probably not the ZM one or you'd have to log in) somewhere on the server. The advantages of this are that it would probably take you 5 minutes to write, the disadvantages are that it might impact your slave machine and isn't particularly neat as a solution.
2) Write a larger script which listens on a port and acts as a mini web server and which reads the image directly from the shared memory and serves it up over the network. This is a much neater solution but somewhat more complicated to implement.
I would recommend (1) to get you going for now and (2) as a proper solution if you need one for the long term. Even (2) should not take more than a few hours to and if you need any help with it, or want me to knock one up for you then let me know.
Cheers,
Phil,
Re: How can ZM record another ZM (client-server) ?
Hi Phil.
Yes, the slave ZM machines are localy recording motion detection through PCI capturing card(s). ZM Master machine (connected over ADSL with each client) would only record 1-2fps from each camera of slave machines to have additional backup.
OK, I'll try with your recommendation 1 for a start, but please consider following solution:
wouldn't it be possible to use MJPEG streaming server already build in ZM - which is used to transfer live images to Mozilla or IE (with cambozolla), so that the (master) ZM software could connect to ZM client camera as a remote camera? This way ZM would be able to record from a) local cameras, b) remote IP cameras and new: c) remote ZM cameras. What do you think about that?
Best regards,
Darko
Yes, the slave ZM machines are localy recording motion detection through PCI capturing card(s). ZM Master machine (connected over ADSL with each client) would only record 1-2fps from each camera of slave machines to have additional backup.
OK, I'll try with your recommendation 1 for a start, but please consider following solution:
wouldn't it be possible to use MJPEG streaming server already build in ZM - which is used to transfer live images to Mozilla or IE (with cambozolla), so that the (master) ZM software could connect to ZM client camera as a remote camera? This way ZM would be able to record from a) local cameras, b) remote IP cameras and new: c) remote ZM cameras. What do you think about that?
Best regards,
Darko
Re: How can ZM record another ZM (client-server) ?
Yes, it would be nice to set this up as a server/client or set up the image gathering from remote computers and relay the stream to the webserver/dbserver for processing. Camserv (http://cserv.sourceforge.net/) does something like this although that is more for webcams than it is for security cams. Could ZM take the stream from camserv and proccess it? What I'm thinking of is there is a new VIA ITX motherboard coming out with 4 video inputs, compact flash, fanless CPU and low power requirments. I believe its using 4 BT878's but it may be 1 that has multiple inputs switched. I think it has an onboard mgep encoder but I dont think its fully supported in linux. Those could be used in place of network ready cameras and support other devices like USB cams, audio, x10, parallel port digital input, serial devices. They use the C3 CPU so they may be able to stream but the proccessing might be asking a little too much to ask.
Re: How can ZM record another ZM (client-server) ?
Yes, it would be nice to set this up as a server/client or set up the image gathering from remote computers and relay the stream to the webserver/dbserver for processing. Camserv (http://cserv.sourceforge.net/) does something like this although that is more for webcams than it is for security cams. Could ZM take the stream from camserv and proccess it? What I'm thinking of is there is a new VIA ITX motherboard coming out with 4 video inputs, compact flash, fanless CPU and low power requirments. I believe its using 4 BT878's but it may be 1 that has multiple inputs switched. I think it has an onboard mgep encoder but I dont think its fully supported in linux. Those could be used in place of network ready cameras and support other devices like USB cams, audio, x10, parallel port digital input, serial devices. They use the C3 CPU so they may be able to stream but the proccessing might be asking a little too much to ask.
Re: How can ZM record another ZM (client-server) ?
Yes, it would be nice to set this up as a server/client or set up the image gathering from remote computers and relay the stream to the webserver/dbserver for processing. Camserv (http://cserv.sourceforge.net/) does something like this although that is more for webcams than it is for security cams. Could ZM take the stream from camserv and proccess it? What I'm thinking of is there is a new VIA ITX motherboard coming out with 4 video inputs, compact flash, fanless CPU and low power requirments. I believe its using 4 BT878's but it may be 1 that has multiple inputs switched. I think it has an onboard mgep encoder but I dont think its fully supported in linux. Those could be used in place of network ready cameras and support other devices like USB cams, audio, x10, parallel port digital input, serial devices. They use the C3 CPU so they may be able to stream but the proccessing might be asking a little too much to ask.
does anyone know if camserv or other webcam server supports the multiport brooktree cards the way zoneminder does? I have a handful of 300-400mhz machines I would like to use as camera servers, by putting one single chip quad port card in each machine, and then use zoneminder on a faster machine in my rack. Using camserv would probably work fine for this if the card only 1 input but I'm not sure how it would handle the multiport cards.
Also, gnuorder do you have a link for the via itx board you mentioned?
Also, gnuorder do you have a link for the via itx board you mentioned?
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
I think i may have lost the thread a bit but since 1.19.0 ZM has been able to use other ZM machines as input via zms. You would need a minimal ZM installation on the slave machine and monitors in 'monitor' mode but all they would do is read from the remote cameras, jpeg encode the images and serve them up. This should be relatively low drain on the CPU.
Phil,
Phil,
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
You basically need to set the path as the zms path that is used in the watch window. Either do a 'view source' and see which you have or if you can wait a while I will let you know what the options are. Essentially it will be something like
http://<hostname>?cgi-bin/zms?monitor=1&rate=100&scale=100
but there are more parameters as well.
Phil,
http://<hostname>?cgi-bin/zms?monitor=1&rate=100&scale=100
but there are more parameters as well.
Phil,