Error in zmfilter.log

Support and queries relating to all previous versions of ZoneMinder
Locked
wheelbarrow
Posts: 43
Joined: Sat Feb 21, 2004 7:39 pm

Error in zmfilter.log

Post by wheelbarrow »

Hi,

I've configured e-mail to attach a viode. but i'm not getting it and instead get an error in the filter log file.

Can you help me work out what is causing this.


Rate is out of range, 0.25 >= rate <= 10
Sending notification email 'Alarm - Front-Door - 2004-03-15 08:02:59'

Regards


Paul
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Re: Error in zmfilter.log

Post by zoneminder »

Hi Paul,

I think this may be a bug. The following patch might help, assuming it posts correctly.

----snip----
*** zmvideo.pl.z 15 Feb 2004 19:47:21 -0000 1.10
--- zmvideo.pl.z 15 Mar 2004 10:18:41 -0000
***************
*** 77,83 ****
delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};

my $event_id;
! my $rate = 0.0;
my $scale = 1.0;
my $overwrite = 0;

--- 77,83 ----
delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};

my $event_id;
! my $rate = 1.0;
my $scale = 1.0;
my $overwrite = 0;

***************
*** 117,125 ****
exit(-1);
}

! if ( $rate < 0.25 || $rate > 10 )
{
! print( STDERR "Rate is out of range, 0.25 >= rate <= 10\n" );
Usage();
}

--- 117,125 ----
exit(-1);
}

! if ( $rate < 0.25 || $rate > 100 )
{
! print( STDERR "Rate is out of range, 0.25 >= rate <= 100\n" );
Usage();
}

***************
*** 232,244 ****
elsif ( ZM_OPT_MPEG eq "ffmpeg" )
{
my $frame_rate = sprintf( "%.2f", $event->{Frames}/$event->{FullLength} );
! if ( $rate != 0.0 )
{
$frame_rate *= $rate;
- }
- else
- {
- $frame_rate = 25.0;
}
my $width = $event->{MonitorWidth};
my $height = $event->{MonitorHeight};
--- 232,240 ----
elsif ( ZM_OPT_MPEG eq "ffmpeg" )
{
my $frame_rate = sprintf( "%.2f", $event->{Frames}/$event->{FullLength} );
! if ( $rate != 1.0 )
{
$frame_rate *= $rate;
}
my $width = $event->{MonitorWidth};
my $height = $event->{MonitorHeight};
----snip----

Cheers,

Phil,
wheelbarrow
Posts: 43
Joined: Sat Feb 21, 2004 7:39 pm

Re: Error in zmfilter.log

Post by wheelbarrow »

Hi Phil,

Ok i'll see if this fixes it.

Silly question, but i know i need to cut the text out of here and save it as a file. What should i do with it once i've saved it.


Regards


Paul
wheelbarrow
Posts: 43
Joined: Sat Feb 21, 2004 7:39 pm

Re: Error in zmfilter.log

Post by wheelbarrow »

Ok Phil,

I've sorted that,

Ok so looking at the code it looks like it defaults to 25fps if the rate isn't sent over. Is this true. It;s just that the moves are runing fast.

I can send one over if you like.

Can i simply change the 25 to say 20.


Regards

Paul
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Re: Error in zmfilter.log

Post by zoneminder »

That was what it _used_ to do. Now it should just use the natural rate if it is not passed in explicitly.

Phil,
Locked