Very Low rate recording - aka monitoring third party webcams

Anything you want added or changed in future versions of ZoneMinder? Post here and there's a chance it will get in! Search to make sure it hasn't already been requested.
Post Reply
WhiteDeath
Posts: 4
Joined: Tue Jan 23, 2007 1:00 am

Very Low rate recording - aka monitoring third party webcams

Post 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).
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post 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.
Phil
WhiteDeath
Posts: 4
Joined: Tue Jan 23, 2007 1:00 am

Post 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
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

Or you could frame skip, it would still download the image but discard it
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
WhiteDeath
Posts: 4
Joined: Tue Jan 23, 2007 1:00 am

Post 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 :?
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post 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.
Phil
WhiteDeath
Posts: 4
Joined: Tue Jan 23, 2007 1:00 am

Post 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]
Post Reply