Sidehistorik
The Setup
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.
I started installing frigate reading the docs and learning from this Youtube video.
Starting up
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.
Looking at many issues at gitHub, it seems that this is a very common mistake.
Second mistake, I started using the config from https://docs.frigate.video/configuration/camera_specific#reolink-cameras and with --shm-size=64m
This gave me ALL sort of trouble, and the cameras stalled within seconds; i tried all sort of streams, https, rstp, rmtp etc etc.
Often ending like this:
I tried all the (bad) advices from a lot of videos.
Then I can came across this Youtube video, and found that a simple stndard standard RTSP are working just fine (must be enabled on the Camera) - WITH more memory for 4 cams.
My first working config: config.yml.std
Also the setup of the docker container may require som tweaking, I You have (or not have) the Google Coral.
Starting frigate:
Kodeblok |
---|
docker run -d \ --name frigate \ --restart=unless-stopped \ --mount type=tmpfs,target=/tmp/cache,tmpfs-size=1000000000 \ --device /dev/bus/usb:/dev/bus/usb \ --shm-size=256m \ -v /mnt/LaCie/nas/frigate:/media/frigate \ -v /opt/frigate/config.yml:/config/config.yml:ro \ -v /etc/localtime:/etc/localtime:ro \ -e FRIGATE_RTSP_PASSWORD='***********' \ -p 5000:5000 \ -p 1935:1935 \ ghcr.io/blakeblackshear/frigate:master-433bf69-tensorrt |
A working/simple config
Kodeblok |
---|
mqtt:
host: 10.0.0.183
cameras:
frigate_front_door_cam:
ffmpeg:
inputs:
- path: rtsp://user:password@10.0.0.151:554//h264Preview_01_main
roles:
- detect
- path: rtsp://user:password@10.0.0.151:554//h264Preview_01_sub
roles:
- record
rtmp:
enabled: False
detect:
width: 640
height: 480
fps: 10
objects:
track:
- person
snapshots:
enabled: True
timestamp: false
bounding_box: True
retain:
default: 2
frigate_garden_cam:
ffmpeg:
inputs:
- path: rtsp://user:password@10.0.0.108:554//h264Preview_01_main
roles:
- detect
- path: rtsp://user:password@10.0.0.108:554//h264Preview_01_sub
roles:
- record
rtmp:
enabled: False
detect:
width: 2560
height: 1920
fps: 10
objects:
track:
- person
snapshots:
enabled: True
timestamp: false
bounding_box: True
retain:
default: 2
frigate_behind_house_cam:
ffmpeg:
inputs:
- path: rtsp://user:password@10.0.0.176:554//h264Preview_01_main
roles:
- detect
- path: rtsp://user:password@10.0.0.176:554//h264Preview_01_sub
roles:
- record
rtmp:
enabled: False
detect:
width: 2560
height: 1920
fps: 10
objects:
track:
- person
snapshots:
enabled: True
timestamp: false
bounding_box: True
retain:
default: 2
frigate_carport_cam:
ffmpeg:
inputs:
- path: rtsp://user:password@10.0.0.191:554//h264Preview_01_main
roles:
- detect
- path: rtsp://user:password@10.0.0.191:554//h264Preview_01_sub
roles:
- record
rtmp:
enabled: False
detect:
width: 2560
height: 1920
fps: 10
objects:
track:
- person
- car
snapshots:
enabled: True
timestamp: false
bounding_box: True
retain:
default: 2
detectors:
coral:
type: edgetpu
device: usb |
CPU - With Google Coral
As the logs states:
Kodeblok |
---|
2023-04-19 21:39:43.672054592 [INFO] Starting Frigate... 2023-04-19 21:39:45.123307770 [2023-04-19 21:39:45] frigate.app INFO : Starting Frigate (0.12.0-433bf69) 2023-04-19 21:39:45.170477205 [2023-04-19 21:39:45] peewee_migrate INFO : Starting migrations 2023-04-19 21:39:45.175774528 [2023-04-19 21:39:45] peewee_migrate INFO : There is nothing to migrate 2023-04-19 21:39:45.204354047 [2023-04-19 21:39:45] detector.coral INFO : Starting detection process: 290 2023-04-19 21:39:48.422390105 [2023-04-19 21:39:45] frigate.app INFO : Output process started: 292 2023-04-19 21:39:48.422396583 [2023-04-19 21:39:45] frigate.comms.dispatcher INFO : Turning off snapshots for frigate_carport_cam 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 2023-04-19 21:39:48.422409419 [2023-04-19 21:39:45] frigate.app INFO : Camera processor started for frigate_garden_cam: 300 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 2023-04-19 21:39:48.422431296 [2023-04-19 21:39:45] frigate.app INFO : Camera processor started for frigate_carport_cam: 303 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 2023-04-19 21:39:48.422459193 [2023-04-19 21:39:45] frigate.app INFO : Capture process started for frigate_garden_cam: 308 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 2023-04-19 21:39:48.422466294 [2023-04-19 21:39:45] frigate.app INFO : Capture process started for frigate_carport_cam: 315 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 2023-04-19 21:39:48.446242266 [2023-04-19 21:39:48] frigate.detectors.plugins.edgetpu_tfl INFO : TPU found |
I assume the Google Coral is working, but still Frigate is highly CPU intensive for 4 cams: