Local realtime person detection for RTSP cameras

I dont think you can do that without a cluster.
But i think that you may limit cpu usage in docker. I think you can limit cpu usage per container. So limiting frigate cpu usage may do the trick.
I never done this but was considering.

Thanks for your reply.
I donā€™t know if I want to limit his usage because then he might not do his job correctlyā€¦

Did anybody succeed with usage of custom trained models with Frigate?
Standard dataset is so poor in terms of accuracy.

You can install frigate on a different computer and still use it within HA for automations.

1 Like

You can check PC bios and make sure it set for performance and not power save profile. This greatly throttles cpu.

Docker allows limit cpu core use. Itā€™s easiest to do in portainer. You can set memory and cpu usage as required. If you do not have enough cpu you will start missing detections. Limiting frame rate would help but at some point it becomes useless depending on your needs

1 Like

Has anyone had any luck getting frigate running on Synology DSM V7?

I had it running fine on v6 and finally took the risk of upgrading and realized that Frigate can no longer see my Coral. I tried a guide to install USB drivers but it hasnā€™t changed anything.

Has anyone gotten this to work?

My logs look like this, is it USB or inability to load the library?



[2022-09-06 10:15:29] frigate.app                    INFO    : Camera processor started for right: 228


[2022-09-06 10:15:29] frigate.app                    INFO    : Camera processor started for left: 229


[2022-09-06 10:15:29] frigate.app                    INFO    : Camera processor started for front: 231


[2022-09-06 10:15:29] frigate.app                    INFO    : Camera processor started for back: 232


[2022-09-06 10:15:29] frigate.app                    INFO    : Capture process started for right: 235


[2022-09-06 10:15:29] frigate.app                    INFO    : Capture process started for left: 236


[2022-09-06 10:15:29] frigate.app                    INFO    : Capture process started for front: 238


[2022-09-06 10:15:29] frigate.app                    INFO    : Capture process started for back: 239


[2022-09-06 10:15:29] ws4py                          INFO    : Using epoll


[2022-09-06 10:15:49] frigate.watchdog               INFO    : Detection appears to have stopped. Exiting frigate...


[cont-finish.d] executing container finish scripts...


[cont-finish.d] done.


[s6-finish] waiting for services.


[2022-09-06 10:15:49] frigate.video                  INFO    : left: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures


[2022-09-06 10:15:49] frigate.video                  INFO    : left: ffmpeg process is not running. exiting capture thread...


[2022-09-06 10:15:49] frigate.video                  INFO    : right: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures


[2022-09-06 10:15:49] frigate.video                  INFO    : right: ffmpeg process is not running. exiting capture thread...


[s6-finish] sending all processes the TERM signal.


[s6-finish] sending all processes the KILL signal and exiting.


[s6-init] making user provided files available at /var/run/s6/etc...exited 0.


[s6-init] ensuring user provided files have correct perms...exited 0.


[fix-attrs.d] applying ownership & permissions fixes...


[fix-attrs.d] done.


[cont-init.d] executing container initialization scripts...


[cont-init.d] done.


[services.d] starting services


[services.d] done.


[2022-09-06 10:15:59] frigate.app                    INFO    : Starting Frigate (0.9.4-26ae608)


Starting migrations


[2022-09-06 10:16:00] peewee_migrate                 INFO    : Starting migrations


There is nothing to migrate


[2022-09-06 10:16:00] peewee_migrate                 INFO    : There is nothing to migrate


[2022-09-06 10:16:00] frigate.mqtt                   INFO    : MQTT connected


[2022-09-06 10:16:00] frigate.app                    INFO    : Output process started: 220


[2022-09-06 10:16:00] detector.coral                 INFO    : Starting detection process: 219


[2022-09-06 10:16:00] frigate.edgetpu                INFO    : Attempting to load TPU as usb


[2022-09-06 10:16:00] frigate.edgetpu                ERROR   : No EdgeTPU was detected. If you do not have a Coral device yet, you must configure CPU detectors.


Process detector:coral:


