MCPSERV.CLUB
Frigate

Frigate

Self-Hosted

Local AI‑powered NVR for IP cameras

Active(100)
26.5kstars
0views
Updated 1 day ago
Frigate screenshot 1
1 / 5

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:

LayerTechnology
DetectionTensorFlow Lite (or full TF) with optional GPU/Edge TPU via pycoral
MotionOpenCV (simple background subtraction)
ConcurrencyPython multiprocessing + asyncio – each camera runs in its own process; detection engines spawn separate worker processes
Web UIFastAPI + Jinja2 for server‑side rendering; front‑end uses vanilla JS with MSE/WebRTC APIs
StorageLocal filesystem (HDD/SSD) with optional Rclone support for cloud backups
MessagingMQTT (paho‑mqtt) and Home Assistant custom component for tight integration
ContainerizationOfficial 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 Topicsfrigate/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 .tflite file into the models/ 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:

  1. Sharding cameras – Each camera runs in its own container; adding a new node simply involves deploying another instance with the same config.
  2. Load‑balanced MQTT – Multiple Frigate instances can publish to the same broker; Home Assistant consumes events without needing a single point of failure.
  3. 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

Weekly Views

Loading...
Support Us

Featured Project

$30/month

Get maximum visibility with featured placement and special badges

Repository Health

Loading health data...

Information

Category
development-tools
License
MIT
Stars
26.5k
Technical Specs
Pricing
Open Source
Database
SQLite
Docker
Official
Min RAM
1GB
Min Storage
5GB
Supported OS
LinuxDocker
Author
blakeblackshear
blakeblackshear
Last Updated
1 day ago