Skip to content

All-in-One Frigate AI NVR

examples/frigate/ turns a single Pixel 6 / 6 Pro into a ~0.8–1.3 W self-contained AI NVR running upstream, unprivileged ghcr.io/blakeblackshear/frigate:stable (verified live on Frigate 0.18.3) — with no custom Docker image, no --privileged flag, no /dev/abrolhos container passthrough, and no external model downloads.

frigate-camera1–2 ISP lenses (stream-multi)→ Exynos MFC H.264 → ffmpegfrigate-tputpu-zmq-bridge.py (host)tpu-ctl serve (/dev/abrolhos)rtsp://127.0.0.1:8554ZMQ IPC (0600)Frigate Container (unprivileged)ghcr.io/blakeblackshear/frigate:stable• Built-in go2rtc RTSP ingest (127.0.0.1:8554)• Built-in type: zmq detector (auto-uploads /cpu_model.tflite)• HTTPS Web UI on :8971 · WebRTC live view on :8555• Recording, motion, snapshots → /var/lib/headless-frigate/mediaZero –privileged · Zero /dev passthrough · Auto-compiles .dgc in 0.71 s
Two host systemd bridges own the ISP, MFC, and Edge TPU while Frigate runs completely unprivileged in Docker.
  1. frigate-tpu.service runs /usr/local/lib/headless-frigate/tpu-zmq-bridge.py over ipc:///run/headless-frigate/zmq_detector (0600). On first startup, Frigate uploads its bundled /cpu_model.tflite (320×320 INT8 MobileDet COCO) over the local socket; the bridge strips CPU post-processing, compiles it on-device to an Abrolhos .dgc in 0.71 s, caches it under /var/lib/headless-frigate/models/, and runs inference at ~272 FPS burst (3.68 ms) with 0.15 ms vectorized NumPy SSD decoding & NMS.
  2. frigate-camera.service (optional) runs /usr/local/lib/headless-frigate/camera-mfc-publisher.py, capturing 1–2 internal lenses via camera-ctl, hardware-encoding H.264 on Exynos MFC (/dev/video7), and remuxing with ffmpeg -c:v copy (zero CPU re-encoding) into Frigate’s loopback go2rtc server (rtsp://127.0.0.1:8554/<name>).

Verified Live Performance (Pixel 6 Pro raven)

Section titled “Verified Live Performance (Pixel 6 Pro raven)”
Workload Total SoC Power (ODPM) TPU Rail Detect Speed Temperature
1 camera (front 720p → MFC → Frigate + TPU @ 5 FPS) 0.78 W (782 mW) 4.5 mW ~14 ms 28.0 °C
2 simultaneous cameras (ultrawide + telephoto 720p → 2× MFC → Frigate + TPU) 1.30 W (1305 mW) 4.5 mW 14.6 ms (0.0 skipped FPS) 34.1 °C

Copy examples/frigate/ to the phone (or clone the repo on the phone) and run setup.sh with your desired camera topology:

Terminal window
sudo bash examples/frigate/setup.sh --cameras ultrawide,telephoto

(You can also pre-enable Frigate bootstrap directly during first-boot provisioning in the WebUSB Installer.)

  • Open https://<phone-hostname>.local:8971 (ports exposed: 8971 HTTPS UI/API, 8555/tcp + 8555/udp WebRTC; 8554 is bound to 127.0.0.1 only; unauthenticated port 5000 is intentionally not published).
  • Retrieve the auto-generated initial admin password:
    Terminal window
    docker logs frigate | grep -A4 'Created a default user'
Alias HAL Spec Default Frigate Name Sensor (raven)
wide 0.2 pixel_wide Samsung GN1 (50 MP, 6.81 mm)
ultrawide 0.3 pixel_ultrawide Sony IMX386 (12 MP, 2.35 mm)
telephoto / tele 0.4 pixel_telephoto Sony IMX586 (48 MP 4× periscope, 19.00 mm)
rear 0 pixel_rear Rear logical multi-cam
front 1 pixel_front Sony IMX663 (11 MP, 2.74 mm)
Flag Default Bounds / Notes
--cameras <LIST> (choose one) 1–2 comma-separated aliases, raw specs (N/N.P), or name=spec pairs.
--camera <SPEC> (choose one) Single-camera shorthand.
--no-camera (choose one) External LAN RTSP cameras only; disables internal publisher blocks in existing config.yml while preserving external go2rtc streams.
--width / --height 1280 / 720 Even integers: 160..4096 and 120..3072.
--fps 15 1..60 (also sets encoder --gop $((FPS * 2))).
--bitrate 2000000 Target H.264 bitrate in bps (> 0).
--night-mode off off, auto, or on slow-shutter color night vision.
--max-exposure-ms 200 33..500 ms.
--max-iso 4800 400..10000.
--night-target-luma 75 20..180.
--ev-comp 0 -24..24 (1/6 EV steps).
--focus-distance (auto AF) 0 (infinity) or 0.000001..15.0 diopters (pre-validated against min_focus_distance).
--power-state 6 0..7 Edge TPU DarwiNN DVFS state.
--force-config Off Overwrite an existing /var/lib/headless-frigate/config/config.yml.
--teardown Off Stops & removes systemd services, brings down Docker Compose, removes /usr/local/lib/headless-frigate, while preserving /var/lib/headless-frigate (config, recordings, compiled models).

By default, brownout-guard.service sets SHED_UNITS=frigate-camera.service. Regardless of charger type, if active battery drain reaches <= 15% SOC (sustained 60 s) or battery voltage sags <= 3450 mV (sustained 15 s) — for example on an unplugged phone or a weak 5 V / 500 mA USB-SDP port — the guard gracefully stops the camera/MFC publisher to prevent hardware brownout and automatically resumes it once power recovers.

If you want to shed the TPU bridge too, add both to /etc/headless-phone/brownout-guard.conf:

/etc/headless-phone/brownout-guard.conf
SHED_UNITS=frigate-camera.service,frigate-tpu.service