How to enable this kind of events view

Forum for questions and support relating to the 1.24.x releases only.
nibelungen79
Posts: 28
Joined: Thu Jun 24, 2010 12:40 pm

Post by nibelungen79 »

...back again.
I started with setting up a new monitor, than i kept the default
zone:
[IMG]http:
//img689.imageshack.us/img689/3267/zonek.png[/IMG]


Image

The following screenshots explain the event:

Image
Image
Image


And now the files generate for the event (directly from /events - folder):

I was really amazed about the first image for the event...
The analysed image... But it doesnt appear in Web-Frontend...

Image
Image
Image
Image
Image
Image
Image
Image


Hope i give you enough info for debug this ?!

Thanks!
bb99
Posts: 943
Joined: Wed Apr 02, 2008 12:04 am

Post by bb99 »

Everything is there. This is going to be a simple settings issue. I rechecked everything you've posted so far and would like you to increase your pre-event buffers to 2 and your alarm frame count to 2. I don't see how either of these settings will affect the display frame but now I'm down to comparing your settings to mine and those are the only differences. The bugger should be working!
nibelungen79
Posts: 28
Joined: Thu Jun 24, 2010 12:40 pm

Post by nibelungen79 »

done... but no changes so far.
I still see all the analyse files in the events folder on filesystem but not in the webfrontend, so there must be a bug in rendering the images in 'still' view?!
i cant see an error in message log oder apache error nor acces log.
nibelungen79
Posts: 28
Joined: Thu Jun 24, 2010 12:40 pm

Post by nibelungen79 »

another thing i recognized, the system date differs in one hour to the eventfiles date?!
bb99
Posts: 943
Joined: Wed Apr 02, 2008 12:04 am

Post by bb99 »

My mistake, the pre-event image count buffer should be 21 instead of 2. Seems to me the time stamp issue is in the forum and boils down to the system clock set to gmt and adjusted by the OS to local time, day light savings if you have such a thing, or the way NTP adjusts the clock. Anyway that's probably not a ZM issue.
Edit: You may have hit on something; please post your options->images setting page.
montecarlo
Posts: 1
Joined: Fri Jul 02, 2010 2:31 am

Post by montecarlo »

I just wanted to chime in and say I recently had the exact same issue. Motion was being detected correctly but the window just had a big red box around it.

I found that if the pixel/filter/blob sizes were small the analyzed outline images were not shown. As soon as I increased the size in the zone settings not only did I see the outlines on new events, but I also saw the outlines on prior detected events... I then tried the old setting just for kicks and they disappeared again.

I didn't go looking into the code as my current settings seem to work for me, but wanted to get the word out there...
nibelungen79
Posts: 28
Joined: Thu Jun 24, 2010 12:40 pm

Post by nibelungen79 »

@bb99
Here wo go:

Image


For some testing i set up JPEG_ALARM_FILE_QUALITY to 100... So it doesnt work too... like with the basic setting.

Okay - i we have gmt+1 here. So that could be the problem - but if this issue doesnt take effect to the analysis issue i can live with it!
Currently no need to debug this for me but i will follow it if this case is closed :)

@montecarlo

thank you! i will give it a try, but it doesnt look to be a good solution (if it´s one)... so the images got rendered why not show them?!
nibelungen79
Posts: 28
Joined: Thu Jun 24, 2010 12:40 pm

Post by nibelungen79 »

@montecarlo

i increased the sizes up to 25 - still no effect.
can you give me an example or the settings of your zone??
i use the image size of 320x240 px
nibelungen79
Posts: 28
Joined: Thu Jun 24, 2010 12:40 pm

:idea: probably solved...

Post by nibelungen79 »

Hello,

i´ve found a way to get it work for me - but i think there must be another way to do the trick...

In functions.php there are one line which describes the analyse image path and filename - this works so far for normal images but the

$hasAnalImage fails while file_exists function...
in this case i´ve createa a second value especially for the $hasAnalImage line... and it works!
The are some issues with the paths and the file_xx functions from php (probably depends on version??) i think.

So far - here comes the code with some lines from me:

Code: Select all

