Multicast Support

Forum for questions and support relating to the 1.30.x releases only.
Locked
raymonvdm
Posts: 23
Joined: Thu Jan 16, 2014 3:01 pm

Multicast Support

Post by raymonvdm »

I noticed Zoneminder has support for output of multicast stream to restream the monitors. I would like to know how to use it

Support multicast or unicast streaming of captured of analysed streams using MPEG4/H.264 over RTP. This will reduce the load when many clients are moniutoring the streams and improve the real-time immediacy of the stream contents.

I currently only get the following errors

Code: Select all


Nov 21 17:19:45 zm olad: common/network/Socket.cpp:224: sendto failed: 237.1.1.1:37895 : Invalid argument
Nov 21 17:19:47 zm olad: common/network/Socket.cpp:224: sendto failed: 237.1.1.1:37895 : Invalid argument
Nov 21 17:19:48 zm olad: common/network/Socket.cpp:224: sendto failed: 239.255.237.2:3792 : Invalid argument
Nov 21 17:19:49 zm olad: common/network/Socket.cpp:224: sendto failed: 237.1.1.1:37895 : Invalid argument
Nov 21 17:19:51 zm olad: common/network/Socket.cpp:224: sendto failed: 237.1.1.1:37895 : Invalid argument
Nov 21 17:19:53 zm olad: common/network/Socket.cpp:224: sendto failed: 237.1.1.1:37895 : Invalid argument
Nov 21 17:19:54 zm olad: common/network/Socket.cpp:224: sendto failed: 239.255.237.2:3792 : Invalid argument
Nov 21 17:19:55 zm olad: common/network/Socket.cpp:224: sendto failed: 237.1.1.1:37895 : Invalid argument
Nov 21 17:19:57 zm olad: common/network/Socket.cpp:224: sendto failed: 237.1.1.1:37895 : Invalid argument
Nov 21 17:19:59 zm olad: common/network/Socket.cpp:224: sendto failed: 237.1.1.1:37895 : Invalid argument
Nov 21 17:20:00 zm olad: common/network/Socket.cpp:224: sendto failed: 239.255.237.2:3792 : Invalid argument
Nov 21 17:20:01 zm olad: common/network/Socket.cpp:224: sendto failed: 237.1.1.1:37895 : Invalid argument
Nov 21 17:20:03 zm olad: common/network/Socket.cpp:224: sendto failed: 237.1.1.1:37895 : Invalid argument

System is running

Code: Select all

uname -a
 Linux zm 4.4.0-47-generic #68-Ubuntu SMP Wed Oct 26 19:39:59 UTC 2016 i686 i686 i686 GNU/Linux

cat /etc/issue
Ubuntu 16.04.1 LTS \n \l

dpkg -l | grep zoneminder
ii  zoneminder                                1.30.0-xenial                                 i386         video camera security and surveillance solution


User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Multicast Support

Post by knight-of-ni »

No one else responded, so I'll bite.

I'm not sure what you are quoting. Is that from the ZoneMinder documentation or from somewhere else?

When discussing multicasting with typical network video recording software like ZoneMinder, you have to specify which segment of the communication stream you are interested in.

If you mean from the camera to the ZoneMinder server, then that would involve a camera with specific support for multicast (enabled in the camera of course) and then setting the correct ffmpeg/libvlc parameters in zoneminder to retrieve the stream. This would benefit a scenario of two or more ZoneMinder servers, all recording from the same cameras for redundancy. Note, however, this would NOT benefit normal viewing from the web client because the web client does not talk directly to the camera. It instead talks to ZoneMinder which sends you a different, usually mjpeg, stream proxied through the server. This is common in the industry. I can only think of one manufacturer, DvTel, which allows the viewing client to hop onto the same multicast group the servers are listening to.

If instead you mean the portion of the stream from the ZoneMinder server to the web client, I don't recall seeing any documentation, blog, or anything else discussing how to do this. Even though I've been using ZoneMinder for 10 years, this feature might be there in some form, but I've never gone looking for it. So it would be nice to hear what you have found if this is what you have indeed been attempting.

In either case, we would need to see how you configured the monitor in zoneminder and what other settings in zoneminder you may have changed to get this going. Screenshots are preferred. Knowing the make/model of camera would help too.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
raymonvdm
Posts: 23
Joined: Thu Jan 16, 2014 3:01 pm

Re: Multicast Support

Post by raymonvdm »

I have found the following log entries after an upgrade from Ubuntu 14.0.4 LTS to 16.04 LTS. The upgrade removed my ZoneMinder 1.30 install so i have reinstalled it using the conner ppa

After this ZoneMinder is working (did some MySQL fixes) and i found out the following logging in syslog

Code: Select all

Nov 21 17:19:45 zm olad: common/network/Socket.cpp:224: sendto failed: 237.1.1.1:37895 : Invalid argument
Nov 21 17:19:47 zm olad: common/network/Socket.cpp:224: sendto failed: 237.1.1.1:37895 : Invalid argument
Nov 21 17:19:48 zm olad: common/network/Socket.cpp:224: sendto failed: 239.255.237.2:3792 : Invalid argument
So i`m interested in the communication between the ZoneMinder server and the client, since this logging seems to tell us something about ZoneMinder trying to setup a Multicast Stream. Which i can then join using for example https://github.com/SvenVD/rpisurv
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Multicast Support

Post by knight-of-ni »

While ZoneMinder can receive a multicast stream from a camera with the proper configuration, ZoneMinder by itself, specifically zms, is not capable of sending a multicast stream to a web client.

Perhaps you could use ffserver or vlc's live555 to convert the unicast stream from zms to multicast rtsp in real time.

You've posted that log entry twice now but what you haven't done is given us some context describing how it was generated. Socket.cpp is not part of zoneminder and the little data you've shown does not indicate it is even related to zoneminder.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
raymonvdm
Posts: 23
Joined: Thu Jan 16, 2014 3:01 pm

Re: Multicast Support

Post by raymonvdm »

I`m sorry i was in the understanding that zm olad was a ZoneMinder process, but it has something to do with another process running on the same server. Since it`s hostname is also ZM, i got confused.
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Multicast Support

Post by knight-of-ni »

Fair enough. Since this is open source linux after all, there probably is a way to accomplish what you are doing, but I've not encountered anyone else attempting to do this. It sounds like you would have to blaze a new trail on your own.

If coding isn't your thing, try setting up ffserver to capture a stream from zoneminder and re-stream it into the format you want. This won't be efficient in terms of cpu resources, but on sufficiently fast hardware, I would expect it to work.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
raymonvdm
Posts: 23
Joined: Thu Jan 16, 2014 3:01 pm

Re: Multicast Support

Post by raymonvdm »

I`m also having some issues with a trial cam i need to fix first viewtopic.php?f=32&t=23534&p=97488#p97488
Locked