Skip to main content

Realtime alert

live feed understanding alert

A reference technical solution for sub-second event detection on live feeds. Attach an RTSP source, declare an event in natural language or as a composed index, subscribe to alerts. Every payload carries the matching clip, frame, and confidence score.

Architecture

The detection pipeline.

RTSP frames are normalized on ingest, sampled at a configurable rate, and run through the index stack (including BYO classifiers). A match builds an alert envelope (event, confidence, clip URL, frame, source tags) and dispatches it via your subscriber.

Realtime Alert  ·  Architecture

Capture LIVE
cam-04 · aisle RTSP · 30 fps · h.264
Live feed · RTSP
Perception
indexes · custom event · BYO classifiers Normalized frames (sampled on ingest)
now
t-1s
t-2s
Event Log
[event description] fall_in_aisleconf 0.94 · ~110 ms
Clip URL Frame Source tags
Post
/ops/page
subscriber webhook
+ clip.m3u8
The three stages

Attach. Define. Subscribe.

Three SDK calls. No frame pipelines to operate. No model serving to manage.

01

Attach a live source

RTSP, ONVIF, RTMP, screen + audio capture, WebRTC. One ingestion path; VideoDB handles the codec normalization and clock alignment.

# attach
rtstream = coll.connect_rtstream(
  url="rtsp://cam-04",
  name="cam-04",
)
rtstream.start()
02

Define the event

In natural language or as a composition of indexes. Confidence threshold, cooldown, scope. The platform compiles it into a continuous index pass.

# define
event_id = conn.create_event(
  event_prompt="a person falls",
  label="fall",
)
scene_index = rtstream.index_visuals(...)
03

Subscribe to alerts

Webhook, WebSocket, or pager. Every alert carries the matching clip URL, the frame timestamp, and the source context. Auditable by default.

# subscribe
alert_id = scene_index.create_alert(
  event_id=event_id,
  callback_url="https://ops/page",
)
Full implementation

A complete fall-detection pipeline across a 1,000-camera fleet.

from videodb import connect

conn = connect()
coll = conn.get_collection()

# 1. Define the event once. Attach it to every camera index.
event_id = conn.create_event(
  event_prompt="a person falls or slips on the floor",
  label="fall_in_aisle",
)

for cam in fleet:
  # 2. Attach and start the live source.
  rtstream = coll.connect_rtstream(url=cam.url, name=cam.id, store=True)
  rtstream.start()

  # 3. Run a continuous visual index on sampled frames.
  scene_index = rtstream.index_visuals(
    prompt="Detect safety events and return evidence.",
    batch_config={"type": "time", "value": 2, "frame_count": 5},
    name="safety_monitor",
  )

  # 4. Subscribe. Alerts include stream/player evidence.
  scene_index.create_alert(
    event_id=event_id,
    callback_url="https://ops.example.com/page",
  )

# Webhook payload: {label, confidence, timestamp, stream_url, player_url}
realtime_alert.py
Data flow

What runs continuously, per camera, per frame.

The entire pipeline runs inside VideoDB. Your application only sees the alerts.
~280 ms typical. End-to-end alert latency.

RTSP IN cam-04 · 30 fps h.264 · aac LIVE FEED EXTRACT keyframes + audio chunks @ 5 Hz default FRAMES INDEX RUN scene · object custom (BYO) ~180 ms p95 INDEX PASS MATCH conf threshold cooldown debounced EVENT MATCH ALERT BUILD + clip.m3u8 + frame.jpg + tags ALERT DELIVER webhook WS · pager OPS RTSP IN cam-04 · 30 fps h.264 · aac EXTRACT keyframes + audio chunks @ 5 Hz default INDEX RUN scene · object custom (BYO) ~180 ms p95 MATCH conf threshold cooldown debounced ALERT BUILD + clip.m3u8 + frame.jpg + tags DELIVER webhook WS · pager

What to know before you ship

01 Latency

Sub-second, end to end

Extract + index + match + deliver typically lands under 300 ms. Configurable sample rate (default 5 Hz) trades latency vs. cost.

02 Cooldown

Built-in debounce

A defined event won't refire for its cooldown window. Prevents alert storms when the underlying condition persists across many frames.

03 Evidence

Every alert is auditable

Each alert ships with the matching clip URL, a still frame, the confidence score, and your source tags. Forwardable to a SIEM or case-management system.

04 Fleet

Scales to 1,000+ feeds

Same SDK shape per camera; the platform handles fan-out, GPU scheduling, and back-pressure. Per-camera or fleet-wide event policies.

Use cases

What teams ship with
this solution.

Industrial safety

Industrial safety

Fall detection in warehouses, PPE compliance on factory floors, hazard alerts on construction sites. Custom-trained classifiers plug in as indexes; the platform runs them on every frame.

Surveillance and security

Surveillance and security

Loitering, intrusion, perimeter breaches across fleets of cameras. Each alert lands as a webhook with the matching clip URL and the source frame, ready for triage in a SOC.

Healthcare operations

Healthcare operations

Patient-fall detection in hospital rooms with per-room confidence thresholds and cooldown windows. Alert payloads carry the clip, frame, and ward context for the on-call nurse.

Broadcast moderation

Broadcast moderation

Detect unsafe content, sponsor-logo violations, and brand-safety flags across live broadcast feeds. The standards desk gets a clip plus the frame; the platform handles cooldowns per policy.

Industrial safety
Surveillance and security
Healthcare operations
Broadcast moderation
Machine