Local realtime person detection for RTSP cameras

I am still getting parsing config errors after making the changes used online yml validators and come back correct format?


Error parsing config: 'NoneType' object has no attribute 'get'

 * Starting nginx nginx

   ...done.

I have finally been able to get the container to load, the problems was the config.yml file which i complied again. The container loads the 4 camera images, however only 2 work correctly providing clips and events , the other 2 do not do either, considering the configs are the same for each camera.
The cameras are Reolink 410, the motion detected os working on the Reolink app.

Any idea what the problem can be ?


 * Starting nginx nginx

   ...done.

frigate.app                    WARNING : Camera garage_driveway has rtmp enabled, but rtmp is not assigned to an input.

frigate.app                    WARNING : Camera front_driveway has rtmp enabled, but rtmp is not assigned to an input.

frigate.app                    WARNING : Camera back_garden has rtmp enabled, but rtmp is not assigned to an input.

frigate.app                    WARNING : Camera koi_pond has rtmp enabled, but rtmp is not assigned to an input.

Starting migrations

peewee_migrate                 INFO    : Starting migrations

There is nothing to migrate

peewee_migrate                 INFO    : There is nothing to migrate

detector.cpu1                  INFO    : Starting detection process: 34

detector.cpu2                  INFO    : Starting detection process: 35

frigate.app                    INFO    : Camera processor started for garage_driveway: 39

frigate.app                    INFO    : Camera processor started for front_driveway: 40

frigate.app                    INFO    : Camera processor started for back_garden: 41

frigate.app                    INFO    : Camera processor started for koi_pond: 42

frigate.app                    INFO    : Capture process started for garage_driveway: 43

frigate.app                    INFO    : Capture process started for front_driveway: 46

frigate.app                    INFO    : Capture process started for back_garden: 50


detectors:
  cpu1:
    type: cpu
  cpu2:
    type: cpu

mqtt:
  host: 192.168.0.74
  user: mikey
  password: mqtt6283

cameras:
  # Reolink
  garage_driveway:
    ffmpeg:
      inputs:
        - path: rtsp://admin:[email protected]:554/h264Preview_01_sub
        - roles:
            - detect
            - clips
    #  motion:
    #    mask:
    width: 640
    height: 480
    fps: 5
    objects:
      track:
        - person
    snapshots:
      enabled: true
      timestamp: false
      bounding_box: true
      retain:
        default: 1
    clips:
      enabled: true
      retain:
        default: 1
  front_driveway:
    ffmpeg:
      inputs:
        - path: rtsp://admin:[email protected]:554/h264Preview_01_sub
        - roles:
            - detect
            - clips
    #  motion:
    #    mask:
    width: 640
    height: 480
    fps: 5
    objects:
    track:
      - person
    snapshots:
      enabled: true
      timestamp: false
      bounding_box: true
      retain:
        default: 1
    clips:
      enabled: true
      retain:
        default: 1
  back_garden:
    ffmpeg:
      inputs:
        - path: rtsp://admin:[email protected]:554/h264Preview_01_sub
          roles:
            - detect
            - clips
    width: 640
    height: 480
    fps: 5
    objects:
      track:
        - person
    snapshots:
      enabled: true
      timestamp: false
      bounding_box: true
      retain:
        default: 1
    clips:
      enabled: true
      retain:
        default: 1
  koi_pond:
    ffmpeg:
      inputs:
        - path: rtsp://admin:[email protected]:554/h264Preview_01_sub
          roles:
            - detect
            - clips
    #  motion:
    #    mask:
    width: 640
    height: 480
    fps: 5
    objects:
      track:
        - person
    snapshots:
      enabled: true
      timestamp: false
      bounding_box: true
      retain:
        default: 1
    clips:
      enabled: true
      retain:
        default: 1````

Stupid question, but are the camera entities created in HA by the Frigate integration supposed to stream?

image

Itā€™d be great to be able to utilise these directly without having to recreate them as generic cameras. I did try setting one camera with RTMP but could not figure out how to ā€˜seeā€™ that stream. Three cameras are Hikvision and three are Dahua; all running the 3rd stream as 720P, h264 @ 6fps.

P.S Frigate is awesome, especially when you add and utilise the Frigate LL card. My wife is loving just being able to use the wall mounted tablet to have a quick look through all the 10s clips from the driveway and front door cameras (and the little image bubbles are genius!).

Yes, they are meant to stream. They use the RTMP feed that Frigate relays. Probably best to open an issue on Github for further support.

Thanks for the fast reply, much appreciated. And thatā€™s great. I was hopeful they created a working camera as that would be bloody useful. Iā€™ll pop something up in the morning as very late here in NZ.

I thought i had Frigate up and running but now i have this error and a lot of cpu useage ?

Any ideas ???

