- Type: Integer
- Range / Valid values: 0 - 2147483647
- Default: 60
- Group: Obsolete
Gap is the seconds of no motion detection that triggers the end of an event. An event is defined as a series of motion images taken within a short timeframe.
This option has been replaced by event_gap
Recommended value is 60 seconds (Default). The value 0 is allowed (but not recommended) and disables events causing all Motion to be written to one single mpeg file and no pre_capture. You can force an event to end and a new to begin using the http control 'http://host:port/thread_number/action/makemovie'. Disabling events has bad side effects on noise_tune and smartmask. Both features can only work properly outside an event. When gap is set to 0, both features don't work properly anymore.
An event is defined as a series of motion images taken within a short timeframe. E.g. a person walking through the room is an event that may have caused 10 single jpg images to be stored. This option defines how long a pause between detected motions that is needed to be defined as a new event.
The gap timer starts after the last motion is detected and post_capture images have been saved and appended to open movie mpeg files.
Any motion detected before the gap timer times out resets the gap timer so it starts counting over again.
The option 'gap' is important. It defines how long a period of no motion detected it takes before we say an event is over. An event is defined as a series of motion images taken within a short timeframe. E.g. a person walking through the room is an event that may have caused 10 single jpg images to be stored. Motion detected includes post_captured frames set by the 'post_capture' option. The 'gap' option defines how long a pause between detected motions that is needed to be defined as a new event. A good starting value is 60 seconds.
The way 'gap' works in more technical terms is:
- Gap is a timer that timeout 'gap' seconds after the last video frame with motion is detected.
- If 'post_capture' is activated then the gap timer starts counting after the last image of the post_capture buffer has been saved.
- The gap timer is reset and starts all over each time new motion is detected, so you will not miss any action by having a short 'gap' value. It will just create more events (e.g. more mpegs files)
The gap value impacts many functions in Motion.
- When the gap timer runs out the event number is increased by one next time motion is detected. When you use the %v conversion specifier in filenames or text features this means that the number in filename or text increased by one.
- The pre_capture feature only works at the beginning of an event. So if you have a very large 'gap' value pre_capture is not working very often.
- When you make mpegs using the ffmpeg features a new mpeg file is started at the beginning of an event when the first motion is detected. When 'gap' seconds has passed without motion (and post_captured frames saved) the mpeg files is completed and closed.
- Do not use large gap values to generate one large mpeg4 file. If Motion stops working this mpeg4 file never gets properly completed and closed and you will not be able to view it.
- Some of the tracking features sets the camera back to the center position when an event is over.
Note that 'gap' and 'minimum_gap' have nothing to do with each other.