forked from matt8707/hass-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
frigate.yml
332 lines (321 loc) · 13.1 KB
/
frigate.yml
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
mqtt:
host: core-mosquitto
# Optional: port (default: shown below)
port: 1883
# Optional: topic prefix (default: shown below)
# WARNING: must be unique if you are running multiple instances
topic_prefix: frigate
# Optional: client id (default: shown below)
# WARNING: must be unique if you are running multiple instances
client_id: frigate
# Optional: user
user: mqtt_user
# Optional: password
# NOTE: Environment variables that begin with 'FRIGATE_' may be referenced in {}.
# eg. password: '{FRIGATE_MQTT_PASSWORD}'
password: '{FRIGATE_MQTT_PASSWORD}'
# Optional: interval in seconds for publishing stats (default: shown below)
stats_interval: 60
cameras:
main:
ffmpeg:
#hwaccel_args:
input_args:
- -avoid_negative_ts
- make_zero
- -fflags
- nobuffer+genpts+discardcorrupt
- -flags
- low_delay
- -strict
- experimental
- -analyzeduration
- 1000M
- -probesize
- 1000M
# - -rw_timeout
# - "5000000"
# output_args:
# - -f
# - rawvideo
# - -pix_fmt
# - rgb24
inputs:
- path: http://192.168.2.46/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=homeassistant&password=password
# - path: rtsp://homeassistant:[email protected]:554/h264Preview_01_main
roles:
- record
#- rtmp
#- path: http://192.168.2.46/flv?port=1935&app=bcs&stream=channel0_sub.bcs&user=homeassistant&password=password
#- path: rtsp://homeassistant:[email protected]:554/h264Preview_01_sub
- path: rtmp://192.168.2.46/bcs/channel0_ext.bcs?channel=0&user=homeassistant&password=password
roles:
- detect
rtmp:
enabled: False # <-- RTMP should be disabled if your stream is not H264
garage:
ffmpeg:
#hwaccel_args:
input_args:
- -avoid_negative_ts
- make_zero
- -fflags
- nobuffer+genpts+discardcorrupt
- -flags
- low_delay
- -strict
- experimental
- -analyzeduration
- 1000M
- -probesize
- 1000M
#- -rw_timeout
#- "5000000"
inputs:
- path: http://192.168.2.47/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=homeassistant&password=password
#- path: rtsp://homeassistant:[email protected]:554/h264Preview_01_main
roles:
- record
#- rtmp
#- path: http://192.168.2.47/flv?port=1935&app=bcs&stream=channel0_sub.bcs&user=homeassistant&password=password
#- path: rtsp://homeassistant:[email protected]:554/h264Preview_01_sub
- path: rtmp://192.168.2.47/bcs/channel0_ext.bcs?channel=0&user=homeassistant&password=password
roles:
- detect
rtmp:
enabled: False # <-- RTMP should be disabled if your stream is not H264
motion:
mask:
- 341,0,640,0,640,135
objects:
filters:
bird:
mask:
- 397,0,640,0,640,136
car:
mask:
- 397,0,640,0,640,136
- 0,286,0,480,640,480,640,0,201,0
cat:
mask:
- 397,0,640,0,640,136
dog:
mask:
- 397,0,640,0,640,136
person:
mask:
- 397,0,640,0,640,136
garden:
ffmpeg:
#hwaccel_args:
input_args:
- -avoid_negative_ts
- make_zero
- -fflags
- nobuffer+genpts+discardcorrupt
- -flags
- low_delay
- -strict
- experimental
- -analyzeduration
- 1000M
- -probesize
- 1000M
#- -rw_timeout
#- "5000000"
inputs:
- path: http://192.168.2.48/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=homeassistant&password=password
roles:
- record
#- rtmp
#- path: http://192.168.2.48/flv?port=1935&app=bcs&stream=channel0_sub.bcs&user=homeassistant&password=password
- path: rtmp://192.168.2.48/bcs/channel0_ext.bcs?channel=0&user=homeassistant&password=password
roles:
- detect
rtmp:
enabled: False
motion:
mask:
- 97,75,310,0,0,0,0,171
- 640,268,640,0,551,0
# width: 640
# height: 480
# fps: 5
# clips:
# # Required: enables clips for the camera (default: shown below)
# # This value can be set via MQTT and will be updated in startup based on retained value
# enabled: True
# # Optional: Number of seconds before the event to include in the clips (default: shown below)
# pre_capture: 5
# # Optional: Number of seconds after the event to include in the clips (default: shown below)
# post_capture: 5
# # Optional: Objects to save clips for. (default: all tracked objects)
# objects:
# - person
# # Optional: Restrict clips to objects that entered any of the listed zones (default: no required zones)
# #required_zones: []
# # Optional: Camera override for retention settings (default: global values)
# retain:
# # Required: Default retention days (default: shown below)
# default: 10
# # Optional: Per object retention days
# objects:
# person: 15
# snapshots:
# # Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
# # This value can be set via MQTT and will be updated in startup based on retained value
# enabled: True
# # Optional: print a timestamp on the snapshots (default: shown below)
# timestamp: False
# # Optional: draw bounding box on the snapshots (default: shown below)
# bounding_box: True
# # Optional: crop the snapshot (default: shown below)
# crop: False
# # Optional: height to resize the snapshot to (default: original size)
# height: 175
# # Optional: Restrict snapshots to objects that entered any of the listed zones (default: no required zones)
# #required_zones: []
# # Optional: Camera override for retention settings (default: global values)
# retain:
# # Required: Default retention days (default: shown below)
# default: 10
# # Optional: Per object retention days
# objects:
# person: 15
detectors:
cpu1:
type: cpu
num_threads: 3
detect:
# Optional: width of the frame for the input with the detect role (default: shown below)
#width: 640
# Optional: height of the frame for the input with the detect role (default: shown below)
#height: 480
width: 896
height: 672
# Optional: desired fps for your camera for the input with the detect role (default: shown below)
# NOTE: Recommended value of 5. Ideally, try and reduce your FPS on the camera.
fps: 5
# Optional: enables detection for the camera (default: True)
# This value can be set via MQTT and will be updated in startup based on retained value
enabled: True
# Optional: Number of frames without a detection before frigate considers an object to be gone. (default: 5x the frame rate)
max_disappeared: 25
# Optional: Configuration for stationary object tracking
stationary:
# Optional: Frequency for running detection on stationary objects (default: shown below)
# When set to 0, object detection will never be run on stationary objects. If set to 10, it will be run on every 10th frame.
interval: 0
# Optional: Number of frames without a position change for an object to be considered stationary (default: 10x the frame rate or 10s)
threshold: 50
# Optional: Define a maximum number of frames for tracking a stationary object (default: not set, track forever)
# This can help with false positives for objects that should only be stationary for a limited amount of time.
# It can also be used to disable stationary object tracking. For example, you may want to set a value for person, but leave
# car at the default.
# WARNING: Setting these values overrides default behavior and disables stationary object tracking.
# There are very few situations where you would want it disabled. It is NOT recommended to
# copy these values from the example config into your config unless you know they are needed.
max_frames:
# Optional: Default for all object types (default: not set, track forever)
default: 3000
# Optional: Object specific values
objects:
person: 1000
objects:
# Optional: list of objects to track from labelmap.txt (default: shown below)
track:
- person
#- car
- dog
snapshots:
# # Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
# # This value can be set via MQTT and will be updated in startup based on retained value
enabled: True
# # Optional: print a timestamp on the snapshots (default: shown below)
# timestamp: False
# # Optional: draw bounding box on the snapshots (default: shown below)
# bounding_box: True
# # Optional: crop the snapshot (default: shown below)
# crop: False
# # Optional: height to resize the snapshot to (default: original size)
# height: 175
# # Optional: Restrict snapshots to objects that entered any of the listed zones (default: no required zones)
# #required_zones: []
# # Optional: Camera override for retention settings (default: global values)
retain:
# # Required: Default retention days (default: shown below)
default: 10
# # Optional: Per object retention days
objects:
person: 15
birdseye:
# Optional: Enable birdseye view (default: shown below)
enabled: True
# Optional: Width of the output resolution (default: shown below)
width: 1280
# Optional: Height of the output resolution (default: shown below)
height: 720
# Optional: Encoding quality of the mpeg1 feed (default: shown below)
# 1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources.
quality: 8
# Optional: Mode of the view. Available options are: objects, motion, and continuous
# objects - cameras are included if they have had a tracked object within the last 30 seconds
# motion - cameras are included if motion was detected in the last 30 seconds
# continuous - all cameras are included always
mode: continuous
record:
# Optional: Enable recording (default: shown below)
# WARNING: If recording is disabled in the config, turning it on via
# the UI or MQTT later will have no effect.
# WARNING: Frigate does not currently support limiting recordings based
# on available disk space automatically. If using recordings,
# you must specify retention settings for a number of days that
# will fit within the available disk space of your drive or Frigate
# will crash.
enabled: True
# Optional: Number of minutes to wait between cleanup runs (default: shown below)
# This can be used to reduce the frequency of deleting recording segments from disk if you want to minimize i/o
expire_interval: 60
# Optional: Retention settings for recording
retain:
# Optional: Number of days to retain recordings regardless of events (default: shown below)
# NOTE: This should be set to 0 and retention should be defined in events section below
# if you only want to retain recordings of events.
days: 7
# Optional: Mode for retention. Available options are: all, motion, and active_objects
# all - save all recording segments regardless of activity
# motion - save all recordings segments with any detected motion
# active_objects - save all recording segments with active/moving objects
# NOTE: this mode only applies when the days setting above is greater than 0
mode: all
# Optional: Event recording settings
events:
# Optional: Number of seconds before the event to include (default: shown below)
pre_capture: 5
# Optional: Number of seconds after the event to include (default: shown below)
post_capture: 5
# Optional: Objects to save recordings for. (default: all tracked objects)
objects:
- person
- dog
# Optional: Restrict recordings to objects that entered any of the listed zones (default: no required zones)
required_zones: []
# Optional: Retention settings for recordings of events
retain:
# Required: Default retention days (default: shown below)
default: 10
# Optional: Mode for retention. (default: shown below)
# all - save all recording segments for events regardless of activity
# motion - save all recordings segments for events with any detected motion
# active_objects - save all recording segments for event with active/moving objects
#
# NOTE: If the retain mode for the camera is more restrictive than the mode configured
# here, the segments will already be gone by the time this mode is applied.
# For example, if the camera retain mode is "motion", the segments without motion are
# never stored, so setting the mode to "all" here won't bring them back.
mode: motion
# Optional: Per object retention days
objects:
person: 15
database:
path: /config/frigate.db