ZM 1.25 feature enhancements

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.
mitch
Posts: 169
Joined: Thu Apr 30, 2009 4:18 am

ZM 1.25 feature enhancements

Post by mitch » Sun Apr 15, 2012 2:18 am

This patch includes many of the feature enhancements from http://www.zoneminder.com/forums/viewto ... =9&t=14008 including:
Main user Visible Features:
-XML API Interface for anywhere there is currently a json interface (&usexml=1)
-API Script for accessing some specific monitor/event data not exposed via the ajax interface: http://127.0.0.1/zm/?view=api&action=[ACTION] valid actions are: get_connkey, list_monitors, zone_info, event_stats
-Previously over time when using a video stream it would most likely half your FPS any time there is a connection issue, now it can auto-reset back to the max fps after a certain amount of time so your FPS does not end up at 1 all the time (REDUCTION_FPS_RESET_TIME under Images).
-Support for silverlight streaming(asf compat format)
-stream.php has the option that during Alarm states it will return to you the ZONES for the event that have alarmed ( &notes=1 on the end of your query string) (This could allow for clients to have different notices for different zones being in alarm mode)
-Events / event status queries now also return the highest scoring frame for the event (&MainFrameID=1)

my enhancement branch is at: https://github.com/mitchcapper/ZoneMinder/tree/fixes with the current fix set patch at:
https://github.com/mitchcapper/ZoneMind ... dd14.patch

User avatar
nightcrawler
Posts: 71
Joined: Fri Aug 12, 2011 9:54 am
Location: the netherlands

Re: ZM 1.25 feature enhancements

Post by nightcrawler » Mon Apr 16, 2012 1:07 pm

Hi mitch,

That are great new features! especially the .ASF silverlight option and XML options because I'm running an ZM monitor with 2 camera's on an birdhouse and with your patch I can integrate it more native to my website. (test site at: http://alco.dyndns.info/Bluemotic/index ... m-vogel-tv )

But I'm not an Linux guru but i'm willing to learn it FAST. So I tried to use your patch on my ZM box. with this (offcourse..first dry-run..)command :

Code: Select all

patch -p0 --dry-run < /usr/scripts/mitch_1.250.patch
But that's not working because it tries to find the first file ConfigData.pm.in

Code: Select all

root@zoneminder:~# patch -p0 --dry-run < /usr/scripts/mitch_1.250.patch
patching file b/README.BRANCH
can't find file to patch at input line 59
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in b/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in
|index dc8a072..e7f6d14 100644
|--- a/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in
|+++ b/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in
and I only can find that file in my GIT source path's. ( I'm currently use the mastertheknife 1.25 GIT patch source)

So my question, is it possible to apply your patch like an ".DIFF file" or something that works on an active ZM configuration?
Or do I have to update an downloaded sourcecode file and install (./configure , make , make install) it again?
Zoneminder @Ubuntu 11 server, ZM 1.25.0 , FFMPEG, 4 Analoge cameras, 1.6ghz P4mobile, 2GB ram, 60GB-HDD.
I also have an (homeseer) domotica system up-and-running with touchscreens,light controllers,weather forecast etc.

mitch
Posts: 169
Joined: Thu Apr 30, 2009 4:18 am

Re: ZM 1.25 feature enhancements

Post by mitch » Mon Apr 16, 2012 2:04 pm

