Architecture
This system treats phones like purpose-built field cameras. Capture is continuous and headless; review is high-quality and on demand.
Devices
- Android Cameras: Lava LXX504 (MediaTek Dimensity 7050), Android 12+, 5 GHz Wi-Fi
- Director: iPad 9 (A13) or iPhone (universal app)
- Network: Home 5 GHz Wi-Fi, LAN-only operation
Capture pipeline (Android)
Camera2 โ MediaCodec (H.264 High)
CBR โ 7 Mbps, 1080p60, IDR every second (GOP=1 s, no B-frames)
CMAF writer: 1 s moof/mdat (tfdt continuity, timescale 90k)
Rolling 10:00 ring (+2 s guard), auto-prune
HTTP microserver: /v1/info, /v1/init, /v1/segments, /v1/export
Thermal: throttle serving before any capture change (fps step only between overs)
Director pipeline (iOS/iPadOS)
Bonjour/mDNS discovery โ roster (Core Data)
Ping/pong every 5 s to estimate drift; clamp apply โค ยฑ50 ms
Review 30 s: fetch init then 30 ร 1 s m4s; progressive playback with AVAssetResourceLoader โ AVPlayer
MARK (โ8/+4): save fast-start MP4 + metadata (no transcode)
Security model
- Pairing (QR/PIN) โ exchange keys; store
pair_token(rotated daily) - Enrollment per match โ
match_token = HMAC(pair_token, "enroll:"+MID+nonce)(TTL) - Serving gate: all /v1/segments and /v1/export require MID + match_token
- LAN-only by default; optional HTTPS + certificate pinning
Performance budgets
- TTFB โค 1.5 s (Review โ first decoded frame)
- Sync โค ยฑ50 ms between cameras over 10 min
- Soak 2 h at 1080p60; window 10:00โ10:02; no gaps
- Storage โ 540 MB per camera for 10 min ring @ ~7.1 Mbps (video+audio)