Local realtime person detection for RTSP cameras

Hi on my cameras Frigate is recording without counting Daylight savings time (time of camera and of HA and real is 11:00, for Frigate recordings is 12:00)

ANy hint how to change this?

Iā€™m having some issues with the config. The relevant part of frigate.yml:

  [camera]:
    ffmpeg:
      inputs:
        - path: [path]
          roles:
            - record
            - detect
    rtmp:
      enabled: False
    record:
      enabled: True
      retain:
        days: 0
        mode: motion
      events:
        retain:
          default: 2
          mode: motion
        required_zones:
          - [zone 2]
    snapshots:
      enabled: True
    zones:
      [zone 1]:
        coordinates: 0,113,763,224,823,734,506,1520,0,1520
      [zone 2]:
        coordinates: 2688,0,791,0,823,748,508,1520,2688,1520
    detect:
      enabled: True

I only want events to be triggered in zone 2. Regardless, also events in zone 1 are stored/reported. How to fix this?

You might need to put zone 2 in required zones for snapshots too.

What happen if you reboot server? What is time on host server?

EDIT
on a side noteā€¦all 2AM to 3AM recording are deleted. Frigate seems to recognize time shift at 3AM Central US and suddenly go back and record over the 2AM recordings.

I run on Proxmox, need to check, not sure how to

I donā€™t want to use recordings, I just want snapshots so that I can send the events to MQTT and then use NodeRed to automate these (text messages to the appropriate person based on their geofence location, etc.).

I am using the low quality substream for detection at 704x480 resolution, which works great. However, I want the snapshot itself to be from the main resolution feed so that the image I am sending is high quality and you can actually see the details of the person.

Is there any way to accomplish that?

I donā€™t think so using frigate alone. Youā€™d need to use the mqtt message to trigger an automation to take a still frame from the full resolution stream or something like that.

Would be far easier to use the full res stream for detect (but much harder on your hardware potentially)

I was wondering if switching to running frigate on its own box running docker would be better than combined with HA as an add on? My HA instance is the OS version tuning on old HP desktop with an i3 processor. I was also using a coral as a detector and noticed my interface speed was no higher than 10ms. Since I switched to running on own machine in docker (Ubuntu, Frigate on docker container on an old HP with i5 CPU with a coral stick) I noticed that the interface speed has gone up to 40ms. What would be the increase figured the laptop was running better hardware? Cameras are the same with no change to the config. 3 cameras total 2 Reolink poe and Amcrest doorbell cam.

Coral shouldnā€™t be 40ms on any hardware i think. Are you sure frigate is using it?

I was thinking the same. I installed Ubuntu on the laptop and installed Frigate on docker this is the only thing on this device. Not sure what happened?? Only think different is the hardware and running in docker vs HA add on.

Anything that I can check for verify ?

Frigate UI >>hambuger menu >> debug page will show the detector in use. Should report coral and not cpu

I run frigate on unraid seperate to my HAOS instance. my inference speed is 7.6ms.

With the coral working properly I donā€™t think thereā€™s a huge argument to have frigate on its own hardware. It more comes down to storage, which is easier to manage if itā€™s not running under HAOS.

Confirmed in UI that coral is in use at around 40ms. You can see that coral was 10ms then a large jump when I moved off the HA to own system tuning Frigate.

Dedicated RaspberryPI 4 8gb 64bit bullseyes, USB coral, 1 single camera

pi resources
image

:frowning:

This looks to be a failed experiment. I was hoping that HA and Frigate would run better separately it seems that they can co exist just fine. I really wish that you can use a larger data drive just for the recordings when combined with HA.

@MRobi and @kinnujan Sorry to resurrect an old conversation, but Iā€™m experiencing similar issues.

I also have an RLN8-410 NVR. A few days ago I lost all my streams from the NVR. I havenā€™t touched the configuration or anything. All my streams are green. All the cameras have the same errors

[2022-11-09 00:14:23] frigate.video                  ERROR   : basement_garage: ffmpeg process is not running. exiting capture thread...
[2022-11-09 00:14:33] watchdog.upstairs_garage       ERROR   : Ffmpeg process crashed unexpectedly for upstairs_garage.
[2022-11-09 00:14:33] watchdog.upstairs_garage       ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2022-11-09 00:14:33] ffmpeg.upstairs_garage.detect  ERROR   : [tcp @ 0x55adf8cae0] Connection to tcp://192.168.1.3:554?timeout=5000000 failed: Connection refused
[2022-11-09 00:14:33] ffmpeg.upstairs_garage.detect  ERROR   : rtsp://user:[email protected]:554/h264Preview_02_sub: Connection refused

The only thing I can see that has changed that a new NVR firmware update came out a few ago.

Have either of you lost your Reolink NVR streams after the Firmware update?