nightcrawler the reason that is failing is because with MTK's patch he changed the total # of configuration variables so patching that file won't work by default on that specific file. The good news is its really easy to fix. When you patch you will be left with a .rej file. Open that file it will basically just show a few lines of code the patch adds to that file in a few places. You can manually add these and manually change the numbers. If you want an example checkout my "all" branch version of that file (https://github.com/mitchcapper/ZoneMind ... Data.pm.in )

it has that variable and one other added to MTK's perfbranch. Using a text editor should be straightforward. Note however that it does expect a ./configure && make && make install after. You will need to run scripts/zmupdate.pl -f to update the database also to include the new config var.

User avatar
nightcrawler
Posts: 71
Joined: Fri Aug 12, 2011 9:54 am
Location: the netherlands

Re: ZM 1.25 feature enhancements

Post by nightcrawler » Mon Apr 16, 2012 8:19 pm

But isn't it easier to use your complete GIT source at https://github.com/mitchcapper/ZoneMinder and build an new install from there?
I noticed that you mentioned in the MTK's topic and GIT history that you compiled an new all-in-one source package on the 14th of april.
Because I installed the MTK performance patch a month ago on my system. So It must be possible to repeat that with your GIT source.
Zoneminder @Ubuntu 11 server, ZM 1.25.0 , FFMPEG, 4 Analoge cameras, 1.6ghz P4mobile, 2GB ram, 60GB-HDD.
I also have an (homeseer) domotica system up-and-running with touchscreens,light controllers,weather forecast etc.

mitch
Posts: 169
Joined: Thu Apr 30, 2009 4:18 am

Re: ZM 1.25 feature enhancements

Post by mitch » Mon Apr 16, 2012 8:56 pm

yes you can use my complete source as desired and ALL does include all of my branches and MTK's perf branch. Note however depending how old your ffmpeg is you may get a compiler error. If so grab the FFMPEG patch and just do patch -R to reverse that patch out (should do so cleanly).

User avatar
nightcrawler
Posts: 71
Joined: Fri Aug 12, 2011 9:54 am
Location: the netherlands

Re: ZM 1.25 feature enhancements

Post by nightcrawler » Mon Apr 16, 2012 9:05 pm

ok than I will try that.

My FFMPEG is realy up-to-date because I'm using this script at an cron job to check every 14 days for an update on FFMPEG or H264 :)
so I hope I don't get the error 8). will try it in my VM-ware DEV sollution for testing :)

(source for ffmpeg-update-script: https://github.com/pruperting/x264-ffmpeg-up-to-date )

And I will keep my result posted
Attachments
ffmpegupdate.rar
unrar and chmod 755 on your linux machine. source
(3.99 KiB) Downloaded 148 times
Zoneminder @Ubuntu 11 server, ZM 1.25.0 , FFMPEG, 4 Analoge cameras, 1.6ghz P4mobile, 2GB ram, 60GB-HDD.
I also have an (homeseer) domotica system up-and-running with touchscreens,light controllers,weather forecast etc.

Andre81
Posts: 14
Joined: Thu Jun 25, 2009 10:25 am

Re: ZM 1.25 feature enhancements

Post by Andre81 » Mon Jun 25, 2012 8:15 am

Hi,

can I use this script with lucid (10.04)

Thanks

A.

mitch
Posts: 169
Joined: Thu Apr 30, 2009 4:18 am

Re: ZM 1.25 feature enhancements

Post by mitch » Mon Jun 25, 2012 2:24 pm

My enhancements are not related to a specific OS.

DREMA
Posts: 162
Joined: Fri Dec 12, 2008 2:39 am
Location: México

Re: ZM 1.25 feature enhancements

Post by DREMA » Sat Jun 30, 2012 5:36 pm

Mitch I'm trying to compile your branch, but I'm getting this error

Code: Select all

Making all in mootools
make[4]: Entering directory `/usr/src/patched_zm/ZoneMinder/web/tools/mootools'
 cd ../../.. && /bin/bash ./config.status web/tools/mootools/Makefile 
config.status: creating web/tools/mootools/Makefile
make[4]: Leaving directory `/usr/src/patched_zm/ZoneMinder/web/tools/mootools'
make[4]: Entering directory `/usr/src/patched_zm/ZoneMinder/web/tools/mootools'
make[4]: *** No rule to make target `mootools-core-1.3.2-nc.js', needed by `all-am'.  Stop.
make[4]: Leaving directory `/usr/src/patched_zm/ZoneMinder/web/tools/mootools'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/src/patched_zm/ZoneMinder/web/tools'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/patched_zm/ZoneMinder/web'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/patched_zm/ZoneMinder'
make: *** [all] Error 2
The Zoneminder svn compiles and works fine.

Any hints? Thanks.
Just... enjoy life! :D

mitch
Posts: 169
Joined: Thu Apr 30, 2009 4:18 am

Re: ZM 1.25 feature enhancements

Post by mitch » Sun Jul 01, 2012 4:20 pm

What branch? Do you have a web\tools\mootools\mootools-core-1.3.2-nc.js file?

DREMA
Posts: 162
Joined: Fri Dec 12, 2008 2:39 am
Location: México

Re: ZM 1.25 feature enhancements

Post by DREMA » Thu Jul 05, 2012 2:48 pm

Yes that was the problem, four mootools* files were missing, I copy them from the normal zm and finally it compiled.

Just one question, can I upgrade an existing zm installation to your version? If so what changes I need to, the database, the config, etc etc

Thanks for the help, awesome work!
Just... enjoy life! :D

mitch
Posts: 169
Joined: Thu Apr 30, 2009 4:18 am

Re: ZM 1.25 feature enhancements

Post by mitch » Thu Jul 05, 2012 2:55 pm

you can update from previous versions just use the standard zmconfgen/zmupdate.pl process.

DREMA
Posts: 162
Joined: Fri Dec 12, 2008 2:39 am
Location: México

Re: ZM 1.25 feature enhancements

Post by DREMA » Tue Jul 17, 2012 8:33 am

Could you be more specific? I tried updating to your zm version but I can't get it to work.
After compiling and make install I do this.

Code: Select all

root@camaras:/usr/src# zmupdate.pl -f
Freshening configuration in database
Loading config from DB
No option 'ZM_LOCAL_BGR_INVERT' found, removing at /root/perl5/lib/perl5/ZoneMinder/ConfigAdmin.pm line 89.
No option 'ZM_Y_IMAGE_DELTAS' found, removing at /root/perl5/lib/perl5/ZoneMinder/ConfigAdmin.pm line 89.
Saving config to DB

root@camaras:/usr/src# zmpkg.pl start
No option 'ZM_CPU_EXTENSIONS' found, removing at /usr/local/share/perl/5.14.2/ZoneMinder/ConfigAdmin.pm line 89.
No option 'ZM_REDUCTION_FPS_RESET_TIME' found, removing at /usr/local/share/perl/5.14.2/ZoneMinder/ConfigAdmin.pm line 89.
No option 'ZM_RECORD_DIAG_IMAGES_FIFO' found, removing at /usr/local/share/perl/5.14.2/ZoneMinder/ConfigAdmin.pm line 89.

Code: Select all

==> /var/log/zm/zmpkg.log <==
07/17/2012 03:29:19.878757 zmpkg[4851].INF [Command: start]
07/17/2012 03:29:20.312742 zmpkg[4851].ERR [Unable to run "su www-data --shell=/bin/sh --command='/usr/local/bin/zmfix'", output is ""]
Thanks a lot.
Just... enjoy life! :D

mitch
Posts: 169
Joined: Thu Apr 30, 2009 4:18 am

Re: ZM 1.25 feature enhancements

Post by mitch » Thu Jul 19, 2012 2:33 am

zmconfgen.pl is what you want i believe;)

DREMA
Posts: 162
Joined: Fri Dec 12, 2008 2:39 am
Location: México

Re: ZM 1.25 feature enhancements

Post by DREMA » Fri Jul 20, 2012 4:34 pm

After compilling and ''make install'' of your repo, I run

Code: Select all

root@camaras:/usr/src/zoneminder-patched# perl zmconfgen.pl
Generating 'src/zm_config_defines.h'
Updating 'db/zm_create.sql'
What else I have to do? If I use the created db/zm_create.sql file I think it will replace my current db.

Thanks a lot for your time.
Just... enjoy life! :D

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest