Page 1 of 1

Very Low rate recording - aka monitoring third party webcams

Posted: Tue Sep 18, 2007 1:44 pm
by WhiteDeath
I have Zoneminder running for a couple of IP cameras locally, so when I wanted to record the images from a webcam on the web, outside my control, it seemed like a logical thing to set up a remote monitor with a max frame rate of say 0.00055 frames per second (ie 1 every 30 minutes) to match the webcam, and put it in record mode.

One issue with doing this was the database only stores the first two decimal places of the frame rate.... easy fixed...

Code: Select all

alter table Monitors modify MaxFPS decimal(5,5);
alter table Monitors modify AlarmMaxFPS decimal(5,5);
Some things that still need work though - The ZM console often displays the Source column in red... i apparently due to zmc not staying running too well...
While source column is in red, viewing the live image doesn't work (no image).
Viewing events works fine.

It looks like a small job, but I haven't managed to find exactly what needs tweaking yet - it's a job for someone who knows the internal workings a bit better than someone who's spent an afternoon playing in the code (i.e. me).

Posted: Tue Sep 18, 2007 3:09 pm
by zoneminder
You may find that zmwatch.pl is killing your capture daemon because it thinks it is dead (because it isn't getting an image often enough). Check in your messages log or zmwatch.log to see if this is the case.

Posted: Tue Sep 18, 2007 4:46 pm
by WhiteDeath
zoneminder wrote:You may find that zmwatch.pl is killing your capture daemon because it thinks it is dead (because it isn't getting an image often enough). Check in your messages log or zmwatch.log to see if this is the case.
I looked there (and in the logs). The line below seems to take care of that by placing a minimum of 3 frame intervals on the timeout if the framerate is less than 1.

Code: Select all

$max_image_delay = ($monitor->{MaxFPS}&&($monitor->{MaxFPS}>0)&&($monitor->{MaxFPS}<1))?(3/$monitor->{MaxFPS}):ZM_WATCH_MAX_DELAY

Posted: Tue Sep 18, 2007 8:29 pm
by jameswilson
Or you could frame skip, it would still download the image but discard it

Posted: Wed Sep 19, 2007 3:04 am
by WhiteDeath
jameswilson wrote:Or you could frame skip, it would still download the image but discard it
I was trying to avoid the bandwidth use... 64kb/s isn't much to play with, especially when i want to use it too :?

Posted: Wed Sep 19, 2007 8:49 am
by zoneminder
WhiteDeath wrote:
zoneminder wrote:You may find that zmwatch.pl is killing your capture daemon because it thinks it is dead (because it isn't getting an image often enough). Check in your messages log or zmwatch.log to see if this is the case.
I looked there (and in the logs). The line below seems to take care of that by placing a minimum of 3 frame intervals on the timeout if the framerate is less than 1.

Code: Select all

$max_image_delay = ($monitor->{MaxFPS}&&($monitor->{MaxFPS}>0)&&($monitor->{MaxFPS}<1))?(3/$monitor->{MaxFPS}):ZM_WATCH_MAX_DELAY
That is true, however are you sure it's not zmwatch killing your daemon anyway, perhaps due to rounding errors or something? If it is then you can just disable it.

Posted: Wed Sep 19, 2007 4:22 pm
by WhiteDeath
No log entries indicating zmwatch had done anything.
I also tried setting the timeouts to something like 9000 - but no different.

I have noticed today my ISDN link is rather sluggish and losing packets - it's possible packet loss is causing the zmc process to get stuck.
I'll get Telstra to check up on the ISDN in the morning.
[/quote]