Hi guys,
I have set my camera setting to Mocord with just a small area in the overall camera view so that it will only record any motion pass through that area and recorded it. But when i look at my result. It seem to capture everything instead of only record when there is motion passing through. Did i do anything wrong? Please help. I don't want the camera to record 24/hrs a day. I just want to have it record as it detect something passing through that zone? Please help
Thanks,
Q
Mocord with Exclusive Zone setup
You need to use "Modetec" for only recording when detecting movement on your zone. "Mocord" is and hybrid of Record/Modetect.
From the wiki
From the wiki
None – The monitor is currently disabled and no streams can be viewed or events generated.
Monitor – The monitor will only stream feeds but no image analysis is done and so no alarms or events will be generated,
Modect – or MOtion DEteCTtion. All captured images will be analysed and events generated where motion is detected.
Record – In this case continuous events of a fixed length are generated regardless of motion which is analogous to a convention time-lapse video recorder. No motion detection takes place in this mode.
Mocord – This is a hybrid of Modect and Record and results in both fixed length events being recorded and also any motion being highlighted within those events.
Nodect – or No DEteCTtion. This is a special mode designed to be used with external triggers. In Nodect no motion detection takes place but events are recorded if external triggers require it.
i think this is a very valid question. the wiki is NOT clear.
i struggled with this for a while before searching and finding this.
i think most people want modect, but the wiki makes it sound like that only records stills of when the motion is captured. modect detects motion and records video of the event.
mocord sounds like it will analyze for motion and then record video.
i see when mocord would be useful if you want some time lapse video and also to generate motion events for other cameras/zones. but this was also not immediately obvious.
the wiki is not clear, but i'm not sure enough at the moment on how to reword it to go and do so.
i struggled with this for a while before searching and finding this.
i think most people want modect, but the wiki makes it sound like that only records stills of when the motion is captured. modect detects motion and records video of the event.
mocord sounds like it will analyze for motion and then record video.
i see when mocord would be useful if you want some time lapse video and also to generate motion events for other cameras/zones. but this was also not immediately obvious.
the wiki is not clear, but i'm not sure enough at the moment on how to reword it to go and do so.
zm 1.24.2 on gentoo amd64
I have the same problem even when set to Modect. Once in the alarm state it continues recording and showing that it is in the alarmed state until I disable the monitor. Is this how ZM is supposed to work or is something not working right?
Before the alarm trips I get lines like these in my zm_log file:
When the alarm trips the lines are like this:
Then once motion is no longer detected I get lines like these:
The "Writing capture frame ..." and "Adding frame ... to DB" lines seem to verify that ZM is continuing to record even though there are not enough alarmed pixels to stay in the alarmed state.
Before the alarm trips I get lines like these in my zm_log file:
Code: Select all
12/19/09 09:39:27.996594 zma_m1[3916].DB4-zm_zone.cpp/150 [Checking alarms for zone 6/All in lines 0 -> 239]
12/19/09 09:39:27.996651 zma_m1[3916].DB5-zm_zone.cpp/152 [Checking for alarmed pixels]
12/19/09 09:39:27.999056 zma_m1[3916].DB5-zm_zone.cpp/214 [Got 275 alarmed pixels, need 15360 -> 0, avg pixel diff 71]
12/19/09 09:39:28.011997 zma_m1[3916].DB4-zm_monitor.cpp/1055 [RI:29, WI: 30, PF = 1, RM = 39, Step = 1]
12/19/09 09:39:28.021278 zma_m1[3916].DB3-zm_monitor.cpp/2704 [Checking active zone All]
12/19/09 09:39:28.021467 zma_m1[3916].DB4-zm_zone.cpp/150 [Checking alarms for zone 6/All in lines 0 -> 239]
12/19/09 09:39:28.021536 zma_m1[3916].DB5-zm_zone.cpp/152 [Checking for alarmed pixels]
12/19/09 09:39:28.024069 zma_m1[3916].DB5-zm_zone.cpp/214 [Got 235 alarmed pixels, need 15360 -> 0, avg pixel diff 82]
12/19/09 09:39:28.068938 zma_m1[3916].DB4-zm_monitor.cpp/1055 [RI:30, WI: 31, PF = 1, RM = 39, Step = 1]
Code: Select all
12/19/09 09:39:31.056654 zma_m1[3916].DB3-zm_monitor.cpp/2704 [Checking active zone All]
12/19/09 09:39:31.056846 zma_m1[3916].DB4-zm_zone.cpp/150 [Checking alarms for zone 6/All in lines 0 -> 239]
12/19/09 09:39:31.056902 zma_m1[3916].DB5-zm_zone.cpp/152 [Checking for alarmed pixels]
12/19/09 09:39:31.059905 zma_m1[3916].DB5-zm_zone.cpp/214 [Got 20515 alarmed pixels, need 15360 -> 0, avg pixel diff 95]
12/19/09 09:39:31.059971 zma_m1[3916].DB5-zm_zone.cpp/239 [Current score is 26]
12/19/09 09:39:31.060021 zma_m1[3916].DB5-zm_zone.cpp/672 [Adjusted score is 26]
12/19/09 09:39:31.060077 zma_m1[3916].DB1-zm_zone.cpp/751 [All: Pixel Diff: 95, Alarm Pixels: 20515, Filter Pixels: 0, Blob Pixels: 0, Blobs: 0, Score: 26]
12/19/09 09:39:31.060134 zma_m1[3916].DB3-zm_monitor.cpp/2710 [Zone is alarmed, zone score = 26]
12/19/09 09:39:31.060341 zma_m1[3916].INF-zm_monitor.cpp/1295 [Monitor-1: 9836 - Gone into alarm state]
12/19/09 09:39:31.062094 zma_m1[3916].INF-zm_monitor.cpp/1308 [Monitor-1: 9836 - Opening new event 139, alarm start]
12/19/09 09:39:31.062313 zma_m1[3916].DB1-zm_event.cpp/487 [Writing pre-capture frame 1]
12/19/09 09:39:31.075203 zma_m1[3916].DB1-zm_event.cpp/487 [Writing pre-capture frame 2]
12/19/09 09:39:31.088375 zma_m1[3916].DB1-zm_event.cpp/487 [Writing pre-capture frame 3]
12/19/09 09:39:31.100847 zma_m1[3916].DB1-zm_event.cpp/487 [Writing pre-capture frame 4]
12/19/09 09:39:31.114225 zma_m1[3916].DB1-zm_event.cpp/487 [Writing pre-capture frame 5]
12/19/09 09:39:31.126762 zma_m1[3916].DB1-zm_event.cpp/487 [Writing pre-capture frame 6]
12/19/09 09:39:31.139209 zma_m1[3916].DB1-zm_event.cpp/487 [Writing pre-capture frame 7]
12/19/09 09:39:31.152585 zma_m1[3916].DB1-zm_event.cpp/487 [Writing pre-capture frame 8]
12/19/09 09:39:31.165103 zma_m1[3916].DB1-zm_event.cpp/487 [Writing pre-capture frame 9]
12/19/09 09:39:31.178299 zma_m1[3916].DB1-zm_event.cpp/487 [Writing pre-capture frame 10]
12/19/09 09:39:31.190199 zma_m1[3916].DB1-zm_event.cpp/497 [Adding 10 frames to DB]
12/19/09 09:39:31.191601 zma_m1[3916].DB1-zm_event.cpp/515 [Writing capture frame 11]
12/19/09 09:39:31.203310 zma_m1[3916].DB1-zm_event.cpp/527 [Adding frame 11 to DB]
12/19/09 09:39:31.210538 zma_m1[3916].DB4-zm_monitor.cpp/1055 [RI:1, WI: 5, PF = 4, RM = 36, Step = 2]
12/19/09 09:39:31.215384 zma_m1[3916].DB3-zm_monitor.cpp/2704 [Checking active zone All]
12/19/09 09:39:31.215543 zma_m1[3916].DB4-zm_zone.cpp/150 [Checking alarms for zone 6/All in lines 0 -> 239]
12/19/09 09:39:31.215575 zma_m1[3916].DB5-zm_zone.cpp/152 [Checking for alarmed pixels]
12/19/09 09:39:31.217076 zma_m1[3916].DB5-zm_zone.cpp/214 [Got 22073 alarmed pixels, need 15360 -> 0, avg pixel diff 99]
12/19/09 09:39:31.217104 zma_m1[3916].DB5-zm_zone.cpp/239 [Current score is 28]
12/19/09 09:39:31.217129 zma_m1[3916].DB5-zm_zone.cpp/672 [Adjusted score is 28]
12/19/09 09:39:31.217159 zma_m1[3916].DB1-zm_zone.cpp/751 [All: Pixel Diff: 99, Alarm Pixels: 22073, Filter Pixels: 0, Blob Pixels: 0, Blobs: 0, Score: 28]
12/19/09 09:39:31.217187 zma_m1[3916].DB3-zm_monitor.cpp/2710 [Zone is alarmed, zone score = 28]
12/19/09 09:39:31.217472 zma_m1[3916].DB1-zm_event.cpp/515 [Writing capture frame 12]
12/19/09 09:39:31.229689 zma_m1[3916].DB1-zm_event.cpp/527 [Adding frame 12 to DB]
12/19/09 09:39:31.230387 zma_m1[3916].DB2-zm_event.cpp/409 [Updating notes for event 139, 'Linked: Monitor-1Motion: All']
12/19/09 09:39:31.237186 zma_m1[3916].DB4-zm_monitor.cpp/1055 [RI:3, WI: 6, PF = 3, RM = 37, Step = 1]
12/19/09 09:39:31.242200 zma_m1[3916].DB3-zm_monitor.cpp/2704 [Checking active zone All]
12/19/09 09:39:31.242331 zma_m1[3916].DB4-zm_zone.cpp/150 [Checking alarms for zone 6/All in lines 0 -> 239]
12/19/09 09:39:31.242367 zma_m1[3916].DB5-zm_zone.cpp/152 [Checking for alarmed pixels]
12/19/09 09:39:31.244384 zma_m1[3916].DB5-zm_zone.cpp/214 [Got 19595 alarmed pixels, need 15360 -> 0, avg pixel diff 96]
12/19/09 09:39:31.244445 zma_m1[3916].DB5-zm_zone.cpp/239 [Current score is 25]
12/19/09 09:39:31.244484 zma_m1[3916].DB5-zm_zone.cpp/672 [Adjusted score is 25]
12/19/09 09:39:31.244518 zma_m1[3916].DB1-zm_zone.cpp/751 [All: Pixel Diff: 96, Alarm Pixels: 19595, Filter Pixels: 0, Blob Pixels: 0, Blobs: 0, Score: 25]
12/19/09 09:39:31.244547 zma_m1[3916].DB3-zm_monitor.cpp/2710 [Zone is alarmed, zone score = 25]
12/19/09 09:39:31.244876 zma_m1[3916].DB1-zm_event.cpp/515 [Writing capture frame 13]
12/19/09 09:39:31.256721 zma_m1[3916].DB1-zm_event.cpp/527 [Adding frame 13 to DB]
12/19/09 09:39:31.263318 zma_m1[3916].DB4-zm_monitor.cpp/1055 [RI:4, WI: 7, PF = 3, RM = 37, Step = 1]
Code: Select all
12/19/09 09:39:34.126542 zma_m1[3916].DB3-zm_monitor.cpp/2704 [Checking active zone All]
12/19/09 09:39:34.126659 zma_m1[3916].DB4-zm_zone.cpp/150 [Checking alarms for zone 6/All in lines 0 -> 239]
12/19/09 09:39:34.126689 zma_m1[3916].DB5-zm_zone.cpp/152 [Checking for alarmed pixels]
12/19/09 09:39:34.127873 zma_m1[3916].DB5-zm_zone.cpp/214 [Got 22 alarmed pixels, need 15360 -> 0, avg pixel diff 179]
12/19/09 09:39:34.128132 zma_m1[3916].DB1-zm_event.cpp/515 [Writing capture frame 102]
12/19/09 09:39:34.140794 zma_m1[3916].DB1-zm_event.cpp/527 [Adding frame 102 to DB]
12/19/09 09:39:34.147871 zma_m1[3916].DB4-zm_monitor.cpp/1055 [RI:13, WI: 14, PF = 1, RM = 39, Step = 1]
Are you sure this is not a result from having post buffer set longer than what you think or are expecting?
After ZM exits Alarm state, it continues to record till the post buffer value is satisfied from the last alarm state frame. This is true for modect mode.
Of coarse MoCord continuously records which would be the other condition that you would observe this.
After ZM exits Alarm state, it continues to record till the post buffer value is satisfied from the last alarm state frame. This is true for modect mode.
Of coarse MoCord continuously records which would be the other condition that you would observe this.
Under the monitor Buffers tab I have the following values:
Image Buffer Size (frames): 40
Warmup Frames: 25
Pre Event Image Count: 10
Post Event Image Count: 10
Stream Replay Image Buffer: 1000
Alarm Frame Count: 1
I just tried changing both the Post Event Image Count and Stream Replay Image Buffer to 1 but that did not seem to make any difference.
Image Buffer Size (frames): 40
Warmup Frames: 25
Pre Event Image Count: 10
Post Event Image Count: 10
Stream Replay Image Buffer: 1000
Alarm Frame Count: 1
I just tried changing both the Post Event Image Count and Stream Replay Image Buffer to 1 but that did not seem to make any difference.
OK, I am making some progress now.
I just deleted that monitor and created a new one with the same settings and things are working now.
In fact this seems to have fixed another problem I was having with Firefox hanging with a waiting for host message whenever I tried to view an event. I will have to play with it some more to see if this is really true.
I just deleted that monitor and created a new one with the same settings and things are working now.
In fact this seems to have fixed another problem I was having with Firefox hanging with a waiting for host message whenever I tried to view an event. I will have to play with it some more to see if this is really true.
hmm, sounds like something was off in the zones table.
In case anyone runs into this again, I would be grateful if you could using mysql dump send me your monitors table and zones table prior to deleting the zone so I can have a look at whats amiss.
Of coarse this has to be run before you fix the zone.
In case anyone runs into this again, I would be grateful if you could using mysql dump send me your monitors table and zones table prior to deleting the zone so I can have a look at whats amiss.
Of coarse this has to be run before you fix the zone.
Code: Select all
mysqldump --user=$ZM_DB_USER --password=$ZM_DB_PASS $ZM_DB_NAME Monitors Zones --add-drop-table > /tmp/ZM_zones_dump.sql