Skip to content

ONVIF cameras

Sapsan can discover ONVIF cameras on the network, receive their events (motion, human and vehicle detection), and check a camera for compliance.

Warning

The ONVIF subsystem is under active development — the feature set and configuration may change.

Camera discovery

Sapsan discovers cameras via WS-Discovery (multicast ProbeMatch) and additionally understands Hikvision's proprietary discovery protocol. For each camera it collects addresses (XAddrs), name, and model; repeated observations of the same camera are merged.

When working through NAT, the addresses a camera reports about itself (snapshot URL, RTSP URL) are automatically rewritten to the actually reachable device address.

Camera events

Events from ONVIF metadata become episodes with open and close:

  • motion (CellMotion IsMotion, MotionAlarm) — true opens an episode, false closes it;
  • human and vehicle detection;
  • digital input triggers;
  • stuck episodes are closed by an inactivity timeout.

Multiple motion sources on one camera are tracked independently.

Compliance check

The built-in camera check produces a structured report: device information, authentication (HTTP Digest), camera clock (time skew is handled automatically), event classification, plus an RTSP stream probe with an error summary (packet loss, broken payload, desync) and keyframe statistics.

Note

TODO: how discovery and the compliance check are launched (config/API/CLI), camera configuration via ONVIF, snapshot retrieval.

Next steps