runner

Ansible role that deployes services on my runner machine

2.5 KBJ2
frigate-config.yml.j2
2.5 KB139 lines • plaintext
1# Frigate Configuration
2# Auto-generated by Ansible Runner Role
3
4mqtt:
5  enabled: true
6  host: {{ frigate_mqtt_host }}
7  port: {{ frigate_mqtt_port }}
8  user: {{ frigate_mqtt_username }}
9  password: {{ frigate_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: 640
100      height: 640
101{% endfor %}
102
103go2rtc:
104  streams:
105{% for camera in frigate_cameras %}
106    {{ camera.name }}: 
107      - rtsp://{{ camera.username }}:{{ camera.password }}@{{ camera.host }}{{ ':' ~ camera.port if camera.port is defined }}{{ camera.path }}
108    {{ camera.name }}-detect: 
109      - "ffmpeg:rtsp://{{ camera.username }}:{{ camera.password }}@{{ camera.host }}{{ ':' ~ camera.port if camera.port is defined }}{{ camera.path }}#video=h264#width=640#height=360#hardware"
110{% endfor %}
111
112ui:
113  timezone: Europe/Amsterdam
114
115birdseye:
116  enabled: true
117  restream: false
118  width: 1280
119  height: 720
120  quality: 8
121  mode: objects
122
123logger:
124  default: debug
125  logs:
126    frigate.event: debug
127    frigate.detectors.plugins.onnx: debug
128    detector.onnx: debug
129
130version: 0.16-1
131
132auth:
133  enabled: false
134
135tls:
136  enabled: false
137detect:
138  enabled: true
139