Traceback (most recent call last):


  File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 160, in load_delegate


    delegate = Delegate(library, options)


  File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 119, in __init__


    raise ValueError(capture.message)


ValueError



During handling of the above exception, another exception occurred:



Traceback (most recent call last):


  File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap


    self.run()


  File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run


    self._target(*self._args, **self._kwargs)


  File "/opt/frigate/frigate/edgetpu.py", line 156, in run_detector


    object_detector = LocalObjectDetector(


  File "/opt/frigate/frigate/edgetpu.py", line 64, in __init__


    edge_tpu_delegate = load_delegate("libedgetpu.so.1.0", device_config)


  File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 162, in load_delegate


    raise ValueError('Failed to load delegate from {}\n{}'.format(


ValueError: Failed to load delegate from libedgetpu.so.1.0


You can tell them to stop recording and doing motion if youā€™ve setup HA integration

Yeah it works great. There is a blueprint available somewhere here where you can setup notifications. Just search for frigate blueprint in the forum

1 Like

Very very strange issue. I am trying to use my 64bit raspberry pi 4 4gb with frigate, to detect thing on a single hikvision camera via an rtsp substream.
I am trying to use hardware acceleration via h264_v4l2m2m.

Here is the odd thing: The same ffmpeg command, if used on rasbian works fine, with hardware acceleration. When used inside the frigate docker container, it fails to capture any frames.

The ffmpeg command:

ffmpeg -loglevel debug -c:v h264_v4l2m2m -i rtsp://username:[email protected]:554/Streaming/Channels/102 test.mp4

I am running the frigate container like this (outside home assistant, to isolate whats going on)

docker run --shm-size="512m" -v /dev:/dev:rw --device /dev/video10 --privileged -it blakeblackshear/frigate:0.11.0-rc2 /bin/bash

A segment from the logs inside the container:

[h264_v4l2m2m @ 0x5587668360] Using device /dev/video10
[h264_v4l2m2m @ 0x5587668360] driver 'bcm2835-codec' on card 'bcm2835-codec-decode' in mplane mode
[h264_v4l2m2m @ 0x5587668360] requesting formats: output=H264 capture=YU12
[h264_v4l2m2m @ 0x5587668360] output: H264 16 buffers initialized: 0320x0240, sizeimage 00524288, bytesperline 00000000
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (h264_v4l2m2m) -> h264 (libx264))
Press [q] to stop, [?] for help
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264_v4l2m2m @ 0x5587668360] capture: YU12 20 buffers initialized: 0320x0240, sizeimage 00115200, bytesperline 00000320
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
Last message repeated 86 times

Same ffmpeg command outside the container:

[h264_v4l2m2m @ 0x5586dc98d0] Using device /dev/video10
[h264_v4l2m2m @ 0x5586dc98d0] driver 'bcm2835-codec' on card 'bcm2835-codec-decode' in mplane mode
[h264_v4l2m2m @ 0x5586dc98d0] requesting formats: output=H264 capture=NV12
[h264_v4l2m2m @ 0x5586dc98d0] output: H264 16 buffers initialized: 0000x0000, sizeimage 00524288, bytesperline 00000000
[h264_v4l2m2m @ 0x5586dc98d0] Driver 'bcm2835-codec': Quirks=0
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (h264_v4l2m2m) -> h264 (libx264))
Press [q] to stop, [?] for help
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264_v4l2m2m @ 0x5586dc98d0] output set status 1074026002 (ON) OK
[h264_v4l2m2m @ 0x5586dc98d0] --- output pre VIDIOC_QBUF: index 0, ts=0.000001 count=0
[h264_v4l2m2m @ 0x5586dc98d0] --- output VIDIOC_QBUF: index 0, ts=0.000001 count=1
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264_v4l2m2m @ 0x5586dc98d0] --- output pre VIDIOC_QBUF: index 1, ts=0.000002 count=1
[h264_v4l2m2m @ 0x5586dc98d0] --- output VIDIOC_QBUF: index 1, ts=0.000002 count=2
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264_v4l2m2m @ 0x5586dc98d0] --- output pre VIDIOC_QBUF: index 0, ts=0.000003 count=0
[h264_v4l2m2m @ 0x5586dc98d0] --- output VIDIOC_QBUF: index 0, ts=0.000003 count=1
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264_v4l2m2m @ 0x5586dc98d0] --- output pre VIDIOC_QBUF: index 0, ts=0.000004 count=0
[h264_v4l2m2m @ 0x5586dc98d0] --- output VIDIOC_QBUF: index 0, ts=0.000004 count=1
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264_v4l2m2m @ 0x5586dc98d0] --- output pre VIDIOC_QBUF: index 0, ts=0.000005 count=0
[h264_v4l2m2m @ 0x5586dc98d0] --- output VIDIOC_QBUF: index 0, ts=0.000005 count=1
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264_v4l2m2m @ 0x5586dc98d0] --- output pre VIDIOC_QBUF: index 0, ts=0.000006 count=0
[h264_v4l2m2m @ 0x5586dc98d0] --- output VIDIOC_QBUF: index 0, ts=0.000006 count=1
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264_v4l2m2m @ 0x5586dc98d0] --- output pre VIDIOC_QBUF: index 0, ts=0.000007 count=0
[h264_v4l2m2m @ 0x5586dc98d0] --- output VIDIOC_QBUF: index 0, ts=0.000007 count=1
[h264_v4l2m2m @ 0x5586dc98d0] Dq event 5
[h264_v4l2m2m @ 0x5586dc98d0] V4L2 capture changed: alloc=0 (32x32) -> (320x240)
[h264_v4l2m2m @ 0x5586dc98d0] Source change: SAR: 1/1, wxh 320x240 crop 320x240 @ 0,0, reinit=1
[h264_v4l2m2m @ 0x5586dc98d0] reinit context
[h264_v4l2m2m @ 0x5586dc98d0] capture: NV12 20 buffers initialized: 0320x0240, sizeimage 00115200, bytesperline 00000320
[h264_v4l2m2m @ 0x5586dc98d0] --- capture VIDIOC_QBUF: index 0, ts=0.000000 count=1
[h264_v4l2m2m @ 0x5586dc98d0] --- capture VIDIOC_QBUF: index 1, ts=0.000000 count=2
[h264_v4l2m2m @ 0x5586dc98d0] --- capture VIDIOC_QBUF: index 2, ts=0.000000 count=3
[h264_v4l2m2m @ 0x5586dc98d0] --- capture VIDIOC_QBUF: index 3, ts=0.000000 count=4
[h264_v4l2m2m @ 0x5586dc98d0] --- capture VIDIOC_QBUF: index 4, ts=0.000000 count=5
[h264_v4l2m2m @ 0x5586dc98d0] --- capture VIDIOC_QBUF: index 5, ts=0.000000 count=6

