\

Architecture

This system treats phones like purpose-built field cameras. Capture is continuous and headless; review is high-quality and on demand.

Devices

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

  1. Pairing (QR/PIN) โ†’ exchange keys; store pair_token (rotated daily)
  2. Enrollment per match โ†’ match_token = HMAC(pair_token, "enroll:"+MID+nonce) (TTL)
  3. Serving gate: all /v1/segments and /v1/export require MID + match_token
  4. LAN-only by default; optional HTTPS + certificate pinning

Performance budgets