
In the rapidly evolving landscape of home security and surveillance, the demand for intelligent, privacy-focused, and cost-effective solutions has never been higher. Traditional Network Video Recorders (NVRs) often rely on motion detection algorithms that trigger alerts for every swaying tree, passing car, or shifting shadow, resulting in notification fatigue. Enter Frigate—an open-source, AI-powered NVR system that leverages computer vision to distinguish between people, animals, vehicles, and objects with remarkable accuracy. This guide provides a deep, technical yet accessible exploration of Frigate, covering its architecture, setup, unique features, and role within modern smart home ecosystems.
The Core Problem Frigate Solves
Traditional NVR systems use pixel-based motion detection. When a percentage of pixels changes between frames, an event is recorded. This approach is notoriously prone to false positives. Frigate replaces this with a two-stage detection pipeline. First, it uses motion detection (a lightweight, high-speed process to identify areas of change) to isolate regions of interest. Second, it passes those regions to a TensorFlow or OpenVINO-based object detection model running locally on your hardware. This means the system only alerts you when a specific, configured object type (e.g., a person, car, dog) is detected, dramatically reducing noise. It does not rely on cloud processing, ensuring that all video data and analysis remain on your local network.
How Frigate Works: The Technical Architecture
Frigate’s performance hinges on its carefully designed pipeline for video processing.
- Video Acquisition & Decoding: Frigate ingests RTSP or HTTP streams from IP cameras. It uses hardware acceleration (VAAPI, Intel QSV, NVIDIA NVDEC, or Raspberry Pi’s GPU) to decode the video stream efficiently, minimizing CPU load. Each camera can have multiple roles: a
clipsrole for recording events, arecordrole for continuous recording, and artmprole for live viewing. - Frame Analysis Pipeline: The system divides each camera feed into a grid of zones. When motion is detected in a specific zone, the relevant frame is sent to the detection model. Frigate does not run object detection on every frame. Instead, it maintains a dynamic detection frequency—typically 5-10 frames per second—to balance accuracy and resource consumption.
- Object Detection Models: Frigate supports several inference engines. The default is Coral Edge TPU, a USB or PCIe accelerator that provides the best performance (under 10ms inference time per frame). For users without a Coral, Frigate can use CPU-based TensorFlow Lite, Intel OpenVINO, or NVIDIA TensorRT via a GPU.
- Event Management & Recording: Once an object is detected, Frigate tracks its movement across frames. It maintains a buffer of pre-recorded video for each camera (configurable, typically 10-30 seconds). When an event triggers (e.g., a person enters a zone), Frigate writes the buffered video plus the ongoing recording to disk as a single
.mp4file. This ensures you never miss the onset of an action.
Key Features That Define Frigate
Frigate’s feature set extends far beyond basic detection.
- Zone-Based Logic: You can define arbitrary polygons on your camera feed (e.g., the driveway, front door, street). You can then configure alerts only when a person enters the driveway but not when they walk on the public sidewalk. Zones can have multiple object types and sub-labels. A bird outside the window is ignored; a person at the back door triggers a recording.
- Sub-Label Classification: Frigate can be trained or configured to recognize sub-categories. For example, you can distinguish between a delivery vehicle and a personal car, or between a UPS truck and a USPS truck. This requires custom model training but is supported through Frigate’s integration with Frigate+ , a paid service that provides labeled training data.
- Timeline & Review Interface: The web UI provides a timeline view that displays detected events as color-coded blocks. A five-minute period with four person detections shows four distinct blocks. You can scrub through each event and see the bounding box overlay. Frigate also generates a snapshot for each event, which serves as a thumbnail for quick review.
- Hardware Acceleration: Frigate excels at leveraging available hardware. On an Intel system with Quick Sync Video (QSV), it can transcode and analyze multiple 4K streams simultaneously. On a Raspberry Pi 4 with a Coral TPU, it can comfortably handle 8-10 1080p streams. This efficiency makes it viable for both low-power and high-performance deployments.
- MQTT & Home Assistant Integration: Frigate publishes all detection events to an MQTT broker. This allows Home Assistant to trigger automations based on specific object detections. For example: When a person is detected in the back yard, turn on the floodlight. MQTT also allows external systems to dynamically adjust Frigate’s zones or recording schedules.
Hardware Requirements and Recommended Configurations
Frigate is resource-conscious but does require specific hardware for optimal performance.
- Minimum: A Raspberry Pi 4 (4GB RAM) with a Google Coral TPU can handle 4-6 720p cameras with motion detection and object detection. This setup runs on a 32GB SD card but benefits from external USB SSD storage for recordings.
- Recommended: An Intel NUC or custom x86 machine with an i5-8500T or newer, 8GB RAM, and a Coral M.2 TPU. This configuration supports 8-12 1080p cameras including continuous recording at 15fps. Use an SSD for the database and a separate HDD for long-term video storage.
- High-Performance: A server with an i7-12700 or better, 16GB RAM, and an NVIDIA GTX 1660 or RTX 3060 (for TensorRT inference). This handles 16+ cameras with 4K resolution and complex zone configurations.
- Storage Considerations: Frigate uses a SQLite database to track events and recordings. The database should reside on SSD storage to avoid corruption and maintain performance. Video files can reside on HDDs. The system automatically deletes old recordings based on a retention policy (e.g., keep 7 days of continuous recording, 30 days of events).
Installation Methods
Frigate is deployed primarily via Docker, ensuring consistency across environments.
- Docker Compose (Linux/Unraid): This is the most common method. You define your
docker-compose.ymlwith environment variables for your Coral TPU, camera feeds, and configuration file path. The container mounts/configforfrigate.yml,/media/frigatefor recordings, and/dev/bus/usbfor the Coral. - Add-On (Home Assistant OS): For users running Home Assistant OS on a Raspberry Pi or NUC, Frigate is available as a one-click add-on. This simplifies networking (automatic access to MQTT) and exposes Frigate’s UI directly within Home Assistant.
- Docker on Synology/TrueNAS: These NAS systems support Docker containers. You’ll need to pass through the Coral TPU (if you have one) and ensure the container has sufficient shm-size (often 256MB-512MB) for shared memory used by OpenCV’s video processing.
Configuring frigate.yml for Optimal Detection
The configuration file controls every aspect of Frigate’s behavior.
- Camera Definition: Each camera requires a
name,host(RTSP URL), androles. Example:go2rtc(for WebRTC streaming),detect,record,clips. Thego2rtcintegration is now Frigate’s default for stream management, offering sub-second latency for live viewing. - Objects Configuration: Define the
tracked_objectslist. Common entries:person,car,bicycle,motorcycle,dog,cat,package. You can also set arequired_zonesfor an object—if a person is detected but not in a defined zone, the event is discarded. - Zone Polygons: Defined as lists of x,y coordinates (as percentages of frame width/height). Example for a driveway zone:
[-coordinates: "0.1,0.8,0.4,0.9,0.6,0.9,0.9,0.8,0.9,0.5,0.1,0.5"]. This creates a region that covers the lower portion of the frame. - Motion Thresholds: You can adjust
motion.contour_area(minimum size of motion area to trigger detection) andmotion.threshold(pixel intensity change required). Tuning these reduces false triggers from insects or rain. - Recording Retention: Set
events.required_zonesto only record events that occur in high-value zones. Setrecord.events.retain.days: 30andrecord.retain.days: 7to manage storage.
The Role of MQTT and Home Assistant
Frigate’s true power emerges when integrated into an automation platform.
- MQTT Topics: Each detection generates a message on topics like
frigate/events/camera_name/person. The payload includes JSON with the object’s label, score (confidence level), bounding box coordinates, and zone entry status. This data is real-time. - Home Assistant Sensors: The Frigate integration creates binary sensors for each camera and object type. A sensor like
binary_sensor.front_door_personisonwhen a person is detected at the front door. You can use this to trigger a voice announcement on a Google Nest Hub or send a notification to your phone with a snapshot. - Camera Entities: Frigate exposes camera streams as
camera.front_doorthat updates with the latest detection snapshot. This allows Home Assistant dashboards to show live detection-highlighted feeds without pulling the raw RTSP stream. - Automation Examples: “If a person enters the driveway and it’s after sunset, record a clip and send an alert.” Or “If a package is detected at the front porch, wait 300 seconds, then take a snapshot and send it to my phone.”
Advanced Customization and Tuning
Beyond basic configuration, Frigate offers deep customization for advanced users.
- Custom Model Training: Using Frigate+ , you can upload your own labeled images (e.g., specific breeds of dogs, brand of car) to train a custom object detection model. This model then replaces the default and provides extremely specific detection.
- Timelapse and Clip Generation: Frigate can generate timelapse videos from continuous recordings. This is useful for monitoring construction projects or garden growth over weeks.
- Motion Masking: You can draw permanent masks on the camera feed to ignore areas with constant motion (e.g., a tree that always sways). This reduces unnecessary detection attempts and saves CPU cycles.
- Performance Monitoring: The Frigate UI includes a real-time dashboard showing FPS (frames per second processed), inference speed (ms per detection), and camera-specific metrics. This helps identify bottlenecks—a camera dropping below 5fps indicates the CPU or TPU is saturated.
- NVR Redundancy: Frigate can be set up with multiple instances (e.g., one in-house, one at a remote location) and configured to record to a network mount. This provides failover if one server goes offline.
Security and Privacy Considerations
Since Frigate operates entirely locally, it inherently addresses privacy concerns associated with cloud-based NVRs. However, several best practices enhance security:
- Network Segmentation: Place Frigate and your cameras on a VLAN separate from your main network. Only allow the Frigate server to access the camera subnet. This prevents compromised cameras from being used as entry points to your personal devices.
- Authentication: Frigate supports OAuth and Google/Home Assistant login integration. Enable authentication for the web UI. For MQTT, use TLS and credentials.
- Encryption: If accessing Frigate remotely, use a reverse proxy (e.g., Nginx or Traefik) with HTTPS. Alternatively, expose Frigate only via Home Assistant’s secure remote access (Nabu Casa) rather than opening a port directly.
- Storage Encryption: Consider encrypting the volume where recordings are stored, especially if using cloud-synced storage or removable drives.
Comparing Frigate to Commercial NVR Solutions
Frigate occupies a unique space between consumer-grade systems (like Nest or Ring) and enterprise NVRs (like Milestone or Genetec).
- Cost: Frigate is free and open-source. You pay for hardware (server, TPU, cameras). A high-end Frigate build costs $300-$800, excluding cameras. Commercial AI NVRs with similar object detection capabilities start at $1,500 and often require per-camera licensing.
- Privacy: Cloud NVRs require subscription fees and upload video to servers. Frigate keeps everything local. This is crucial for users who want to avoid storing footage on corporate servers.
- Customizability: Commercial systems offer limited configuration. Frigate allows you to write your own detection logic, define complex zone hierarchies, and integrate with any MQTT-capable system. However, this flexibility comes with a steeper learning curve.
- Reliability: Frigate’s performance is directly tied to the quality of your hardware and network. A commercial NVR is a turnkey appliance. Frigate can fail if Docker misbehaves, the Coral TPU disconnects, or the database becomes corrupt (though it has built-in recovery tools).
Common Pitfalls and Troubleshooting
Understanding frequent issues streamlines deployment. The most common problem is high CPU usage, often caused by running object detection on the CPU without a Coral TPU. Solution: reduce detection FPS, switch to CPU-inference with TensorFlow Lite (which is slower but functional), or add a Coral. Another frequent issue involves RTSP stream drops; this is usually a camera firmware or network bandwidth problem. Frigate’s go2rtc module can often stabilize streams by reconnecting automatically, but persistent drops require adjusting the camera’s bitrate or frame rate. Users also report false positives due to motion thresholds set too low; raising the motion.contour_area value to 50-100 eliminates tiny movements like bugs or rain.