The main diffrence I see in output is that outside the container, h264_v4l2m2m recognizes ā€œcapture=NV12ā€ while inside the container it says ā€œcapture=YU12ā€. Iā€™ve tried lots of ffmpeg options but I cant seem to be able to affect this.

My only assumption right now is that ffmpeg inside the frigate container is built differently to ffmpeg that comes in raspbian so it doesnā€™t have all the codecs or something and chooses YU12 instead of NV12 which I assume is incorrect. Iā€™ve tried both the latest rc2 and the stable docker container for frigate for aarch64 with same results.

Alternatively there may be a way to set NV12 for h264_v4l2m2m capture via a CLI option in ffmpeg? If so I havenā€™t yet figured out how to do that. cc @blakeblackshear

have you tried this: Local realtime person detection for RTSP cameras - #6159 by Danzal

1 Like

Holy cow just got this from seed studio. I would imagine this is your builder @blakeblackshear.

Fantastic!

hopefully someone gives a clue where to dig. I have a completely unsupported installation. Running a Debian on top of a ESXi host with the unsupported HA supervisor install (i know itā€™s a mess).
Anyway got a coral pcie i would like to use with frigate. Passed it through to the debian.
lspci
13:00.0 System peripheral: Global Unichip Corp. Coral Edge TPU