function getImageSrc( $event, $frame, $scale=SCALE_BASE, $captureOnly=false, $overwrite=false )
{
    $eventPath = getEventPath( $event );

    if ( !is_array($frame) )
        $frame = array( 'FrameId'=>$frame, 'Type'=>'' );

    //echo "S:$scale, CO:$captureOnly<br>";
    $captImage = sprintf( "%0".ZM_EVENT_IMAGE_DIGITS."d-capture.jpg", $frame['FrameId'] );
    $captPath = $eventPath.'/'.$captImage;
    $thumbCaptPath = ZM_DIR_IMAGES.'/'.$event['Id'].'-'.$captImage;
    //echo "CI:$captImage, CP:$captPath, TCP:$thumbCaptPath<br>";

    $analImage = sprintf( "%0".ZM_EVENT_IMAGE_DIGITS."d-analyse.jpg", $frame['FrameId'] );
   $analPath = $eventPath.'/'.$analImage;
   $analPath1 = ZM_DIR_EVENTS.'/'.$eventPath.'/'.$analImage; //workaround by nibelungen79
    $thumbAnalPath = ZM_DIR_IMAGES.'/'.$event['Id'].'-'.$analImage;
    //echo "AI:$analImage, AP:$analPath, TAP:$thumbAnalPath<br>";

    $alarmFrame = $frame['Type']=='Alarm';

    //$hasAnalImage = $alarmFrame && file_exists( $analPath ) && filesize( $analPath ); //original line
    $hasAnalImage = $alarmFrame && file_exists( $analPath1 ) && filesize( $analPath1 ); // workaround by nibelungen79

.........
bb99
Posts: 943
Joined: Wed Apr 02, 2008 12:04 am

Post by bb99 »

I don't think this is a work around, you got it! We were headed down two separate paths with the same thought. You can test your fix by taking an event from within ZM and viewing frame by frame (one frame at a time), the red outline should be present within all frames with the red border. One more favour with this: please post versions of any software you feel pertinent (browser, OS, php, etc). This will help future forum searches highlight this post and maybe edit the title with "solved".
nibelungen79
Posts: 28
Joined: Thu Jun 24, 2010 12:40 pm

Post by nibelungen79 »

i'm not sure if it is really solved - i will go and test some cases.
If everything works well i will change the subject to solved.

Currently im not getting analyse images in the events folder - but events with the red border.

will be back soon.

cheers
bb99
Posts: 943
Joined: Wed Apr 02, 2008 12:04 am

Post by bb99 »

One last shot: Check zm.conf to make sure all of your variables are set.
http://www.zoneminder.com/forums/viewtopic.php?t=16158

Should've been a simple edit and a tick but went down a similar path as you and I did until he discovered the issue. Worth a look anyway. Please post back.
nibelungen79
Posts: 28
Joined: Thu Jun 24, 2010 12:40 pm

Post by nibelungen79 »

Hey bb99,


back to my posting - i´ve checked the zm.conf and i can't see any
variables i´ve set in the options...

So i think the options are only stored in DB? Look at one of my
screenshots in earlier post - there you can see the settings.

Are you sure ZM needs to set the settings in this file too??
Let me see an example file with more settings than mine.

I currently dont know what variables the zm.conf can handle.

Thanks!

bye

Code: Select all

# ==========================================================================
#
# ZoneMinder Base Configuration, $Date: 2008-07-25 10:48:16 +0100 (Fri, 25 Jul 2008) $, $Revision: 2612 $
#
# ==========================================================================
#
# This file is generated by 'configure'. Care should be taken if manually
# editing this file as an changes may be overwritten by subsequent configuration
# or installations.
#

# Current version of ZoneMinder
ZM_VERSION=1.24.2

# Path to build directory, used mostly for finding DB upgrade scripts
ZM_PATH_BUILD=/tmp/buildd/zoneminder-1.24.2

# Build time, used to record when to trigger various checks
ZM_TIME_BUILD=1272778158

# Path to ZoneMinder binaries
ZM_PATH_BIN=/usr/bin

# Path to ZoneMinder libraries (none at present, for future use)
ZM_PATH_LIB=/usr/lib

# Path to ZoneMinder configuration (this file only at present)
ZM_PATH_CONF=/etc/zm

# Path to ZoneMinder web files
#ZM_PATH_WEB=/usr/share/zoneminder
ZM_PATH_WEB=/var/www/zm

# Path to ZoneMinder cgi files
ZM_PATH_CGI=/usr/lib/cgi-bin

# Username and group that web daemon (httpd/apache) runs as
ZM_WEB_USER=www-data
ZM_WEB_GROUP=www-data

# ZoneMinder database hostname or ip address
ZM_DB_HOST=localhost

# ZoneMinder database name
ZM_DB_NAME=****

# ZoneMinder database user
ZM_DB_USER=*************

# ZoneMinder database password
ZM_DB_PASS=*****************
bb99
Posts: 943
Joined: Wed Apr 02, 2008 12:04 am

Post by bb99 »

I was too quick to post the link, your zm.conf is what it should be.
Locked