RTSP Live Monitoring Wall
Turn always-on RTSP cameras into a searchable monitoring wall where quiet footage is skipped before extraction, kept segments carry gate verdicts, and email alerts fire from retriever results.
One manifest creates a live RTSP wall with gated capture, searchable kept segments, retriever alerts and a scheduled health watch.
Security, operations, facilities, city-camera and media teams that need live camera footage searchable without paying to analyze every unchanged minute.
What deploys today: 5 ready.
What deploys today
Every part of this template and what one click on Deploy gives you for it right now. The states are read from the manifest, so a part it ships commented out never shows as ready.
| Part | Kind | Today | What it needs |
|---|---|---|---|
| segments-analysis | Collection | Deploys ready | Deploys and processes documents as they arrive. |
| segments-index | Collection | Deploys ready | Deploys and processes documents as they arrive. |
| similar-segments | Retriever | Deploys ready | Deploys and answers queries once its collections hold documents. |
| match-monitor | Retriever | Deploys ready | Deploys and answers queries once its collections hold documents. |
| match-control | Retriever | Deploys ready | Deploys and answers queries once its collections hold documents. |
What it looks like
Pick a frame or a search and see what fires.
cleared- camera-feed -> camera-sync -> camera-segments
- Camera A · searchable
- Camera B · processing
- route: cleared
- camera-feedYour RTSP camera URL and credentials. The template leaves placeholders for host, username and password.
- similar-segmentsA saved multimodal retriever used as the admission gate and as the analyst search over kept footage.
- thresholdsScene-change and verdict thresholds you tune per camera: tonight's run used 12, 6, 4 and 4 across four NYC DOT feeds.
Camera A · searchableCamera B · processingcleared
gate_top_score 0.58 · match_count 10unchanged frame droppedexcluded
matched-footage alert stripreview
interval watch · latency bound 15snotify_on failurecleared- camera-segmentsKept video segments with capture time, segment index and gate verdict fields.
- matched-footageEmail alert driven by match-monitor when kept footage clears the verdict bar.
- wall-health-watchScheduled trigger that reruns match-monitor and notifies only when the wall stops producing expected matches.
How the namespace is wired
1 buckets, 2 collections, 0 clean views, 3 retrievers. The diagram generates the manifest below; they cannot drift apart.
Reward signals
How reviewer decisions move the thresholds
Thresholds at ingest drift as the corpus changes. The reviewers working the queue are the ones who see where a threshold is wrong first, so this template routes their decisions back into the model that set it.
Operators tune scene_change_threshold, gate_top_score bars and control thresholds from reviewed camera runs. Those settings live on the connection and retriever resources, not in a dashboard-only note.
Every kept segment carries gate_applied, gate_top_score and gate_match_count. Alert executions and trigger failures become the operational signal that a camera, threshold or gate has drifted.
camera-segmentssegments-indexsegments-analysismatched-footage executionswall-health-watch executionsSystem collections in your namespace, on the same vector store as the rest of the template. They are yours to query.
Replay captured segments through candidate thresholds, compare retained minutes against alert precision, then update the connection or retriever settings when the measured tradeoff is better.
One file spins up the namespace. Generated from the diagram above. Also served at /templates/rtsp-live-monitoring.namespace.yaml.
# rtsp-live-monitoring: one manifest spins up the namespace.
# Platform manifest schema (GET /v1/discovery/schema). Validate with POST /v1/manifest/validate,
# apply with POST /v1/manifest/apply or the Deploy button. Wiring comes from the flow diagram:
# edges are bucket -> collection sources, collection -> retriever scope, retriever -> view.
version: '1.0'
metadata:
name: rtsp-live-monitoring
description: "Namespace template rtsp-live-monitoring. Generated from the flow diagram on mixpeek.com/templates/rtsp-live-monitoring."
namespaces:
- name: rtsp-live-monitoring
description: "Everything below lives in this namespace."
feature_extractors:
- name: multimodal_extractor
version: v2
- name: passthrough_extractor
version: v1
storage_connections:
- name: camera-feed
provider: rtsp
description: "Your RTSP camera. The gate retriever judges each segment before admission; gate_on_error publish means a broken gate costs extraction, never footage."
config:
url: "rtsp://YOUR-CAMERA-HOST:8554/stream"
credentials:
type: basic
username: "YOUR-USERNAME"
password: "YOUR-PASSWORD"
transport: tcp
segment_seconds: 10
segments_per_run: 3
scene_change_threshold: 6
gate_retriever_id: similar-segments
gate_on_error: publish
gate_timeout_seconds: 30
buckets:
- name: camera-segments
namespace: rtsp-live-monitoring
description: "Fed by your storage connection."
schema:
properties:
segment:
type: video
captured_at:
type: string
segment_index:
type: integer
gate_applied:
type: boolean
gate_top_score:
type: number
gate_match_count:
type: integer
bucket_syncs:
- name: camera-sync
bucket: camera-segments
connection: camera-feed
source_path: camera-feed
sync_mode: continuous
polling_interval_seconds: 300
# note: Captures a window every 5 minutes; each run's kept segments are batched into the collections below.
schema_mapping:
mappings:
segment:
target_type: blob
blob_type: video
blob_property: segment
source:
type: file
captured_at:
target_type: field
source:
type: rtsp_field
field: captured_at
segment_index:
target_type: field
source:
type: rtsp_field
field: segment_index
gate_applied:
target_type: field
source:
type: rtsp_field
field: applied
gate_top_score:
target_type: field
source:
type: rtsp_field
field: top_score
gate_match_count:
target_type: field
source:
type: rtsp_field
field: match_count
collections:
- name: segments-analysis
namespace: rtsp-live-monitoring
description: "Multimodal embeddings of kept segments: the corpus the admission gate searches, so the gate improves as footage accrues. Feeds similar-segments."
source:
type: bucket
bucket: camera-segments
feature_extractor:
name: multimodal_extractor
version: v2
input_mappings:
video: segment
field_passthrough: []
enabled: true
- name: segments-index
namespace: rtsp-live-monitoring
description: "Payload view of every kept segment: the verdict fields are readable and filterable here, and the alert retrievers search this. Feeds match-monitor, match-control, matched-footage."
source:
type: bucket
bucket: camera-segments
feature_extractor:
name: passthrough_extractor
version: v1
field_passthrough: []
alert_applications:
- alert: matched-footage
input_mappings:
- input_key: marker
source: {source_type: constant, value: ingest}
enabled: true
retrievers:
- name: similar-segments
namespace: rtsp-live-monitoring
description: "The admission gate and the analyst: embeds a segment and searches the footage corpus."
collections:
- segments-analysis
input_schema:
query:
type: text
required: true
description: "What to look for; searched across every index below"
stages:
- stage_name: search
stage_id: feature_search
parameters:
searches:
- feature_uri: "mixpeek://multimodal_extractor@v2/gemini-embedding-2"
query:
input_mode: text
value: "{{INPUT.query}}"
top_k: 25
fusion: rrf
final_top_k: 25
tags:
- template:rtsp-live-monitoring
- name: match-monitor
namespace: rtsp-live-monitoring
description: "Kept segments whose verdict cleared 0.5. Non-empty results mean matching live footage landed. Materialises into matched-footage, wall-health-watch."
collections:
- segments-index
input_schema:
limit:
type: text
required: false
description: "Optional cap on documents grouped per run"
stages:
- stage_name: verdict_filter
config:
stage_id: attribute_filter
parameters:
conditions:
AND:
- field: gate_applied
operator: eq
value: true
- field: gate_top_score
operator: gte
value: 0.5
tags:
- template:rtsp-live-monitoring
- name: match-control
namespace: rtsp-live-monitoring
description: "The same verdict filter at a bar nothing clears; an alert on this must stay silent, proving the wall alert discriminates."
collections:
- segments-index
input_schema:
limit:
type: text
required: false
description: "Optional cap on documents grouped per run"
stages:
- stage_name: verdict_filter
config:
stage_id: attribute_filter
parameters:
conditions:
AND:
- field: gate_applied
operator: eq
value: true
- field: gate_top_score
operator: gte
value: 0.99
tags:
- template:rtsp-live-monitoring
alerts:
- name: matched-footage
namespace: rtsp-live-monitoring
description: "Fires when kept segments clear the verdict bar. Email goes to the org notifications address in Settings -> Notifications; unset means opted out."
source: retriever
retriever: match-monitor
trigger_on: results
notification_config:
channels:
- channel_type: email
include_matches: true
include_scores: true
enabled: true
triggers:
- name: wall-health-watch
namespace: rtsp-live-monitoring
description: "Scheduled watch: runs match-monitor every 5 minutes and emails when the run errors or breaches the latency bound. An empty window is healthy for a match-filtered retriever and never pages."
action_type: retriever_execution
trigger_type: interval
schedule_config:
interval_seconds: 300
action_config:
retriever: match-monitor
inputs: {}
skip_cache: true
acceptance:
max_total_time_ms: 15000
max_stage_latency_breaches: 0
notification_config:
channels:
- channel_type: email
notify_on: failure