Overview
Discover what makes Frigate powerful
Frigate is a **self‑hosted Network Video Recorder (NVR)** that fuses low‑latency video streaming with **real‑time AI object detection**. Built on top of OpenCV and TensorFlow, it processes every frame locally, avoiding cloud dependencies while delivering detection accuracy comparable to commercial solutions. The core idea is to use a lightweight motion detector as a gatekeeper: only when motion is detected does Frigate launch the heavy TensorFlow inference pipeline, thereby conserving CPU/GPU cycles and maintaining high frame‑rates (100 + FPS on supported accelerators).
Zone & mask editor
Event‑based recording
WebRTC & MSE streaming
MQTT integration
Overview
Frigate is a self‑hosted Network Video Recorder (NVR) that fuses low‑latency video streaming with real‑time AI object detection. Built on top of OpenCV and TensorFlow, it processes every frame locally, avoiding cloud dependencies while delivering detection accuracy comparable to commercial solutions. The core idea is to use a lightweight motion detector as a gatekeeper: only when motion is detected does Frigate launch the heavy TensorFlow inference pipeline, thereby conserving CPU/GPU cycles and maintaining high frame‑rates (100 + FPS on supported accelerators).
Key Features
- Zone & mask editor – Define per‑camera polygons to focus detection on areas of interest and suppress false positives from shadows or wind.
- Event‑based recording – Retain footage only when configured objects appear, drastically reducing storage usage.
- WebRTC & MSE streaming – Low‑latency live view in browsers without the need for RTSP clients.
- MQTT integration – Emit detection events to Home Assistant or any other MQTT‑capable system for automation.
- Multi‑camera scrubbing – Parallel playback of multiple feeds with synchronized timeline controls.
Technical Stack
Frigate is written in Python 3.11+ and relies on the following ecosystem components:
| Layer | Technology |
|---|---|
| Detection | TensorFlow Lite (or full TF) with optional GPU/Edge TPU via pycoral |
| Motion | OpenCV (simple background subtraction) |
| Concurrency | Python multiprocessing + asyncio – each camera runs in its own process; detection engines spawn separate worker processes |
| Web UI | FastAPI + Jinja2 for server‑side rendering; front‑end uses vanilla JS with MSE/WebRTC APIs |
| Storage | Local filesystem (HDD/SSD) with optional Rclone support for cloud backups |
| Messaging | MQTT (paho‑mqtt) and Home Assistant custom component for tight integration |
| Containerization | Official Docker images (multi‑arch, ARM & x86) with optional GPU support via NVIDIA or Coral runtime |
The architecture is deliberately micro‑service‑like: each camera’s pipeline runs isolated, enabling horizontal scaling by adding more containers or physical nodes without shared state. The detection service can be swapped out with a custom TensorFlow model, and new zones or masks are persisted as JSON in the configuration directory.
Core Capabilities & APIs
Developers can extend Frigate through several programmatic interfaces:
- REST API – Exposes camera status, live stream URLs, and event logs (JSON). Useful for building dashboards or integrating with other services.
- MQTT Topics –
frigate/events/<camera>/<event_id>publishes event metadata;frigate/motion/<camera>signals motion starts/ends. Subscribing services can trigger automations or log events. - WebSocket – Real‑time updates for the UI; can be leveraged by custom clients to build lightweight viewers.
- Custom Model Plug‑in – Drop a
.tflitefile into themodels/directory and declare it in the config; Frigate will load it at runtime, allowing developers to train domain‑specific detectors (e.g., “scooter”, “dog”).
These interfaces keep Frigate extensible while remaining opinionated enough to provide a stable base for hobbyist and enterprise deployments.
Deployment & Infrastructure
Frigate is designed to run on modest hardware: a Raspberry Pi 4 with a Coral USB accelerator can handle several cameras at 30 FPS, while a mid‑range workstation with an NVIDIA GPU can scale to dozens. Docker Compose or Kubernetes are supported; the official image exposes environment variables for camera URLs, storage paths, and MQTT brokers. For production‑grade setups, use an external NAS or cloud object store for archival, and consider a reverse proxy (Traefik/Nginx) with TLS termination.
Scalability is achieved by:
- Sharding cameras – Each camera runs in its own container; adding a new node simply involves deploying another instance with the same config.
- Load‑balanced MQTT – Multiple Frigate instances can publish to the same broker; Home Assistant consumes events without needing a single point of failure.
- Horizontal file‑system – Use GlusterFS or Ceph for shared storage if multiple nodes must access the same footage.
Integration & Extensibility
Frigate’s tight coupling with Home Assistant is a major selling point: the custom component exposes camera feeds, zones, and events as entities, enabling complex automations (e.g., “if a person enters zone A after sunset, send an email”). Beyond Home Assistant, any system that can consume MQTT or HTTP will integrate seamlessly. For developers wanting deeper control, the open‑source codebase and extensive documentation make it trivial to fork or contribute new features such as additional detection backends, alternative motion algorithms, or custom UI widgets.
Developer Experience
The project follows clean Python conventions and ships with a comprehensive documentation site (https://docs.frigate.video). Configuration is YAML‑based, mirroring Home Assistant’s style for familiarity. The community is active on GitHub and Discord; contributors can submit pull requests or issue trackers for new models. The documentation includes a “Developer Guide” section that walks through extending the detection pipeline, adding custom MQTT topics, and building a lightweight front‑end.
Use Cases
- Home Automation – Combine Frigate with Home
Open SourceReady to get started?
Join the community and start self-hosting Frigate today
Related Apps in development-tools
Hoppscotch
Fast, lightweight API development tool
code-server
Self-hosted development-tools
AppFlowy
AI-powered workspace for notes, projects, and wikis
Appwrite
All-in-one backend platform for modern apps
PocketBase
Lightweight Go backend in a single file
Gitea
Fast, lightweight self-hosted Git platform
Weekly Views
Repository Health
Information
Tags
Explore More Apps
Grist
Hybrid database‑powered spreadsheet for modern data work
Haven
Private, ad‑free blogging for friends and family
Teleport
Secure, unified access to all infrastructure
Fork Recipes
Elegant recipe manager for the modern kitchen
Jina
Build and deploy AI services at scale
This Week in Past
Show your yearly photo memories on a weekly slideshow
