Motion - Config Option Event Gap

event_gap

  • Type: Integer
  • Range / Valid values: 0 - 2147483647
  • Default: 60
  • Group: Motion Detection

event_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 time-frame., event_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 time-frame.

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 movie 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 event_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 event_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 event_gap timer times out resets the event_gap timer so it starts counting over again.

Detailed Description

The option 'event_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 'event_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 'event_gap' works in more technical terms is:
  • event_gap is a timer that timeout 'event_gap' seconds after the last video frame with motion is detected.
  • If 'post_capture' is activated then the event_gap timer starts counting after the last image of the post_capture buffer has been saved.
  • The event_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 'event_gap' value. It will just create more events (e.g. more mpegs files)

The event_gap value impacts many functions in Motion.
  • When the event_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 'event_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 'event_gap' seconds has passed without motion (and post_captured frames saved) the movie file is completed and closed.
  • Do not use large event_gap values to generate one large movie file. If Motion stops working this movie 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.
Topic revision: r3 - 07 Aug 2016, KennethLavrsen
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.