Local realtime person detection for RTSP cameras

Do you mind sharing your settings for all 5 cams. Bitrate/fps in the each camera settings.

I’m still getting quite high the cpu usage ( 1 at 720p, other 4 cams at 2k), I’m trying to reduce it

I’m trying to start detection from a file:

cameras:
  test1:
    ffmpeg:
      input: /var/share/Mox-02_01_20211011135404_n.mp4
      input_args:
        - -stream_loop
        - "-1"
        - -re
      inputs:
        - path: /var/share/Mox-02_01_20211011135404_n.mp4
          roles:
            - detect
            - record
    objects:
      track:
        - person
        - dog
        - cat

I get error:
[2021-10-15 09:26:48] frigate.app INFO : Starting Frigate (0.9.1-800f33e)
Error parsing config: 1 validation error for FrigateConfig
cameras → test1 → ffmpeg → input
extra fields not permitted (type=value_error.extra)

How to make the correct configuration?

Hi all. I’m able to get Frigate up and running. Detections and snapshots are working fine. Snapshot images appear in the \media\frigate\clips.
I am having issue with recordings as it does not appear in \media\frigate\recordings.
Hoping someone could shed some light on what I am missing.
Frigate.yml as below.

cameras:
  Tapo_Cam_Hall:
    ffmpeg:
      inputs:
        - path: rtsp://xxx
          roles:
            - rtmp
            - record
        - path: rtsp://xxx
          roles:
            - detect
    detect:
      width: 640
      height: 360
      fps: 5
    record:
      enabled: True
      retain_days: 0
      events:
        max_seconds: 300
        pre_capture: 5
        post_capture: 5
        objects:
          - person
        retain:
          default: 10
    snapshots:
      enabled: True
      timestamp: False
      bounding_box: True
      retain:
        default: 10
    rtmp:
      enabled: True

try change

    inputs:
        - path: rtsp://xxx
          roles:
            - rtmp
            - record
        - path: rtsp://xxx
          roles:
            - detect

to

      inputs:
        - path: rtsp://xxx
          roles:
            - rtmp
            - detect
            - record
        - path: rtsp://xxx
          roles:
            - detect
            - record

Thanks for the input.
I have tried to merge it in attempt to simplify as both input paths are just 2 different streams of the same camera. It still does not record (recording folder empty).
I’m running Frigate on HassOs on Raspberry Pi 4.
Camera is a TP-Link Tapo C210

      inputs:
        - path: rtsp://xxx
          roles:
            - rtmp
            - detect
            - record

The event is captured and it seems like it should have recorded.

But the Media Browser is empty (confirmed when i checked the physical directory)

This has been solved with newest Frigate Lovelace Card 1.2.0. Now clips are visible.

Is there rtsp for that camera model?

Yep, I finally had found the path, I used rtsp://:554/onvif1, after a lot of trial and error

1 Like

Does any sricam ip cameras have rtsp out of the box or only select few has it?
I’m thinking of getting one or a few since they’re quite cheap

Managed to get recording and events working. Below is my current config for posterity.

mqtt:
  host: 192.xxx
  user: xxx
  password: xxx

record:
  enabled: True
  retain_days: 0
  events:
    max_seconds: 300
    pre_capture: 5
    post_capture: 5
    objects:
      - person
    retain:
      default: 10

snapshots:
  enabled: True
  timestamp: False
  bounding_box: True
  retain:
    objects:
      person: 10

cameras:
  Tapo_Cam_Hall:
    ffmpeg:
      inputs:
        - path: rtsp://TapoCamxxx/stream1
          roles:
            - record
        - path: rtsp://TapoCamxxx/stream2
          roles:
            - detect
    detect:
      width: 640
      height: 360
    record:
      enabled: True
    snapshots:
      enabled: True

Now my goal is to dynamically download the event clips.

Does somebody know what is this? Idont have beagle. It started after sometime on 2.0

W driver/beagle/beagle_kernel_top_level_handler.cc:131] Could not set performance expectation : 96 (Inappropriate ioctl for device)

Hi, @madface did you ever get it working for the h/w acceleration with radeon integrated graphics?
I’ve got an t530 with Radeon 2E onboard

@ ferbulous I think yes, it’s a long time ago and i replaced my deskmini X300 with an intel nuc. And though i had the problem that the power consumption with enabled hardware acceleration was higher than without it (even on the nuc with intel graphics, i have 2 streams with 640x240 running) i was not using it a long time.
But as i remember, yes it startet without error and i could see the camera picture in the addon.

Did anyone kow what is this error about?

[2021-10-17 07:26:34] frigate.edgetpu INFO : TPU found
[2021-10-17 07:27:04] frigate.watchdog INFO : Detection appears to be stuck. Restarting detection process…
[2021-10-17 07:27:04] root INFO : Waiting for detection process to exit gracefully…
[2021-10-17 07:27:34] root INFO : Detection process didnt exit. Force killing…
[2021-10-17 07:27:34] detector.coral1 INFO : Starting detection process: 310
W driver/beagle/beagle_kernel_top_level_handler.cc:131] Could not set performance expectation : 50 (Inappropriate ioctl for device)
[2021-10-17 07:27:34] frigate.edgetpu INFO : Attempting to load TPU as pci:0
[2021-10-17 07:27:34] frigate.edgetpu INFO : TPU found
[2021-10-17 07:27:44] frigate.watchdog INFO : Detection appears to be stuck. Restarting detection process…
[2021-10-17 07:27:44] root INFO : Waiting for detection process to exit gracefully…
[2021-10-17 07:28:14] root INFO : Detection process didnt exit. Force killing…
[2021-10-17 07:28:14] detector.coral2 INFO : Starting detection process: 327
W driver/beagle/beagle_kernel_top_level_handler.cc:131] Could not set performance expectation : 48 (Inappropriate ioctl for device)
[2021-10-17 07:28:14] frigate.edgetpu INFO : Attempting to load TPU as pci:1
[2021-10-17 07:28:14] frigate.edgetpu INFO : TPU found

Hi. Probably this has been made for people with cameras on 24/24… My cam are on just from 20:00 to 8:00.
When cans are off I keep on getting errors, even if detection, snapshots and record are switched off for every camera.
Watchdog is off.
Is there a way to stop everything while cams are off?
My cams are powered on by a switch in HA, so but there isn’t a main “detect” switch to turn off frigate from trying to connect to cams.

Is that because of the privacy? Or for what?
What type of cameras you have?

it’s because during the day somebody is always at home, so we don’t need cameras to be on, we use them during the night or when the alarm is armed.
More, especially during summer the sun makes them very hot, I prefer to keep them off to avoid to boil them.
They are cheap cameras, Hiseeu bullet 720p.

i see, i wanted to reccomend as maybe they have some private mask option.
Nevermind, the only one solution is for you to turn off the frigate through Home assistant API from nodered or automation

Anyone know the best way to prevent these false person detections? As you can see, the confidence is actually pretty high but clearly that is not a person. If I set the confidence min to 75%, I’m going to miss some people as I’ve had people detected when confidence is in the 60’s.

Any tips would be appreciated other than just masking out the bird bath. I’m also getting them on another camera in an area where I need person detection based on shadows from a palm tree above when it’s windy (often!). That’s the 2nd image below.

image

Hi. I don’t use node-red. Any link about how to do it via API?
Thanks