Frigate: Local NVR With Real Object Detection

A network video recorder that tells the difference between a person and a passing cat, entirely on your own hardware

Contents

For years my cameras were dumb. They recorded to a hard drive around the clock, motion detection meant “a shadow moved”, and reviewing footage was an exercise in scrubbing through six hours of swaying branches to find the two seconds that mattered. Every cloud camera that promised “AI person detection” wanted a monthly fee and a copy of my front garden uploaded to someone else’s servers. I wasn’t willing to pay a subscription to watch my own doorstep, and I was even less willing to stream it off-site.

Frigate is the answer to both objections. It’s a network video recorder that runs on your own hardware, ingests your existing cameras over RTSP, and runs real object detection on the video — so it can tell you “a person appeared in the driveway at 22:14” instead of “something moved”. Crucially, the detection happens locally, the footage stays on your disk, and there is no cloud in the loop at all. It integrates cleanly with Home Assistant, and once it’s tuned it turns a wall of useless motion alerts into a handful of genuinely useful ones. Let me explain the architecture first, because getting the hardware right is what separates a Frigate that hums along from one that pins your CPU at 100% and lies about it.

Why object detection changes everything

Advertisement

Traditional motion detection works on pixel changes. A cloud moves, the light shifts, a spider builds a web across the lens overnight, and your phone buzzes at 3am. The signal-to-noise ratio is dreadful, and dreadful alerts get ignored, which defeats the entire purpose of having cameras. After a week of false alarms you mute the notifications, and now the system is decorative.

Object detection asks a different question. The question stops being “did pixels change?” and becomes “is there a person in this frame?” A neural network trained on millions of labelled images looks at the video and returns labelled bounding boxes — person, car, dog, cat — with a confidence score. Frigate uses motion as a cheap first pass to decide where to look, then runs the expensive detection model only on those regions. That two-stage design is what makes real-time detection feasible on modest hardware, and it’s why the hardware you give the detection stage matters so much.

The hardware decision that makes or breaks it

Running a detection model on every interesting frame from several cameras is a lot of arithmetic. You have three realistic options, and choosing wrong is the number one reason people bounce off Frigate.

A Google Coral TPU. This is a small USB or M.2 device built to do exactly one thing — run these detection models — and it does it for a couple of watts while barely troubling your CPU. A Coral will happily handle several cameras with inference times in single-digit milliseconds. If you’re buying anything for Frigate, buy this first. It’s the difference between a server that idles and one that roars.

A modern Intel iGPU via OpenVINO. Recent Frigate versions can run detection on Intel integrated graphics, which is a genuinely good option if you already have a machine with a capable iGPU and don’t want another dongle. Inference is slower than a Coral but perfectly workable for a handful of cameras.

Bare CPU. Frigate will run detection on the CPU, and for one low-resolution camera you might get away with it. Point four cameras at CPU detection and you’ll melt a core, inference times balloon, and Frigate starts skipping frames — which means it misses the person it exists to catch. Treat CPU detection as a way to test the config, then get a Coral before you rely on it.

The other side of the hardware story is storage and the camera feeds themselves. Frigate wants two streams from each camera: a low-resolution “detect” stream it analyses continuously, and the full-resolution “record” stream it saves to disk. Modern IP cameras expose both as separate RTSP URLs (a main and a sub stream), and using the sub stream for detection is what keeps the workload sane. Recording eats disk fast, so budget for it and put Frigate’s media directory somewhere you’re happy to fill — and somewhere that’s part of your backup thinking.

A working configuration

Advertisement

Frigate is configured with a single YAML file and runs as a container. Here’s a compact deployment plus the config for one camera pulling both streams, using a Coral for detection:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# docker-compose.yml
services:
  frigate:
    image: ghcr.io/blakeblackshear/frigate:stable
    container_name: frigate
    restart: unless-stopped
    privileged: true                 # simplest path for Coral USB passthrough
    shm_size: "256mb"                # bump for more cameras
    devices:
      - /dev/bus/usb:/dev/bus/usb    # Coral USB
    volumes:
      - ./config:/config
      - ./media:/media/frigate
      - type: tmpfs
        target: /tmp/cache
        tmpfs:
          size: 1000000000
    ports:
      - "5000:5000"                  # web UI
      - "8554:8554"                  # RTSP restream
    environment:
      - FRIGATE_RTSP_PASSWORD=changeme
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# config/config.yml
mqtt:
  host: 192.168.1.10                 # your local MQTT broker
detectors:
  coral:
    type: edgetpu
    device: usb
cameras:
  driveway:
    ffmpeg:
      inputs:
        - path: rtsp://user:{FRIGATE_RTSP_PASSWORD}@192.168.1.50:554/sub
          roles: [detect]
        - path: rtsp://user:{FRIGATE_RTSP_PASSWORD}@192.168.1.50:554/main
          roles: [record]
    detect:
      width: 640
      height: 480
    objects:
      track:
        - person
        - car
    record:
      enabled: true
      retain:
        days: 7
        mode: motion
    snapshots:
      enabled: true

That config records the driveway on motion for seven days, keeps snapshots of every detected person and car, and publishes events to MQTT so Home Assistant can act on them. Note the addresses are placeholder RFC1918 ranges — put your own broker and camera IPs in, and never expose port 5000 to the internet.

