TASK ONVIF task

Motion Detection on
ONVIF Cameras

Software-based motion detection that works with any ONVIF camera, including cameras that have no built-in motion detection of their own. Configure sensitivity, noise filtering, and event frequency from a single interface, regardless of camera brand.

Software-based detection and why it matters

Some cameras have built-in motion detection, but coverage and consistency vary by brand and model. Banalytics provides software-based motion detection that runs on your server, so it works regardless of whether your camera supports it natively and gives you a single unified interface across all your cameras.

CAM

Cameras without motion detection

Apply motion detection to any ONVIF camera that lacks the feature entirely.

MIX

Mixed camera brands

Manage cameras from different manufacturers under one consistent detection system.

EVT

Event-triggered capture

Record only what matters, such as a delivery arriving at your front door.

TUNE

Fine-grained control

Tune sensitivity, noise filtering, and event frequency independently for each camera.

Prerequisites

01

ONVIF camera added to Banalytics

The camera must be connected as an ONVIF Camera component. See Add & Configure an ONVIF Camera if you have not done this yet.

02

Capture video task already running

Motion detection works on top of an existing Capture Video task. Make sure the capture video task for your camera is configured and running before adding motion detection. See Capture & Record Video with an ONVIF Camera.

Adding the motion detection task

01

Open the camera task section

In the Banalytics interface, navigate to your ONVIF camera and open its task section.

02

Find and add Motion Detection

The Motion Detection option is located in the bottom-right corner of the task panel. Click it to add the task to your camera.

03

Configure the settings

The task opens with configurable parameters. Work through the sections below to tune detection for your environment.

General settings

ParameterDescriptionDefault
Restart on failure
Controls how the task behaves when it encounters an error. Options include Stop on failure, Immediately, 10 sec, 30 sec, and 1 min.10 sec
Debug mode
Displays raw footage with visual overlays to help you understand exactly what the algorithm is seeing. Enable it while tuning sensitivity settings and turn it off once configuration is complete.Off
Tip: Enable debug mode while tuning your settings so you can see which areas are triggering detection in real time. Turn it off once you are satisfied with the configuration.

Sensitivity and noise reduction

These settings control how the system distinguishes genuine motion events from irrelevant changes in the image, such as camera noise, lighting flicker, distant traffic, or leaves blowing.

ParameterDescriptionEffect of increasing
Background sensitivity
Controls how sensitive the camera is to movement in the scene. Set too high, it may detect passing cars or swaying branches. Set too low, it may miss real events.Detects smaller changes
Blur size
Applies a blur before analysis. A larger blur smooths out minor pixel-level differences and helps ignore sensor noise or compression artifacts.Ignores more fine-grained noise
Dilate size
Expands detected motion regions to merge nearby small movements into a larger detection event.Merges small movements and reduces fragmented detections
Recommended approach: Start with defaults. Enable debug mode, observe yellow noise and red detection areas, then adjust blur size, dilate size, and background sensitivity in that order.

Advanced motion detection parameters

ParameterDescriptionDefault
Motion area threshold
Minimum size of a detected movement area required to trigger an event. Raise it to ignore small objects such as insects, small animals, or lens noise.varies
Detection timeout
Interval between consecutive analysis frames. A shorter timeout improves responsiveness but increases CPU usage.varies
Stun events
Minimum interval between successive motion event notifications. Use it to prevent continuous motion from flooding Telegram or event logs.varies
Font scale
Adjusts the size of text annotations displayed in debug mode.varies
Enable flags
Toggles visual overlay indicators in debug mode. When enabled, motion regions and noise areas are drawn on the video feed.Off

Understanding the debug overlay

When debug mode is active and Enable Flags is on, the live feed shows colored overlays. Understanding each color makes it easier to tune settings correctly.

Red squares show areas where motion has been detected. These regions can trigger events and recording.
Yellow areas represent noise: pixel-level changes classified as too small or scattered to count as real motion.
Goal when tuning: Red squares should appear only when genuine motion occurs, with minimal yellow noise during idle periods. If you see constant yellow noise, increase blur size. If tiny objects create red squares, raise the motion area threshold.

After enabling motion detection

Motion detection flags movement. To record video clips when motion is detected, or to send a Telegram notification, add the corresponding tasks and actions to your camera setup.