On-Camera / Edge Analytics for Security Cameras
← Back to: Security & Surveillance
On-Camera / Edge Analytics means the camera itself runs the full inference pipeline and outputs trustworthy results—stable events/metadata and ROI or masked video—under real limits like thermal, bandwidth, and worst-case scenes. The core is an evidence-backed output contract (timestamps, model/version IDs, integrity checks) so every alarm can be reproduced, verified, and tied to the exact video segment.
H2-1. What “On-Camera / Edge Analytics” Really Means
Purpose: lock the scope and define a verifiable output contract (events, metadata, ROI streams) that proves analytics truly runs on the camera—not in VMS/NVR.
Card A — What it is / isn’t (acceptance rules)
- It is inference + decision + packaging performed on the camera, producing outputs that can be tied back to specific frames/PTS (not just “alarm happened”).
- It is bounded-latency behavior under load (motion spikes, bitrate spikes, thermal throttling), proven by p95 timing from pipeline nodes.
- It is reproducible behavior: outputs carry model/pipeline identity so field changes are explainable and traceable.
- It isn’t “forward the stream to NVR/VMS to infer later” (that is platform analytics, not on-camera analytics).
- It isn’t an opaque alarm with no evidence fields (no track, no rule, no timestamps → not debuggable, not auditable).
Card B — Output contract (minimum fields)
- Identity:
device_id,fw_ver,pipeline_profile,model_id,model_hash - Time binding:
frame_id/ptsreference, and event windowstart_pts–end_pts(or equivalent) - Explainability:
rule_id,zone_id,track_id,confidence, key attributes (as needed) - Debug hooks:
queue_depth,drop_reason,throttle_state(prove why outputs degrade)
ICNavigator | On-Camera / Edge Analytics | Fig F1 (Pipeline + Output Contract)
H2-2. Reference Architecture: Multi-Stream Ingest, Split-Pipelines, and Where Work Runs
Purpose: provide a canonical block-level architecture that maps tasks to engines (ISP/Codec/NPU/DSP/CPU) and defines the minimum observability (timestamps + counters) needed to debug field behavior.
Card A — Canonical architecture rules (task → engine)
- Multi-stream ingest: produce at least a main stream (quality) and an analytics stream (stable), plus snapshot/clip outputs as needed.
- Split-pipeline principle: video quality optimization and analytics stability are different objectives; separate branches avoid “good video but unstable analytics”.
- Engine mapping: ISP prepares images; Codec encodes streams; NPU runs CNN inference; DSP handles lightweight transforms/filters/post ops; CPU orchestrates scheduling, rules, and event packaging.
- Shared resource reality: DDR/DMA is the bottleneck hub—bitrate/motion spikes can starve preproc/inference even when NPU is “fine”.
- Deterministic behavior: define queue limits and drop policies (with reasons) so the camera degrades safely instead of failing silently.
Card B — Minimum observability (timestamps + counters)
- Pipeline timestamps (locate where time is spent):
ts_isp_out,ts_preproc,ts_infer_done,ts_event_emit - Engine utilization (see which unit is saturated):
npu_util%,dsp_util%,codec_util% - Memory / bandwidth (prove contention):
ddr_bw(or read/write split),dma_queue_depth - Health / backpressure (prove safe degrade):
queue_depth,frame_drop_count,drop_reason,throttle_state
ICNavigator | On-Camera / Edge Analytics | Fig F2 (Video/Analytics/Control + DDR/DMA)
H2-3. NPU/DSP Pipeline Scheduling: Deterministic Latency Under Thermal & Load
Goal: keep inference stable when bitrate spikes, motion increases, or thermal throttling occurs—by using explicit scheduling modes, queue backpressure, and graceful degradation with measurable evidence.
Card A — 3 scheduling patterns (when to use + how they fail)
- Fixed-FPS inference: targets a constant analytics rate for predictable alarms. Requires hard queue limits; otherwise latency grows without bound under bursts.
- Adaptive inference: adjusts
infer_fpsand/or input size based onqueue_depthorp95_latency_ms. Must enforce a minimum service level (avoid long blind gaps). - Event-driven inference: runs on triggers (scene change, zone hit, external input). Needs debounce/cooldown and a periodic “heartbeat” run to avoid trigger loss.
Card B — Debug checklist (first 2 measurements)
- First measure: per-stage
queue_depth(preproc / infer / postproc). Identify where backlog accumulates. - Second measure:
infer_fpswiththrottle_state. Determine whether collapse is thermal/clock-driven or contention-driven. - Latency evidence (minimum table fields):
queue_depth,infer_fps,p95_latency_ms,throttle_state - Drop reason codes (must be explicit):
DROP_QUEUE_FULL,DROP_THERMAL,DROP_BW_LIMIT
DROP_QUEUE_FULL proves queue caps work; DROP_THERMAL indicates clock/thermal limits; DROP_BW_LIMIT suggests DDR/bus contention (often burst encode complexity).
ICNavigator | On-Camera / Edge Analytics | Fig F3 (Scheduling State Machine + Queues + Drop Gates)
H2-4. Pre-Processing for Inference: Resize, Normalize, ROI Crop, and Sensor Variance Handling
Goal: prevent “works in the lab, fails in the field” by treating pre-processing as a measurable input contract: stable tensors despite exposure/WDR/IR variance and quantization constraints.
Card A — Common preproc mistakes (field-failure patterns)
- Color space mismatch: YUV/RGB conversion or matrix mismatch changes the model’s world (accuracy collapses with “no obvious bug”).
- Aspect ratio errors: stretching instead of letterboxing introduces geometry distortion; boxes drift and scale incorrectly.
- Normalization mismatch: wrong mean/std or scaling range (0–1 vs 0–255) shifts distributions and breaks thresholds.
- ROI crop coordinate mismatch: ROI defined in one coordinate space but applied in another; results look “randomly wrong”.
- Over-correction: aggressive lens correction can warp edges; keep corrections light and consistent.
- IR/WDR discontinuities: day/night or WDR mode switches cause abrupt distribution shifts; stabilize via profiles, not ad-hoc tuning.
- INT8 quant pitfalls: incorrect scale/zero-point or per-channel drift produces silent accuracy loss.
Card B — Minimal telemetry to prove preproc mismatch
- Per-frame tensor stats:
input_mean,input_std(overall or per-channel) to detect distribution drift. - Sensor variance bins:
exposure_bin,gain_bin,wdr_modeto correlate accuracy drops with capture regimes. - ROI accounting:
roi_crop_countand a coordinate tag (e.g.,roi_coord_space) to confirm where ROI is applied. - Quant identity:
quant_scale_id(or equivalent profile ID) to prove INT8 configuration consistency. - Optional canary proof: store a tiny downscaled debug thumbnail or a
canary_hash(privacy-safe) to detect input pipeline changes.
ICNavigator | On-Camera / Edge Analytics | Fig F4 (Preproc Chain + Variance + Telemetry Tags)
H2-5. Post-Processing: Tracking, Attributes, and Event Logic Without False Alarms
Goal: turn raw detections into stable, explainable events—the part operators and customers actually feel—by tuning track lifecycle, rule hysteresis, and scene-aware thresholds.
Card A — Event stability knobs (what keeps alarms from “chattering”)
- Track lifecycle: require confirmation before emitting events (
min_hits), tolerate brief occlusion (max_lost), and bound association jumps (max_jump_px). - Association gates: tune matching strictness (
assoc_iou_gate/ distance gate) to reduce ID churn without merging distinct targets. - Rule hysteresis: separate trigger vs release conditions so boundary jitter does not spam alarms (e.g., enter threshold > exit threshold).
- Debounce & hold: use time-based stability windows (
debounce_ms,hold_ms) to prevent one-frame spikes from triggering. - Scene profiles: keep thresholds per class and per capture regime (
scene_profile_idfor day/night/WDR/IR) rather than a single global number.
Card B — False alarm triage fields (minimum evidence to debug fast)
- Track metrics:
track_id,age,lost_count,reid_count,zone_hits(prove continuity vs churn). - Alarm reasons: log rule state transitions:
RULE_X_TRIGGER,RULE_X_HOLD,RULE_X_RELEASE. - Profile identity: include
scene_profile_idand per-class thresholds in the event context so “night-only false alarms” are attributable. - Fast discriminators:
frequent
RULE_X_RELEASEwith highlost_countsuggests occlusion/visibility; highreid_countsuggests association gates too strict.
ICNavigator | On-Camera / Edge Analytics | Fig F5 (Detections→Tracker→Rule Engine→Events + Hysteresis)
H2-6. ROI Coding and Sub-Streams: Bandwidth Savings Without Losing Evidence
Goal: generate ROI maps and sub-streams on-camera so bandwidth drops while evidence remains consistent—by aligning ROI to encoder grids and time-bases, and by logging measurable alignment checks.
Card A — ROI/sub-stream design patterns (what to build)
- ROI coding from analytics: detections/tracks produce an ROI map (tile grid), which drives a foreground/background QP-map concept for the encoder.
- Analytics sub-stream: a low-resolution, stable stream optimized for inference consistency (fixed cadence, low jitter, predictable bitrate).
- Evidence burst: a short high-bitrate clip around an event (pre/post window) to preserve forensic detail without keeping the whole stream expensive.
- Consistency contract: ROI map must align to the encode frame grid; sub-stream and main stream must remain timestamp-aligned.
Card B — Measurable knobs & failure signatures (how to verify)
- Encode telemetry (minimum):
roi_map_id,roi_coverage%,avg_qp_fg/bg,substream_bitrate,idr_interval. - Alignment checks (must be explicit):
roi_grid_mismatch_count,ts_skew_ms(main,sub). - Common failure signatures: bitrate does not drop (ROI too large), foreground detail still poor (QP not applied), evidence clip time mismatch (skew/jitter), ROI “swims” (grid mismatch).
- Guardrails:
cap
roi_coverage%, enforce grid quantization, boundts_skew_mswith hard checks and corrective resync.
ICNavigator | On-Camera / Edge Analytics | Fig F6 (ROI Tiles → Encoder QP Map + Alignment Checks)
H2-7. Privacy Masking: Redaction That Survives Scaling, PTZ, and Scene Changes
Goal: make privacy masking reliable across zoom/pan/warp and changing scenes, prevent drift or leaks, and enforce a fail-safe policy when detection or system health degrades.
Card A — Masking strategies & drift causes
- Mask sources: detector boxes (faces/plates), fixed polygons (privacy zones), or hybrid (polygons as a safety net + detector-follow masks for moving targets).
- Why drift happens: mask defined in the wrong coordinate space (tensor vs encode frame), zoom/warp changes the mapping, or detector jitter reshapes boxes frame-to-frame.
- Stabilize first, then apply:
track the mask target (
track_id) and bound the update rate so masks do not “swim” during PTZ and motion bursts. - Transform chain (concept):
Detect → Track → Transform (PTZ/warp profile) → Apply (pre-encode). Each step should be attributable to a profile ID rather than hidden behavior.
Card B — Fail-safe policy + counters (never leak)
- Fail-safe triggers:
low confidence (
mask_conf_minbelow threshold), unstable detections (mask_boxes_ncollapsing), or system degradation (queue/thermal states). - Fail-safe actions:
expand masks (
mask_expand_px), enforce minimum mask coverage, and hold masks through short detector dropouts. - Mask telemetry (minimum):
mask_boxes_n,mask_area%,mask_conf_min,mask_expand_px,mask_fail_safe_active. - Leak spot-check (concept): run randomized checks and count suspected exposures without storing raw frames; gate output if checks fail.
ICNavigator | On-Camera / Edge Analytics | Fig F7 (Detect→Track→Transform→Apply(pre-encode)→Verify + Fail-safe)
H2-8. Metadata & Event Packaging: What to Output, How to Timestamp, How to Reconcile Streams
Goal: define an on-camera analytics payload contract that downstream systems can trust—clear payload types, unambiguous timestamps, and a deterministic way to reference the exact video segment on main and sub streams.
Card A — Payload contract (what to output)
- Events: alarm + context; must reference video precisely.
Minimum fields:
event_id,zone_id,confidence,model_id,start_pts,end_pts,frame_id_ref. - Tracks: continuous objects for reconciliation and audit.
Fields:
track_id,class_id,first_pts,last_pts,age,lost_count, optional attributes. - Snapshots: key frames for fast review.
Fields:
snapshot_id,frame_id/pts,stream_id, optional crop boxes. - ROI maps: encode/control artifacts.
Fields:
roi_map_id,roi_coverage%, grid metadata (tile size/profile). - Mask descriptors: redaction geometry descriptors.
Fields:
mask_id, polygons/boxes,coord_space,transform_id,apply_stage=PRE_ENCODE.
Card B — Timestamp & alignment checklist (how to reconcile)
- Use two time bases:
monotonic device time for ordering +
pts/frame_idfor video referencing; add wallclock if available. - Reference the exact segment:
events include
start_pts/end_ptsand aframe_id_refthat maps to both main and sub streams. - Skew checks:
log
ts_skew_ms(main,sub). If skew exceeds the bound, mark video reference degraded. - Light integrity (non-crypto):
include
sequence_noandpayload_hashto detect truncation, drops, and reorder without defining signature schemes here.
pts/frame_id_ref, reconciles main/sub streams via skew checks, and adds light continuity fields (sequence/hash).
ICNavigator | On-Camera / Edge Analytics | Fig F8 (Event→(frame_id,pts)→Main/Sub Clips + Skew + Sequence)
H2-9. Model Lifecycle on Camera: Profiles, Versioning, Rollback, and A/B Validation
Goal: prevent “updates made accuracy worse” and make field behavior explainable and reversible through auditable identities, profile switching rules, staged rollout, and rollback gates.
Card A — Lifecycle policy (safe and explainable)
- Identity contract: treat “model” as a bound set (weights + quant + labels + preproc profile).
Always publish
model_id,model_hash,quant_profile,labels_ver, andpipeline_profile. - Scene profiles: define explicit profiles (day/night, IR on/off, indoor/outdoor) with auditable switching rules and hysteresis. A profile is a parameter pack (thresholds, trackers, mask policy levels), not an opaque “auto mode”.
- Safe update flow: stage → warmup → validate → commit (or rollback). Validation can be time-sliced A/B (alternating windows) or shadow-run (compute-only, no event emission).
- Rollback hierarchy: if behavior degrades, first attempt a conservative profile, then revert model/hash. Always store a last-known-good target and a reason code.
Card B — What to log for blame-free postmortems
- Update timeline:
model_apply_start_ts,model_apply_end_ts,warmup_frames,active_model_id,active_model_hash. - Profile context:
scene_profile_id, optionalprofile_switch_ts+profile_switch_reason(e.g., IR toggle, lux threshold, schedule). - Accuracy proxies (field-safe):
event_rate,false_alarm_rate_proxy, optionalconfidence_histogram_id. - Rollback accountability:
rollback_reason(e.g.,PROXY_SPIKE,P95_LATENCY,THERMAL,PROFILE_FLAP,OPERATOR_FORCE), plusrollback_from_hash→rollback_to_hash.
ICNavigator | On-Camera / Edge Analytics | Fig F9 (Old→Stage→Validate→Commit/Rollback + Metrics Gate)
H2-10. Performance Budgeting: End-to-End Latency, DDR Bandwidth, and Worst-Case Scenarios
Goal: provide a practical budgeting method for p50/p95 latency and bandwidth that survives worst-case scenes (crowds, rain, IR switching, PTZ motion) without guesswork.
Card A — Budgeting method (practical steps)
- Define an SLO: pick a forensic-grade bound (e.g., event emission p95 ≤ target ms) rather than average latency.
- Decompose latency: instrument stage timestamps for capture → preproc → infer → postproc → event emit → encode packaging.
- Measure p50/p95 per stage: record
stage_ms_p50/stage_ms_p95and the end-to-end p95; treat queueing as a first-class signal. - Budget shared DDR: track total bandwidth and engine utilization; plan for codec bursts and ISP spikes during motion/noise.
- Worst-case validation: run a scenario matrix (crowds, rain/snow, IR toggles, PTZ sweeps, night gain) and confirm the p95 bound holds or degrades safely.
Card B — If p95 breaks: which 2 counters first
- Counter #1:
max_queue_depth(or queue depth at the inference boundary) — proves whether latency is queueing-driven. - Counter #2:
ddr_bw_total(or DDR utilization) — indicates contention from ISP/codec bursts versus compute starvation. - Fast discriminator: queue↑ + DDR↑ → contention; queue↑ + DDR flat → scheduling/locks; DDR↑ + codec_util↑ → bitrate bursts; p95↑ + thermal_state throttle → clock collapse.
- Budget table fields (minimum):
stage_ms_p50/p95,ddr_bw_total,codec_util%,npu_util%,max_queue_depth,thermal_state.
ICNavigator | On-Camera / Edge Analytics | Fig F10 (Latency Blocks + Shared DDR Hub + Worst-case Triggers)
H2-11. Signing & Watermarking at the Camera: What to Sign, Where to Embed, How to Verify
Goal: lock camera outputs (events, snapshots, ROI maps, clip manifests) to device identity and timestamps, while embedding on-frame evidence watermarks—without expanding into full key-management or boot chains.
Card A — Minimal secure integrity model for camera outputs
- Sign structured outputs (tamper detection + attribution): events/tracks, snapshots, ROI maps, and a clip manifest that lists hashes for frames/segments inside
[start_pts…end_pts]. - Bind to context (explainable behavior): include
device_id,fw_ver,model_id,model_hash,scene_profile_id, and the referenceframe_id/ptsthat the event points to. - Canonicalize before hashing: normalize field order and encoding so the same payload produces the same hash across firmware builds (
PAYLOAD_FORMAT_ERRbecomes diagnosable, not random). - Watermark video at a forced stage: apply watermark at a pre-encode compositor stage so every encode path passes through a single insertion point (prevents
ENCODE_PATH_BYPASSleaks).
Card B — Verification hooks and measurable failure codes
- What to verify (sample-based): (1) payload signature, (2) clip manifest signature + segment hash chain, (3) watermark detectability on sampled frames.
- Counters:
sign_ok/sign_fail,watermark_insert_ok/watermark_insert_fail,verify_sample_fail_rate(orverify_sample_ok/verify_sample_fail). - Failure taxonomy (camera-side, actionable):
KEY_UNAVAILABLE(engine/SE not ready),PAYLOAD_FORMAT_ERR(canonicalization mismatch),ENCODE_PATH_BYPASS(watermark stage skipped),TIME_BINDING_ERR(event pts/frame reference inconsistent). - Fast triage: sign_fail↑ with KEY_UNAVAILABLE → check SE/crypto engine readiness; sign_fail↑ with FORMAT_ERR → compare canonical schema version; watermark_fail↑ or BYPASS↑ → enforce single compositor stage for all streams.
MPN examples (camera-side integrity building blocks)
Examples only (common in embedded security/video designs). Final selection depends on availability, crypto needs, interfaces, and certification targets.
- Secure element / key storage (I²C/SPI):
Microchip
ATECC608B(ECC + secure key storage), MicrochipATECC608A, NXP EdgeLockSE050, STMicroelectronicsSTSAFE-A110, Maxim/Analog DevicesDS28C36. - MCU/MPU with hardware crypto acceleration (SHA/AES/ECC engines for hashing/signing pipelines):
ST
STM32H743/STM32H753, STSTM32U575, NXPi.MX RT1062, RenesasRA6M4. - RTC for stable timestamp reference (when wallclock is required in addition to monotonic time):
Maxim/Analog Devices
DS3231M, NXPPCF2129, Micro CrystalRV-3028-C7. - NVM for manifests/audit logs (append-friendly storage for hashes/records):
Winbond
W25Q128JV(QSPI NOR), MacronixMX25L128, MicronMT25QL128.
ICNavigator | On-Camera / Edge Analytics | Fig F11 (Payload Sign + Video Watermark + Verify Gate + Bypass Failure)
sign_fail or watermark_insert_fail exceeds a threshold.
H2-12. FAQs (On-Camera / Edge Analytics)
Each answer stays on-camera, points back to measurable evidence fields, and maps to chapters above (no scope creep into VMS/NVR or full key management).
Analytics FPS drops at night—thermal throttle or DDR contention?
Short answer: Separate “heat throttling” from “memory contention” using paired counters, not guesses.
- Evidence to check:
infer_fps,p95_latency_ms,thermal_state/throttle_state,ddr_bw_total,max_queue_depth,codec_util%. - Discriminate:
thermal_state=THROTTLEDwith broad utilization drop → thermal; risingddr_bw_total+ queue growth → DDR contention. - First fix: Cap worst-case bitrate (night NR/IR), enforce queue limits, and switch to adaptive inference with a deterministic drop policy (
DROP_BW_LIMIT/DROP_QUEUE_FULL).
Detections look fine but events are unstable—tracker or rule hysteresis?
Short answer: “Event instability” is usually a tracking lifecycle problem or a hysteresis/debounce problem in the rule engine.
- Evidence to check:
track_id,age,lost_count,reid_count,zone_hits, plusRULE_X_TRIGGER/RULE_X_HOLD/RULE_X_RELEASE. - Discriminate: High
lost_count/reid_count→ tracker; stable tracks but rapid TRIGGER/RELEASE → hysteresis too weak. - First fix: Add minimum dwell/hold time, debounce, and release hysteresis; then tighten “lost” handling (avoid immediate track reset).
ROI coding saves bandwidth but faces become unrecognizable—ROI map design or QP bounds?
Short answer: The common failure is either ROI coverage misses faces/plates, or QP bounds crush foreground detail.
- Evidence to check:
roi_map_id,roi_coverage%,avg_qp_fg/bg,substream_bitrate,idr_interval. - Discriminate: Low
roi_coverage%or frequent misses → ROI design; extreme fg QP or fg/bg gap → QP bounds. - First fix: Expand face/plate ROI tiles, set a foreground QP ceiling, and add a short “evidence burst” clip around events.
Sub-stream timestamps don’t match main stream—what fields prove skew?
Short answer: Prove mismatch with explicit skew counters and shared frame references, then enforce a single timebase.
- Evidence to check:
ts_skew_ms(main,sub),frame_id_ref,start_pts/end_pts,sequence_no, per-streamidr_interval. - Discriminate: Large skew plus event referencing the “wrong” PTS window indicates broken reconciliation, not model accuracy issues.
- First fix: Derive both streams from one PTS source, resync at IDR boundaries, and carry
sequence_noend-to-end.
Privacy masks drift during PTZ—tracking transform or coordinate mismatch?
Short answer: PTZ/warp changes coordinate space; mask drift is usually a transform-chain mismatch rather than detector quality.
- Evidence to check:
mask_boxes_n,mask_area%,mask_expand_px, (optional)ptz_state_id/warp_idto tag the active transform. - Discriminate: Stable tracks but drifting masks during PTZ implies transform/space mismatch; unstable boxes implies tracking.
- First fix: Apply masks in the same stabilized coordinate space used for encode, and lock transform IDs per frame.
Masks sometimes disappear under load—fail-safe policy or pipeline bypass?
Short answer: Under load, masks disappear either because fail-safe is not enforced, or because scheduling/paths bypass the masking stage.
- Evidence to check:
mask_fail_safe_active,mask_conf_min,queue_depth/max_queue_depth, drop codes (DROP_QUEUE_FULL/DROP_THERMAL), and any “bypass” counter. - Discriminate: Fail-safe inactive while confidence is low → policy issue; queue spikes + stage skipped → pipeline bypass.
- First fix: Reserve budget for masking, enforce a minimum mask policy when degraded, and prevent stage skipping in degraded modes.
Model update reduced accuracy—how to make rollback provable?
Short answer: Make updates reversible by logging “apply → validate → commit/rollback” with explicit model identity and gates.
- Evidence to check:
model_apply_start/end,warmup_frames,model_id,model_hash,labels_ver,quant_profile,rollback_reason. - Discriminate: A/B time-sliced run shows whether regression is model/profile or scene-profile switching.
- First fix: Stage deployment, keep the previous model resident, and trigger rollback on proxy metrics (event-rate anomalies, false-alarm proxies).
CRC/logs say OK but behavior changed—preproc normalization mismatch?
Short answer: CRC “OK” only proves the file is intact; field regressions often come from preproc and quantization profile drift.
- Evidence to check:
input_mean/std, exposure/gain bins,roi_crop_count,quant_scale_id, and a canary hash (thumbnail/tensor hash). - Discriminate: Same model hash but different
input_mean/stdorquant_scale_idindicates normalization mismatch. - First fix: Version the preproc profile, lock colorspace/normalize/letterbox parameters, and validate on canary frames before rollout.
False alarms only in rain/snow—what worst-case knobs matter?
Short answer: Rain/snow creates worst-case motion noise and bitrate spikes; instability is often a mix of budget breakage and weak rule hysteresis.
- Evidence to check:
p95_latency_ms,ddr_bw_total,max_queue_depth,thermal_state, pluslost_countandRULE_X_HOLD/RELEASE. - Discriminate: If p95 and queues rise with false alarms, fix budget first; if tracks are stable, strengthen hysteresis.
- First fix: Require multi-frame confirmation, tighten release hysteresis, and degrade inference deterministically under worst-case load.
How do I bind an event to the exact video segment?
Short answer: Bind events to video using explicit frame references and a PTS window, and keep the binding stable across main/sub streams.
- Evidence to check:
event_id,frame_id_ref,start_pts/end_pts,stream_id,sequence_no,payload_hash. - Discriminate: A valid event must replay the same PTS window on both streams within measured skew bounds.
- First fix: Emit a clip manifest per event window and ensure both streams share one monotonic timebase + PTS lineage.
Should I sign video frames or just the event payload?
Short answer: Full-frame signing is expensive; the practical approach is signing payloads plus a clip manifest (chunk hashes), and using watermarks for visual redistribution checks.
- Evidence to check:
payload_hash,sequence_no,start_pts/end_pts,clip_manifest,sign_ok/sign_fail. - First fix: Sign payload + manifest on-camera using a secure key store (e.g.,
ATECC608BorSE050) and verify by sampling downstream.
Watermark verification fails sporadically—where to look first?
Short answer: Sporadic failures usually mean path inconsistency (bypass) or worst-case resource collapse during spikes (DDR/thermal/queues).
- Evidence to check:
watermark_insert_ok/fail,verify_sample_fail_rate, failure codes (ENCODE_PATH_BYPASS,KEY_UNAVAILABLE), plusddr_bw_total,max_queue_depth,thermal_state. - Discriminate: Fail with BYPASS → enforce pre-encode compositor; fail with queue/thermal spikes → budget headroom issue.
- First fix: Force one insertion stage for all streams, reserve compute/memory headroom, and run a periodic self-test sampling hook.