`
[h264 @ 0x55ac3e072e00] error while decoding MB 28 18, bytestream -11

[h264 @ 0x55ac3e072e00] left block unavailable for requested intra mode

[h264 @ 0x55ac3e072e00] error while decoding MB 0 5, bytestream 48387

[h264 @ 0x55b21cfe2e00] error while decoding MB 2 23, bytestream -55

[h264 @ 0x556109d3de00] error while decoding MB 33 3, bytestream -26

[h264 @ 0x556109d3de00] left block unavailable for requested intra4x4 mode -1

[h264 @ 0x556109d3de00] error while decoding MB 0 5, bytestream 45781

[h264 @ 0x563922e98e00] error while decoding MB 22 8, bytestream -16

[h264 @ 0x55d037e3ce00] error while decoding MB 22 2, bytestream -56

[h264 @ 0x55d037e3ce00] left block unavailable for requested intra mode

[h264 @ 0x55d037e3ce00] error while decoding MB 0 10, bytestream 65829

[h264 @ 0x55c8fb2d8e00] error while decoding MB 23 8, bytestream -20

[h264 @ 0x5615f966ce00] error while decoding MB 37 8, bytestream -37

[h264 @ 0x5615f966ce00] left block unavailable for requested intra mode

4 cameras, no TPU, no HW accel and only CPU. You canā€™t expect low overload and so frames are skipped
Thatā€™s part of the documentation

It was working for a day and then all of a sudden it came up with these errors. I have ordered a Coral TPU but it will be a while yet. So i set this up in the meantime. I will try just 2 cameras to see if this solves the problem.

Same result after removing too cameras ??

So what is the point ?
If 1 cam is more than 50% CPU, 2 will be too muchā€¦

No point, I am just trying to understand and learn what is going on. I will use HA Frigate addon as it works fine there with 4 cameras on a sub stream and NO TPU and I was using sub stream in the HA Container. I was trying to have the cameras separate from the rest of HA.

Thank anyway.

Ffmpeg is used to intially convert video to 300px by 300px. This will use a lot of cpu especially with no GPU

After 300x300, the TPU is used for detect object if you have itā€¦if not also cpu used here

Thanks for reply, Is there a way that i can rectify this , as i donā€™t have a TPU as yet it was working fine for a few days then this . I followed the recommended configuration which includes the ffmpeg. if i were to remove it would this solve in the meantime? My understand now is that you have to use Coral for more than 1 camera ? If so I will have to wait until there are finally in stock ?

Hello! Someone connected a Sricam camera on frigate? I have the SP018 model. Iā€™m never sure what path I should pass, how can I find this? Iā€™m getting a green screen on frigate dashboard.

Turns out I did not have ffmpeg enabled in my config. I had it but Iā€™d renamed the package file that contained that line while I had a camera offline. Put ffmpeg back into main config and streaming now. :sweat_smile:

For anyone looking for PCIe to M.2 (e key)
oddly hard to find

@blakeblackshear Frigate was featured on LTT Linus Tech Tips on latest video :smiley: wooohoo

1 Like

Hi Everyone.

Iā€™ve been running Frigate off a NUC that runs off an intel CPU.
It has been running stable for weeks with no issues, with cpu detection on 3 cameras.

I have also been using the object detection integration to trigger automations with no issue for a while.

Today, i decided to setup https, so i installed nginx for reverse proxy connections, and MariaDB (required by Nginx proxy manager). My reverse proxy is working fine, but weirdly, i noticed that my object detection was broken.
Iā€™m not sure what broke it, when I disabled MariaDB and Nginx, as well as removed the configuration.yaml changes, the problem still persisted.

Iā€™m getting these entries in my Frigate log.

 * Starting nginx nginx
   ...done.
frigate.app                    INFO    : Creating directory: /tmp/cache
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.cpu1                  INFO    : Starting detection process: 38
frigate.app                    INFO    : Camera processor started for Dispensary_Front: 41
frigate.mqtt                   INFO    : Turning off clips for Dispensary_Front via mqtt
frigate.mqtt                   INFO    : Turning off snapshots for Dispensary_Front via mqtt
frigate.mqtt                   INFO    : Turning off detection for Dispensary_Front via mqtt
frigate.mqtt                   INFO    : Turning off clips for Waiting_Area via mqtt
frigate.mqtt                   INFO    : Turning off snapshots for Waiting_Area via mqtt
frigate.mqtt                   INFO    : Turning off detection for Waiting_Area via mqtt
frigate.mqtt                   INFO    : Turning off clips for FiveFootWay via mqtt
frigate.mqtt                   INFO    : Turning off snapshots for FiveFootWay via mqtt
frigate.mqtt                   INFO    : Turning off detection for FiveFootWay via mqtt
frigate.app                    INFO    : Camera processor started for Waiting_Area: 42
frigate.app                    INFO    : Camera processor started for FiveFootWay: 43
frigate.app                    INFO    : Capture process started for Dispensary_Front: 44
frigate.app                    INFO    : Capture process started for Waiting_Area: 48
frigate.app                    INFO    : Capture process started for FiveFootWay: 49

I canā€™t make sense of the mqtt info bit, but my presence detection isnā€™t working.

Any idea what I might have broke?

Thanks !

Omg new update birdseye omg waaaw

Iā€™ve been using Tensorflow for a couple of years with GPU acceleration. Right now I have a GTX 1080 behind my deployment and it is scanning six camera feeds every 3-5 seconds and doing full-frame object detection.

Iā€™m starting to get concerned over the lack of updates to tensorflow and the fact that stats are only showing eight active deployments (Iā€™m one of them).

Does Frigate support GPU acceleration? I see that itā€™s based on Tensorflow, so I assume the inherent Nvidia support is included. I have a Coral but my expectations far exceed its capabilities.

My requirements:

  • Real-time multi-camera object detection (6 x 2560x1920 images)
  • Full-frame (not zoned) detection

Iā€™m currently considering upgrading my GTX 1080 to something faster. Iā€™d really like to have updates in the 1-2 second range.