Hello everyone.
My setup is an HP EliteDesk 800 G4 DM Core i5-8500T 2.1 - SSD 480 GB - 32GB, with Proxmox installed, HA in VM and Double Take as addon, Frigate in LXC container, and Compreface in LXC container.
I have 6 cores attributed to HA VM, 6 cores and 4GB RAM to Frigate, and 6 cores and 8Gb RAM to Compreface.
Also have Coral USB used by Frigate.
I have a Dahua NVR with 8 cameras, all of them with H.265 video compression, 7 of them with 2560x1440 primary stream (can have better resolution) and 704x576 secondary stream (is the best resolution I can have). The 8th camera has 1280x720 primary stream and 1920x1080 secondary stream.
Frigate is 0.12.0-27A31E7 version.
My Frigate configuration.yml is this:
mqtt:
host: 192.168.XX.XX
port: 1883
user: xxxx
password: XXXXXX
detectors:
coral:
type: edgetpu
device: usb
go2rtc:
streams:
Varanda_da_Frente:
- ffmpeg:rtsp://yyy:[email protected]:xxx/cam/realmonitor?channel=1&subtype=0
Varanda_da_Frente_Sub:
- ffmpeg:rtsp://yyy:[email protected]:xxx/4/cam/realmonitor?channel=1&subtype=1
Varanda_da_Entrada:
- ffmpeg:rtsp://yyy:[email protected]:xxx/cam/realmonitor?channel=2&subtype=0
Varanda_da_Entrada_Sub:
- ffmpeg:rtsp://yyy:[email protected]:xxx/cam/realmonitor?channel=2&subtype=1
Lateral_Quartos:
- ffmpeg:rtsp://yyy:[email protected]:xxx/cam/realmonitor?channel=3&subtype=0
Lateral_Quartos_Sub:
- ffmpeg:rtsp://yyy:[email protected]:xxx/cam/realmonitor?channel=3&subtype=1
Traseira:
- ffmpeg:rtsp://yyy:[email protected]:xxx/cam/realmonitor?channel=4&subtype=0
Traseira_Sub:
- ffmpeg:rtsp://yyy:[email protected]:xxx/cam/realmonitor?channel=4&subtype=1
Lateral_WC:
- ffmpeg:rtsp://yyy:[email protected]:xxx/cam/realmonitor?channel=5&subtype=0
Lateral_WC_Sub:
- ffmpeg:rtsp://yyy:[email protected]:xxx/cam/realmonitor?channel=5&subtype=1
Lateral_Rampa:
- ffmpeg:rtsp://yyy:[email protected]:xxx/cam/realmonitor?channel=6&subtype=0
Lateral_Rampa_Sub:
- ffmpeg:rtsp://yyy:[email protected]:xxx/cam/realmonitor?channel=6&subtype=1
Frente_Portao:
- ffmpeg:rtsp://yyy:[email protected]:xxx/cam/realmonitor?channel=7&subtype=0
Frente_Portao_Sub:
- ffmpeg:rtsp://yyy:[email protected]:xxx/cam/realmonitor?channel=7&subtype=1
Campainha:
- ffmpeg:rtsp://yyy:[email protected]:xxx/cam/realmonitor?channel=8&subtype=1
Campainha_Sub:
- ffmpeg:rtsp://yyy:[email protected]:xxx/cam/realmonitor?channel=8&subtype=0
birdseye:
enabled: True
quality: 8
mode: objects
database:
# The path to store the SQLite DB (default: shown below)
path: /media/frigate/frigate.db
logger:
# Optional: Default log verbosity (default: shown below)
default: info
# Optional: Component specific logger overrides
logs:
frigate.app: debug
ffmpeg:
hwaccel_args:
- -hwaccel
- vaapi
# Optional: global ffmpeg args (default: shown below)
global_args: -hide_banner -loglevel warning -threads 1
# Optional: global hwaccel args (default: shown below)
# Optional: global input args (default: shown below)
input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1
# Optional: global output args
output_args:
# Optional: output args for detect streams (default: shown below)
detect: -threads 1 -f rawvideo -pix_fmt yuv420p
# Optional: output args for record streams (default: shown below)
record: preset-record-generic
cameras:
Varanda_da_Frente:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/Varanda_da_Frente
input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://127.0.0.1:8554/Varanda_da_Frente_Sub
input_args: preset-rtsp-restream
roles:
- detect
live:
stream_name: Varanda_da_Frente_Sub
detect:
width: 1920
height: 1080
fps: 5
enabled: True
max_disappeared: 25
stationary:
interval: 0
threshold: 50
max_frames:
default: 3000
objects:
person: 1000
objects:
track:
- person
- cat
- dog
- knife
- cell phone
- mouse
mask: 0,0,1000,0,1000,200,0,200
filters:
person:
min_area: 5000
max_area: 100000
min_score: 0.5
threshold: 0.7
mask: 0,0,1000,0,1000,200,0,200
motion:
threshold: 25
contour_area: 30
delta_alpha: 0.2
frame_alpha: 0.2
frame_height: 50
mask: 0,900,1080,900,1440,1920,0,1920
improve_contrast: False
best_image_timeout: 60
# Optional: 24/7 recording configuration
record:
# Optional: Enable recording (default: global setting)
enabled: True
# Optional: Number of days to retain (default: global setting)
retain:
days: 3
mode: motion
events:
retain:
default: 7
mode: active_objects
objects:
person: 50
# Optional: RTMP re-stream configuration
rtmp:
# Required: Enable the live stream (default: True)
enabled: False
# Optional: Configuration for the jpg snapshots written to the clips directory for each event
snapshots:
# Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
# This value can be set via MQTT and will be updated in startup based on retained value
enabled: False
# Optional: print a timestamp on the snapshots (default: shown below)
timestamp: False
# Optional: draw bounding box on the snapshots (default: shown below)
bounding_box: False
# Optional: crop the snapshot (default: shown below)
crop: False
# Optional: height to resize the snapshot to (default: original size)
height: 175
# Optional: Restrict snapshots to objects that entered any of the listed zones (default: no required zones)
required_zones: []
# Optional: Camera override for retention settings (default: global values)
retain:
# Required: Default retention days (default: shown below)
default: 10
# Optional: Per object retention days
objects:
person: 15
mqtt:
enabled: True
timestamp: True
bounding_box: True
crop: True
height: 500
quality: 100
Varanda_da_Entrada:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/Varanda_da_Entrada
input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://127.0.0.1:8554/Varanda_da_Entrada_Sub
input_args: preset-rtsp-restream
roles:
- detect
live:
stream_name: Varanda_da_Entrada_Sub
detect:
width: 1920
height: 1080
fps: 5
enabled: True
max_disappeared: 25
stationary:
interval: 0
threshold: 50
max_frames:
default: 3000
objects:
person: 1000
objects:
track:
- person
- bird
- cat
- dog
- knife
- cell phone
- mouse
mask: 0,0,1000,0,1000,200,0,200
filters:
person:
min_area: 5000
max_area: 100000
min_score: 0.5
threshold: 0.7
mask: 0,0,1000,0,1000,200,0,200
motion:
threshold: 25
contour_area: 30
delta_alpha: 0.2
frame_alpha: 0.2
frame_height: 50
mask: 0,900,1080,900,1080,1920,0,1920
improve_contrast: False
best_image_timeout: 60
# Optional: 24/7 recording configuration
record:
# Optional: Enable recording (default: global setting)
enabled: True
# Optional: Number of days to retain (default: global setting)
retain:
days: 3
mode: motion
events:
retain:
default: 7
mode: active_objects
objects:
person: 50
# Optional: RTMP re-stream configuration
rtmp:
# Required: Enable the live stream (default: True)
enabled: False
# Optional: Configuration for the jpg snapshots written to the clips directory for each event
snapshots:
# Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
# This value can be set via MQTT and will be updated in startup based on retained value
enabled: False
# Optional: print a timestamp on the snapshots (default: shown below)
timestamp: False
# Optional: draw bounding box on the snapshots (default: shown below)
bounding_box: False
# Optional: crop the snapshot (default: shown below)
crop: False
# Optional: height to resize the snapshot to (default: original size)
height: 175
# Optional: Restrict snapshots to objects that entered any of the listed zones (default: no required zones)
required_zones: []
# Optional: Camera override for retention settings (default: global values)
retain:
# Required: Default retention days (default: shown below)
default: 10
# Optional: Per object retention days
objects:
person: 15
mqtt:
enabled: True
timestamp: True
bounding_box: True
crop: True
height: 500
quality: 100
Lateral_Quartos:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/Lateral_Quartos
input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://127.0.0.1:8554/Lateral_Quartos_Sub
input_args: preset-rtsp-restream
roles:
- detect
live:
stream_name: Lateral_Quartos_Sub
detect:
width: 1920
height: 1080
fps: 5
enabled: True
max_disappeared: 25
stationary:
interval: 0
threshold: 50
max_frames:
default: 3000
objects:
person: 1000
objects:
track:
- person
- bird
- cat
- dog
- knife
- cell phone
- mouse
mask: 0,0,1000,0,1000,200,0,200
filters:
person:
min_area: 5000
max_area: 100000
min_score: 0.5
threshold: 0.7
mask: 0,0,1000,0,1000,200,0,200
motion:
threshold: 25
contour_area: 30
delta_alpha: 0.2
frame_alpha: 0.2
frame_height: 50
mask: 0,900,1080,900,1080,1920,0,1920
improve_contrast: False
best_image_timeout: 60
# Optional: 24/7 recording configuration
record:
# Optional: Enable recording (default: global setting)
enabled: True
# Optional: Number of days to retain (default: global setting)
retain:
days: 3
mode: motion
events:
retain:
default: 7
mode: active_objects
objects:
person: 50
# Optional: RTMP re-stream configuration
rtmp:
# Required: Enable the live stream (default: True)
enabled: False
# Optional: Configuration for the jpg snapshots written to the clips directory for each event
snapshots:
# Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
# This value can be set via MQTT and will be updated in startup based on retained value
enabled: False
# Optional: print a timestamp on the snapshots (default: shown below)
timestamp: False
# Optional: draw bounding box on the snapshots (default: shown below)
bounding_box: False
# Optional: crop the snapshot (default: shown below)
crop: False
# Optional: height to resize the snapshot to (default: original size)
height: 175
# Optional: Restrict snapshots to objects that entered any of the listed zones (default: no required zones)
required_zones: []
# Optional: Camera override for retention settings (default: global values)
retain:
# Required: Default retention days (default: shown below)
default: 10
# Optional: Per object retention days
objects:
person: 15
mqtt:
enabled: True
timestamp: True
bounding_box: True
crop: True
height: 500
quality: 100
Traseira:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/Traseira
input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://127.0.0.1:8554/Traseira_Sub
input_args: preset-rtsp-restream
roles:
- detect
live:
stream_name: Traseira_Sub
detect:
width: 1920
height: 1080
fps: 5
enabled: True
max_disappeared: 25
stationary:
interval: 0
threshold: 50
max_frames:
default: 3000
objects:
person: 1000
objects:
track:
- person
- bird
- cat
- dog
- knife
- cell phone
- mouse
mask: 0,0,1000,0,1000,200,0,200
filters:
person:
min_area: 5000
max_area: 100000
min_score: 0.5
threshold: 0.7
mask: 0,0,1000,0,1000,200,0,200
motion:
threshold: 25
contour_area: 30
delta_alpha: 0.2
frame_alpha: 0.2
frame_height: 50
mask: 0,900,1080,900,1080,1920,0,1920
improve_contrast: False
best_image_timeout: 60
# Optional: 24/7 recording configuration
record:
# Optional: Enable recording (default: global setting)
enabled: True
# Optional: Number of days to retain (default: global setting)
retain:
days: 3
mode: motion
events:
retain:
default: 7
mode: active_objects
objects:
person: 50
# Optional: RTMP re-stream configuration
rtmp:
# Required: Enable the live stream (default: True)
enabled: False
# Optional: Configuration for the jpg snapshots written to the clips directory for each event
snapshots:
# Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
# This value can be set via MQTT and will be updated in startup based on retained value
enabled: False
# Optional: print a timestamp on the snapshots (default: shown below)
timestamp: False
# Optional: draw bounding box on the snapshots (default: shown below)
bounding_box: False
# Optional: crop the snapshot (default: shown below)
crop: False
# Optional: height to resize the snapshot to (default: original size)
height: 175
# Optional: Restrict snapshots to objects that entered any of the listed zones (default: no required zones)
required_zones: []
# Optional: Camera override for retention settings (default: global values)
retain:
# Required: Default retention days (default: shown below)
default: 10
# Optional: Per object retention days
objects:
person: 15
mqtt:
enabled: True
timestamp: True
bounding_box: True
crop: True
height: 500
quality: 100
Lateral_WC:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/Lateral_WC
input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://127.0.0.1:8554/Lateral_WC_Sub
input_args: preset-rtsp-restream
roles:
- detect
live:
stream_name: Lateral_WC_Sub
detect:
width: 1920
height: 1080
fps: 5
enabled: True
max_disappeared: 25
stationary:
interval: 0
threshold: 50
max_frames:
default: 3000
objects:
person: 1000
objects:
track:
- person
- car
- motorcycle
- bird
- cat
- dog
- knife
- cell phone
- mouse
mask: 0,0,1000,0,1000,200,0,200
filters:
person:
min_area: 5000
max_area: 100000
min_score: 0.5
threshold: 0.7
mask: 0,0,1000,0,1000,200,0,200
motion:
threshold: 25
contour_area: 30
delta_alpha: 0.2
frame_alpha: 0.2
frame_height: 50
mask: 0,900,1080,900,1080,1920,0,1920
improve_contrast: False
best_image_timeout: 60
# Optional: 24/7 recording configuration
record:
# Optional: Enable recording (default: global setting)
enabled: True
# Optional: Number of days to retain (default: global setting)
retain:
days: 3
mode: motion
events:
retain:
default: 7
mode: active_objects
objects:
person: 50
# Optional: RTMP re-stream configuration
rtmp:
# Required: Enable the live stream (default: True)
enabled: False
# Optional: Configuration for the jpg snapshots written to the clips directory for each event
snapshots:
# Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
# This value can be set via MQTT and will be updated in startup based on retained value
enabled: False
# Optional: print a timestamp on the snapshots (default: shown below)
timestamp: False
# Optional: draw bounding box on the snapshots (default: shown below)
bounding_box: False
# Optional: crop the snapshot (default: shown below)
crop: False
# Optional: height to resize the snapshot to (default: original size)
height: 175
# Optional: Restrict snapshots to objects that entered any of the listed zones (default: no required zones)
required_zones: []
# Optional: Camera override for retention settings (default: global values)
retain:
# Required: Default retention days (default: shown below)
default: 10
# Optional: Per object retention days
objects:
person: 15
mqtt:
enabled: True
timestamp: True
bounding_box: True
crop: True
height: 500
quality: 100
Lateral_Rampa:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/Lateral_Rampa
input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://127.0.0.1:8554/Lateral_Rampa_Sub
input_args: preset-rtsp-restream
roles:
- detect
live:
stream_name: Lateral_Rampa_Sub
detect:
width: 1920
height: 1080
fps: 5
enabled: True
max_disappeared: 25
stationary:
interval: 0
threshold: 50
max_frames:
default: 3000
objects:
person: 1000
objects:
track:
- person
- car
- motorcycle
- bird
- cat
- dog
- knife
- cell phone
- mouse
mask: 0,0,1000,0,1000,200,0,200
filters:
person:
min_area: 5000
max_area: 100000
min_score: 0.5
threshold: 0.7
mask: 0,0,1000,0,1000,200,0,200
motion:
threshold: 25
contour_area: 30
delta_alpha: 0.2
frame_alpha: 0.2
frame_height: 50
mask: 0,900,1080,900,1080,1920,0,1920
improve_contrast: False
best_image_timeout: 60
# Optional: 24/7 recording configuration
record:
# Optional: Enable recording (default: global setting)
enabled: True
# Optional: Number of days to retain (default: global setting)
retain:
days: 3
mode: motion
events:
retain:
default: 7
mode: active_objects
objects:
person: 50
# Optional: RTMP re-stream configuration
rtmp:
# Required: Enable the live stream (default: True)
enabled: False
# Optional: Configuration for the jpg snapshots written to the clips directory for each event
snapshots:
# Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
# This value can be set via MQTT and will be updated in startup based on retained value
enabled: False
# Optional: print a timestamp on the snapshots (default: shown below)
timestamp: False
# Optional: draw bounding box on the snapshots (default: shown below)
bounding_box: False
# Optional: crop the snapshot (default: shown below)
crop: False
# Optional: height to resize the snapshot to (default: original size)
height: 175
# Optional: Restrict snapshots to objects that entered any of the listed zones (default: no required zones)
required_zones: []
# Optional: Camera override for retention settings (default: global values)
retain:
# Required: Default retention days (default: shown below)
default: 10
# Optional: Per object retention days
objects:
person: 15
mqtt:
enabled: True
timestamp: True
bounding_box: True
crop: True
height: 500
quality: 100
Frente_Portao:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/Frente_Portao
input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://127.0.0.1:8554/Frente_Portao_Sub
input_args: preset-rtsp-restream
roles:
- detect
live:
stream_name: Frente_Portao_Sub
detect:
width: 1920
height: 1080
fps: 5
enabled: True
max_disappeared: 25
stationary:
interval: 0
threshold: 50
max_frames:
default: 3000
objects:
person: 1000
objects:
track:
- person
- car
- motorcycle
- bird
- cat
- dog
- knife
- cell phone
- mouse
mask: 0,0,1000,0,1000,200,0,200
filters:
person:
min_area: 5000
max_area: 100000
min_score: 0.5
threshold: 0.7
mask: 0,0,1000,0,1000,200,0,200
motion:
threshold: 25
contour_area: 30
delta_alpha: 0.2
frame_alpha: 0.2
frame_height: 50
mask: 0,900,1080,900,1080,1920,0,1920
improve_contrast: False
best_image_timeout: 60
# Optional: 24/7 recording configuration
record:
# Optional: Enable recording (default: global setting)
enabled: True
# Optional: Number of days to retain (default: global setting)
retain:
days: 3
mode: motion
events:
retain:
default: 7
mode: active_objects
objects:
person: 50
# Optional: RTMP re-stream configuration
rtmp:
# Required: Enable the live stream (default: True)
enabled: False
# Optional: Configuration for the jpg snapshots written to the clips directory for each event
snapshots:
# Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
# This value can be set via MQTT and will be updated in startup based on retained value
enabled: False
# Optional: print a timestamp on the snapshots (default: shown below)
timestamp: False
# Optional: draw bounding box on the snapshots (default: shown below)
bounding_box: False
# Optional: crop the snapshot (default: shown below)
crop: False
# Optional: height to resize the snapshot to (default: original size)
height: 175
# Optional: Restrict snapshots to objects that entered any of the listed zones (default: no required zones)
required_zones: []
# Optional: Camera override for retention settings (default: global values)
retain:
# Required: Default retention days (default: shown below)
default: 10
# Optional: Per object retention days
objects:
person: 15
mqtt:
enabled: True
timestamp: True
bounding_box: True
crop: True
height: 500
quality: 100
Campainha:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/Campainha
input_args: preset-rtsp-restream
roles:
- record
- path: rtsp://127.0.0.1:8554/Campainha_Sub
input_args: preset-rtsp-restream
roles:
- detect
live:
stream_name: Campainha_Sub
detect:
width: 1920
height: 1080
fps: 5
enabled: True
max_disappeared: 25
stationary:
interval: 0
threshold: 50
max_frames:
default: 3000
objects:
person: 1000
objects:
track:
- person
- car
- motorcycle
- bird
- cat
- dog
- knife
- cell phone
- mouse
mask: 0,0,1000,0,1000,200,0,200
filters:
person:
min_area: 5000
max_area: 100000
min_score: 0.5
threshold: 0.7
mask: 0,0,1000,0,1000,200,0,200
motion:
threshold: 25
contour_area: 30
delta_alpha: 0.2
frame_alpha: 0.2
frame_height: 50
mask: 0,900,1080,900,1080,1920,0,1920
improve_contrast: False
best_image_timeout: 60
# Optional: 24/7 recording configuration
record:
# Optional: Enable recording (default: global setting)
enabled: True
# Optional: Number of days to retain (default: global setting)
retain:
days: 3
mode: motion
events:
retain:
default: 7
mode: active_objects
objects:
person: 50
# Optional: RTMP re-stream configuration
rtmp:
# Required: Enable the live stream (default: True)
enabled: False
# Optional: Configuration for the jpg snapshots written to the clips directory for each event
snapshots:
# Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
# This value can be set via MQTT and will be updated in startup based on retained value
enabled: False
# Optional: print a timestamp on the snapshots (default: shown below)
timestamp: False
# Optional: draw bounding box on the snapshots (default: shown below)
bounding_box: False
# Optional: crop the snapshot (default: shown below)
crop: False
# Optional: height to resize the snapshot to (default: original size)
height: 175
# Optional: Restrict snapshots to objects that entered any of the listed zones (default: no required zones)
required_zones: []
# Optional: Camera override for retention settings (default: global values)
retain:
# Required: Default retention days (default: shown below)
default: 10
# Optional: Per object retention days
objects:
person: 15
mqtt:
enabled: True
timestamp: True
bounding_box: True
crop: True
height: 500
quality: 100
It’s all working.
My issues are:
- Low quality for detection, I already changed my streaming detection to primary stream, but frigate crashed with too much cpu usage (95%), despite frigate detects very well if is person, car, dog, cat and whatsoever.
- Compreface recognizes faces with very low quality, and gives false positives. One example, compreface always gives a result for everyone, even if I only have my family in database. Everyone looks like me or my kids!
Can you help me configuring this better?
Thanks!