I moved from haos to supervised to do the storage problem without changing the udev at haos. I tried the code as on the Frigate website:

UUID=1a65fec6-c25f-404a-b3d2-1f2fcf6095c8 /media/data ext4 defaults 0 0
/media/data/homeassistant/media /usr/share/hassio/media none bind 0 0

Of course changed to my UUID which is not visible here.

When I look at the SSD in debian terminal where the mount goes it doesnā€™t seem to fill the SSD. Donā€™t see anything in the media browser either. Anyone have an idea what I can do? Could
UUID=1a65fec6-c25f-404a-b3d2-1f2fcf6095c
8 /usr/share/hassio/media/frigate ext4
defaults 0 0
help? Thank you all!

I had tons of issues with Frigate and Reolink RTSP. Ended up moving over to the RTMP stream.
Try using this:
'rtmp://192.168.XX.XXX/bcs/channel1_sub.bcs?channel=0&stream=0&user=USER&password=PASSWORD'

You can also test if the stream works using VLC. Go under Media, then Open Network Stream and enter the address. That will help you narrow it down if itā€™s on the NVR side or the Frigate side.

HI,

when I try to add a 3rd camera to frigate i get this error

frigate_camera_tpu | Fatal Python error: Bus error
frigate_camera_tpu | 
frigate_camera_tpu | Thread 0x0000007f90e311e0 (most recent call first):
frigate_camera_tpu |   File "/usr/lib/python3.9/threading.py", line 312 in wait
frigate_camera_tpu |   File "/usr/lib/python3.9/multiprocessing/queues.py", line 233 in _feed
frigate_camera_tpu |   File "/usr/lib/python3.9/threading.py", line 892 in run
frigate_camera_tpu |   File "/usr/lib/python3.9/threading.py", line 954 in _bootstrap_inner
frigate_camera_tpu |   File "/usr/lib/python3.9/threading.py", line 912 in _bootstrap
frigate_camera_tpu | 
frigate_camera_tpu | Current thread 0x0000007f936321e0 (most recent call first):
frigate_camera_tpu |   File "/opt/frigate/frigate/video.py", line 168 in capture_frames
frigate_camera_tpu |   File "/opt/frigate/frigate/video.py", line 306 in run
frigate_camera_tpu |   File "/usr/lib/python3.9/threading.py", line 954 in _bootstrap_inner
frigate_camera_tpu |   File "/usr/lib/python3.9/threading.py", line 912 in _bootstrap
frigate_camera_tpu | 
frigate_camera_tpu | Thread 0x0000007f93e331e0 (most recent call first):
frigate_camera_tpu |   File "/usr/lib/python3.9/multiprocessing/synchronize.py", line 261 in wait
frigate_camera_tpu |   File "/usr/lib/python3.9/multiprocessing/synchronize.py", line 349 in wait
frigate_camera_tpu |   File "/opt/frigate/frigate/video.py", line 232 in run
frigate_camera_tpu |   File "/usr/lib/python3.9/threading.py", line 954 in _bootstrap_inner
frigate_camera_tpu |   File "/usr/lib/python3.9/threading.py", line 912 in _bootstrap
frigate_camera_tpu | 
frigate_camera_tpu | Thread 0x0000007f8111a1e0 (most recent call first):
frigate_camera_tpu |   File "/opt/frigate/frigate/log.py", line 64 in run
frigate_camera_tpu |   File "/usr/lib/python3.9/threading.py", line 954 in _bootstrap_inner
frigate_camera_tpu |   File "/usr/lib/python3.9/threading.py", line 912 in _bootstrap
frigate_camera_tpu | 
frigate_camera_tpu | Thread 0x0000007f975e6010 (most recent call first):
frigate_camera_tpu |   File "/usr/lib/python3.9/threading.py", line 1049 in _wait_for_tstate_lock
frigate_camera_tpu |   File "/usr/lib/python3.9/threading.py", line 1033 in join
frigate_camera_tpu |   File "/opt/frigate/frigate/video.py", line 337 in capture_camera
frigate_camera_tpu |   File "/usr/lib/python3.9/multiprocessing/process.py", line 108 in run
frigate_camera_tpu |   File "/usr/lib/python3.9/multiprocessing/process.py", line 315 in _bootstrap
frigate_camera_tpu |   File "/usr/lib/python3.9/multiprocessing/popen_fork.py", line 71 in _launch
frigate_camera_tpu |   File "/usr/lib/python3.9/multiprocessing/popen_fork.py", line 19 in __init__
frigate_camera_tpu |   File "/usr/lib/python3.9/multiprocessing/context.py", line 277 in _Popen
frigate_camera_tpu |   File "/usr/lib/python3.9/multiprocessing/context.py", line 224 in _Popen
frigate_camera_tpu |   File "/usr/lib/python3.9/multiprocessing/process.py", line 121 in start
frigate_camera_tpu |   File "/opt/frigate/frigate/app.py", line 286 in start_camera_capture_processes
frigate_camera_tpu |   File "/opt/frigate/frigate/app.py", line 364 in start
frigate_camera_tpu |   File "/opt/frigate/frigate/__main__.py", line 16 in <module>
frigate_camera_tpu |   File "/usr/lib/python3.9/runpy.py", line 87 in _run_code
frigate_camera_tpu |   File "/usr/lib/python3.9/runpy.py", line 197 in _run_module_as_main
frigate_camera_tpu | Fatal Python error: Bus error
frigate_camera_tpu | 
frigate_camera_tpu | Thread 0x0000007f90e311e0 (most recent call first):
frigate_camera_tpu |   File "/usr/lib/python3.9/threading.py", line 312 in wait
frigate_camera_tpu |   File "/usr/lib/python3.9/multiprocessing/queues.py", line 233 in _feed
frigate_camera_tpu |   File "/usr/lib/python3.9/threading.py", line 892 in run
frigate_camera_tpu |   File "/usr/lib/python3.9/threading.py", line 954 in _bootstrap_inner
frigate_camera_tpu |   File "/usr/lib/python3.9/threading.py", line 912 in _bootstrap
frigate_camera_tpu | 
frigate_camera_tpu | Current thread 0x0000007f936321e0 (most recent call first):
frigate_camera_tpu |   File "/opt/frigate/frigate/video.py", line 168 in capture_frames
frigate_camera_tpu |   File "/opt/frigate/frigate/video.py", line 306 in run
frigate_camera_tpu |   File "/usr/lib/python3.9/threading.py", line 954 in _bootstrap_inner
frigate_camera_tpu |   File "/usr/lib/python3.9/threading.py", line 912 in _bootstrap
frigate_camera_tpu | 
frigate_camera_tpu | Thread 0x0000007f93e331e0 (most recent call first):
frigate_camera_tpu |   File "/usr/lib/python3.9/multiprocessing/synchronize.py", line 261 in wait
frigate_camera_tpu |   File "/usr/lib/python3.9/multiprocessing/synchronize.py", line 349 in wait
frigate_camera_tpu |   File "/opt/frigate/frigate/video.py", line 232 in run
frigate_camera_tpu |   File "/usr/lib/python3.9/threading.py", line 954 in _bootstrap_inner
frigate_camera_tpu |   File "/usr/lib/python3.9/threading.py", line 912 in _bootstrap
frigate_camera_tpu | 
frigate_camera_tpu | Thread 0x0000007f8111a1e0 (most recent call first):
frigate_camera_tpu |   File "/opt/frigate/frigate/log.py", line 64 in run
frigate_camera_tpu |   File "/usr/lib/python3.9/threading.py", line 954 in _bootstrap_inner
frigate_camera_tpu |   File "/usr/lib/python3.9/threading.py", line 912 in _bootstrap
frigate_camera_tpu | 
frigate_camera_tpu | Thread 0x0000007f975e6010 (most recent call first):
frigate_camera_tpu |   File "/usr/lib/python3.9/threading.py", line 1049 in _wait_for_tstate_lock
frigate_camera_tpu |   File "/usr/lib/python3.9/threading.py", line 1033 in join
frigate_camera_tpu |   File "/opt/frigate/frigate/video.py", line 337 in capture_camera
frigate_camera_tpu |   File "/usr/lib/python3.9/multiprocessing/process.py", line 108 in run
frigate_camera_tpu |   File "/usr/lib/python3.9/multiprocessing/process.py", line 315 in _bootstrap
frigate_camera_tpu |   File "/usr/lib/python3.9/multiprocessing/popen_fork.py", line 71 in _launch
frigate_camera_tpu |   File "/usr/lib/python3.9/multiprocessing/popen_fork.py", line 19 in __init__
frigate_camera_tpu |   File "/usr/lib/python3.9/multiprocessing/context.py", line 277 in _Popen
frigate_camera_tpu |   File "/usr/lib/python3.9/multiprocessing/context.py", line 224 in _Popen
frigate_camera_tpu |   File "/usr/lib/python3.9/multiprocessing/process.py", line 121 in start
frigate_camera_tpu |   File "/opt/frigate/frigate/app.py", line 286 in start_camera_capture_processes
frigate_camera_tpu |   File "/opt/frigate/frigate/app.py", line 364 in start
frigate_camera_tpu |   File "/opt/frigate/frigate/__main__.py", line 16 in <module>
frigate_camera_tpu |   File "/usr/lib/python3.9/runpy.py", line 87 in _run_code
frigate_camera_tpu |   File "/usr/lib/python3.9/runpy.py", line 197 in _run_module_as_main

any ideas?