Local realtime person detection for RTSP cameras

Thank you so much for the quick response!
I was actually wanted to allow just the motion clips to be viewed from the HA mobile android app. I can see the snapshot, but when I wanted to access the clip I get an error from nginx. Did you manage to do a similar approach with the mobile app? or any other suggestions (even better ones)?

update: I managed to get the video file, but it shows as a broken like this:

maybe something with the resolution? this is width: 3840 height: 2160 (c800 ankee, using the main stream). I can see the file in the folder, and can play it on windows but the phone and the frigate page itself canā€™t.
Am I missing something in the configuration?


Eeeeeehhhhhhmā€¦any recomendations? @biggen1684 @Nick_Meyer @juan11perez
Plastic zip tie?

Hm?Lets try xD

1 Like

When i insert, 2 devices apear :open_mouth:
IOMMU Group 6 05:00.0 System peripheral [0880]: Device [1ac1:089a]
IOMMU Group 6 00:1c.4 PCI bridge [0604]: Intel Corporation Device [8086:a394] (rev f0)
As the Group 6 is bound with network adapter how can i pass it in proxmox only the specific PCI slot :open_mouth:

Thatā€™s actually the stream component in Home Assistant. The RTMP feed from Frigate does include audio, but if you added your cameras directly to Home Assistant with the RTSP URL it would also include the audio with stream enabled.

Not withstanding, Frigate is awesome :slight_smile:

Hi all,
First and foremost thanks @blakeblackshear for this fantastic work. Iā€™m struggling with a reolink on rpi4ā€¦
What is the correct configuration for Frigate being run in docker on a rpi4 (standalone) with a reolink camera. I understand thereā€™s a specific configuration from reolink cameras and the configuration should be with rtmp ā€¦and what should be the hw acceleration settings ?
Can anyone share their configuration file? Thanks so much in advance for your help and time!

How many camera streams can one Google Coral USB TPU handle? Is there a way to monitor its ā€œstress levelā€? I got my first TPU today and plugged it in. I have seven cameras and starting two cameras worth of detection brought my 6-core CPU to its knees. Iā€™m guessing the TPU can handle more but can I throw all seven at it and no worries? How do you know if you need to add another one?

Try a lower resolution stream for detection and/or try reduce FPS for detection stream

I have 7 camera at 10fps and run detection every second for 2 and 3-5 seconds for other 4 without issue.

If tpu cannot keep up you begin to see errors in logs and miss events. It becomes obvious.

So it looks like I need a separate container per camera, how do I do that?
A different config file install frigate againā€¦?
I cannot find any docs describing the process of adding a new container.

Thank you

One container for all cameras. (At least in a normal setup.)

So how do I configure a second camera, I tried adding a second config under the cameras stanza but it only displays one.

Today, I turned off Zoneminder. Probably the thing I have run on my server for ~5 years!

Frigate is doing everything I was trying to get zoneminder to do, but better and more efficient. Integration with HA is the icing on the cake! Things become really clever/ powerful and some really advanced stuff seem to be possible.

Looking forwards to where this goes in the future.

Thanks for the support and making some really great software!

3 Likes

Did you restart container after?

Post your config

I did restart after updating the config.

mqtt:
  host: 192.168.1.98
  user: uuuu
  password: pppp
detectors:
  coral:
    type: edgetpu
    device: usb
rtmp:
      # Required: Enable the live stream (default: True)
      enabled: True
cameras:
  frontdoor:
    ffmpeg:
      inputs:
        - path: rtsp://uuuu:[email protected]:554/stream2
          roles:
            - detect
            - rtmp
        - path: rtsp://uuuu:[email protected]:554/stream1
          roles:
            - record
            - clips
    width: 640
    height: 360
    fps: 5s
  driveway:
    ffmpeg:
      inputs:
        - path: rtsp://uuuu:[email protected]:554/stream2
          roles:
            - detect
            - rtmp
        - path: rtsp://uuuu:[email protected]:554/stream1
          roles:
            - record
            - clips
    width: 640
    height: 360
    fps: 5s

Solved!
Didnā€™t require changing the OS my Docker was running on.
I had to start the docker run from:

  --device /dev/bus/usb:/dev/bus/usb

to this:

  --device /dev/apex_0:/dev/apex_0

Thanks,
-Mike
Now to begin converting my cameras from motionEyeā€¦

Hi!

On my HA dashboard I have a couple of picture entities that show snapshots of the most recent event for each camera (eg. camera.frontdoor_person). Very cool. Now what I would like to do is click on it and play the corresponding video.

I was looking at the api and /api/<camera_name>/<object_name>/best.jpg (latest.jpg doesnā€™t seem to work for me) and was hoping for something like /best.mp4 or /latest.mp4 for the corresponding video clip.

As an aside, Frigate + the Coral TPU is the coolest thing since sliced bread. I have had 0 false alerts in the last month and have since turned off Synology Surveillance Station.

I dont use RTMP but I expect this is NOT a global camera setting and should be defined under each camera. I could not tell from documentation. I would remove it until I get streams working then readd it.

FPS is number. no need add the ā€œsā€, just ā€œfps: 5ā€ is enough

trying to figure out why this keeps happening after a day or two where several entities come up Unavailable:

If I restart the pod in Kubernetes, it will work again for a couple days. Not seeing any errors in the HA logs. The Frigate pod logs are pretty bare too.

 * Starting nginx nginx
   ...done.
frigate.app                    WARNING : Camera middle_driveway has record assigned to an input, but record is not enabled.
frigate.app                    WARNING : Camera upper_driveway has record assigned to an input, but record is not enabled.
frigate.app                    WARNING : Camera mudroom_door has record assigned to an input, but record is not enabled.
Starting migrations
peewee_migrate                 INFO    : Starting migrations
There is nothing to migrate
peewee_migrate                 INFO    : There is nothing to migrate
frigate.mqtt                   INFO    : MQTT connected
detector.coral                 INFO    : Starting detection process: 37
frigate.edgetpu                INFO    : Attempting to load TPU as usb
frigate.app                    INFO    : Camera processor started for middle_driveway: 40
frigate.app                    INFO    : Camera processor started for upper_driveway: 41
frigate.app                    INFO    : Camera processor started for mudroom_door: 42
frigate.app                    INFO    : Capture process started for middle_driveway: 43
frigate.app                    INFO    : Capture process started for upper_driveway: 44
frigate.app                    INFO    : Capture process started for mudroom_door: 50
frigate.edgetpu                INFO    : TPU found

While some values are Unavailable, others never have a problem. I normally notice thereā€™s an issue as the Automations I use that trigger of the entity stop working as not seeing any change.

The unavailable ones interface via MQTT. Try checking the logs of your mqtt broker.

Same here, made the switch and Iā€™m amazed at the simplicity and accuracy of Frigate compared to ZM. I just deleted my ZM dockers and migrated Frigate to production.

1 Like