I have ZM 1.30 doing motion detection at a remote location. Works great, except I get a few more false positives than I'd like. No surprise there---I'm using very simplistic, overly sensitive zone rules with AlarmedPixels only. My initial intent was to favor false positives over potentially missing a legitimate event because my filters are too strict.
Now I feel like I have a "representative sample" of the kind of motion I'd like to use as an event trigger. So I'd like to tighten up my event criteria. However, to make sure my rules aren't too strict, I'd like to test them on existing events.
Stated another way: let's say over the course of a day, I have 11 events: 10 are bogus/false positives, but one is interesting. Over the last several weeks, I've deliberately kept (and archived) those interesting events. Now if I change my rules to be stricter, I want to "re-play" those events through the new zone definitions, to make sure they'd still trigger an event.
Hopefully that makes sense.
Is this possible? And if so, how would I go about it?
Thanks!
Modect - use existing events to test new zone rules?
-
- Posts: 24
- Joined: Fri Jan 24, 2014 6:22 pm
-
- Posts: 678
- Joined: Wed Dec 16, 2009 4:32 pm
- Location: Israel
Re: Modect - use existing events to test new zone rules?
I did this once, but for development purposes.
If you have the events as videos, create a new monitor with ffmpeg source type, and feed it with the video file. It'll work.
If you have the events as videos, create a new monitor with ffmpeg source type, and feed it with the video file. It'll work.
Kfir Itzhak.
- knight-of-ni
- Posts: 2404
- Joined: Thu Oct 18, 2007 1:55 pm
- Location: Shiloh, IL
Re: Modect - use existing events to test new zone rules?
I was not able to get the ffmpeg source type to play an exported video directly. Instead I used ffserver to create a local rtsp server which essentially created a virtual camera that looped through the video clip continuously. If you search the forum for ffserver, I'm sure you will come across past discussions that reveal details on how to do this.
This is also how we have our demo server setup:
https://demo.zoneminder.com/zm/index.php
user: zmuser
pwd: zmpass
Playing the file direct from the ffmpeg source type would be far more efficient, however. Perhaps mastertheknife could tell us what parameters to use in our monitor config.
This is also how we have our demo server setup:
https://demo.zoneminder.com/zm/index.php
user: zmuser
pwd: zmpass
Playing the file direct from the ffmpeg source type would be far more efficient, however. Perhaps mastertheknife could tell us what parameters to use in our monitor config.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
All of these can be found at https://zoneminder.blogspot.com/
-
- Posts: 24
- Joined: Fri Jan 24, 2014 6:22 pm
Re: Modect - use existing events to test new zone rules?
Regarding direct play of the video file (new ZM monitor using ffmpeg source): it half-worked for me. I created the video using my script, although it's really just a wrapper for ffmpeg, using this command:
filelist.txt looks like this:
When I created a new ffmpeg source type monitor in ZM, and set the path to my video, it kept generating "signal" events. Watching this monitor in live view had it showing a blue screen about half the time. My video is very short, around 7 seconds. When the blue screen shows up, and for how long looked non-deterministic to me. Sometimes I'd see only a second or so of the real video, sometimes I'd get lucky and see the whole video.
I'll give ffserver a try.
Thanks!
Edit: knnniggett, your post in this thread, Camera Simulation for Demostration Purposes?, shows how to set up ffserver. This is working for me. Thanks again!
Code: Select all
ffmpeg -safe 0 -f concat -i filelist.txt -vf scale=iw:ih -framerate 15 -pix_fmt yuv420p outfile.mkv
Code: Select all
file '/var/lib/zoneminder/events/Front_Porch_Camera/17/03/08/09/46/38/00001-capture.jpg'
file '/var/lib/zoneminder/events/Front_Porch_Camera/17/03/08/09/46/38/00002-capture.jpg'
file '/var/lib/zoneminder/events/Front_Porch_Camera/17/03/08/09/46/38/00003-capture.jpg'
file '/var/lib/zoneminder/events/Front_Porch_Camera/17/03/08/09/46/38/00004-capture.jpg'
file '/var/lib/zoneminder/events/Front_Porch_Camera/17/03/08/09/46/38/00005-capture.jpg'
...
When I created a new ffmpeg source type monitor in ZM, and set the path to my video, it kept generating "signal" events. Watching this monitor in live view had it showing a blue screen about half the time. My video is very short, around 7 seconds. When the blue screen shows up, and for how long looked non-deterministic to me. Sometimes I'd see only a second or so of the real video, sometimes I'd get lucky and see the whole video.
I'll give ffserver a try.
Thanks!
Edit: knnniggett, your post in this thread, Camera Simulation for Demostration Purposes?, shows how to set up ffserver. This is working for me. Thanks again!
- knight-of-ni
- Posts: 2404
- Joined: Thu Oct 18, 2007 1:55 pm
- Location: Shiloh, IL
Re: Modect - use existing events to test new zone rules?
Oh yeah, look at that. I did a complete write up on how to do it ....and then completely forgot about it.
Glad it helped someone. Maybe I should put it up in my blog so I don't lose it again.
Update: Done.
http://zoneminder.blogspot.com/p/zonemi ... amera.html
Glad it helped someone. Maybe I should put it up in my blog so I don't lose it again.
Update: Done.
http://zoneminder.blogspot.com/p/zonemi ... amera.html
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
All of these can be found at https://zoneminder.blogspot.com/