diff --git a/frigate/config/config.yaml b/frigate/config/config.yaml new file mode 100644 index 0000000..dc4d3d4 --- /dev/null +++ b/frigate/config/config.yaml @@ -0,0 +1,131 @@ +# yaml-language-server: $schema=http://192.168.1.234:5000/api/config/schema.json +auth: + enabled: false + +proxy: + header_map: + user: Remote-User + +tls: + enabled: false + +mqtt: + enabled: false + +go2rtc: + streams: + nw_garage: + - ffmpeg:http://192.168.1.240/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=frigate&password=RN3cCsRP5HDF4hFy6dis5NTG#video=copy#audio=copy#audio=opus + ne_garage: + - ffmpeg:http://192.168.1.136/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=frigate&password=6aLJ6lWfm3aTlsgkJrt2m8S8#video=copy#audio=copy#audio=opus + doorbell: + - ffmpeg:http://192.168.1.60/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=frigate&password=dcp5rWdsQ3L4gVyUC2lLNGlf#video=copy#audio=copy#audio=opus + - rtsp://192.168.1.60/Preview_01_sub + webrtc: + candidates: + - 192.168.1.234:8555 + - stun:8555 + +detectors: # <---- add detectors + coral1: + type: edgetpu + device: pci:0 + coral2: + type: edgetpu + device: pci:1 + +objects: + track: + - person + - car + - dog + - cat + +cameras: + nw_garage: + enabled: true + ffmpeg: + inputs: + - path: rtsp://127.0.0.1:8554/nw_garage + input_args: preset-rtsp-restream + roles: + - record + - detect + hwaccel_args: preset-vaapi + detect: + enabled: true + width: 960 + height: 720 + fps: 5 + record: + enabled: true + motion: + mask: + - 0.865,0.955,0.865,0.99,0.895,0.99,0.895,0.955 + - 0.827,0.955,0.827,0.99,0.858,0.99,0.858,0.955 + - 0.79,0.955,0.79,0.99,0.821,0.99,0.821,0.955 + ne_garage: + enabled: true + ffmpeg: + inputs: + - path: rtsp://127.0.0.1:8554/ne_garage + input_args: preset-rtsp-restream + roles: + - record + - detect + hwaccel_args: preset-vaapi + detect: + enabled: true + width: 960 + height: 720 + fps: 5 + record: + enabled: true + motion: + mask: + - 0.865,0.955,0.865,0.99,0.895,0.99,0.895,0.955 + - 0.827,0.955,0.827,0.99,0.858,0.99,0.858,0.955 + - 0.79,0.955,0.79,0.99,0.821,0.99,0.821,0.955 + doorbell: + enabled: true + ffmpeg: + inputs: + - path: rtsp://127.0.0.1:8554/doorbell + input_args: preset-rtsp-restream + roles: + - record + - detect + hwaccel_args: preset-vaapi + detect: + enabled: true + width: 960 + height: 720 + fps: 5 + record: + enabled: true + motion: + mask: + - 0.79,0.003,0.79,0.035,0.82,0.035,0.82,0.003 + - 0.828,0.003,0.828,0.035,0.858,0.035,0.858,0.003 + - 0.866,0.003,0.866,0.035,0.896,0.035,0.896,0.003 + threshold: 35 + contour_area: 15 + improve_contrast: true +version: 0.14 +camera_groups: + Birdseye: + order: 1 + icon: LuBird + cameras: birdseye + + Front: + order: 2 + icon: LuWarehouse + cameras: + - doorbell + - ne_garage + - nw_garage +detect: + stationary: + interval: 50 + threshold: 40 diff --git a/frigate/docker-compose.yml b/frigate/docker-compose.yml new file mode 100644 index 0000000..44eeec8 --- /dev/null +++ b/frigate/docker-compose.yml @@ -0,0 +1,27 @@ +services: + frigate: + container_name: frigate + restart: unless-stopped + image: ghcr.io/blakeblackshear/frigate:stable + shm_size: "250mb" + devices: + - /dev/apex_0:/dev/apex_0 # Passes a PCIe Coral + - /dev/apex_1:/dev/apex_1 # Passes a PCIe Coral + - /dev/dri/renderD128:/dev/dri/renderD128 # GPU hw accel + volumes: + - /etc/localtime:/etc/localtime:ro + - ./data:/config + - ./config/config.yaml:/config/config.yaml + - /media/surveillance:/media/frigate + - type: tmpfs + target: /tmp/cache + tmpfs: + size: 4000000000 + ports: + - "8971:8971" + - "8554:8554" # RTSP feeds + - "8555:8555/tcp" # WebRTC over tcp + - "8555:8555/udp" # WebRTC over udp + - "5000:5000" # VS Code schema validation allowed + environment: + LIBVA_DRIVER_NAME: "radeonsi" # FRIGATE_RTSP_PASSWORD: "69$nC*6$jADbc!"