No more red outlines on analysis frames

Forum for questions and support relating to the 1.30.x releases only.
cambot
Posts: 14
Joined: Mon Apr 23, 2012 5:15 pm

No more red outlines on analysis frames

Post by cambot » Wed Aug 10, 2016 4:22 am

So, first the good news. Zoneminder 1.29 updated to 1.30.0 on my ubuntu 14.04.5 LTS and everything seemed to go smoothly without any user input on my part!

The bad news is that it appears the red outlines on my analysis images are gone! The alarm frames are there, and it still appears to triggering identically to before but now the red outlines that showed what changed in each image no longer appear.

I double-checked OPTIONS->CONFIG->CREATE_ANALYSIS_IMAGES is still enabled.

Any ideas?

chacko
Posts: 1
Joined: Thu Aug 11, 2016 7:21 pm

Re: No more red outlines on analysis frames

Post by chacko » Thu Aug 11, 2016 8:00 pm

I have the same problem on CentOS 6.8. I haven't found any error or warning messages in the log.

mattionline
Posts: 53
Joined: Thu Jun 18, 2015 7:27 pm
Contact:

Re: No more red outlines on analysis frames

Post by mattionline » Fri Aug 12, 2016 12:05 pm

Same here
My Personal Blog: https://mattionline.de

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

Re: No more red outlines on analysis frames

Post by knight-of-ni » Fri Aug 12, 2016 6:06 pm

Please apply the changes described in this pull request and let us know:
https://github.com/ZoneMinder/ZoneMinder/pull/1592
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/

cambot
Posts: 14
Joined: Mon Apr 23, 2012 5:15 pm

Re: No more red outlines on analysis frames

Post by cambot » Fri Aug 12, 2016 7:55 pm

Thanks knnniggett.

I replaced that with my /usr/share/zoneminder/www/skins/classic/views/frame.php file on my installation and restarted with CREATE_ANALYSIS_IMAGES checked and I don't see any difference. Do I need to restart or flush any apache bits to make sure the php file isn't cached anywhere?

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

Re: No more red outlines on analysis frames

Post by knight-of-ni » Fri Aug 12, 2016 8:19 pm

It depends on exactly what time you did it and how you did it.
iconnor pushed a couple more changes in the past hour.

Maybe the best way to make sure you get all the commits is to:

Code: Select all

git clone https://github.com/connortechnology/ZoneMinder.git fix_analysis_frame
Copy these files:
web/includes/Frame.php
web/skins/classic/views/frame.php
web/views/image.php

and put them into the proper place on your filesystem.
On my CentOS server, that would be under /usr/share/zoneminder/www

I just tested this pr on my end, and the red outline works for me now just like it used to.
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/

cambot
Posts: 14
Joined: Mon Apr 23, 2012 5:15 pm

Re: No more red outlines on analysis frames

Post by cambot » Sat Aug 13, 2016 5:47 am

So I have partial success with this patch.

What now works:

From ZM Console in classic web mode, click on the number of Events to show the list of events; a new window pops up with the list of events.
Click on the Event name (i.e. Event-1). A new window open which starts the playback of the events normally.
Then I click on Stills above the playback video. The series of still images that show up now have red outlines for the motion!

However, what is now completely broken is if I click on the link to show an individual frame from the list of Events.
Starting over:
From the ZM Console, click on the number of Events.
Now on the right most side, under the heading "Max. Score" there is a number which previously showed the one frame with the max score and a diagnostic image. That window now shows no image at all, where before it showed the frame but no red outlining.

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

Re: No more red outlines on analysis frames

Post by knight-of-ni » Sun Aug 14, 2016 1:02 pm

cambot wrote:So I have partial success with this patch.

What now works:

From ZM Console in classic web mode, click on the number of Events to show the list of events; a new window pops up with the list of events.
Click on the Event name (i.e. Event-1). A new window open which starts the playback of the events normally.
Then I click on Stills above the playback video. The series of still images that show up now have red outlines for the motion!
I've never used the stills screen so its good to know the red outline works here.
cambot wrote: However, what is now completely broken is if I click on the link to show an individual frame from the list of Events.
Starting over:
From the ZM Console, click on the number of Events.
Now on the right most side, under the heading "Max. Score" there is a number which previously showed the one frame with the max score and a diagnostic image. That window now shows no image at all, where before it showed the frame but no red outlining.
This is exactly what I tested lasted Friday, and this morning I built and tested this again in a different vm. Works fine for me.
{click number of events} -> Max Score -> Single snapshot appears with red outline
At this point you can move through the event frame-by-frame and observe each snapshot with the red outline

I've done some additional testing, which also shows the red outline, duplicating the behaviour of 1.29.0:
{click number of events} -> {click on the thumbnail}
{click number of events} -> Alarm Frames -> {click on an alarm frame id}
{click number of events} -> Frames -> {click on an alarm frame id}

@cambot Check your logs files for errors. In this case you will need to look in the console built into your web browser, in the Apache log for possible php errors, and the zoneminder log for any other errors. Last week the only time I got the results you described was when the changes in the current state of that pr were not all there.
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/

cambot
Posts: 14
Joined: Mon Apr 23, 2012 5:15 pm

Re: No more red outlines on analysis frames

Post by cambot » Sun Aug 14, 2016 2:40 pm

Gotcha - well, since what I did was just replace those 3 files on top of the zoneminder 1.30.0-trusty debian package as installed from iconnor's ppa, I think I will have to be more thorough and attempt to build a full replacement .deb file from the git code checkout.

