Motion Detection

Detects motion in the video stream.

Overview

The Motion detection node detects motion in the video, adds motion detection metadata to the frame metadata, and can drop frames when there is no motion to reduce downstream processing. This node makes it easy to build use cases such as motion triggered recordings, or to reduce downstream processing when there is no motion.

Inputs & Outputs

  • Inputs : 1, Media Format : Raw Video
  • Outputs : 1, Media Format: Raw Video
  • Output Metadata : MOtion Information

Properties

PropertyValue
sensitivityMotion detection sensitivity. Higher sensitivity will detect smaller motions.
Range: 0 - 100
Default : 50
displayBoolean. Display motion detection state on video

Ex. true / false
drop_frames_without_motionBoolean. If enabled, will drop frames that have no motion

Ex. true / false

Metadata

Metadata PropertyDescription
nodes.<node_id>Describes the Motion detection state.
Format: as defined in the table below.

<node_id> for Motion Detection Nodes is of the form annotate_motionX (ex. annotate_motion1)

Example

"nodes": {
    "annotate_motion1": {
        "type": "annotate_motion",
        "rois": {
            "fullframe": {
                "motion": True,
                "motion_score": 0.8,
                "motion_duration": 30,
                "time_since_motion_stopped": -1
            }
        }
    }
}

Format

KeyTypeDescription
motionBooleanTrue if motion is currently detected, else False
motion_scoreFloatA number between 0 and 1 that indicates the extent of detected motion. Larger number means higher amount of motion.
motion_durationIntegerNumber of seconds since motion started, when motion is True. -1 if motion is False.
time_since_motion_stoppedIntegerNumber of seconds since motion last stopped. -1 if motion is currently True.