[App] Zonerama - Merge multiple Monitors into one! [v 1.1b]

If you've made a patch to quick fix a bug or to add a new feature not yet in the main tree then post it here so others can try it out.
xba
Posts: 11
Joined: Fri Apr 29, 2011 12:15 pm

[App] Zonerama - Merge multiple Monitors into one! [v 1.1b]

Post by xba » Sun May 15, 2011 10:19 pm

It is often difficulty to follow Events on multiple cameras that happend on the same time. Zonerama solves this by syncronizung the Captured Images and merging them into a so-called "Merged" Monitor that can be viewed like a normal camera. It also supports the Creation of mpeg/avi video files and the deletion of processed imagefiles to free up disk space.

Screenshot, Download, Documentation-Wiki (read it!), Bugtracking/Feature Requests at:

http://code.google.com/p/zonerama/

please do not report bugs here, use the project page!
I use this software in a production envoirement for a year now, works perfect. Please give feedback how it works for you.

Changelog:
Update 1.1: 4 new options: maxFPS, forceFPS, holdLastPictureForSeconds and standByImagePath (see wiki for documentation)
Update 1.1a: fixed non-deleted frames when using maxFPS or forceFPS and some other small fixes.
Update 1.1b: zoneminder 1.26 compatibility, small fixes.


419-capture-scaled.jpg
2 cameras merged into one!
419-capture-scaled.jpg (69.12 KiB) Viewed 8681 times
zonerama-9-scaled.jpg
9 cameras merged into one!
zonerama-9-scaled.jpg (88.5 KiB) Viewed 8681 times
Last edited by xba on Tue Feb 04, 2014 4:50 pm, edited 7 times in total.

User avatar
Normando
Posts: 219
Joined: Sun Aug 17, 2008 5:34 am
Location: Rosario - Argentina

Re: [App] Zonerama - Merge multiple Monitors into one!

Post by Normando » Mon May 16, 2011 5:47 am

Nice hack! Thank you

croll12
Posts: 5
Joined: Wed May 25, 2011 9:14 pm

