How blakeblackshear/frigate works
Frigate is a local, AI-enabled NVR for IP cameras, with a web interface and Home Assistant/MQTT integration. The main workflow ingests camera streams, uses motion to focus object detection, tracks activity, and stores recordings and event data for review and live viewing. The graph also preserves documented streaming, recording, and integration capabilities and substantial indexed modules. Some subsystem links rely on README descriptions; unsampled implementations and wiring are not inferred beyond those statements.
Main entry points: app.py Application Runtime · ffmpeg.py Video and FFmpeg · models.py Event and Media Data · maintainer.py Event Processing
Components 25
Camera Ingest
- Video and FFmpeg
frigate/video/ffmpeg.py
Detection and Events
- Motion Detection
frigate/motion/frigate_motion.py - Detector Setup
frigate/detectors/detector_config.py - Object Detectors
frigate/detectors/plugins - Object Tracking
frigate/track/object_processing.py - Event Processing
frigate/events/maintainer.py - Post Processing
frigate/data_processing/post - GenAI Providers
frigate/genai/__init__.py - Embeddings
frigate/embeddings/embeddings.py
Media and Storage
- Event and Media Data
frigate/models.py - Recording
frigate/record/record.py - Retention and Usage
frigate/storage.py - Live Output
frigate/output/output.py
User Interfaces
- HTTP API
frigate/api/fastapi_app.py - Web Interface
web/src/App.tsx
Configuration and Integrations
- Configuration
frigate/config/config.py - Application Runtime
frigate/app.py - Camera Config Updates
frigate/config/camera/updater.py - Process Messaging
frigate/comms/inter_process.py - MQTT Integration
frigate/comms/mqtt.py - Usage Analytics
frigate/analytics/reporter.py
Other components
- NVR Operator
- IP Cameras
- MQTT Broker
- Home Assistant
Connections 28
- NVR Operator → IP Cameras: configures
README.md - IP Cameras → Video and FFmpeg: sends streams
README.md - Configuration → Application Runtime: configures
frigate/app.py - Application Runtime → Camera Config Updates: updates
frigate/app.py - Camera Config Updates → Process Messaging: publishes updates
frigate/config/camera/updater.py - Application Runtime → Video and FFmpeg: starts services
- Video and FFmpeg → Motion Detection: provides frames
README.md - Motion Detection → Object Detectors: focuses detection
README.md - Detector Setup → Object Detectors: configures
frigate/detectors/detector_config.py - Object Detectors → Object Tracking: detects objects
- Object Tracking → Event Processing: tracks activity
- Event Processing → Event and Media Data: stores event data
- Event Processing → Post Processing: dispatches processing
- Post Processing → GenAI Providers: requests descriptions
frigate/data_processing/post/review_descriptions.py - Post Processing → Embeddings: updates embeddings
frigate/data_processing/post/review_descriptions.py - Embeddings → Event and Media Data: stores vectors
frigate/embeddings/embeddings.py - Video and FFmpeg → Recording: records video
README.md - Recording → Event and Media Data: stores recording metadata
- Retention and Usage → Event and Media Data: reads recording data
frigate/storage.py - Video and FFmpeg → Live Output: restreams
README.md - NVR Operator → Web Interface: uses
README.md - Web Interface → HTTP API: requests data
- HTTP API → Event and Media Data: serves event data
- Application Runtime → HTTP API: starts API
frigate/app.py - Application Runtime → MQTT Integration: starts integration
frigate/app.py - MQTT Integration → MQTT Broker: publishes messages
README.md - MQTT Broker → Home Assistant: integrates with
README.md - Application Runtime → Usage Analytics: starts reporting
frigate/app.py