ONVIF triggers external events in ZoneMinder
I finally put together everything I had learned about ZoneMinder external event triggering and ONVIF VideoAnalytics.
On reception of an ONVIF event the script generates a ZoneMinder event. Thus the ZoneMinder server does not need to analyze the video streams from several cameras. The cameras themselves watch for any movement. This saves a lot of CPU power and network bandwidth. Read More…
I wanted to explore more features of my webcam (TV-IP311PI). Apart from probing and streaming it can also do “video analytics”. That is the ONVIF name for motion detection.
From a system architecture point of view, it makes more sense to have each camera analyse its own view field and only then send image data. If we have a central system analysing data from many cameras the data volume is much larger. Obviously the central system needs to receive image streams from all cameras in order to analyse them. Read More…
I used the ONVIF API I had assembled to build an automatic configurator for ONVIF cameras in ZoneMinder.
Essentially I put the files from my
zm-onvif poject in a folder
onvif in my local copy of the ZoneMinder sources. I then added some files to integrate both parts. The most complex task for me was to understand the ZoneMinder architecture.
I have not had the time to upload the code, yet. I uploaded the code and made a pull request to include it in ZoneMinder.
Meanwhile I made some screen shots of my local installation:
The Media service
I wanted some quick wins therefore I focused on getting the camera to work. I decided the generic message parsing stuff would have to wait.
With the address I got previously I called the ONVIF Device Management web service method
GetServices. Read More…
Completing the proxy generation
First I wanted to get rid of the errors “not implemented” and “deep recursion” that occurred during proxy generation.
I made local copies of all referenced XSDs and replaced references with
xsd:anyType or commented out the attributes referencing http://docs.oasis-open.org/wsn/b-2 . This XSD had the most errors and was only referenced by the Event service which I would not use to begin with.
I decided to use ZoneMinder as the native linux app to connect to my ip camera. Actually this is much more than an app. It is a complete suite of video surveillance programs. From my furtive glance at their site I got the impression that this system could just as easily control all the cameras in you average shopping mall as provide a static look-out at my coffee machine.
A further perusal of the ONVIF specifications showed that the complete interface consisted of Web Services. Seeing this I decided that it would be easier to generate proxies for these Web Services than adapt the existing onvifdm .NET code.
I was going to build the onvifdm libraries on Fedora and then build a small sample application to test my ip camera.
First I downloaded the source code from the onvifdm project on Sourceforge:
svn checkout svn://svn.code.sf.net/p/onvifdm/code/trunk onvifdm
I tried to build on Fedora so I got the necessary mono compilers. Directions by the F# Software Foundation were not immediately applicable to Fedora and Fedora 20 did not pack the necessary versions (>= 3.0).
I wanted to use my Trendnet OUTDOOR POE 3MP DOME DAY/NIGHT (TV-IP311PI) ip camera with linux.
The camera came with only Windows software. The manual promised support for “ONVIF 2.1” though.
A quick research showed that ONVIF is both an industry consortium and a family of specifications. They try to standardize access to ip cameras and other security devices.
I thought with a standardized interface it should be possible to connect this camera to some existing linux software.