Re: [App] Zonerama - Merge multiple Monitors into one! [v 1.

Post by croll12 » Wed May 25, 2011 9:17 pm

I am having issues setting this up. How is it supposed to be setup in Zoneminder, as a monitor? When I run the command from terminal (./Zonerama) I always get an error looking for an event that does not exist.

xba
Posts: 11
Joined: Fri Apr 29, 2011 12:15 pm

Re: [App] Zonerama - Merge multiple Monitors into one! [v 1.

Post by xba » Thu May 26, 2011 6:53 am

croll12 wrote:I am having issues setting this up. How is it supposed to be setup in Zoneminder, as a monitor? When I run the command from terminal (./Zonerama) I always get an error looking for an event that does not exist.
Zonerama does not run out-of-the-box because it requires some configuration to fit your needs. please read
http://code.google.com/p/zonerama/w/list especialy the configuration page:
Zonerama-Wiki; Configuration wrote: monitorId

the id of the "merged" monitor where you want the resulting pictures go to. This must be a existing zoneminder monitor id. Just add a new monitor to zonerminder and configure it as:

Source: Local
Function: None
set width and height to equal outputImageHeight/Width so zoneminder displays it corrently in the webinterface.
i will update the installation page with this detail.

croll12
Posts: 5
Joined: Wed May 25, 2011 9:14 pm

Re: [App] Zonerama - Merge multiple Monitors into one! [v 1.

Post by croll12 » Thu May 26, 2011 11:49 am

Thank you for the reply, I will try that. Any idea about the error message looking for events that do not exist? It always looks for event number 69 for some reason. If I run a filter to delete all events to start over, I then get an error stating events or older than what it is looking for.

xba
Posts: 11
Joined: Fri Apr 29, 2011 12:15 pm

Re: [App] Zonerama - Merge multiple Monitors into one! [v 1.

Post by xba » Thu May 26, 2011 12:06 pm

croll12 wrote:Thank you for the reply, I will try that. Any idea about the error message looking for events that do not exist? It always looks for event number 69 for some reason. If I run a filter to delete all events to start over, I then get an error stating events or older than what it is looking for.
when reporting problems, please state the exact error messages/output.

if it says "oldest event is younger than maxLength+maxTimeBetweenEvents, exiting" it means exactly what it says: the oldest existing event is too young to be processed. if you want to generate 30 minutes video, there need to be 30 minutes old video material available - plus maxTimeBetweenEvents because it is possible that there are gaps. for testing purpose, set maxLength and maxTimeBetweenEvents to 60 seconds, so it will process events that are 2 minutes old.

if it is not that "error", please paste here what zonerama says.

croll12
Posts: 5
Joined: Wed May 25, 2011 9:14 pm

Re: [App] Zonerama - Merge multiple Monitors into one! [v 1.

Post by croll12 » Thu May 26, 2011 1:54 pm

I followed the steps you mentioned before and what do I put under the "Device Path"
After this is all setup shouldnt I be able to click on the monitor name and it will bring up the events correct?

I created a now monitor and ran "./Zonerama" from terminal and the error message I am receiving now is:

cannot creat Monitordir, exit "/var/cache/zoneminder/events//2/11/05/26/08/29/09/"

xba
Posts: 11
Joined: Fri Apr 29, 2011 12:15 pm

Re: [App] Zonerama - Merge multiple Monitors into one! [v 1.

Post by xba » Thu May 26, 2011 2:44 pm

croll12 wrote:I followed the steps you mentioned before and what do I put under the "Device Path"
what? Device Path? dont know what you mean.
croll12 wrote:After this is all setup shouldnt I be able to click on the monitor name and it will bring up the events correct?
the error you stated below (cannot create Monitordir) stops zonerama from running, it did not do anything, so you dont see any new events.
there is a little bug that will be fixed in the next version: if you have set deleteFramesAfterGenerateVideoFromDB and deleteFramesAfterGenerateVideoFromHDD both set to false, you should see new events for that monitor. if deleteFramesAfterGenerateVideoFromDB is true, it will delete the frames even if generateVideo is set to false. so set both options to false for now if you have set generateVideo to false.
croll12 wrote:II created a now monitor and ran "./Zonerama" from terminal and the error message I am receiving now is:

cannot creat Monitordir, exit "/var/cache/zoneminder/events//2/11/05/26/08/29/09/"
it just means what it says, he was unable to create the directory /var/cache/zoneminder/events//2/11/05/26/08/29/09/. check the file system permissons of /var/cache/zoneminder/events/. the user that runs Zonerama MUST have read and write rights. Try to run Zonerama as Root if unsure.

croll12
Posts: 5
Joined: Wed May 25, 2011 9:14 pm

Re: [App] Zonerama - Merge multiple Monitors into one! [v 1.

Post by croll12 » Thu May 26, 2011 2:51 pm

When you create the monitor in zoneminder and follow the settings you previously stated:

Source: Local
Function: None

then under the Source Tab

Do I put anything under the "Source Path". Is that where I put the path to Zonerama binary?

xba
Posts: 11
Joined: Fri Apr 29, 2011 12:15 pm

Re: [App] Zonerama - Merge multiple Monitors into one! [v 1.

Post by xba » Thu May 26, 2011 7:44 pm

croll12 wrote: then under the Source Tab
Do I put anything under the "Source Path". Is that where I put the path to Zonerama binary?
Zonerama does not care about that. All zonerama needs is a monitor id on which zonerama can assign the newly generated events, plus the name of the monitor so it can name the events in the "MonitorName-Eventid"-format. zoneminder itself needs the height and width of the output image to display it correctly in the web interface.

zonerama is a stand-alone-application that is not started by zoneminder. you may start it as a filter, or use the forever-loop-script that is included in the 1.1 version of zonerama inside a screen (the linux console window manager) or in conjunction with nohup.

so you got zonerama working now?

croll12
Posts: 5
Joined: Wed May 25, 2011 9:14 pm

Re: [App] Zonerama - Merge multiple Monitors into one! [v 1.

Post by croll12 » Thu May 26, 2011 9:43 pm

I am getting much closer, I thought it would display through zoneminder just like a different camera would. It is creating video now but all the jpg are blank and the video is blank.

when running ./Zonerama from terminal I get numerous errors " error loading image "/var/cache/zoneminder/events/10/11/05/26/11/16/21/022-capture.jpg" (22) all the way down to the end. Then it hangs on creating the avi file.

Is there a link I would go to to view this from the web?

xba
Posts: 11
Joined: Fri Apr 29, 2011 12:15 pm

Re: [App] Zonerama - Merge multiple Monitors into one! [v 1.

Post by xba » Thu May 26, 2011 10:43 pm

croll12 wrote: when running ./Zonerama from terminal I get numerous errors " error loading image "/var/cache/zoneminder/events/10/11/05/26/11/16/21/022-capture.jpg" (22) all the way down to the end.
zonerama is not able to find the captured image files.
  • does /var/cache/zoneminder/events/10/11/05/26/11/16/21/022-capture.jpg exist? (do a "ls -l /var/cache/zoneminder/events/10/11/05/26/11/16/21/022-capture.jpg")
  • what would be the correct path for that image file (look at camera 10, the event that is starting at 11:16:21, frame number 23, right click on the image and klick view image or copy image location so you can see the path of the image. )
  • zonerama currently only supports the deep file storage (storing the image in the folders specifing the starting date/time. (zoneminder default, option is called USE_DEEP_STORAGE and needs to be enabled.)
  • make sure that you have set deleteFramesAfterGenerateVideoFromDB AND deleteFramesAfterGenerateVideoFromHDD set to false, or the event will not be visible on the zoneminder web interface.
  • update to zonerama version 1.1a just to be sure (dont overwrite your config :))
  • if the problem persists: paste your zonerama.conf to pastebin.com and submit the link here.
that you get black images and a black video is because zonerama can't find the source images that should be merged. if you get that fixed you should be fine.
croll12 wrote: Then it hangs on creating the avi file.
it should not hang. output should look like:

Code: Select all

DONE rendering 252 frames in 1 secs: 252 
Generating Video... 
...using command "/usr/bin/ffmpeg" "-f image2 -r 20 -i /root/workspace/zm/events//3/11/05/25/11/40/25//%03d-capture.jpg /root/workspace/zm/events//3/11-05-25-_-11-40-25.avi" 
done generating video
croll12 wrote:Is there a link I would go to to view this from the web?
on the zoneminder main page you can see the merged monitor and also columns called "Events, Hour, Day, Week...". if there is something different from zero, klick on it and you should see the generated events.

arymar
Posts: 13
Joined: Tue Dec 14, 2010 3:53 pm
Location: France

Re: [App] Zonerama - Merge multiple Monitors into one! [v 1.

Post by arymar » Tue Jul 05, 2011 6:01 am

HI XBA,
This is exactly what I am looking for. Point is that I need some help installing it over fedora14. So far the qmake and even make command leads to no action even if qt has been installed. Could you please be more explicit in the way to install it, non Linux expert may face the same issue and give up. 1.24.2 is running on my system (working very well by the way).

qmake result: "bash: qmake: command not found...
Similar command is: 'make'"

make result: "make: *** No targets specified and no makefile found. Stop."

Thanks in advance.
Alain

alecano23
Posts: 22
Joined: Thu Oct 23, 2008 1:47 pm

Re: [App] Zonerama - Merge multiple Monitors into one! [v 1.

Post by alecano23 » Tue Jul 12, 2011 5:27 am

Hi when trying to compile with qmake I got this err.

root@fibertel:~/zonerama-1.1a# qmake
root@fibertel:~/zonerama-1.1a# make
g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_SCRIPT_LIB -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtSql -I/usr/include/qt4/QtScript -I/usr/include/qt4 -I. -o LinkedMonitor.o LinkedMonitor.cpp
In file included from LinkedMonitor.cpp:9:
LinkedMonitor.h:13:20: error: QPainter: No existe el fichero ó directorio
LinkedMonitor.h:14:21: error: QDateTime: No existe el fichero ó directorio
LinkedMonitor.h:15:18: error: QDebug: No existe el fichero ó directorio
LinkedMonitor.h:16:17: error: QFile: No existe el fichero ó directorio
LinkedMonitor.h:17:18: error: QImage: No existe el fichero ó directorio
In file included from LinkedMonitor.h:18,
from LinkedMonitor.cpp:9:
zFrame.h:17: error: âQDateTimeâ does not name a type
zFrame.h:18: error: âQDateTimeâ does not name a type
In file included from LinkedMonitor.cpp:9:
LinkedMonitor.h:23: error: âQStringâ has not been declared
LinkedMonitor.h:26: error: âQPainterâ has not been declared
LinkedMonitor.h:27: error: âQPainterâ has not been declared
LinkedMonitor.h:28: error: âQPainterâ has not been declared
LinkedMonitor.h:31: error: âQStringâ does not name a type
LinkedMonitor.h:34: error: âQStringâ has not been declared
LinkedMonitor.h:49: error: âQStringâ does not name a type
LinkedMonitor.h:51: error: âQStringâ does not name a type
LinkedMonitor.h:55: error: âQImageâ does not name a type
LinkedMonitor.h:56: error: âQImageâ does not name a type
LinkedMonitor.h:63: error: âQStringâ does not name a type
LinkedMonitor.h:68: error: âQStringâ has not been declared
LinkedMonitor.cpp:11: error: âQStringâ has not been declared
LinkedMonitor.cpp: In constructor âLinkedMonitor::LinkedMonitor(int, int)â:
LinkedMonitor.cpp:15: error: âm_eventsDirâ was not declared in this scope
LinkedMonitor.cpp:26: error: âm_standByImagePathâ was not declared in this scope
LinkedMonitor.cpp: At global scope:
LinkedMonitor.cpp:36: error: variable or field âpaintLastFrameâ declared void
LinkedMonitor.cpp:36: error: âQPainterâ was not declared in this scope
LinkedMonitor.cpp:36: error: âpainterâ was not declared in this scope
LinkedMonitor.cpp:42: error: variable or field âpaintFrameâ declared void
LinkedMonitor.cpp:42: error: âQPainterâ was not declared in this scope
LinkedMonitor.cpp:42: error: âpainterâ was not declared in this scope
LinkedMonitor.cpp:42: error: expected primary-expression before âframeâ
make: *** [LinkedMonitor.o] Error 1
root@fibertel:~/zonerama-1.1a#



Any idea???

xba
Posts: 11
Joined: Fri Apr 29, 2011 12:15 pm

Re: [App] Zonerama - Merge multiple Monitors into one! [v 1.

Post by xba » Fri Jul 13, 2012 12:56 pm

@alecano23
looks like something with your qt installation is wrong, or you just have a too old version of qt.
As stated in the http://code.google.com/p/zonerama/wiki/Requirements wiki page, zonerama requires at least qt 4.5 to be installed.

@arymar
you need to have make, gcc and qt installed. if qmake is not found but you are sure it is installed, your path variable may be configured wrong (our you may need to logout and login after installing it.
it is out of the scope of zonerama to provide a full tutorial how to set up all requirements. also, a sad fact is, that you indeed need to be some kind of computer expirienced user to get zonerama working, as there is no installer for it, no binary packages for different operating systems and also no configuration gui.

please ask support questions at the google codes page.
http://code.google.com/p/zonerama/issues/list

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests