Motion Detection Node

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

Property

Value

sensitivity

Motion detection sensitivity. Higher sensitivity will detect smaller motions.
Range: 0 - 100
Default : 50

display

Boolean. Display motion detection state on video

Ex. true / false

drop_frames_without_motion

Boolean. If enabled, will drop frames that have no motion

Ex. true / false

Metadata

Metadata Property

Description

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

Key

Type

Description

motion

Boolean

True if motion is currently detected, else False

motion_score

Float

A number between 0 and 1 that indicates the extent of detected motion.

Larger number means higher amount of motion.

motion_duration

Integer

Number of seconds since motion started, when motion is True.

-1 if motion is False.

time_since_motion_stopped

Integer

Number of seconds since motion last stopped.

-1 if motion is currently True.


Did this page help you?