WIP feat(frigate): BREAKING-CHANGE Restructure configuration and add per camera config (#5412)

* remove defaults from ffmpeg

* add required to questions for Model

* update detect section for defaults and requireds

* fix defaults for birdseye

* fix defaults and requireds for Motion

* fix defaults and requireds for Record

* fix defaults and requireds for Snapshots

* fix defaults in Live

* fix defaults and requireds for Timestamp_Style

* bump version

* add missing end tag for record>events

* add "" values for enum questions

* remove hardcoded defaults in values.yaml

* fix lint error. Add space at beginning of comment

* lint error. Including mqtt host

* try to fix lint. Blank out fields in values.yaml

* Put integer defaults back in the questions

* revert values.yaml to have defaults

* Clarify names of nested render_config questions

* sparse mqtt

* detectors

* model

* logger

* birdseye

* ff

* detect

* objects

* motion

* record

* rtmp and live

* cameras

* cameras

* pipe

* fix ffmepg

* update questions

* clear args

* split few things

* obj

* moree

* timstamp

* snapshots

* split more

* fix sytnax highlighting

* fix questions

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
Signed-off-by: mgale456 <55673155+mgale456@users.noreply.github.com>
Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
Co-authored-by: Stavros kois <s.kois@outlook.com>
This commit is contained in:
mgale456
2023-01-21 14:02:26 +02:00
committed by GitHub
co-authored by Stavros Kois Stavros kois
parent 5e0336aad9
commit 72ca65cae6
5 changed files with 759 additions and 550 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ sources:
- https://github.com/blakeblackshear/frigate - https://github.com/blakeblackshear/frigate
- https://hub.docker.com/r/blakeblackshear/frigate - https://hub.docker.com/r/blakeblackshear/frigate
type: application type: application
version: 5.0.14 version: 6.0.0
annotations: annotations:
truecharts.org/catagories: | truecharts.org/catagories: |
- nvr - nvr
+154 -102
View File
@@ -31,28 +31,25 @@ questions:
label: Port label: Port
schema: schema:
type: int type: int
required: true
default: 1883 default: 1883
- variable: topic_prefix - variable: topic_prefix
label: Topic Prefix label: Topic Prefix
description: Must be unique if you are running multiple instances description: Must be unique if you are running multiple instances
schema: schema:
type: string type: string
required: true default: ""
default: frigate - variable: client_id
- variable: topic_prefix
label: Client ID label: Client ID
description: Must be unique if you are running multiple instances description: Must be unique if you are running multiple instances
schema: schema:
type: string type: string
required: true default: ""
default: frigate
- variable: stats_interval - variable: stats_interval
label: Stats Interval label: Stats Interval
description: Interval in seconds for publishing stats description: Interval in seconds for publishing stats
schema: schema:
type: int type: int
required: true "null": true
default: 60 default: 60
- variable: user - variable: user
label: Username label: Username
@@ -86,7 +83,7 @@ questions:
default: [] default: []
items: items:
- variable: detector_entry - variable: detector_entry
label: Detector Entry label: ""
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
@@ -121,8 +118,8 @@ questions:
description: This value is only used for CPU types description: This value is only used for CPU types
schema: schema:
type: int type: int
"null": true
show_if: [["type", "=", "cpu"]] show_if: [["type", "=", "cpu"]]
default: 3
- variable: model - variable: model
label: Model label: Model
schema: schema:
@@ -137,34 +134,36 @@ questions:
default: false default: false
show_subquestions_if: true show_subquestions_if: true
subquestions: subquestions:
- variable: path
label: Path
schema:
type: string
default: /edgetpu_model.tflite
- variable: labelmap_path
label: Label Map Path
schema:
type: string
default: /labelmap.txt
- variable: width - variable: width
label: Width label: Width
schema: schema:
type: int type: int
required: true
default: 320 default: 320
- variable: height - variable: height
label: Height label: Height
schema: schema:
type: int type: int
required: true
default: 320 default: 320
- variable: path
label: Path
schema:
type: string
default: ""
- variable: labelmap_path
label: Label Map Path
schema:
type: string
default: ""
- variable: labelmap - variable: labelmap
label: LabelMap Configuration label: Label Map Configuration
schema: schema:
type: list type: list
default: [] default: []
items: items:
- variable: labelmap_entry - variable: labelmap_entry
label: LabelMap Entry label: ""
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
@@ -173,11 +172,13 @@ questions:
label: Model label: Model
schema: schema:
type: string type: string
required: true
default: "" default: ""
- variable: name - variable: name
label: Name label: Name
schema: schema:
type: string type: string
required: true
default: "" default: ""
- variable: logger - variable: logger
label: Logger label: Logger
@@ -217,7 +218,7 @@ questions:
default: [] default: []
items: items:
- variable: component_entry - variable: component_entry
label: Component Specific Log Entry label: ""
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
@@ -271,15 +272,13 @@ questions:
description: Width of the output resolution description: Width of the output resolution
schema: schema:
type: int type: int
required: true "null": true
default: 1280
- variable: height - variable: height
label: Height label: Height
description: Height of the output resolution description: Height of the output resolution
schema: schema:
type: int type: int
required: true "null": true
default: 720
- variable: quality - variable: quality
label: Quality label: Quality
description: Encoding quality of the mpeg1 feed. Where 1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources. description: Encoding quality of the mpeg1 feed. Where 1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources.
@@ -287,7 +286,6 @@ questions:
type: int type: int
min: 1 min: 1
max: 31 max: 31
required: true
default: 8 default: 8
- variable: mode - variable: mode
label: Mode label: Mode
@@ -298,9 +296,10 @@ questions:
Continuous - All cameras are included always. Continuous - All cameras are included always.
schema: schema:
type: string type: string
required: true default: ""
default: objects
enum: enum:
- value: ""
description: Inherit
- value: objects - value: objects
description: Objects description: Objects
- value: motion - value: motion
@@ -325,20 +324,18 @@ questions:
label: Global Args label: Global Args
schema: schema:
type: string type: string
required: true default: ""
default: -hide_banner -loglevel warning
- variable: input_args
label: Input Args
schema:
type: string
required: true
default: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1
- variable: hwaccel_args - variable: hwaccel_args
label: HW Acceleration Args label: HW Acceleration Args
description: See hardware acceleration docs for your specific device description: See hardware acceleration docs for your specific device
schema: schema:
type: string type: string
default: "" default: ""
- variable: input_args
label: Input Args
schema:
type: string
default: ""
- variable: output_args - variable: output_args
label: Output Args label: Output Args
schema: schema:
@@ -349,20 +346,17 @@ questions:
label: Detect label: Detect
schema: schema:
type: string type: string
required: true default: ""
default: -f rawvideo -pix_fmt yuv420p
- variable: record - variable: record
label: Record label: Record
schema: schema:
type: string type: string
required: true default: ""
default: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an
- variable: rtmp - variable: rtmp
label: RTMP label: RTMP
schema: schema:
type: string type: string
required: true default: ""
default: -c copy -f flv
- variable: detect - variable: detect
label: Detect label: Detect
schema: schema:
@@ -388,29 +382,25 @@ questions:
description: Width of the frame for the input with the detect role description: Width of the frame for the input with the detect role
schema: schema:
type: int type: int
required: true "null": true
default: 1280
- variable: height - variable: height
label: Height label: Height
description: Height of the frame for the input with the detect role description: Height of the frame for the input with the detect role
schema: schema:
type: int type: int
required: true "null": true
default: 720
- variable: fps - variable: fps
label: FPS label: FPS
description: Desired fps for your camera for the input with the detect role. Recommended value of 5. Ideally, try and reduce your FPS on the camera. description: Desired fps for your camera for the input with the detect role. Recommended value of 5. Ideally, try and reduce your FPS on the camera.
schema: schema:
type: int type: int
required: true "null": true
default: 5
- variable: max_disappeared - variable: max_disappeared
label: Max Disappeared label: Max Disappeared
description: Number of frames without a detection before frigate considers an object to be gone. description: Number of frames without a detection before frigate considers an object to be gone.
schema: schema:
type: int type: int
required: true "null": true
default: 25
- variable: stationary - variable: stationary
label: Stationary label: Stationary
schema: schema:
@@ -425,15 +415,13 @@ questions:
If set to 10, object detection will run to confirm the object still exists on every 10th frame. If set to 10, object detection will run to confirm the object still exists on every 10th frame.
schema: schema:
type: int type: int
required: true "null": true
default: 0
- variable: threshold - variable: threshold
label: Threshold label: Threshold
description: Number of frames without a position change for an object to be considered stationary description: Number of frames without a position change for an object to be considered stationary
schema: schema:
type: int type: int
required: true "null": true
default: 50
- variable: set_max_frames - variable: set_max_frames
label: Set Max Frames label: Set Max Frames
schema: schema:
@@ -616,7 +604,7 @@ questions:
50 - low sensitivity 50 - low sensitivity
schema: schema:
type: int type: int
default: 30 "null": true
- variable: delta_alpha - variable: delta_alpha
label: Delta Alpha label: Delta Alpha
description: | description: |
@@ -646,7 +634,7 @@ questions:
of higher CPU usage. Lower values result in less CPU, but small changes may not register as motion. of higher CPU usage. Lower values result in less CPU, but small changes may not register as motion.
schema: schema:
type: int type: int
default: 50 "null": true
- variable: mask - variable: mask
label: Mask label: Mask
description: See docs for more detailed info on creating masks description: See docs for more detailed info on creating masks
@@ -664,7 +652,7 @@ questions:
description: Delay when updating camera motion through MQTT from ON -> OFF description: Delay when updating camera motion through MQTT from ON -> OFF
schema: schema:
type: int type: int
default: 30 "null": true
- variable: record - variable: record
label: Record label: Record
schema: schema:
@@ -694,10 +682,9 @@ questions:
description: Number of minutes to wait between cleanup runs description: Number of minutes to wait between cleanup runs
schema: schema:
type: int type: int
required: true "null": true
default: 60
- variable: retain - variable: retain
label: Retain label: Record > Retain
description: Retention settings for recording description: Retention settings for recording
schema: schema:
additional_attrs: true additional_attrs: true
@@ -717,8 +704,7 @@ questions:
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. 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.
schema: schema:
type: int type: int
required: true "null": true
default: 0
- variable: mode - variable: mode
label: Mode label: Mode
description: | description: |
@@ -730,9 +716,10 @@ questions:
schema: schema:
type: string type: string
show_if: [["days", "!=", 0]] show_if: [["days", "!=", 0]]
required: true default: ""
default: all
enum: enum:
- value: ""
description: Inherit
- value: all - value: all
description: All description: All
- value: motion - value: motion
@@ -740,26 +727,32 @@ questions:
- value: active_objects - value: active_objects
description: Active Objects description: Active Objects
- variable: events - variable: events
label: Events label: Record > Events
description: Event recording settings description: Event recording settings
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
attrs: attrs:
- variable: render_config
label: Render Configuration
description: Enable it to add the configuration in the config file
schema:
type: boolean
default: false
show_subquestions_if: true
subquestions:
- variable: pre_capture - variable: pre_capture
label: Pre Capture label: Pre Capture
description: Number of seconds before the event to include description: Number of seconds before the event to include
schema: schema:
type: int type: int
required: true "null": true
default: 5
- variable: post_capture - variable: post_capture
label: Post Capture label: Post Capture
description: Number of seconds after the event to include description: Number of seconds after the event to include
schema: schema:
type: int type: int
required: true "null": true
default: 5
- variable: objects - variable: objects
label: Objects label: Objects
description: Objects to save recordings for. Defaults to all objects. description: Objects to save recordings for. Defaults to all objects.
@@ -768,7 +761,7 @@ questions:
default: [] default: []
items: items:
- variable: object_entry - variable: object_entry
label: Object Entry label: ""
schema: schema:
type: string type: string
required: true required: true
@@ -781,13 +774,13 @@ questions:
default: [] default: []
items: items:
- variable: zone_entry - variable: zone_entry
label: Zone Entry label: ""
schema: schema:
type: string type: string
required: true required: true
default: "" default: ""
- variable: retain - variable: retain
label: Retain label: Record > Events > Retain
description: Retention settings for recordings of events description: Retention settings for recordings of events
schema: schema:
additional_attrs: true additional_attrs: true
@@ -816,9 +809,10 @@ questions:
Active Objects - save all recording segments for event with active/moving objects Active Objects - save all recording segments for event with active/moving objects
schema: schema:
type: string type: string
required: true default: ""
default: motion
enum: enum:
- value: ""
description: Inherit
- value: all - value: all
description: All description: All
- value: motion - value: motion
@@ -833,7 +827,7 @@ questions:
default: [] default: []
items: items:
- variable: objects_entry - variable: objects_entry
label: Objects Entry label: ""
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
@@ -918,8 +912,8 @@ questions:
required: true required: true
default: "" default: ""
- variable: retain - variable: retain
label: Retain label: Snapshots > Retain
description: Retention settings for recordings of events description: Retention settings for snapshots of events
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
@@ -1007,8 +1001,7 @@ questions:
reduce bandwidth required for viewing the live stream. Width is computed to match known aspect ratio. reduce bandwidth required for viewing the live stream. Width is computed to match known aspect ratio.
schema: schema:
type: int type: int
required: true "null": true
default: 720
- variable: quality - variable: quality
label: Quality label: Quality
description: | description: |
@@ -1016,7 +1009,6 @@ questions:
1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources. 1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources.
schema: schema:
type: int type: int
required: true
min: 1 min: 1
max: 31 max: 31
default: 8 default: 8
@@ -1039,9 +1031,10 @@ questions:
description: Position of the timestamp description: Position of the timestamp
schema: schema:
type: string type: string
required: true default: ""
default: tl
enum: enum:
- value: ""
description: Inherit
- value: tl - value: tl
description: Top Left description: Top Left
- value: tr - value: tr
@@ -1052,17 +1045,24 @@ questions:
description: Bottom Right description: Bottom Right
- variable: format - variable: format
label: Format label: Format
description: Format specifier conform to the Python package "datetime" description: Format specifier conform to the Python package <datetime>
schema: schema:
type: string type: string
required: true default: ""
default: "%m/%d/%Y %H:%M:%S"
- variable: color - variable: color
label: Color label: Timestamp Style > Color
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
attrs: attrs:
- variable: render_config
label: Render Configuration
description: Enable it to add the configuration in the config file
schema:
type: boolean
default: false
show_subquestions_if: true
subquestions:
- variable: red - variable: red
label: Red label: Red
schema: schema:
@@ -1086,20 +1086,21 @@ questions:
description: Line thickness of font description: Line thickness of font
schema: schema:
type: int type: int
required: true "null": true
default: 2
- variable: effect - variable: effect
label: Effect label: Effect
description: | description: |
Effect of lettering Effect of lettering
Inherit - Inherit from default configuration
None - No effect None - No effect
Solid - Solid background in inverse color of font Solid - Solid background in inverse color of font
Shadow - Shadow for font Shadow - Shadow for font
schema: schema:
type: string type: string
required: true default: ""
default: None
enum: enum:
- value: ""
description: Inherit
- value: None - value: None
description: None description: None
- value: solid - value: solid
@@ -1140,7 +1141,7 @@ questions:
default: [] default: []
items: items:
- variable: input_entry - variable: input_entry
label: Input Entry label: ""
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
@@ -1160,7 +1161,7 @@ questions:
default: [] default: []
items: items:
- variable: role_entry - variable: role_entry
label: Role Entry label: ""
schema: schema:
type: string type: string
required: true required: true
@@ -1172,6 +1173,45 @@ questions:
description: RTMP description: RTMP
- value: record - value: record
description: Record description: Record
- variable: global_args
label: Global Args
description: Stream specific global args
schema:
type: string
default: ""
- variable: hwaccel_args
label: HW Acceleration Args
description: Stream specific hwaccel args
schema:
type: string
default: ""
- variable: input_args
label: Input Args
description: Stream specific input args
schema:
type: string
default: ""
- variable: output_args
label: Output Args
schema:
additional_attrs: true
type: dict
attrs:
- variable: detect
label: Detect
schema:
type: string
default: ""
- variable: record
label: Record
schema:
type: string
default: ""
- variable: rtmp
label: RTMP
schema:
type: string
default: ""
- variable: global_args - variable: global_args
label: Global Args label: Global Args
description: Camera specific global args description: Camera specific global args
@@ -1192,7 +1232,22 @@ questions:
default: "" default: ""
- variable: output_args - variable: output_args
label: Output Args label: Output Args
description: Camera specific output args schema:
additional_attrs: true
type: dict
attrs:
- variable: detect
label: Detect
schema:
type: string
default: ""
- variable: record
label: Record
schema:
type: string
default: ""
- variable: rtmp
label: RTMP
schema: schema:
type: string type: string
default: "" default: ""
@@ -1201,8 +1256,7 @@ questions:
description: Timeout for highest scoring image before allowing it to be replaced by a newer image. description: Timeout for highest scoring image before allowing it to be replaced by a newer image.
schema: schema:
type: int type: int
required: true "null": true
default: 60
- variable: zones - variable: zones
label: Zones label: Zones
description: Zones for this camera description: Zones for this camera
@@ -1211,7 +1265,7 @@ questions:
default: [] default: []
items: items:
- variable: zone_entry - variable: zone_entry
label: Zone Entry label: ""
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
@@ -1236,7 +1290,7 @@ questions:
default: [] default: []
items: items:
- variable: object_entry - variable: object_entry
label: Object Entry label: ""
description: For example person description: For example person
schema: schema:
type: string type: string
@@ -1329,15 +1383,13 @@ questions:
description: Height to resize the snapshot to description: Height to resize the snapshot to
schema: schema:
type: int type: int
required: true "null": true
default: 720
- variable: quality - variable: quality
label: Quality label: Quality
description: JPEG encode quality description: JPEG encode quality
schema: schema:
type: int type: int
required: true "null": true
default: 70
- variable: required_zones - variable: required_zones
label: Required Zones label: Required Zones
description: Restrict mqtt messages to objects that entered any of the listed zones description: Restrict mqtt messages to objects that entered any of the listed zones
+410 -272
View File
@@ -16,349 +16,487 @@ data:
database: database:
path: /db/frigate.db path: /db/frigate.db
mqtt: mqtt:
host: {{ required "You need to provide an MQTT host" .Values.frigate.mqtt.host }} {{- include "frigate.mqtt" .Values.frigate.mqtt | indent 6 }}
port: {{ .Values.frigate.mqtt.port | default 1883 }}
topic_prefix: {{ .Values.frigate.mqtt.topic_prefix | default "frigate" }}
client_id: {{ .Values.frigate.mqtt.client_id | default "frigate" }}
stats_interval: {{ .Values.frigate.mqtt.stats_interval| default 60 }}
{{- with .Values.frigate.mqtt.user }}
user: {{ . }}
{{- end }}
{{- with .Values.frigate.mqtt.password }}
password: {{ . }}
{{- end }}
{{- if .Values.frigate.detectors.render_config }} {{- if and .Values.frigate.detectors.render_config .Values.frigate.detectors.config }}
{{- if .Values.frigate.detectors.config }}
detectors: detectors:
{{- range .Values.frigate.detectors.config }} {{- include "frigate.detectors" .Values.frigate.detectors | indent 6 }}
{{ required "You need to provide a detector name" .name }}:
type: {{ .type }}
{{- with .device }}
device: {{ . }}
{{- end }}
{{- with .num_threads }}
num_threads: {{ . }}
{{- end }}
{{- end }}
{{- end }}
{{- end }} {{- end }}
{{- if .Values.frigate.model.render_config }} {{- if .Values.frigate.model.render_config }}
model: model:
{{- with .Values.frigate.model.path }} {{- include "frigate.model" .Values.frigate.model | indent 6 }}
path: {{ . }}
{{- end }}
{{- with .Values.frigate.model.labelmap_path }}
labelmap_path: {{ . }}
{{- end }}
width: {{ .Values.frigate.model.width | default 320 }}
height: {{ .Values.frigate.model.height | default 320 }}
{{- with .Values.frigate.model.labelmap }}
labelmap:
{{- range . }}
{{ .model }}: {{ .name }}
{{- end }}
{{- end }}
{{- end }} {{- end }}
{{- if .Values.frigate.logger.render_config }} {{- if .Values.frigate.logger.render_config }}
logger: logger:
default: {{ .Values.frigate.logger.default | default "info" }} {{- include "frigate.logger" .Values.frigate.logger | indent 6 }}
{{- with .Values.frigate.logger.logs }}
logs:
{{- range . }}
{{ .component }}: {{ .verbosity }}
{{- end }}
{{- end }}
{{- end }} {{- end }}
{{- if .Values.frigate.birdseye.render_config }} {{- if .Values.frigate.birdseye.render_config }}
birdseye: birdseye:
enabled: {{ ternary "True" "False" .Values.frigate.birdseye.enabled }} {{- include "frigate.birdseye" .Values.frigate.birdseye | indent 6 }}
width: {{ .Values.frigate.birdseye.width | default 1280 }}
height: {{ .Values.frigate.birdseye.height | default 720 }}
quality: {{ .Values.frigate.birdseye.quality | default 8 }}
mode: {{ .Values.frigate.birdseye.mode | default "objects" }}
{{- end }} {{- end }}
{{- if .Values.frigate.ffmpeg.render_config }} {{- if .Values.frigate.ffmpeg.render_config }}
ffmpeg: ffmpeg:
global_args: {{ .Values.frigate.ffmpeg.global_args | default "-hide_banner -loglevel warning" }} {{- include "frigate.ffmpeg" .Values.frigate.ffmpeg | indent 6 }}
input_args: {{ .Values.frigate.ffmpeg.input_args | default "-avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1" }}
{{- with .Values.frigate.ffmpeg.hwaccel_args }}
hwaccel_args: {{ . }}
{{- end }}
output_args:
detect: {{ .Values.frigate.ffmpeg.output_args.detect | default "-f rawvideo -pix_fmt yuv420p" }}
record: {{ .Values.frigate.ffmpeg.output_args.record | default "-f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an" }}
rtmp: {{ .Values.frigate.ffmpeg.output_args.rtmp | default "-c copy -f flv" }}
{{- end }} {{- end }}
{{- if .Values.frigate.detect.render_config }} {{- if .Values.frigate.detect.render_config }}
detect: detect:
enabled: {{ ternary "True" "False" .Values.frigate.detect.enabled }} {{- include "frigate.detect" .Values.frigate.detect | indent 6 }}
width: {{ .Values.frigate.detect.width | default 1280 }} {{- end -}}
height: {{ .Values.frigate.detect.height | default 720 }}
fps: {{ .Values.frigate.detect.fps | default 5 }}
max_disappeared: {{ .Values.frigate.detect.max_disappeared | default 25 }}
stationary:
interval: {{ .Values.frigate.detect.stationary.interval | default 0 }}
threshold: {{ .Values.frigate.detect.stationary.threshold | default 50 }}
{{- if (hasKey .Values.frigate.detect.stationary "max_frames") }}
{{- if or (hasKey .Values.frigate.detect.stationary.max_frames "default") (hasKey .Values.frigate.detect.stationary.max_frames "objects") }}
{{- if or .Values.frigate.detect.stationary.max_frames.default .Values.frigate.detect.stationary.max_frames.objects }}
max_frames:
{{- with .Values.frigate.detect.stationary.max_frames.default }}
default: {{ . }}
{{- end }}
{{- with .Values.frigate.detect.stationary.max_frames.objects }}
objects:
{{- range . }}
{{ .object }}: {{ .frames }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.frigate.objects.render_config }} {{- if .Values.frigate.objects.render_config }}
objects: objects:
{{- with .Values.frigate.objects.track }} {{- include "frigate.objects" .Values.frigate.objects | indent 6 }}
track:
{{- range . }}
- {{ . }}
{{- end }}
{{- end }}
{{- with .Values.frigate.objects.mask }}
mask: {{ . }}
{{- end }}
{{- with .Values.frigate.objects.filters }}
filters:
{{- range . }}
{{ .object }}:
{{- with .min_area }}
min_area: {{ . }}
{{- end }}
{{- with .max_area }}
max_area: {{ . }}
{{- end }}
{{- with .min_ratio }}
min_ratio: {{ . }}
{{- end }}
{{- with .max_ratio }}
max_ratio: {{ . }}
{{- end }}
{{- with .min_score }}
min_score: {{ . }}
{{- end }}
{{- with .threshold }}
threshold: {{ . }}
{{- end }}
{{- with .mask }}
mask: {{ . }}
{{- end }}
{{- end }}
{{- end }}
{{- end }} {{- end }}
{{- if .Values.frigate.motion.render_config }} {{- if .Values.frigate.motion.render_config }}
motion: motion:
threshold: {{ .Values.frigate.motion.threshold | default 25 }} {{- include "frigate.motion" .Values.frigate.motion | indent 6 }}
contour_area: {{ .Values.frigate.motion.contour_area | default 30 }}
delta_alpha: {{ .Values.frigate.motion.delta_alpha | default 0.2 }}
frame_alpha: {{ .Values.frigate.motion.frame_alpha | default 0.2 }}
frame_height: {{ .Values.frigate.motion.frame_height | default 50 }}
{{- with .Values.frigate.motion.mask }}
mask: {{ . }}
{{- end }}
improve_contrast: {{ ternary "True" "False" .Values.frigate.motion.improve_contrast }}
mqtt_off_delay: {{ .Values.frigate.motion.mqtt_off_delay | default 30 }}
{{- end }} {{- end }}
{{- if .Values.frigate.record.render_config }} {{- if .Values.frigate.record.render_config }}
record: record:
enabled: {{ ternary "True" "False" .Values.frigate.record.enabled }} {{- include "frigate.record" .Values.frigate.record | indent 6 }}
expire_interval: {{ .Values.frigate.record.expire_interval | default 60 }}
{{- if .Values.frigate.record.retain.render_config }}
retain:
days: {{ .Values.frigate.record.retain.days | default 0 }}
mode: {{ .Values.frigate.record.retain.mode | default "all" }}
{{- end }}
events:
pre_capture: {{ .Values.frigate.record.events.pre_capture | default 5 }}
post_capture: {{ .Values.frigate.record.events.post_capture | default 5 }}
{{- with .Values.frigate.record.events.objects }}
objects:
{{- range . }}
- {{ . }}
{{- end }}
{{- end }}
{{- with .Values.frigate.record.events.required_zones }}
required_zones:
{{- range . }}
- {{ . }}
{{- end }}
{{- end }}
{{- if .Values.frigate.record.events.retain.render_config }}
retain:
default: {{ .Values.frigate.record.events.retain.default | default 10 }}
mode: {{ .Values.frigate.record.events.retain.mode | default "motion" }}
{{- with .Values.frigate.record.events.retain.objects }}
objects:
{{- range . }}
{{ .object }}: {{ .days }}
{{- end }}
{{- end }}
{{- end }}
{{- end }} {{- end }}
{{- if .Values.frigate.snapshots.render_config }} {{- if .Values.frigate.snapshots.render_config }}
snapshots: snapshots:
enabled: {{ ternary "True" "False" .Values.frigate.snapshots.enabled }} {{- include "frigate.snapshots" .Values.frigate.snapshots | indent 6 }}
clean_copy: {{ ternary "True" "False" .Values.frigate.snapshots.clean_copy }}
timestamp: {{ ternary "True" "False" .Values.frigate.snapshots.timestamp }}
bounding_box: {{ ternary "True" "False" .Values.frigate.snapshots.bounding_box }}
crop: {{ ternary "True" "False" .Values.frigate.snapshots.crop }}
{{- with .Values.frigate.snapshots.height }}
height: {{ . }}
{{- end }}
{{- with .Values.frigate.snapshots.required_zones }}
required_zones:
{{- range . }}
- {{ . }}
{{- end }}
{{- end }}
{{- if .Values.frigate.snapshots.retain.render_config }}
retain:
default: {{ .Values.frigate.snapshots.retain.default | default 10 }}
{{- with .Values.frigate.snapshots.retain.objects }}
objects:
{{- range . }}
{{ .object }}: {{ .days }}
{{- end }}
{{- end }}
{{- end }}
{{- end }} {{- end }}
{{- if .Values.frigate.rtmp.render_config }} {{- if .Values.frigate.rtmp.render_config }}
rtmp: rtmp:
enabled: {{ ternary "True" "False" .Values.frigate.rtmp.enabled }} {{- include "frigate.rtmp" .Values.frigate.rtmp | indent 6 }}
{{- end }} {{- end }}
{{- if .Values.frigate.live.render_config }} {{- if .Values.frigate.live.render_config }}
live: live:
height: {{ .Values.frigate.live.height | default 720 }} {{- include "frigate.live" .Values.frigate.live | indent 6 }}
quality: {{ .Values.frigate.live.quality | default 8 }}
{{- end }} {{- end }}
{{- if .Values.frigate.timestamp_style.render_config }} {{- if .Values.frigate.timestamp_style.render_config }}
timestamp_style: timestamp_style:
position: {{ .Values.frigate.timestamp_style.position | default "tl" }} {{- include "frigate.timestamp_style" .Values.frigate.timestamp_style | indent 6 }}
format: {{ .Values.frigate.timestamp_style.format | quote }}
color:
red: {{ .Values.frigate.timestamp_style.color.red | default 255 }}
green: {{ .Values.frigate.timestamp_style.color.green | default 255 }}
blue: {{ .Values.frigate.timestamp_style.color.blue | default 255 }}
thickness: {{ .Values.frigate.timestamp_style.thickness | default 2 }}
{{- if ne .Values.frigate.timestamp_style.effect "None" }}
effect: {{ .Values.frigate.timestamp_style.effect }}
{{- end }}
{{- end }} {{- end }}
{{- $cameras := .Values.frigate.cameras }}
cameras: cameras:
{{- range .Values.frigate.cameras }} {{- range $cam := $cameras }}
{{ .camera_name }}: {{ $cam.camera_name | required "You need to provide a camera name" }}:
ffmpeg: ffmpeg:
{{- with .ffmpeg }}
inputs: inputs:
{{- range .inputs }} {{- range $input := $cam.ffmpeg.inputs }}
- path: {{ .path }} - path: {{ $input.path | required "You need to provide a path" }}
{{- with .roles }}
roles: roles:
{{- range . }} {{- range $role := $input.roles }}
- {{ . }} - {{ $role }}
{{- end }} {{- else -}}
{{- end }} {{/* end with roles*/}} {{- fail "You need to provide roles" -}}
{{- with .global_args }} {{- end -}}
global_args: {{ . }} {{- include "frigate.ffmpeg" $input | indent 14 }}
{{- end }} {{- end -}} {{/* End range $cam.ffmpeg.inputs */}}
{{- with .hwaccel_args }} {{- include "frigate.ffmpeg" $cam.ffmpeg | indent 10 }}
hwaccel_args: {{ . }} {{- with $cam.best_image_timeout }}
{{- end }} best_image_timeout: {{ . }}
{{- with .input_args }} {{- end -}}
input_args: {{ . }} {{- with $cam.zones }}
{{- end }}
{{- end }} {{/* end range inputs */}}
{{- with .global_args }}
global_args: {{ . }}
{{- end }}
{{- with .hwaccel_args }}
hwaccel_args: {{ . }}
{{- end }}
{{- with .input_args }}
input_args: {{ . }}
{{- end }}
{{- with .output_args }}
output_args: {{ . }}
{{- end }}
{{- end }} {{/* end with ffmpeg */}}
best_image_timeout: {{ .best_image_timeout | default 60 }}
{{- with .zones }}
zones: zones:
{{- range . }} {{- range $zone := . }}
{{ .name }}: {{ $zone.name | required "You have to specify a zone name" }}:
coordinates: {{ required "You have to specify coordinates" .coordinates }} coordinates: {{ required "You have to specify coordinates" .coordinates }}
{{- with .objects }} {{- with $zone.objects }}
objects: objects:
{{- range . }} {{- range $obj := . }}
- {{ . }} - {{ $obj }}
{{- end }} {{- end -}}
{{- end }} {{/* end with objects*/}} {{- end -}}
{{- with .filters }} {{- with $zone.filters }}
filters: filters:
{{- range . }} {{- range $filter := . }}
{{ .object }}: {{ $filter.object | required "You have to specify an object" }}:
{{- with .min_area }} {{- with $filter.min_area }}
min_area: {{ . }} min_area: {{ . }}
{{- end }} {{- end -}}
{{- with .max_area }} {{- with $filter.max_area }}
max_area: {{ . }} max_area: {{ . }}
{{- end }} {{- end -}}
{{- with .threshold }} {{- with $filter.threshold }}
threshold: {{ . }} threshold: {{ . }}
{{- end }} {{- end -}}
{{- end }} {{/* end range filters */}} {{- end -}} {{/* end range filters */}}
{{- end }} {{/* end with filter */}} {{- end -}} {{/* end with filter */}}
{{- end }} {{/* end range zones */}} {{- end -}} {{/* end range zones */}}
{{- end }} {{/* end with zones */}} {{- end -}} {{/* end with zones */}}
{{- if .mqtt.render_config }} {{- if $cam.mqtt.render_config -}}
{{- with .mqtt }} {{- with $cam.mqtt }}
mqtt: mqtt:
enabled: {{ ternary "True" "False" .enabled }} enabled: {{ ternary "True" "False" .enabled }}
timestamp: {{ ternary "True" "False" .timestamp }} timestamp: {{ ternary "True" "False" .timestamp }}
bounding_box: {{ ternary "True" "False" .bounding_box }} bounding_box: {{ ternary "True" "False" .bounding_box }}
crop: {{ ternary "True" "False" .crop }} crop: {{ ternary "True" "False" .crop }}
height: {{ .height | default 270 }} {{- with .height }}
quality: {{ .quality | default 70 }} height: {{ . }}
{{- end -}}
{{- with .quality }}
quality: {{ . }}
{{- end -}}
{{- with .required_zones }} {{- with .required_zones }}
required_zones: required_zones:
{{- range . }} {{- range $zone := . }}
- {{ . }} - {{ $zone }}
{{- end }} {{- end -}}
{{- end }} {{- end -}}
{{- end }} {{/* end with mqtt */}} {{- end -}} {{/* end with mqtt */}}
{{- end }} {{/* end if mqtt.render_config */}} {{- end -}} {{/* end if mqtt.render_config */}}
{{- if .ui.render_config }} {{- if $cam.ui.render_config -}}
{{- with .ui }} {{- with $cam.ui }}
ui: ui:
{{- if or .order (eq (int .order) 0) }} {{- if not (kindIs "invalid" .order) }}
order: {{ .order }} order: {{ .order }}
{{- end }} {{- end }}
dashboard: {{ ternary "True" "False" .dashboard }} dashboard: {{ ternary "True" "False" .dashboard }}
{{- end }} {{/* end with ui */}} {{- end -}} {{/* end with ui */}}
{{- end }} {{/* end if ui.render_config */}} {{- end -}} {{/* end if ui.render_config */}}
{{- end }} {{/* end range cameras */}} {{- end -}} {{/* end range cameras */}}
{{- end }} {{- end }}
{{- define "frigate.ffmpeg" -}}
{{- $ffmpeg := . -}}
{{- with $ffmpeg.global_args }}
global_args: {{ . }}
{{- end -}}
{{- with $ffmpeg.input_args }}
input_args: {{ . }}
{{- end -}}
{{- with $ffmpeg.hwaccel_args }}
hwaccel_args: {{ . }}
{{- end -}}
{{- if $ffmpeg.output_args -}}
{{- if or $ffmpeg.output_args.detect $ffmpeg.output_args.record $ffmpeg.output_args.rtmp }}
output_args:
{{- with $ffmpeg.output_args.detect }}
detect: {{ . }}
{{- end -}}
{{- with $ffmpeg.output_args.record }}
record: {{ . }}
{{- end -}}
{{- with $ffmpeg.output_args.rtmp }}
rtmp: {{ . }}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- define "frigate.detect" -}}
{{- $detect := . }}
enabled: {{ ternary "True" "False" $detect.enabled }}
{{- with $detect.width }}
width: {{ . }}
{{- end -}}
{{- with $detect.height }}
height: {{ . }}
{{- end -}}
{{- with $detect.fps }}
fps: {{ . }}
{{- end -}}
{{- with $detect.max_disappeared }}
max_disappeared: {{ . }}
{{- end -}}
{{- if or (not (kindIs "invalid" $detect.stationary.interval)) $detect.stationary.threshold $detect.stationary.set_max_frames }}
stationary:
{{- if not (kindIs "invalid" $detect.stationary.interval) }} {{/* invalid kind means its empty (0 is not empty) */}}
interval: {{ $detect.stationary.interval }}
{{- end -}}
{{- with $detect.stationary.threshold }}
threshold: {{ . }}
{{- end -}}
{{- if (hasKey $detect.stationary "max_frames") }}
{{- if or $detect.stationary.max_frames.default $detect.stationary.max_frames.objects }}
max_frames:
{{- with $detect.stationary.max_frames.default }}
default: {{ . }}
{{- end -}}
{{- with $detect.stationary.max_frames.objects }}
objects:
{{- range $obj := . }}
{{ $obj.object | required "You need to provide an object" }}: {{ $obj.frames | required "You need to provide frames" }}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- define "frigate.motion" -}}
{{- $motion := . -}}
{{- with $motion.threshold }}
threshold: {{ . }}
{{- end -}}
{{- with $motion.contour_area }}
contour_area: {{ . }}
{{- end -}}
{{- with $motion.delta_alpha }}
delta_alpha: {{ . }}
{{- end -}}
{{- with $motion.frame_alpha }}
frame_alpha: {{ . }}
{{- end -}}
{{- with $motion.frame_height }}
frame_height: {{ . }}
{{- end -}}
{{- with $motion.mask }}
mask: {{ . }}
{{- end }}
improve_contrast: {{ ternary "True" "False" $motion.improve_contrast }}
{{- with $motion.mqtt_off_delay }}
mqtt_off_delay: {{ . }}
{{- end -}}
{{- end -}}
{{- define "frigate.record" -}}
{{- $record := . }}
enabled: {{ ternary "True" "False" $record.enabled }}
{{- with $record.expire_interval }}
expire_interval: {{ . }}
{{- end -}}
{{- if $record.retain.render_config }}
retain:
{{- if not (kindIs "invalid" $record.retain.days) }}
days: {{ $record.retain.days }}
{{- end -}}
{{- with $record.retain.mode }}
mode: {{ . }}
{{- end -}}
{{- end -}}
{{- if $record.events.render_config }}
events:
{{- if not (kindIs "invalid" $record.events.pre_capture) }}
pre_capture: {{ $record.events.pre_capture }}
{{- end -}}
{{- if not (kindIs "invalid" $record.events.post_capture) }}
post_capture: {{ $record.events.post_capture }}
{{- end -}}
{{- with $record.events.objects }}
objects:
{{- range $obj := . }}
- {{ $obj }}
{{- end -}}
{{- end -}}
{{- with $record.events.required_zones }}
required_zones:
{{- range $zone := . }}
- {{ $zone }}
{{- end -}}
{{- end -}}
{{- if $record.events.retain.render_config }}
retain:
default: {{ $record.events.retain.default | required "You need to provide default retain days" }}
{{- with $record.events.retain.mode }}
mode: {{ . }}
{{- end -}}
{{- with $record.events.retain.objects }}
objects:
{{- range $obj := . }}
{{ $obj.object | required "You need to provide an object" }}: {{ $obj.days | required "You need to provide default retain days" }}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- define "frigate.objects" -}}
{{- $objects := . -}}
{{- with $objects.track }}
track:
{{- range $track := . }}
- {{ $track }}
{{- end -}}
{{- end -}}
{{- with $objects.mask }}
mask: {{ . }}
{{- end -}}
{{- with $objects.filters }}
filters:
{{- range $filter := . }}
{{ $filter.object | required "You need to provide an object" }}:
{{- with $filter.min_area }}
min_area: {{ . }}
{{- end -}}
{{- with $filter.max_area }}
max_area: {{ . }}
{{- end -}}
{{- with $filter.min_ratio }}
min_ratio: {{ . }}
{{- end -}}
{{- with $filter.max_ratio }}
max_ratio: {{ . }}
{{- end -}}
{{- with $filter.min_score }}
min_score: {{ . }}
{{- end -}}
{{- with $filter.threshold }}
threshold: {{ . }}
{{- end -}}
{{- with $filter.mask }}
mask: {{ . }}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- define "frigate.birdseye" -}}
{{- $birdseye := . }}
enabled: {{ ternary "True" "False" $birdseye.enabled }}
{{- with $birdseye.width }}
width: {{ . }}
{{- end -}}
{{- with $birdseye.height }}
height: {{ . }}
{{- end -}}
{{- with $birdseye.quality }}
quality: {{ . }}
{{- end -}}
{{- with $birdseye.mode }}
mode: {{ . }}
{{- end -}}
{{- end -}}
{{- define "frigate.timestamp_style" -}}
{{- $timestamp_style := . -}}
{{- with $timestamp_style.position }}
position: {{ . }}
{{- end -}}
{{- with $timestamp_style.format }}
format: {{ . }}
{{- end -}}
{{- if $timestamp_style.color.render_config }}
color:
red: {{ $timestamp_style.color.red }}
green: {{ $timestamp_style.color.green }}
blue: {{ $timestamp_style.color.blue }}
{{- end -}}
{{- with $timestamp_style.thickness }}
thickness: {{ . }}
{{- end -}}
{{- with $timestamp_style.effect }}
effect: {{ $timestamp_style.effect }}
{{- end -}}
{{- end -}}
{{- define "frigate.live" -}}
{{- $live := . -}}
{{- with $live.height }}
height: {{ . }}
{{- end -}}
{{- with $live.quality }}
quality: {{ . }}
{{- end -}}
{{- end -}}
{{- define "frigate.rtmp" -}}
{{- $rtmp := . }}
enabled: {{ ternary "True" "False" $rtmp.enabled }}
{{- end -}}
{{- define "frigate.snapshots" -}}
{{- $snapshots := . }}
enabled: {{ ternary "True" "False" $snapshots.enabled }}
clean_copy: {{ ternary "True" "False" $snapshots.clean_copy }}
timestamp: {{ ternary "True" "False" $snapshots.timestamp }}
bounding_box: {{ ternary "True" "False" $snapshots.bounding_box }}
crop: {{ ternary "True" "False" $snapshots.crop }}
{{- with $snapshots.height }}
height: {{ . }}
{{- end -}}
{{- with $snapshots.required_zones }}
required_zones:
{{- range $zone := . }}
- {{ $zone }}
{{- end -}}
{{- end -}}
{{- if $snapshots.retain.render_config }}
retain:
default: {{ $snapshots.retain.default | required "You need to provide default retain days" }}
{{- with $snapshots.retain.objects }}
objects:
{{- range $obj := . }}
{{ $obj.object | required "You need to provide an object" }}: {{ $obj.days | required "You need to provide default retain days" }}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- define "frigate.detectors" -}}
{{- $detectors := . -}}
{{- range $detector := $detectors.config }}
{{ $detector.name | required "You need to provide a detector name" }}:
type: {{ $detector.type | required "You need to provide a detector type" }}
{{- with $detector.device }}
device: {{ . }}
{{- end -}}
{{- with $detector.num_threads }}
num_threads: {{ . }}
{{- end -}}
{{- end -}}
{{- end -}}
{{- define "frigate.model" -}}
{{ $model := . }}
width: {{ $model.width | required "You need to provide a model width" }}
height: {{ $model.height | required "You need to provide a model height" }}
{{- with $model.path }}
path: {{ . }}
{{- end -}}
{{- with $model.labelmap_path }}
labelmap_path: {{ . }}
{{- end -}}
{{- with $model.labelmap }}
labelmap:
{{- range $lmap := . }}
{{ $lmap.model | required "You need to provide a labelmap model" }}: {{ $lmap.name | required "You need to provide a labelmap name" }}
{{- end -}}
{{- end -}}
{{- end -}}
{{- define "frigate.logger" -}}
{{- $logger := . }}
default: {{ $logger.default }}
{{- with $logger.logs }}
logs:
{{- range $log := . }}
{{ $log.component | required "You need to provide a logger cmponent" }}: {{ $log.verbosity | required "You need to provide logger verbosity" }}
{{- end -}}
{{- end -}}
{{- end -}}
{{- define "frigate.mqtt" -}}
{{- $mqtt := . }}
host: {{ required "You need to provide an MQTT host" $mqtt.host }}
{{- with $mqtt.port }}
port: {{ . }}
{{- end -}}
{{- with $mqtt.topic_prefix }}
topic_prefix: {{ . }}
{{- end -}}
{{- with $mqtt.client_id }}
client_id: {{ . }}
{{- end -}}
{{- if not (kindIs "invalid" $mqtt.stats_interval) }}
stats_interval: {{ $mqtt.stats_interval }}
{{- end -}}
{{- with $mqtt.user }}
user: {{ . }}
{{- end -}}
{{- with $mqtt.password }}
password: {{ . }}
{{- end -}}
{{- end -}}
+88 -70
View File
@@ -11,22 +11,21 @@ podSecurityContext:
runAsUser: 0 runAsUser: 0
runAsGroup: 0 runAsGroup: 0
global: # -- The "render_config" key is only used internally to "render" or not the configuration
isSCALE: true
# -- In most cases the "enabled" key is only used internally to "render" or not the configuration
# - Some parts of the config bellow are slightly modified so they can be added on SCALE UI. Mainly lists. # - Some parts of the config bellow are slightly modified so they can be added on SCALE UI. Mainly lists.
# - Do not blindly copy paste configuration from upstream. # - Do not blindly copy paste configuration from upstream. As this won't work on all cases
# - Where you see "null" set as default is ignored by the configmap. (Not all keys are supported).
# - Those "nulls" should be replaced with integers (if you want to set a value)
frigate: frigate:
mqtt: mqtt:
host: mqtt.server.com host: mqtt.server.com
port: 1883 port: 1883
# -- NOTE: Must be unique if you are running multiple instances # -- NOTE: Must be unique if you are running multiple instances
topic_prefix: frigate topic_prefix: ""
# -- NOTE: Must be unique if you are running multiple instances # -- NOTE: Must be unique if you are running multiple instances
client_id: frigate client_id: ""
user: mqtt_user user: ""
password: password password: ""
stats_interval: 60 stats_interval: 60
detectors: detectors:
@@ -46,14 +45,14 @@ frigate:
model: model:
# -- Enable it to add the configuration in the config file # -- Enable it to add the configuration in the config file
render_config: false render_config: false
# -- Optional: Path to the model
path: /edgetpu_model.tflite
# -- Optional: Path to the labelmap
labelmap_path: /labelmap.txt
# -- Required: Object detection model input width # -- Required: Object detection model input width
width: 320 width: 320
# -- Required: Object detection model input height # -- Required: Object detection model input height
height: 320 height: 320
# -- Optional: Path to the model
path: ""
# -- Optional: Path to the labelmap
labelmap_path: ""
# -- Optional: Label name modifications. # -- Optional: Label name modifications.
labelmap: labelmap:
[] []
@@ -69,8 +68,9 @@ frigate:
default: info default: info
# -- Optional: Component specific logger overrides # -- Optional: Component specific logger overrides
logs: logs:
- component: frigate.event []
verbosity: debug # - component: frigate.event
# verbosity: debug
birdseye: birdseye:
# -- Enable it to add the configuration in the config file # -- Enable it to add the configuration in the config file
@@ -78,36 +78,36 @@ frigate:
# -- Enables birdseye # -- Enables birdseye
enabled: true enabled: true
# -- Optional: Width of the output resolution # -- Optional: Width of the output resolution
width: 1280 width: null
# -- Optional: Height of the output resolution # -- Optional: Height of the output resolution
height: 720 height: null
# -- Optional: Encoding quality of the mpeg1 feed # -- Optional: Encoding quality of the mpeg1 feed
# - 1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources. # - 1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources.
quality: 8 quality: null
# -- Optional: Mode of the view. Available options are: objects, motion, and continuous # -- 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 # - 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 # - motion - cameras are included if motion was detected in the last 30 seconds
# - continuous - all cameras are included always # - continuous - all cameras are included always
mode: objects mode: ""
ffmpeg: ffmpeg:
# -- Enable it to add the configuration in the config file # -- Enable it to add the configuration in the config file
render_config: false render_config: true
# -- Optional: global ffmpeg args # -- Optional: global ffmpeg args
global_args: -hide_banner -loglevel warning global_args: ""
# -- Optional: global input args # -- Optional: global input args
input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 input_args: ""
# -- Optional: global hwaccel args # -- Optional: global hwaccel args
# - NOTE: See hardware acceleration docs for your specific device # - NOTE: See hardware acceleration docs for your specific device
hwaccel_args: "" hwaccel_args: ""
# -- Optional: global output args # -- Optional: global output args
output_args: output_args:
# -- Optional: output args for detect streams # -- Optional: output args for detect streams
detect: -f rawvideo -pix_fmt yuv420p detect: ""
# -- Optional: output args for record streams # -- Optional: output args for record streams
record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an record: ""
# -- Optional: output args for rtmp streams # -- Optional: output args for rtmp streams
rtmp: -c copy -f flv rtmp: ""
detect: detect:
# -- Enable it to add the configuration in the config file # -- Enable it to add the configuration in the config file
@@ -116,22 +116,22 @@ frigate:
# - This value can be set via MQTT and will be updated in startup based on retained value # - This value can be set via MQTT and will be updated in startup based on retained value
enabled: true enabled: true
# -- Optional: width of the frame for the input with the detect role # -- Optional: width of the frame for the input with the detect role
width: 1280 width: null
# -- Optional: height of the frame for the input with the detect role # -- Optional: height of the frame for the input with the detect role
height: 720 height: null
# -- Optional: desired fps for your camera for the input with the detect role # -- Optional: desired fps for your camera for the input with the detect role
# - NOTE: Recommended value of 5. Ideally, try and reduce your FPS on the camera. # - NOTE: Recommended value of 5. Ideally, try and reduce your FPS on the camera.
fps: 5 fps: null
# -- Optional: Number of frames without a detection before frigate considers an object to be gone. (default: 5x the frame rate) # -- Optional: Number of frames without a detection before frigate considers an object to be gone. (default: 5x the frame rate)
max_disappeared: 25 max_disappeared: null
# -- Optional: Configuration for stationary object tracking # -- Optional: Configuration for stationary object tracking
stationary: stationary:
# -- Optional: Frequency for confirming stationary objects # -- Optional: Frequency for confirming stationary objects
# - When set to 0, object detection will not confirm stationary objects until movement is detected. # - When set to 0, object detection will not confirm stationary objects until movement is detected.
# - If set to 10, object detection will run to confirm the object still exists on every 10th frame. # - If set to 10, object detection will run to confirm the object still exists on every 10th frame.
interval: 0 interval: null
# -- Optional: Number of frames without a position change for an object to be considered stationary (default: 10x the frame rate or 10s) # -- Optional: Number of frames without a position change for an object to be considered stationary (default: 10x the frame rate or 10s)
threshold: 50 threshold: null
# -- Optional: Define a maximum number of frames for tracking a stationary object (default: not set, track forever) # -- 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. # - 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 # - It can also be used to disable stationary object tracking. For example, you may want to set a value for person, but leave
@@ -152,11 +152,13 @@ frigate:
render_config: false render_config: false
# -- Optional: list of objects to track from labelmap.txt # -- Optional: list of objects to track from labelmap.txt
track: track:
- person []
# - person
# - car
# -- Optional: mask to prevent all object types from being detected in certain areas (default: no mask) # -- Optional: mask to prevent all object types from being detected in certain areas (default: no mask)
# - Checks based on the bottom center of the bounding box of the object. # - Checks based on the bottom center of the bounding box of the object.
# - NOTE: This mask is COMBINED with the object type specific mask below # - NOTE: This mask is COMBINED with the object type specific mask below
mask: 0,0,1000,0,1000,200,0,200 mask: ""
# - Optional: filters to reduce false positives for specific object types # - Optional: filters to reduce false positives for specific object types
filters: filters:
[] []
@@ -183,7 +185,7 @@ frigate:
# -- Optional: The threshold passed to cv2.threshold to determine if a pixel is different enough to be counted as motion. # -- Optional: The threshold passed to cv2.threshold to determine if a pixel is different enough to be counted as motion.
# - Increasing this value will make motion detection less sensitive and decreasing it will make motion detection more sensitive. # - Increasing this value will make motion detection less sensitive and decreasing it will make motion detection more sensitive.
# - The value should be between 1 and 255. # - The value should be between 1 and 255.
threshold: 25 threshold: null
# -- Optional: Minimum size in pixels in the resized motion image that counts as motion # -- Optional: Minimum size in pixels in the resized motion image that counts as motion
# - Increasing this value will prevent smaller areas of motion from being detected. Decreasing will # - Increasing this value will prevent smaller areas of motion from being detected. Decreasing will
# - make motion detection more sensitive to smaller moving objects. # - make motion detection more sensitive to smaller moving objects.
@@ -191,29 +193,29 @@ frigate:
# - 15 - high sensitivity # - 15 - high sensitivity
# - 30 - medium sensitivity # - 30 - medium sensitivity
# - 50 - low sensitivity # - 50 - low sensitivity
contour_area: 30 contour_area: null
# -- Optional: Alpha value passed to cv2.accumulateWeighted when averaging the motion delta across multiple frames # -- Optional: Alpha value passed to cv2.accumulateWeighted when averaging the motion delta across multiple frames
# - Higher values mean the current frame impacts the delta a lot, and a single raindrop may register as motion. # - Higher values mean the current frame impacts the delta a lot, and a single raindrop may register as motion.
# - Too low and a fast moving person wont be detected as motion. # - Too low and a fast moving person wont be detected as motion.
delta_alpha: "0.2" delta_alpha: ""
# -- Optional: Alpha value passed to cv2.accumulateWeighted when averaging frames to determine the background # -- Optional: Alpha value passed to cv2.accumulateWeighted when averaging frames to determine the background
# - Higher values mean the current frame impacts the average a lot, and a new object will be averaged into the background faster. # - Higher values mean the current frame impacts the average a lot, and a new object will be averaged into the background faster.
# - Low values will cause things like moving shadows to be detected as motion for longer. # - Low values will cause things like moving shadows to be detected as motion for longer.
# - https://www.geeksforgeeks.org/background-subtraction-in-an-image-using-concept-of-running-average/ # - https://www.geeksforgeeks.org/background-subtraction-in-an-image-using-concept-of-running-average/
frame_alpha: "0.2" frame_alpha: ""
# -- Optional: Height of the resized motion frame (default: 50) # -- Optional: Height of the resized motion frame (default: 50)
# - This operates as an efficient blur alternative. Higher values will result in more granular motion detection at the expense # - This operates as an efficient blur alternative. Higher values will result in more granular motion detection at the expense
# - of higher CPU usage. Lower values result in less CPU, but small changes may not register as motion. # - of higher CPU usage. Lower values result in less CPU, but small changes may not register as motion.
frame_height: 50 frame_height: null
# -- Optional: motion mask # -- Optional: motion mask
# - NOTE: see docs for more detailed info on creating masks # - NOTE: see docs for more detailed info on creating masks
mask: 0,900,1080,900,1080,1920,0,1920 mask: ""
# -- Optional: improve contrast # -- Optional: improve contrast
# - Enables dynamic contrast improvement. This should help improve night detections at the cost of making motion detection more sensitive # - Enables dynamic contrast improvement. This should help improve night detections at the cost of making motion detection more sensitive
# - for daytime. # - for daytime.
improve_contrast: false improve_contrast: false
# -- Optional: Delay when updating camera motion through MQTT from ON -> OFF # -- Optional: Delay when updating camera motion through MQTT from ON -> OFF
mqtt_off_delay: 30 mqtt_off_delay: null
record: record:
# -- Enable it to add the configuration in the config file # -- Enable it to add the configuration in the config file
@@ -228,7 +230,7 @@ frigate:
enabled: false enabled: false
# -- Optional: Number of minutes to wait between cleanup runs # -- Optional: Number of minutes to wait between cleanup runs
# - This can be used to reduce the frequency of deleting recording segments from disk if you want to minimize i/o # - This can be used to reduce the frequency of deleting recording segments from disk if you want to minimize i/o
expire_interval: 60 expire_interval:
# -- Optional: Retention settings for recording # -- Optional: Retention settings for recording
retain: retain:
# -- Render retain config # -- Render retain config
@@ -236,19 +238,21 @@ frigate:
# -- Optional: Number of days to retain recordings regardless of events # -- Optional: Number of days to retain recordings regardless of events
# - NOTE: This should be set to 0 and retention should be defined in events section 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. # - if you only want to retain recordings of events.
days: 0 days:
# -- Optional: Mode for retention. Available options are: all, motion, and active_objects # -- Optional: Mode for retention. Available options are: all, motion, and active_objects
# - all - save all recording segments regardless of activity # - all - save all recording segments regardless of activity
# - motion - save all recordings segments with any detected motion # - motion - save all recordings segments with any detected motion
# - active_objects - save all recording segments with active/moving objects # - active_objects - save all recording segments with active/moving objects
# - NOTE: this mode only applies when the days setting above is greater than 0 # - NOTE: this mode only applies when the days setting above is greater than 0
mode: all mode: ""
# -- Optional: Event recording settings # -- Optional: Event recording settings
events: events:
# -- Enable it to add the configuration in the config file
render_config: false
# -- Optional: Number of seconds before the event to include # -- Optional: Number of seconds before the event to include
pre_capture: 5 pre_capture: null
# -- Optional: Number of seconds after the event to include # -- Optional: Number of seconds after the event to include
post_capture: 5 post_capture: null
# -- Optional: Objects to save recordings for. Defaults to all # -- Optional: Objects to save recordings for. Defaults to all
objects: objects:
[] []
@@ -265,11 +269,12 @@ frigate:
# - all - save all recording segments for events regardless of activity # - all - save all recording segments for events regardless of activity
# - motion - save all recordings segments for events with any detected motion # - motion - save all recordings segments for events with any detected motion
# - active_objects - save all recording segments for event with active/moving objects # - active_objects - save all recording segments for event with active/moving objects
mode: motion mode: ""
# -- Optional: Per object retention days # -- Optional: Per object retention days
objects: objects:
- object: person []
days: 15 # - object: person
# days: 15
snapshots: snapshots:
# -- Enable it to add the configuration in the config file # -- Enable it to add the configuration in the config file
@@ -297,8 +302,9 @@ frigate:
default: 10 default: 10
# -- Optional: Per object retention days # -- Optional: Per object retention days
objects: objects:
- object: person []
days: 15 # - object: person
# days: 15
rtmp: rtmp:
# -- Enable it to add the configuration in the config file # -- Enable it to add the configuration in the config file
@@ -312,34 +318,36 @@ frigate:
# -- Optional: Set the height of the live stream. (default: 720) # -- Optional: Set the height of the live stream. (default: 720)
# - This must be less than or equal to the height of the detect stream. Lower resolutions # - This must be less than or equal to the height of the detect stream. Lower resolutions
# - reduce bandwidth required for viewing the live stream. Width is computed to match known aspect ratio. # - reduce bandwidth required for viewing the live stream. Width is computed to match known aspect ratio.
height: 720 height: null
# -- Optional: Set the encode quality of the live stream (default: shown below) # -- Optional: Set the encode quality of the live stream (default: shown below)
# - 1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources. # - 1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources.
quality: 8 quality: null
timestamp_style: timestamp_style:
# -- Enable it to add the configuration in the config file # -- Enable it to add the configuration in the config file
render_config: false render_config: false
# -- Optional: Position of the timestamp # -- Optional: Position of the timestamp
# - "tl" (top left), "tr" (top right), "bl" (bottom left), "br" (bottom right) # - "tl" (top left), "tr" (top right), "bl" (bottom left), "br" (bottom right)
position: "tl" position: ""
# -- Optional: Format specifier conform to the Python package "datetime" # -- Optional: Format specifier conform to the Python package "datetime"
# - Additional Examples: # - Additional Examples:
# - german: "%d.%m.%Y %H:%M:%S" # - german: "%d.%m.%Y %H:%M:%S"
format: "%m/%d/%Y %H:%M:%S" format: ""
# -- Optional: Color of font # -- Optional: Color of font
color: color:
# -- Enable it to add the configuration in the config file
render_config: false
# -- All Required when color is specified (default: shown below) # -- All Required when color is specified (default: shown below)
red: 255 red: 255
green: 255 green: 255
blue: 255 blue: 255
# -- Optional: Line thickness of font (default: shown below) # -- Optional: Line thickness of font (default: shown below)
thickness: 2 thickness: null
# -- Optional: Effect of lettering (default: shown below) # -- Optional: Effect of lettering (default: shown below)
# - None (No effect), # - None (No effect),
# - "solid" (solid background in inverse color of font) # - "solid" (solid background in inverse color of font)
# - "shadow" (shadow for font) # - "shadow" (shadow for font)
effect: None effect: ""
cameras: cameras:
# -- Required: name of the camera # -- Required: name of the camera
@@ -357,19 +365,27 @@ frigate:
- detect - detect
- rtmp - rtmp
# -- Optional: stream specific global args # -- Optional: stream specific global args
global_args: global_args: ""
# - Optional: stream specific hwaccel args # - Optional: stream specific hwaccel args
hwaccel_args: hwaccel_args: ""
# - Optional: stream specific input args # - Optional: stream specific input args
input_args: input_args: ""
# - Optional: stream specific output args
output_args:
detect: ""
record: ""
rtmp: ""
# -- Optional: camera specific global args # -- Optional: camera specific global args
global_args: global_args: ""
# -- Optional: camera specific hwaccel args # -- Optional: camera specific hwaccel args
hwaccel_args: hwaccel_args: ""
# -- Optional: camera specific input args # -- Optional: camera specific input args
input_args: input_args: ""
# -- Optional: camera specific output args # -- Optional: camera specific output args
output_args: output_args:
detect: ""
record: ""
rtmp: ""
# -- Optional: timeout for highest scoring image before allowing it # -- Optional: timeout for highest scoring image before allowing it
# - to be replaced by a newer image. # - to be replaced by a newer image.
best_image_timeout: 60 best_image_timeout: 60
@@ -383,14 +399,16 @@ frigate:
coordinates: 545,1077,747,939,788,805 coordinates: 545,1077,747,939,788,805
# -- Optional: List of objects that can trigger this zone (default: all tracked objects) # -- Optional: List of objects that can trigger this zone (default: all tracked objects)
objects: objects:
- person []
# - person
# -- Optional: Zone level object filters. # -- Optional: Zone level object filters.
# -NOTE: The global and camera filters are applied upstream. # -NOTE: The global and camera filters are applied upstream.
filters: filters:
- object: person []
min_area: 5000 # - object: person
max_area: 100000 # min_area: null
threshold: "0.7" # max_area: null
# threshold: ""
# -- Optional: Configuration for the jpg snapshots published via MQTT # -- Optional: Configuration for the jpg snapshots published via MQTT
mqtt: mqtt:
# -- Enable it to add the configuration in the config file # -- Enable it to add the configuration in the config file
@@ -406,9 +424,9 @@ frigate:
# -- Optional: crop the snapshot # -- Optional: crop the snapshot
crop: true crop: true
# -- Optional: height to resize the snapshot to # -- Optional: height to resize the snapshot to
height: 270 height: null
# -- Optional: jpeg encode quality # -- Optional: jpeg encode quality
quality: 70 quality: null
# -- Optional: Restrict mqtt messages to objects that entered any of the listed zones # -- Optional: Restrict mqtt messages to objects that entered any of the listed zones
required_zones: [] required_zones: []
# -- Optional: Configuration for how camera is handled in the GUI. # -- Optional: Configuration for how camera is handled in the GUI.
@@ -417,7 +435,7 @@ frigate:
render_config: false render_config: false
# -- Optional: Adjust sort order of cameras in the UI. Larger numbers come later # -- Optional: Adjust sort order of cameras in the UI. Larger numbers come later
# - By default the cameras are sorted alphabetically. # - By default the cameras are sorted alphabetically.
order: 0 order: null
# -- Optional: Whether or not to show the camera in the Frigate UI # -- Optional: Whether or not to show the camera in the Frigate UI
dashboard: true dashboard: true
+1
View File
@@ -160,6 +160,7 @@ words:
- modports - modports
- mongosh - mongosh
- mountpoint - mountpoint
- mqtt
- multihost - multihost
- nbclassic - nbclassic
- neko - neko