Functionality of old Minimum_Gap in 3.2.11?
Question
So, here's the situation. I'm running a webcam in our construction shop, putting together a timelapse video of the whole project (~1 year duration). Previously, I was using cron and ffmpeg to snap images at regular intervals. Of course, this meant that roughly ~50% of the images were of the shop slumbering through the night. Motion looked like a pretty sweet program to allow me to snap photos at pre-determined intervals ("snapshot_interval" variable) as well as take photos at a higher rate when motion is being detected ("minimm_gap" pre-3.2.7, "minimum_frame_time" afterward).
Unfortunately, "minimum_frame_time" is utterly useless. Say I want to take photos every 5 minutes while action is happening, so I set minimum_frame_time to 300: Expected behavior: Motion should scan for motion at the rate defined in "framerate". If it detects motion, it snaps an image, waits five minutes, and then begin scanning for motion again.
Actual result: Motion snaps a
single frame every five minutes. If this frame does not contain motion, it is not saved. Despite the fact that it has not saved an image, it does not continue scanning for motion; it simply shuts down for another five minutes. Basically, if any motion occurs outside of those hard, 5-minute intervals, nothing is saved. In addition, as it is capturing a single frame after a long period of inactivity, the camera has powered down, so the single frame is with the aperture half open as the camera is powering back up, and looks like crap.
Finally, as the camera is taking a frame every five minutes, as opposed to taking frames continuously and only
saving up to every five minutes, the web page, of course, does not update continuously.
As I understand it, the old "minimum_gap" option in <3.2.7 provided exactly the functionality that I am looking for. I realize that I could write a bash script using some ridiculous nested for/while/if loops and awk/sed to delete motion images that are saved at a rate higher than desired, but it seems like a pretty ridiculous solution to implement something that used to be a built-in feature. Am I missing something? Is there a way to configure Motion to behave as desired?
Environment
Motion version: |
3.2.11.1 |
ffmpeg version: |
|
Libraries: |
ffmpeg, mysql, postgresql |
Server OS: |
Ubuntu 9.04 |
--
AdemRudin - 17 Oct 2009
Answer