Followed this guide Get started with the M.2 or Mini PCIe Accelerator | Coral

Seems outdated a bit as there is no subsystem apex which the udev picks up. So no drivers loaded - are they native now to the debian?

But no luck with frigate.

Config.yml

coral:
type: edgetpu
device: pci

Logs

[2022-09-08 21:13:31] detector.coral                 INFO    : Starting detection process: 212
[2022-09-08 21:13:31] frigate.edgetpu                INFO    : Attempting to load TPU as pci
[2022-09-08 21:13:32] frigate.edgetpu                ERROR   : No EdgeTPU was detected. If you do not have a Coral device yet, you must configure CPU detectors.
Process detector:coral:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 160, in load_delegate
    delegate = Delegate(library, options)
  File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 119, in __init__
    raise ValueError(capture.message)
ValueError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/frigate/frigate/edgetpu.py", line 136, in run_detector
    object_detector = LocalObjectDetector(
  File "/opt/frigate/frigate/edgetpu.py", line 44, in __init__
    edge_tpu_delegate = load_delegate("libedgetpu.so.1.0", device_config)
  File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 162, in load_delegate
    raise ValueError('Failed to load delegate from {}\n{}'.format(
ValueError: Failed to load delegate from libedgetpu.so.1.0

They reached out to me a few months ago about putting together hardware bundles targeted at Frigate users. We are still early in the process, but I am hoping to eventually have some more official hardware options in the future. It would be great to have a machine that comes with a dual TPU pre-installed as supply for Coral devices comes back. I am still undergoing testing of their hardware options to see what I want to more officially recommend. Several other users have had success with the Odyssey Blue, so thatā€™s where we started.

Thank you! That looks very promising. I just went through a rather painful rollback to v6, so maybe Iā€™ll hang out here for a while.

So Iā€™m trying to get my Frigate back up on DSM v6 after that disastrous flirtation with synology DSM v7. It seems to be starting up and running okay, but it never opens the web UI. It just stays on this last log message for an hour or more. Anyone have any idea what might be wrong? Iā€™m using a backup from my previous frigate config so Iā€™m pretty sure it should work, but I had to recreate the docker compose, so maybe I got something wrong there.

Here is the log:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[2022-09-11 14:29:20] frigate.app                    INFO    : Starting Frigate (0.9.4-26ae608)
[2022-09-11 14:29:20] frigate.app                    INFO    : Creating directory: /media/frigate/recordings
[2022-09-11 14:29:20] frigate.app                    INFO    : Creating directory: /media/frigate/clips
Starting migrations
[2022-09-11 14:29:20] peewee_migrate                 INFO    : Starting migrations
Migrate "001_create_events_table"
[2022-09-11 14:29:20] peewee_migrate                 INFO    : Migrate "001_create_events_table"
sql ('CREATE TABLE IF NOT EXISTS "event" ("id" VARCHAR(30) NOT NULL PRIMARY KEY, "label" VARCHAR(20) NOT NULL, "camera" VARCHAR(20) NOT NULL, "start_time" DATETIME NOT NULL, "end_time" DATETIME NOT NULL, "top_score" REAL NOT NULL, "false_positive" INTEGER NOT NULL, "zones" JSON NOT NULL, "thumbnail" TEXT NOT NULL)',)
[2022-09-11 14:29:20] peewee_migrate                 INFO    : sql ('CREATE TABLE IF NOT EXISTS "event" ("id" VARCHAR(30) NOT NULL PRIMARY KEY, "label" VARCHAR(20) NOT NULL, "camera" VARCHAR(20) NOT NULL, "start_time" DATETIME NOT NULL, "end_time" DATETIME NOT NULL, "top_score" REAL NOT NULL, "false_positive" INTEGER NOT NULL, "zones" JSON NOT NULL, "thumbnail" TEXT NOT NULL)',)
sql ('CREATE INDEX IF NOT EXISTS "event_label" ON "event" ("label")',)
[2022-09-11 14:29:20] peewee_migrate                 INFO    : sql ('CREATE INDEX IF NOT EXISTS "event_label" ON "event" ("label")',)
sql ('CREATE INDEX IF NOT EXISTS "event_camera" ON "event" ("camera")',)
[2022-09-11 14:29:20] peewee_migrate                 INFO    : sql ('CREATE INDEX IF NOT EXISTS "event_camera" ON "event" ("camera")',)
Done 001_create_events_table
[2022-09-11 14:29:20] peewee_migrate                 INFO    : Done 001_create_events_table
Migrate "002_add_clip_snapshot"
[2022-09-11 14:29:21] peewee_migrate                 INFO    : Migrate "002_add_clip_snapshot"
add_column ('event', 'has_clip', <BooleanField: Event.has_clip>)
[2022-09-11 14:29:21] peewee_migrate                 INFO    : add_column ('event', 'has_clip', <BooleanField: Event.has_clip>)
add_column ('event', 'has_snapshot', <BooleanField: Event.has_snapshot>)
[2022-09-11 14:29:21] peewee_migrate                 INFO    : add_column ('event', 'has_snapshot', <BooleanField: Event.has_snapshot>)
Done 002_add_clip_snapshot
[2022-09-11 14:29:21] peewee_migrate                 INFO    : Done 002_add_clip_snapshot
Migrate "003_create_recordings_table"
[2022-09-11 14:29:21] peewee_migrate                 INFO    : Migrate "003_create_recordings_table"
Done 003_create_recordings_table
[2022-09-11 14:29:21] peewee_migrate                 INFO    : Done 003_create_recordings_table
Migrate "004_add_bbox_region_area"
[2022-09-11 14:29:21] peewee_migrate                 INFO    : Migrate "004_add_bbox_region_area"
add_column ('event', 'region', <JSONField: Event.region>)
[2022-09-11 14:29:21] peewee_migrate                 INFO    : add_column ('event', 'region', <JSONField: Event.region>)
add_column ('event', 'box', <JSONField: Event.box>)
[2022-09-11 14:29:21] peewee_migrate                 INFO    : add_column ('event', 'box', <JSONField: Event.box>)
add_column ('event', 'area', <IntegerField: Event.area>)
[2022-09-11 14:29:21] peewee_migrate                 INFO    : add_column ('event', 'area', <IntegerField: Event.area>)
Done 004_add_bbox_region_area
[2022-09-11 14:29:21] peewee_migrate                 INFO    : Done 004_add_bbox_region_area
[2022-09-11 14:29:21] frigate.mqtt                   INFO    : MQTT connected
[2022-09-11 14:29:21] frigate.app                    INFO    : Output process started: 218
[2022-09-11 14:29:21] ws4py                          INFO    : Using epoll
[2022-09-11 14:29:22] frigate.app                    INFO    : Camera processor started for right: 224
[2022-09-11 14:29:22] frigate.app                    INFO    : Camera processor started for left: 225
[2022-09-11 14:29:22] frigate.app                    INFO    : Camera processor started for front: 226
[2022-09-11 14:29:22] frigate.app                    INFO    : Camera processor started for back: 227
[2022-09-11 14:29:22] frigate.app                    INFO    : Capture process started for right: 228
[2022-09-11 14:29:22] frigate.app                    INFO    : Capture process started for left: 229
[2022-09-11 14:29:22] frigate.app                    INFO    : Capture process started for front: 234
[2022-09-11 14:29:22] frigate.app                    INFO    : Capture process started for back: 237
[2022-09-11 14:29:21] detector.coral                 INFO    : Starting detection process: 217
[2022-09-11 14:29:21] frigate.edgetpu                INFO    : Attempting to load TPU as usb
[2022-09-11 14:29:22] ws4py                          INFO    : Using epoll
[2022-09-11 14:29:27] frigate.edgetpu                INFO    : TPU found

hereā€™s my docker compose, based off an older working one, just added some new things back in.

version: "3"
services:
  frigate:
    container_name: frigate_0_94
    restart: unless-stopped
    privileged: true
    image: blakeblackshear/frigate:0.9.4-amd64
    volumes:
      - /dev/bus/usb:/dev/bus/usb
      - /volume1/docker_storage/frigate/config:/config:ro
      - /etc/localtime:/etc/localtime:ro 
      - /volume1/docker_storage/frigate/storage:/storage
      - type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
        target: /tmp/cache
        tmpfs:
          size: 1000000000
    shm_size: 1g 
    devices:
      - /dev/bus/usb:/dev/bus/usb # passes the USB Coral, needs to be modified for other versions
      - /dev/dri/renderD128 # for intel hwaccel, needs to be updated for your hardware
    ports:
      - 4000:4000
      - 1935:1935
    environment:
      - RTSP_PASSWORD=PASSWORD
      - RTSP_PASSWORD_RIGHT=PASSWORD
      - RTSP_PASSWORD_LEFT=PASSWORD
      - RTSP_PASSWORD_FRONT=PASSWORD
      - RTSP_PASSWORD_BACK=PASSWORD
      - FRIGATE_MQTT_PASSWORD=PASSWORD

Any idea why it just quits doing anything and doesnā€™t open the UI after it finds the TPU?

I accidentally bought 2 Google Coral USB when I only wanted one.
Does anyone need one, happy to sell it for what I paid + postage.
PM me.
(UK Only)

1 Like

Okay answering my own dumb question here. Port map should have been 4000:5000 rather than 4000:4000. I donā€™t know why I had that in an old file. Hereā€™s the working compose file for DSM 6.

version: "3"
services:
  frigate:
    container_name: frigate_0_94
    restart: unless-stopped
    privileged: true
    image: blakeblackshear/frigate:0.9.4-amd64
    volumes:
      - /dev/bus/usb:/dev/bus/usb
      - /volume1/docker_storage/frigate/config:/config:ro
      - /etc/localtime:/etc/localtime:ro 
      - /volume1/docker_storage/frigate/storage:/storage:rw
      - /volume1/video/frigate:/media/frigate:rw
      - /volume1/docker_storage/frigate/db:/db:rw
      - type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
        target: /tmp/cache
        tmpfs:
          size: 1000000000
    shm_size: 1g 
    devices:
      - /dev/bus/usb:/dev/bus/usb # passes the USB Coral, needs to be modified for other versions
      - /dev/dri/renderD128 # for intel hwaccel, needs to be updated for your hardware
    ports:
      - 4000:5000
      - 1935:1935
    environment:
      - RTSP_PASSWORD=PASSWORD
      - RTSP_PASSWORD_RIGHT=PASSWORD
      - RTSP_PASSWORD_LEFT=PASSWORD
      - RTSP_PASSWORD_FRONT=PASSWORD
      - RTSP_PASSWORD_BACK=PASSWORD
      - FRIGATE_MQTT_PASSWORD=PASSWORD

Have you been able to fix your ā€œHandleEvent failed. USB transfer error 1ā€ that you were getting with your Google USB Coral accelerator? I just got mine and I keep getting this error every 15 seconds and the whole frigate keeps restarting after that.

I think the issue was either the docker build needed updating, the coral drivers or both and a hardware reboot of my unRAID server. TBH I canā€™t remember. Sorry

I seem to not be retaining the pre_capture and post_capture periods for my cameras.
I have a significant portion of one camera masked (busy street) so that I only get an event when something moves on my property. When something does get detected on my property iā€™d still like to see what the preceding 15 seconds looked like. I thought the below would achieve this but my events and recordings seem to have only a few seconds before the property boundary and some events are less than 10 seconds of playback in total (i assumed it would be minimum of 25 with these settings).

record:
  enabled: true
  retain:
    days: 1
    mode: motion
  events:
    max_seconds: 1800
    pre_capture: 15
    post_capture: 10
    objects:
      - person
    required_zones: []
    retain:
      mode: active_objects
      default: 5
      objects:
        person: 7
        dog: 2