I've never done that before; is there a good place I can read up on how to do that?

I tried doing apt-get source zoneminder but that just pulls the 1.26.5 sources; I've re-built that package from scratch a few times in the past.

EDIT: I started following the instructions here:

http://zoneminder.readthedocs.io/en/sta ... rom-source

and I *think* this should build the package from this git branch:

/do_debian_package.sh trusty 2016081401 local fix_analysis_frame

And it mostly works, but it fails from what looks like a failed dependency:

zoneminder_1.30.0-trusty-2016081401.orig/src/zm_ffmpeg_camera.cpp: In member function ‘int FfmpegCamera::OpenFfmpeg()’:
/home/pingo/myapps/zoneminder/src/zoneminder_1.30.0-trusty-2016081401.orig/src/zm_ffmpeg_camera.cpp:241:67: error: ‘av_dict_parse_string’ was not declared in this scope
ret = av_dict_parse_string(&opts, Options().c_str(), "=", ",", 0);

BTW, I have no reason to doubt that this patch has fixed the issue for you; if this is too much trouble I can just wait for the fix to get merged and pushed out. I'm perfectly fine working around the problem for now since my zones are pretty well setup. I'm also hanging back on ubuntu LTS 14.04 for a few months while I work out some other alternatives for other software that won't be cleanly moving to 16.04, since it appears the do_debain_package.sh instructions state this was only tested on ubuntu 15.X and later.

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

Re: No more red outlines on analysis frames

Post by knight-of-ni » Sun Aug 14, 2016 4:07 pm

From a big picture perspective, this highlights that we need more help building and testing ZoneMinder before we release. The commit that broke the red outlines was done back in May, but despite a long release candidate period, this issue was still not noticed until August. It would be nice if we could get more than just the few of us on the development team to build the zoneminder master branch into a package and test it. This isn't directed at anyone specifically, but rather it is a request for volunteers.

The instructions you followed are correct, and the compile error you received means the version of libav/ffmpeg on your system is old. It is older than what we expected. I just merged the PR, which should fix that (and hopefully won't create any new problems):
https://github.com/ZoneMinder/ZoneMinder/pull/1585

So try building from the latest master branch again. It should work.

And thank you for trying to build a package, rather than mess up your system by building from-source. We need everyone to do it the way you are trying to build it.
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/

cambot
Posts: 14
Joined: Mon Apr 23, 2012 5:15 pm

Re: No more red outlines on analysis frames

Post by cambot » Sun Aug 14, 2016 4:26 pm

Thanks for your help knnniggett! I was able to rebuild and install the latest master package and the red outlines are now back!

FYI, for anyone else following along, I'm on 14.04 LTS and I followed these instructions:

http://zoneminder.readthedocs.io/en/sta ... rom-source

For me, this ended up being:

sudo apt-get install git
wget https://raw.githubusercontent.com/ZoneM ... package.sh
chmod a+x do_debian_package.sh
./do_debian_package.sh `lsb_release -a 2>/dev/null | grep Codename | awk '{print $2}'` `date +%Y%m%d`01 local master
# (this part took about 15 minutes, and it will ask to download and install a bunch of development library packages)
# After it's all done, I ended up with 3 new .deb files:
zoneminder_1.30.0-trusty-2016081401_amd64.deb, zoneminder-dbg_1.30.0-trusty-2016081401_amd64.deb, zoneminder-doc_1.30.0-trusty-2016081401_all.deb
# I only installed the main package which installed on top of the existing one using:
sudo dpkg -i zoneminder_1.30.0-trusty-2016081401_amd64.deb
# You can tell because it says this:
# Preparing to unpack zoneminder_1.30.0-trusty-2016081401_amd64.deb ...
# Unpacking zoneminder (1.30.0-trusty-2016081401) over (1.30.0-trusty) ...

After that the red outlines re-appeared!

User avatar
emailej
Posts: 19
Joined: Wed Aug 24, 2016 12:31 am

Re: No more red outlines on analysis frames

Post by emailej » Wed Aug 24, 2016 8:35 pm

This is also broken on the OpenSuse 13.2 package.

I can see the red outlines on the thumbnails in the list of events but not when I click to open the individual frames. Hmmmm how to build the RPM... Maybe I'll wait for the next stable release as my system is working nice and stable anyways.

michaelh99
Posts: 9
Joined: Sun Aug 02, 2015 3:00 pm

Re: No more red outlines on analysis frames

Post by michaelh99 » Fri Aug 26, 2016 1:08 pm

emailej's response mostly mirrors mine. I had a (mostly) stable system before 1.3 and while I'd like to test the latest code I don't have a plethora of machines lying about that I could run alpha ZM on.
I'm open to suggestions as to how I could help to test that don't involve taking my regular ZM machine down.

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

Re: No more red outlines on analysis frames

Post by knight-of-ni » Fri Aug 26, 2016 3:15 pm

We have documentation on our readthedocs sites, which steps you through how to build a package, based on the latest master branch, for both debian and redhat based distros. Once you build the zoneminder package, just install it in a virtual machine, running your favorite linux distro, if you don't have a spare physical machine around. Most IP cameras can dual stream, so you can use the same production cameras on your network.

We also have a docker container, which runs the latest master and is supported by the community.
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/

mattionline
Posts: 53
Joined: Thu Jun 18, 2015 7:27 pm
Contact:

Re: No more red outlines on analysis frames

Post by mattionline » Sat Aug 27, 2016 10:00 am

Does anybody know when this fix appears in the iconnor ubuntu ppa?
My Personal Blog: https://mattionline.de

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests