Initial home camera stack
This commit is contained in:
@@ -0,0 +1,164 @@
|
||||
##############################################################################
|
||||
# Frigate 0.17 - SIMPLE (lower-CPU) variant
|
||||
#
|
||||
# Use if main config.yml uses too much CPU on your hardware.
|
||||
#
|
||||
# Differences vs main config.yml:
|
||||
# - Sub-stream (640x480) used for detect; main stream for record only
|
||||
# - Lower CPU: only the small sub-stream is decoded for detection
|
||||
# - Face recognition still works for close-up faces; struggles at distance
|
||||
# - LPR will rarely succeed (plate area too small in 640x480)
|
||||
# - face_recognition.min_area lowered to 300 to catch smaller faces
|
||||
#
|
||||
# To activate:
|
||||
# cp frigate_config/config.yml frigate_config/config.yml.bak
|
||||
# cp frigate_config/alternatives/config-simple.yml frigate_config/config.yml
|
||||
# docker compose restart frigate
|
||||
##############################################################################
|
||||
|
||||
version: 0.17-0
|
||||
|
||||
mqtt:
|
||||
enabled: true
|
||||
host: mosquitto
|
||||
port: 1883
|
||||
user: "{FRIGATE_MQTT_USER}"
|
||||
password: "{FRIGATE_MQTT_PASSWORD}"
|
||||
topic_prefix: frigate
|
||||
client_id: frigate
|
||||
stats_interval: 60
|
||||
|
||||
tls:
|
||||
enabled: false
|
||||
|
||||
audio:
|
||||
enabled: false
|
||||
|
||||
detectors:
|
||||
coral:
|
||||
type: edgetpu
|
||||
device: usb
|
||||
|
||||
birdseye:
|
||||
mode: continuous
|
||||
|
||||
semantic_search:
|
||||
enabled: false
|
||||
model_size: small
|
||||
|
||||
face_recognition:
|
||||
enabled: true
|
||||
model_size: small
|
||||
min_area: 300 # smaller default since faces will be small on sub-stream
|
||||
|
||||
lpr:
|
||||
enabled: true
|
||||
model_size: small
|
||||
|
||||
classification:
|
||||
bird:
|
||||
enabled: false
|
||||
|
||||
objects:
|
||||
track:
|
||||
- person
|
||||
|
||||
record:
|
||||
enabled: true
|
||||
continuous:
|
||||
days: 0
|
||||
motion:
|
||||
days: 10
|
||||
alerts:
|
||||
retain:
|
||||
days: 360
|
||||
mode: motion
|
||||
detections:
|
||||
retain:
|
||||
days: 360
|
||||
mode: motion
|
||||
|
||||
snapshots:
|
||||
enabled: true
|
||||
bounding_box: true
|
||||
crop: true
|
||||
retain:
|
||||
default: 360
|
||||
|
||||
go2rtc:
|
||||
streams:
|
||||
front_door:
|
||||
- rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@{FRIGATE_FRONT_DOOR_IP}:554/cam/realmonitor?channel=1&subtype=0#backchannel=0
|
||||
front_door_sub:
|
||||
- rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@{FRIGATE_FRONT_DOOR_IP}:554/cam/realmonitor?channel=1&subtype=1#backchannel=0
|
||||
|
||||
back_door:
|
||||
- rtsp://{FRIGATE_RTSP_USER1}:{FRIGATE_RTSP_PASSWORD1}@{FRIGATE_BACK_DOOR_IP}:554/cam/realmonitor?channel=1&subtype=0#backchannel=0
|
||||
back_door_sub:
|
||||
- rtsp://{FRIGATE_RTSP_USER1}:{FRIGATE_RTSP_PASSWORD1}@{FRIGATE_BACK_DOOR_IP}:554/cam/realmonitor?channel=1&subtype=1#backchannel=0
|
||||
|
||||
squirrel:
|
||||
- rtsp://{FRIGATE_RTSP_USER2}:{FRIGATE_RTSP_PASSWORD2}@{FRIGATE_SQUIRREL_IP}:554/cam/realmonitor?channel=1&subtype=0#backchannel=0
|
||||
squirrel_sub:
|
||||
- rtsp://{FRIGATE_RTSP_USER2}:{FRIGATE_RTSP_PASSWORD2}@{FRIGATE_SQUIRREL_IP}:554/cam/realmonitor?channel=1&subtype=1#backchannel=0
|
||||
|
||||
cameras:
|
||||
|
||||
front_door:
|
||||
enabled: true
|
||||
ffmpeg:
|
||||
inputs:
|
||||
- path: rtsp://127.0.0.1:8554/front_door
|
||||
input_args: preset-rtsp-restream
|
||||
roles:
|
||||
- record
|
||||
- path: rtsp://127.0.0.1:8554/front_door_sub
|
||||
input_args: preset-rtsp-restream
|
||||
roles:
|
||||
- detect
|
||||
detect:
|
||||
enabled: true
|
||||
width: 640
|
||||
height: 480
|
||||
fps: 5
|
||||
motion:
|
||||
mask:
|
||||
- 0.582,0.426,0.582,0.476,0.989,0.534,0.994,0.467
|
||||
- 0.984,0.614,0.513,0.99,0.991,0.996
|
||||
- 0.001,0.163,0.085,0.165,0.095,0.255,0.003,0.263
|
||||
|
||||
back_door:
|
||||
enabled: false
|
||||
ffmpeg:
|
||||
inputs:
|
||||
- path: rtsp://127.0.0.1:8554/back_door
|
||||
input_args: preset-rtsp-restream
|
||||
roles:
|
||||
- record
|
||||
- path: rtsp://127.0.0.1:8554/back_door_sub
|
||||
input_args: preset-rtsp-restream
|
||||
roles:
|
||||
- detect
|
||||
detect:
|
||||
enabled: true
|
||||
width: 640
|
||||
height: 480
|
||||
fps: 5
|
||||
|
||||
squirrel:
|
||||
enabled: false
|
||||
ffmpeg:
|
||||
inputs:
|
||||
- path: rtsp://127.0.0.1:8554/squirrel
|
||||
input_args: preset-rtsp-restream
|
||||
roles:
|
||||
- record
|
||||
- path: rtsp://127.0.0.1:8554/squirrel_sub
|
||||
input_args: preset-rtsp-restream
|
||||
roles:
|
||||
- detect
|
||||
detect:
|
||||
enabled: true
|
||||
width: 640
|
||||
height: 480
|
||||
fps: 5
|
||||
@@ -0,0 +1,202 @@
|
||||
##############################################################################
|
||||
# Frigate 0.17 production config
|
||||
#
|
||||
# - Main stream (2688x1520) used for detect + record on each camera
|
||||
# (better face crops at distance, higher CPU)
|
||||
# - Face recognition + LPR enabled (small models, CPU-friendly)
|
||||
# - MQTT enabled for frigate-notify push events
|
||||
#
|
||||
# An alternate lower-CPU config that uses the sub-stream for detect lives at
|
||||
# frigate_config/alternatives/config-simple.yml. To swap:
|
||||
# cp frigate_config/config.yml frigate_config/config.yml.bak
|
||||
# cp frigate_config/alternatives/config-simple.yml frigate_config/config.yml
|
||||
# docker compose restart frigate
|
||||
#
|
||||
# Validate before restart:
|
||||
# docker run --rm \
|
||||
# -v $(pwd)/frigate_config/config.yml:/config/config.yml \
|
||||
# --entrypoint python3 \
|
||||
# ghcr.io/blakeblackshear/frigate:0.17.1 \
|
||||
# -u -m frigate --validate-config
|
||||
##############################################################################
|
||||
|
||||
version: 0.17-0
|
||||
|
||||
mqtt:
|
||||
enabled: true
|
||||
host: mosquitto
|
||||
port: 1883
|
||||
user: "{FRIGATE_MQTT_USER}"
|
||||
password: "{FRIGATE_MQTT_PASSWORD}"
|
||||
topic_prefix: frigate
|
||||
client_id: frigate
|
||||
stats_interval: 60
|
||||
|
||||
tls:
|
||||
enabled: false
|
||||
|
||||
audio:
|
||||
enabled: false # flip on when a mic-equipped camera arrives
|
||||
|
||||
detectors:
|
||||
coral:
|
||||
type: edgetpu
|
||||
device: usb
|
||||
|
||||
birdseye:
|
||||
mode: continuous
|
||||
|
||||
semantic_search:
|
||||
enabled: false
|
||||
model_size: small
|
||||
|
||||
face_recognition:
|
||||
enabled: true
|
||||
model_size: small
|
||||
|
||||
lpr:
|
||||
enabled: true
|
||||
model_size: small
|
||||
# known_plates:
|
||||
# owner:
|
||||
# - "ABC-1234"
|
||||
|
||||
classification:
|
||||
bird:
|
||||
enabled: false
|
||||
|
||||
objects:
|
||||
track:
|
||||
- person
|
||||
|
||||
# ---------- global record defaults (0.17 schema) ----------
|
||||
|
||||
record:
|
||||
enabled: true
|
||||
continuous:
|
||||
days: 0
|
||||
motion:
|
||||
days: 10
|
||||
alerts:
|
||||
retain:
|
||||
days: 360
|
||||
mode: motion
|
||||
detections:
|
||||
retain:
|
||||
days: 360
|
||||
mode: motion
|
||||
|
||||
snapshots:
|
||||
enabled: true
|
||||
bounding_box: true
|
||||
crop: true
|
||||
retain:
|
||||
default: 360
|
||||
|
||||
# ---------- go2rtc: restream from cameras ----------
|
||||
|
||||
go2rtc:
|
||||
streams:
|
||||
front_door:
|
||||
- rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@{FRIGATE_FRONT_DOOR_IP}:554/cam/realmonitor?channel=1&subtype=0#backchannel=0
|
||||
front_door_sub:
|
||||
- rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@{FRIGATE_FRONT_DOOR_IP}:554/cam/realmonitor?channel=1&subtype=1#backchannel=0
|
||||
|
||||
back_door:
|
||||
- rtsp://{FRIGATE_RTSP_USER1}:{FRIGATE_RTSP_PASSWORD1}@{FRIGATE_BACK_DOOR_IP}:554/cam/realmonitor?channel=1&subtype=0#backchannel=0
|
||||
back_door_sub:
|
||||
- rtsp://{FRIGATE_RTSP_USER1}:{FRIGATE_RTSP_PASSWORD1}@{FRIGATE_BACK_DOOR_IP}:554/cam/realmonitor?channel=1&subtype=1#backchannel=0
|
||||
|
||||
squirrel:
|
||||
- rtsp://{FRIGATE_RTSP_USER2}:{FRIGATE_RTSP_PASSWORD2}@{FRIGATE_SQUIRREL_IP}:554/cam/realmonitor?channel=1&subtype=0#backchannel=0
|
||||
squirrel_sub:
|
||||
- rtsp://{FRIGATE_RTSP_USER2}:{FRIGATE_RTSP_PASSWORD2}@{FRIGATE_SQUIRREL_IP}:554/cam/realmonitor?channel=1&subtype=1#backchannel=0
|
||||
|
||||
# ---------- cameras ----------
|
||||
|
||||
cameras:
|
||||
|
||||
front_door:
|
||||
enabled: true
|
||||
ffmpeg:
|
||||
inputs:
|
||||
# Main stream used for both detect and record. Single connection,
|
||||
# higher resolution -> better face recognition crops.
|
||||
- path: rtsp://127.0.0.1:8554/front_door
|
||||
input_args: preset-rtsp-restream
|
||||
roles:
|
||||
- detect
|
||||
- record
|
||||
detect:
|
||||
enabled: true
|
||||
width: 2688 # adjust if your main stream is different
|
||||
height: 1520
|
||||
fps: 5 # detection doesn't need high fps; saves CPU
|
||||
motion:
|
||||
mask:
|
||||
- 0.582,0.426,0.582,0.476,0.989,0.534,0.994,0.467
|
||||
- 0.984,0.614,0.513,0.99,0.991,0.996
|
||||
- 0.001,0.163,0.085,0.165,0.095,0.255,0.003,0.263
|
||||
|
||||
back_door:
|
||||
enabled: false
|
||||
ffmpeg:
|
||||
inputs:
|
||||
- path: rtsp://127.0.0.1:8554/back_door
|
||||
input_args: preset-rtsp-restream
|
||||
roles:
|
||||
- detect
|
||||
- record
|
||||
detect:
|
||||
enabled: true
|
||||
width: 2688
|
||||
height: 1520
|
||||
fps: 5
|
||||
|
||||
squirrel:
|
||||
enabled: false
|
||||
ffmpeg:
|
||||
inputs:
|
||||
- path: rtsp://127.0.0.1:8554/squirrel
|
||||
input_args: preset-rtsp-restream
|
||||
roles:
|
||||
- detect
|
||||
- record
|
||||
detect:
|
||||
enabled: true
|
||||
width: 2688
|
||||
height: 1520
|
||||
fps: 5
|
||||
|
||||
##############################################################################
|
||||
# HOW TO ADD A CAMERA WITH A MIC (e.g., future Anpviz)
|
||||
#
|
||||
# 1. Set audio.enabled: true at the top of this file.
|
||||
#
|
||||
# 2. In go2rtc.streams, add the ffmpeg audio transcode line so live view
|
||||
# has both AAC (for MSE) and opus (for WebRTC):
|
||||
# anpviz:
|
||||
# - rtsp://{FRIGATE_RTSP_USER3}:{FRIGATE_RTSP_PASSWORD3}@{FRIGATE_ANPVIZ_IP}:554/...#backchannel=0
|
||||
# - "ffmpeg:anpviz#audio=aac#audio=opus"
|
||||
#
|
||||
# 3. In cameras, add the 'audio' role and set the audio-aware record preset:
|
||||
# anpviz:
|
||||
# enabled: true
|
||||
# ffmpeg:
|
||||
# output_args:
|
||||
# record: preset-record-generic-audio-aac
|
||||
# inputs:
|
||||
# - path: rtsp://127.0.0.1:8554/anpviz
|
||||
# input_args: preset-rtsp-restream
|
||||
# roles:
|
||||
# - detect
|
||||
# - record
|
||||
# - audio
|
||||
#
|
||||
# 4. Add FRIGATE_RTSP_USER3 / _PASSWORD3 / FRIGATE_ANPVIZ_IP to .env.
|
||||
#
|
||||
# 5. RTSP paths vary by vendor:
|
||||
# Anpviz H-series (Hikvision OEM): /Streaming/Channels/101 (main), /102 (sub)
|
||||
# Anpviz U-series (Dahua OEM): /cam/realmonitor?channel=1&subtype=0 (main)
|
||||
# /cam/realmonitor?channel=1&subtype=1 (sub)
|
||||
##############################################################################
|
||||
Reference in New Issue
Block a user