CCTV Integration
Connect CCTV cameras and NVR systems to the evidence chain — live streams, motion-triggered clips, browser object detection, and automatic evidence linking.
Last updated: 2025-02-18
CCTV Integration
Certexi connects warehouse CCTV cameras directly to the evidence chain. Motion-triggered clips are automatically recorded, stored in Nextcloud, and linked to placement events for complete audit coverage.
6 camera feeds with recording status, motion detection indicators, and zone assignments.
How It Works
Supported Systems
| System | Protocol | Features |
|---|---|---|
| Hikvision | RTSP | Live stream, motion detection, PTZ |
| Dahua | RTSP | Live stream, motion detection |
| Axis | RTSP/ONVIF | Live stream, analytics |
| Generic NVR | RTSP | Live stream only |
| USB Webcam | V4L2 | Live stream, software detection |
Camera Status Card
<Card className="w-72"> <CardHeader className="pb-2 flex flex-row items-center justify-between"> <CardTitle className="text-sm">Loading Dock — Cam 3</CardTitle> <Badge className="bg-green-500 text-white text-[10px]">Live</Badge> </CardHeader> <CardContent className="space-y-3"> <div className="aspect-video rounded-md bg-gradient-to-br from-gray-800 to-gray-900 flex items-center justify-center"> <div className="text-center"> <div className="text-gray-400 text-xs">RTSP Stream Active</div> <div className="text-gray-500 text-[10px] font-mono mt-1">1920x1080 @ 25fps</div> </div> </div> <div className="flex items-center justify-between text-xs"> <span className="text-muted-foreground">Zone</span> <Badge variant="outline">Zone C — Shipping</Badge> </div> <div className="flex items-center justify-between text-xs"> <span className="text-muted-foreground">Motion</span> <Badge className="bg-red-500 text-white text-[10px]">Recording</Badge> </div> <div className="flex gap-1"> <Button size="sm" variant="outline" className="flex-1 text-xs h-7">Expand</Button> <Button size="sm" variant="outline" className="flex-1 text-xs h-7">Clips</Button> <Button size="sm" variant="ghost" className="text-xs h-7">Settings</Button> </div> </CardContent> </Card>
Motion Detection
Motion detection runs server-side via FFmpeg scene change detection:
- FFmpeg processes the RTSP stream in real time
- Scene change above threshold triggers clip extraction
- Pre-roll buffer captures 5 seconds before the event
- Post-roll captures 10 seconds after motion stops
- Clip is uploaded to Nextcloud with metadata
- Event is logged in the immutable ledger
Configuration
| Parameter | Default | Description |
|---|---|---|
sensitivity | 0.3 | Scene change threshold (0-1) |
pre_record_seconds | 5 | Buffer before motion |
post_record_seconds | 10 | Continue after motion stops |
min_duration_seconds | 2 | Ignore very short events |
max_clip_seconds | 300 | Maximum clip duration |
Browser-Side Object Detection
Privacy-First
TensorFlow.js COCO-SSD runs entirely in the browser. No video frames leave the device. Detection results (bounding boxes, labels) are overlaid on the stream locally.
Optional browser-side detection provides object classification overlays:
- Person detection with confidence scores
- Vehicle identification at entry/exit points
- Package/pallet detection at loading docks
- Forklift tracking in warehouse zones
Evidence Linking
Clips are automatically linked to WHMS events when:
- A placement occurs in a zone with an active camera
- Motion is detected within 60 seconds of an event
- An operator manually attaches a clip to a record
<Card className="w-80"> <CardHeader className="pb-2"> <CardTitle className="text-sm">Evidence Link</CardTitle> <CardDescription>Auto-linked CCTV clip</CardDescription> </CardHeader> <CardContent className="space-y-2"> <div className="flex items-center gap-3"> <div className="w-20 h-12 rounded bg-muted flex items-center justify-center text-[10px] text-muted-foreground">Thumbnail</div> <div className="flex-1"> <div className="text-xs font-medium">Cam 3 — Loading Dock</div> <div className="text-[10px] text-muted-foreground">14:32:05 — 14:32:17 (12s)</div> </div> </div> <div className="flex items-center justify-between text-xs"> <span className="text-muted-foreground">Linked to</span> <span className="font-mono">TU-2025-00042</span> </div> <div className="flex items-center justify-between text-xs"> <span className="text-muted-foreground">Event</span> <Badge variant="outline">PLACED at A-01-03</Badge> </div> </CardContent> </Card>
Setup Guide
1. Add Camera
Navigate to Settings > IoT > Cameras and add your RTSP URL:
rtsp://admin:password@192.168.1.100:554/Streaming/Channels/101
2. Assign to Zone
Link the camera to a warehouse zone so clips are automatically associated with zone events.
3. Enable Motion Detection
Toggle motion detection per camera. Adjust sensitivity based on environment conditions.
4. Configure Storage
Clips are stored in Nextcloud under /Evidence/CCTV/{camera_name}/{date}/. Configure retention in Settings > Evidence > Retention.