Dans ce cas, voilà le compose de frigate chez moi
Encore en phase d’optimisation pour l’accélération hw pi4 qui marche pas !!
version: "3.9"
networks:
nvr:
name: nvr
services:
frigate:
image: blakeblackshear/frigate:0.9.0-rc2-aarch64
hostname: frigate
privileged: true # this may not be necessary for all setups
restart: unless-stopped
shm_size: '1gb'
devices:
- /dev/bus/usb:/dev/bus/usb
# VAAPI Devices
- /dev/dri/renderD128:/dev/dri/renderD128
- /dev/dri/card0:/dev/dri/card0
# RPi 4
- /dev/vchiq:/dev/vchiq
environment:
- TIMEZONE=Europe/Paris
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- /dev/shm:/config/data/transcoding-temp/transcodes
- /opt/vc/lib:/opt/vc/lib ## OpenMax Libraries
- ./config/frigate.yml:/config/config.yml:ro
- ./media/:/media/frigate
- type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
target: /tmp/cache
tmpfs:
size: 1000000000
ports:
- "5000:5000"
- "1935:1935" # RTMP feeds
environment:
FRIGATE_RTSP_PASSWORD: "password"
networks:
- nvr
et le frigate.yaml aussi en cours de tests/évolution
# frigate.yml
detectors:
coral:
type: edgetpu
device: usb
# cpu1:
# type: cpu
ffmpeg:
global_args:
- '-loglevel'
- debug
input_args:
- '-rtsp_transport'
- tcp
hwaccel_args:
- '-hwaccel_output_format'
- yuv420p
- '-c:v' #codec video
- h264_v4l2m2m
# - '-codec:v:0'
# - h264_v4l2m2m
# - '-init_hw_device'
# - '-hwaccel_device'
# - /dev/dri/card0
# - hw
# - -hwaccel
# - qsv
# - h264_qsv
# - h264_v4l2h264dec
# - h264_omx
# - h264_mmal
# - h264_qsv
# - h264_cuvid
# - /dev/dri/renderD128
# - cuda
# - auto
# - '-qsv_device'
# - /dev/video10
mqtt:
host: 192.168.1.69
port: 1883
topic_prefix: frigate
client_id: frigate
user: user
password: password
stats_interval: 60
birdseye:
enabled: False
cameras:
# usb:
# ffmpeg:
# inputs:
# - path: /dev/video0
# roles:
# - clips
# - detect
# input_args: -f video4linux2 -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -use_wallclock_as_timestamps 1 -f yuyv422
# output_args:
# clips: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -f yuyv422 -an
# detect:
# enabled: false
# max_disappeared: 15
# width: 1280
# height: 720
# fps: 5
contre-allee:
ffmpeg:
inputs:
- path: rtsp://192.168.1.60:554/h264D1?username=admin&password=password
roles:
- rtmp
- record
#- path: rtsp://192.168.1.60:554/h264CIF?username=admin&password=password
- path: rtsp://192.168.1.60:554/h264?username=admin&password=password
roles:
- detect
best_image_timeout: 15
detect:
enabled: True
max_disappeared: 15
width: 2592
height: 1944
fps: 5
objects:
track:
- airplane
- bicycle
- bird
# - bus
- car
- cat
- dog
- motorcycle
- person
# - truck
filters:
airplane:
mask:
- 0,1944,2592,1944,2568,1404,2008,1006,1600,1366,1135,1334,1003,1241,1013,1032,0,932
person:
mask:
- 2592,0,2592,1318,0,1213,0,0
bicycle:
mask:
- 2592,0,2592,1318,0,1213,0,0
truck:
mask:
- 2592,0,2592,1318,0,1213,0,0
motorcycle:
mask:
- 2592,0,2592,1318,0,1213,0,0
cat:
mask:
- 2592,0,2592,1318,0,1213,0,0
dog:
mask:
- 2592,0,2592,1318,0,1213,0,0
car:
mask:
- 2592,0,2592,1318,0,1213,0,0
- 1634,1944,1523,1802,857,1757,684,1944
motion:
threshold: 50
snapshots:
enabled: true
clean_copy: True
timestamp: True
bounding_box: True
crop: False
retain:
default: 2
objects:
- airplane
- bicycle
- bird
# - bus
- car
- cat
- dog
- motorcycle
- person
# - truck
record:
enabled: True
retain_days: 2
events:
enabled: False
max_seconds: 300
pre_capture: 10
post_capture: 5
objects:
- airplane
- bicycle
- bird
# - bus
- car
- cat
- dog
- motorcycle
- person
# - truck
logger:
default: debug
logs:
frigate.video: debug