Zones and masks: turning detection into intent

Raw object detection tells you a person exists somewhere in frame. What you usually want is something more specific: a person in the driveway, or at the front door, rather than a pedestrian on the pavement forty metres away. This is where zones and masks earn their keep, and learning them is the step that takes Frigate from noisy to genuinely useful.

A zone is a polygon you draw on the camera view — the driveway, the doorstep, the path — and Frigate reports when a tracked object enters it. You can then build automations that fire only for the zone you care about, so a person crossing the public pavement never triggers anything while a person stepping onto your property does. A mask is the opposite: an area you tell Frigate to ignore entirely, which is how you kill the false positives from a swaying tree, a busy road, or the corner of the frame where a reflection off a window fools the model. Spend twenty minutes drawing zones and motion masks per camera and your false-alarm rate collapses. Skip it and you’ll blame the model for noise that’s really a configuration gap.

There’s also a review workflow worth understanding, because it changes how you live with the footage. Recent Frigate versions group detections into review items — segments flagged as containing an alert (a person, a car) versus mere detections — so instead of scrubbing hours of timeline you open the review page and see a short list of moments that actually mattered, each with a clip. That triage is the everyday payoff: the point of object detection was never just smarter alerts, it was making the recorded footage searchable by what happened rather than when. Finding the moment the parcel was left becomes a ten-second job instead of a coffee-fuelled scrub through the afternoon.

One more design decision that matters: give each camera a sensible frame rate for detection. You don’t need 30fps to spot a person walking up a path — 5fps for the detect stream is plenty, and it slashes the inference workload, letting a single detector cover more cameras. Keep the high frame rate for the record stream where you actually want smooth footage, and let the detect stream run lean. This pairing of a lean detect stream with a full-quality record stream is the core efficiency trick, and it’s the thing most first-time configs get wrong.

Wiring it into the wider system

Frigate publishes events to MQTT, and the official Home Assistant integration turns those into entities: a binary sensor per camera that goes on when a person is detected, camera entities for live view, and rich event data you can build automations on. This is where Frigate stops being a security-camera app and becomes part of the house. A person in the driveway after dark can trigger a light, announce on a speaker, and send a notification with a snapshot attached — and because the whole chain is local, it works when the internet is down.

The natural place to build that logic is a Node-RED flow, where you can combine a Frigate person event with the time of day and whether anyone’s home before deciding whether to bother you. And because Frigate can share its object detection with the rest of your presence stack, it complements indoor mmWave presence sensors rather than duplicating them: the cameras watch the perimeter, the mmWave sensors handle inside.

Troubleshooting the things that will go wrong

CPU is pinned and inference times are climbing. You’re detecting on the full-resolution stream, or detecting on CPU, or both. Confirm your detect role points at the low-res sub stream, keep the detect resolution modest (640x480 is plenty), and if you’re on CPU, this is the moment to buy a Coral. Watch the inference speed on the System page — anything much above 15ms on a Coral means something is misconfigured.

The Coral isn’t detected. USB Corals are fussy about power and about which port they’re on. Give it a powered USB port or a good direct connection, confirm the /dev/bus/usb passthrough is present, and check the logs for the TPU initialising. A Coral that enumerates as a different USB ID after its first inference is normal — that catches people who think it vanished.

Cameras keep dropping and reconnecting. Usually the camera can’t serve two simultaneous RTSP streams, or ffmpeg is choking on the codec. Some cheaper cameras only allow a limited number of connections; Frigate’s built-in restream (go2rtc) can pull one connection and fan it out, which fixes both the connection limit and the reconnect churn. Check the camera’s own settings for a substream and make sure it’s actually enabled.

Recordings are eating the disk. Recording in all mode saves everything around the clock. Switch to mode: motion or mode: active_objects so you only keep footage that contains movement or detected objects, and set a sane retain.days. Frigate will happily fill a 4TB disk in a fortnight if you let it.

Detection misses people at the edge of frame or in the dark. Tune the object filters — Frigate lets you set minimum and maximum bounding-box sizes and mask out areas (a busy road, a neighbour’s garden) that generate noise. For night-time, the detection model needs a usable image, so a camera with a decent IR illuminator matters more than any config tweak.

The verdict

Frigate is the single best upgrade I’ve made to home cameras, and I’d struggle to go back to dumb motion recording. It removes the subscription, keeps every frame on hardware you control, and turns a firehose of false alarms into alerts you’ll actually trust. The one real cost is the hardware honesty: you need a Coral or a capable iGPU to run it properly, and pretending CPU detection will scale is how people conclude Frigate is flaky when the flakiness is entirely their own configuration.

If you have IP cameras and a spare machine, budget forty pounds or so for a Coral and give it an afternoon. You’ll end up with a private, capable NVR that answers to your own automations and never sends your front garden to anyone. Just remember that the footage it so diligently records is only as safe as your backups — a dead disk full of un-backed-up recordings is its own kind of lesson.

Advertisement
Advertisement
Smarc
Written by Smarc

Founder and editor of vo.rs. A lifelong tinkerer who self-hosts far more than is sensible, hardens Linux boxes for fun, and prods the latest AI tools to see what they can really do. The how-to guides here are the notes Smarc wishes had existed the first time round.