Wiki source code of Frigate with Reolink

Version 1.1 by Normann P. Nielsen on 2026/11/15 15:41

Hide last authors
Normann P. Nielsen 1.1 1 = The Setup =
2
3 I have 4 Reolink cams, 3 x 510WA and 1 x 510A - seems pretty much the same, just the "WA" hawing Wifi, and the "A" having POE.
4
5 I started installing frigate reading the docs and learning from[[ this Youtube >>https://www.youtube.com/watch?v=pqDCEZSVeRk]]video.
6
7 = Starting up =
8
9 **The first mistake** was to install via DockerHub, now a days the image is at GitHub, so I spend a lot of time on an old version and new documentation.
10
11 Looking at many issues at gitHub, it seems that this is a very common mistake.
12
13 **Second mistake**, I started using the config from [[https://docs.frigate.video/configuration/camera_specific#reolink-cameras]] and with ~-~-shm-size=64m
14
15 This gave me ALL sort of trouble, and the camera streams stalled within seconds; i tried all sort of streams, https, rstp, rmtp etc etc.
16
17 Often ending like this:
18
19 [[image:Screen Shot 2023-04-18 at 22.39.27.jpg||width="300"||alt="Screen Shot 2023-04-18 at 22.39.27.jpg"]]
20
21 I tried all the (bad) advices from a lot of videos, and a lot or article pointing out the problem was the cams.
22
23
24
25 Then I came across t[[his Youtube>>https://www.youtube.com/watch?v=h5kCiOc3qao]] video, and found that a simple standard RTSP are working just fine (must be enabled on the Camera) - WITH more memory for 4 cams / 8 streams (~-~-shm-size=256m).
26
27 My first __working config__: [[config.yml.std>>attach:config.yml.std]]
28
29 Works fine and the camera streams does not stall
30
31
32
33 Also the setup of the docker container may require som tweaking, I You have (or not have) the [[Google Coral>>https://coral.ai/products/accelerator]].
34
35 = Installing Coral support =
36
37 Ripped from [[https://coral.ai/docs/accelerator/get-started/#1-install-the-edge-tpu-runtime]]
38
39
40 {{code}}
41 echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" | sudo tee /etc/apt/sources.list.d/coral-edgetpu.list
42 curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
43 sudo apt-get update
44 sudo apt-get install libedgetpu1-std
45 {{/code}}
46
47 = Starting frigate (version 13+14): =
48
49
50 {{code}}
51 docker run -d \
52 --name frigate \
53 --restart=unless-stopped \
54 --mount type=tmpfs,target=/tmp/cache,tmpfs-size=1000000000 \
55 --device /dev/bus/usb:/dev/bus/usb \
56 --shm-size=256m \
57 -v /opt/frigate/media:/media/frigate \
58 -v /opt/frigate/config.yml:/config/config.yml:ro \
59 -v /etc/localtime:/etc/localtime:ro \
60 -e FRIGATE_RTSP_PASSWORD='***********' \
61 -p 5000:5000 \
62 -p 1935:1935 \
63 ghcr.io/blakeblackshear/frigate:master-433bf69-tensorrt
64 {{/code}}
65
66 = Starting frigate (new versions) =
67
68 In the new versions, the "config" is a directory - im my case under /opt/frigate/config, so we need to move the file from version 13+14:
69
70
71 {{code}}
72 mkdir /opt/frigate/config
73 mv /opt/frigate/config.yml /opt/frigate/config
74 {{/code}}
75
76 and then start:
77
78
79 {{code}}
80 docker run -d \
81 --name frigate \
82 --restart=unless-stopped \
83 --mount type=tmpfs,target=/tmp/cache,tmpfs-size=1000000000 \
84 --device /dev/bus/usb:/dev/bus/usb \
85 --shm-size=256m \
86 -v /opt/frigate/media:/media/frigate \
87 -v /opt/frigate/config:/config \
88 -v /etc/localtime:/etc/localtime:ro \
89 -e FRIGATE_RTSP_PASSWORD='***********' \
90 -p 5000:5000 \
91 -p 1935:1935 \
92 ghcr.io/blakeblackshear/frigate:stable
93 {{/code}}
94
95
96
97 = A working/simple config =
98
99 {{success}}Previously, I did not use the [[**go2rtc**>>https://github.com/AlexxIT/go2rtc]] - and the playback of event clips was extreme chonky and studdering. After setting up go2rtc as proxy (see the code) the event clips are way better.
100
101 Great that it is embedded with Frigate.{{/success}}
102
103
104
105
106 {{code}}
107 mqtt:
108 host: 10.0.0.183
109 go2rtc:
110 streams:
111 frigate_front_door_cam_main:
112 - "ffmpeg:http://10.0.0.151/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=readonly&password={FRIGATE_RTSP_PASSWORD}#video=copy#audio=copy#audio=opus"
113 frigate_front_door_cam_sub:
114 - "ffmpeg:http://10.0.0.151/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=readonly&password={FRIGATE_RTSP_PASSWORD}"
115 frigate_behind_house_cam_main:
116 - "ffmpeg:http://10.0.0.176/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=readonly&password={FRIGATE_RTSP_PASSWORD}#video=copy#audio=copy#audio=opus"
117 frigate_behind_house_cam_sub:
118 - "ffmpeg:http://10.0.0.176/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=readonly&password={FRIGATE_RTSP_PASSWORD}"
119 frigate_carport_cam_main:
120 - "ffmpeg:http://10.0.0.191/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=readonly&password={FRIGATE_RTSP_PASSWORD}#video=copy#audio=copy#audio=opus"
121 frigate_carport_cam_sub:
122 - "ffmpeg:http://10.0.0.191/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=readonly&password={FRIGATE_RTSP_PASSWORD}"
123 frigate_big_shed_cam_main:
124 - "ffmpeg:http://10.0.0.108/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=readonly&password={FRIGATE_RTSP_PASSWORD}#video=copy#audio=copy#audio=opus"
125 frigate_big_shed_cam_sub:
126 - "ffmpeg:http://10.0.0.108/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=readonly&password={FRIGATE_RTSP_PASSWORD}"
127
128 cameras:
129 frigate_front_door_cam:
130 ffmpeg:
131 inputs:
132 - path: rtsp://127.0.0.1:8554/frigate_front_door_cam_sub?video=copy
133 input_args: preset-rtsp-restream
134 roles:
135 - detect
136 - path: rtsp://127.0.0.1:8554/frigate_front_door_cam_main?video=copy&audio=aac
137 input_args: preset-rtsp-restream
138 roles:
139 - record
140 rtmp:
141 enabled: False
142 detect:
143 width: 640
144 height: 480
145 fps: 5
146 objects:
147 track:
148 - person
149 snapshots:
150 enabled: True
151 timestamp: false
152 bounding_box: True
153 retain:
154 default: 2
155 record:
156 enabled: True
157 events:
158 retain:
159 default: 10
160 frigate_behind_house_cam:
161 ffmpeg:
162 inputs:
163 - path: rtsp://127.0.0.1:8554/frigate_behind_house_cam_sub?video=copy
164 input_args: preset-rtsp-restream
165 roles:
166 - detect
167 - path: rtsp://127.0.0.1:8554/frigate_behind_house_cam_main?video=copy&audio=aac
168 input_args: preset-rtsp-restream
169 roles:
170 - record
171 rtmp:
172 enabled: False
173 detect:
174 width: 640
175 height: 480
176 fps: 5
177 objects:
178 track:
179 - person
180 snapshots:
181 enabled: True
182 timestamp: false
183 bounding_box: True
184 retain:
185 default: 2
186 record:
187 enabled: True
188 events:
189 retain:
190 default: 10
191 frigate_carport_cam:
192 ffmpeg:
193 inputs:
194 - path: rtsp://127.0.0.1:8554/frigate_carport_cam_sub?video=copy
195 input_args: preset-rtsp-restream
196 roles:
197 - detect
198 - path: rtsp://127.0.0.1:8554/frigate_carport_cam_main?video=copy&audio=aac
199 input_args: preset-rtsp-restream
200 roles:
201 - record
202 rtmp:
203 enabled: False
204 detect:
205 width: 640
206 height: 480
207 fps: 5
208 objects:
209 track:
210 - person
211 snapshots:
212 enabled: True
213 timestamp: false
214 bounding_box: True
215 retain:
216 default: 2
217 record:
218 enabled: True
219 events:
220 retain:
221 default: 10
222 frigate_big_shed_cam:
223 ffmpeg:
224 inputs:
225 - path: rtsp://127.0.0.1:8554/frigate_big_shed_cam_sub?video=copy
226 input_args: preset-rtsp-restream
227 roles:
228 - detect
229 - path: rtsp://127.0.0.1:8554/frigate_big_shed_cam_main?video=copy&audio=aac
230 input_args: preset-rtsp-restream
231 roles:
232 - record
233 rtmp:
234 enabled: False
235 detect:
236 width: 640
237 height: 480
238 fps: 5
239 objects:
240 track:
241 - person
242 snapshots:
243 enabled: True
244 timestamp: false
245 bounding_box: True
246 retain:
247 default: 2
248 record:
249 enabled: True
250 events:
251 retain:
252 default: 10
253 detectors:
254 coral:
255 type: edgetpu
256 device: usb
257 birdseye:
258 enabled: True
259 mode: continuous
260 {{/code}}
261
262 = CPU - With Google Coral =
263
264 As the logs states:
265
266
267 {{code}}
268 2023-04-19 21:39:43.672054592 [INFO] Starting Frigate...
269 2023-04-19 21:39:45.123307770 [2023-04-19 21:39:45] frigate.app INFO : Starting Frigate (0.12.0-433bf69)
270 2023-04-19 21:39:45.170477205 [2023-04-19 21:39:45] peewee_migrate INFO : Starting migrations
271 2023-04-19 21:39:45.175774528 [2023-04-19 21:39:45] peewee_migrate INFO : There is nothing to migrate
272 2023-04-19 21:39:45.204354047 [2023-04-19 21:39:45] detector.coral INFO : Starting detection process: 290
273 2023-04-19 21:39:48.422390105 [2023-04-19 21:39:45] frigate.app INFO : Output process started: 292
274 2023-04-19 21:39:48.422396583 [2023-04-19 21:39:45] frigate.comms.dispatcher INFO : Turning off snapshots for frigate_carport_cam
275 2023-04-19 21:39:48.422404731 [2023-04-19 21:39:45] frigate.app INFO : Camera processor started for frigate_front_door_cam: 298
276 2023-04-19 21:39:48.422409419 [2023-04-19 21:39:45] frigate.app INFO : Camera processor started for frigate_garden_cam: 300
277 2023-04-19 21:39:48.422426668 [2023-04-19 21:39:45] frigate.app INFO : Camera processor started for frigate_behind_house_cam: 302
278 2023-04-19 21:39:48.422431296 [2023-04-19 21:39:45] frigate.app INFO : Camera processor started for frigate_carport_cam: 303
279 2023-04-19 21:39:48.422434562 [2023-04-19 21:39:45] frigate.app INFO : Capture process started for frigate_front_door_cam: 304
280 2023-04-19 21:39:48.422459193 [2023-04-19 21:39:45] frigate.app INFO : Capture process started for frigate_garden_cam: 308
281 2023-04-19 21:39:48.422463190 [2023-04-19 21:39:45] frigate.app INFO : Capture process started for frigate_behind_house_cam: 311
282 2023-04-19 21:39:48.422466294 [2023-04-19 21:39:45] frigate.app INFO : Capture process started for frigate_carport_cam: 315
283 2023-04-19 21:39:48.446236449 [2023-04-19 21:39:45] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as usb
284 2023-04-19 21:39:48.446242266 [2023-04-19 21:39:48] frigate.detectors.plugins.edgetpu_tfl INFO : TPU found
285 {{/code}}
286
287 I assume the [[Google Coral>>https://coral.ai/products/accelerator]] is working, but still Frigate is highly CPU intensive for 4 cams:
288
289 [[image:Screen Shot 2023-04-19 at 22.12.12.jpg||width="1091"||height="985"||alt="Screen Shot 2023-04-19 at 22.12.12.jpg"]]
290
291 With frigate not running:
292
293 [[image:Screen Shot 2023-04-20 at 06.39.31.jpg||width="1093"||height="1094"||alt="Screen Shot 2023-04-20 at 06.39.31.jpg"]]
294
295 If this is not improving / improved somehow, I will setup Frigate on a seperate piece of hardware.
296
297
298
299 This is 1 cam high res detect:
300
301 [[image:Screenshot 2023-04-21 at 08.34.04.png||width="841"||height="250"||alt="Screenshot 2023-04-21 at 08.34.04.png"]]