/
/
/
Ansible role that deployes services on my runner machine
1# Frigate Configuration
2# Auto-generated by Ansible Runner Role
3
4mqtt:
5 enabled: true
6 host: {{ mqtt_host }}
7 port: {{ mqtt_port }}
8 user: {{ mqtt_username }}
9 password: {{ mqtt_password }}
10 topic_prefix: frigate
11
12database:
13 path: /data/frigate.db
14
15{% if frigate_hardware_acceleration == 'nvenc' %}
16detectors:
17 onnx_0:
18 type: onnx
19 onnx_1:
20 type: onnx
21
22model:
23 model_type: yolo-generic
24 path: /config/models/yolov7-tiny.onnx
25 labelmap_path: /config/models/coco_labels.txt
26 width: 640
27 height: 640
28 input_tensor: nchw
29 input_dtype: float
30
31ffmpeg:
32 hwaccel_args: preset-nvidia
33{% else %}
34detectors:
35 cpu_0:
36 type: cpu
37
38ffmpeg:
39 hwaccel_args: auto
40{% endif %}
41
42snapshots:
43 enabled: true
44 timestamp: false
45 bounding_box: true
46 crop: false
47 height: 175
48
49record:
50 enabled: true
51 expire_interval: 60
52 sync_recordings: false
53 retain:
54 days: 30
55 mode: all
56
57objects:
58 track:
59 - person
60 - car
61 - cat
62 filters:
63 person:
64 min_area: 2000
65 max_area: 200000
66 threshold: 0.7
67 car:
68 min_area: 1000
69 max_area: 5000
70 threshold: 0.9
71 cat:
72 min_area: 2000
73 max_area: 100000
74 threshold: 0.6
75review:
76 alerts:
77 labels: [person, cat]
78
79motion:
80 threshold: 25
81 contour_area: 30
82 delta_alpha: 0.2
83 frame_alpha: 0.2
84 frame_height: 144
85 improve_contrast: false
86
87cameras:
88{% for camera in frigate_cameras %}
89 {{ camera.name }}:
90 enabled: {{ camera.enabled | bool | lower }}
91 ffmpeg:
92 inputs:
93 - path: rtsp://127.0.0.1:8554/{{ camera.name }}-detect
94 roles: [detect]
95 - path: rtsp://127.0.0.1:8554/{{ camera.name }}
96 roles: [record]
97 detect:
98 fps: 7
99 width: {{ camera.detect_width | default(640) }}
100 height: {{ camera.detect_height | default(640) }}
101{% if camera.name in frigate_cameras_record_disabled %}
102 record:
103 enabled: false
104{% endif %}
105{% endfor %}
106
107go2rtc:
108 streams:
109{% for camera in frigate_cameras %}
110 {{ camera.name }}:
111 - rtsp://{{ camera.username }}:{{ camera.password }}@{{ camera.host }}{{ ':' ~ camera.port if camera.port is defined }}{{ camera.path }}
112 {{ camera.name }}-detect:
113 - "ffmpeg:rtsp://{{ camera.username }}:{{ camera.password }}@{{ camera.host }}{{ ':' ~ camera.port if camera.port is defined }}{{ camera.path }}#video=h264#width=640#height=360#hardware"
114{% endfor %}
115
116{% if frigate_onvif_cameras | default([]) | length > 0 %}
117onvif:
118{% for cam in frigate_onvif_cameras %}
119 {{ cam.name }}:
120 host: {{ cam.host }}
121 port: {{ cam.port | default(2020) }}
122 user: {{ cam.username }}
123 password: {{ cam.password }}
124{% if frigate_onvif_autotracking %}
125 autotracking:
126 enabled: true
127{% endif %}
128{% endfor %}
129{% endif %}
130
131ui:
132 timezone: {{ runner_timezone }}
133
134birdseye:
135 enabled: true
136 restream: false
137 width: 1280
138 height: 720
139 quality: 8
140 mode: objects
141
142logger:
143 default: debug
144 logs:
145 frigate.event: debug
146 frigate.detectors.plugins.onnx: debug
147 detector.onnx: debug
148
149version: 0.16-1
150
151auth:
152 enabled: false
153
154tls:
155 enabled: false
156detect:
157 enabled: true
158