Local realtime person detection for RTSP cameras

Use reverse proxy like nginx

Hi guys, i’m testing the 0.9.0 version on a separate machine
I’m a bit confused about clips/recordings on this release
Does this mean I need to enable 24/7 recordings to get event detection?

    record:
      enabled: True
      retain_days: 30
      events:
        enabled: True
        # Optional: Number of seconds before the event to include (default: shown below)
        pre_capture: 5
        # Optional: Number of seconds after the event to include (default: shown below)
        post_capture: 5
        # Optional: Objects to save events for. (default: all tracked objects)
        objects:
          - person
          - cat
        # Optional: Restrict events to objects that entered any of the listed zones (default: no required zones)
        required_zones: []
        # Optional: Camera override for retention settings (default: global values)
        retain:
          # Required: Default retention days (default: shown below)
          default: 10
          # Optional: Per object retention days
          objects:
            person: 15
            cat: 15

Thank you for your reply.

Excuse my ignorance in docker and lack of trying - my server is broken right now, clash between docker and LXD networking…

Does the reverse proxy go on the host? I would prefer to keep the host untouched since I have other services running.

Indeed, you have to enable also recording BUT, you can set retain_days to 0 and then configure the event retention settings under record. This will delete any recording segments that do not contain the events based on your retention settings. See here and here.

See doc, there is a section for Reolink 410/520.

EDIT: Found also a post of someone with the same camera here. Hope it helps !

which app?

Are you using the Frigate blueprint ? It seems other have the same issue with iOS.

I see, thanks for the links
So that’s how recording events generally work with 0.9.0 requiring more storage
Basically the 24/7 recordings will be wiped after 24 hours except for the specific event.

Will this be a separate release or updated as the final version?

It deletes the recording segments that don’t contain events after 5 minutes (or your configured max_seconds), not 24 hours. 0.9.0 actually requires less storage than 0.8.4 for those using clips in 0.8.4 because it does not duplicate the video for overlapping events. Multiple events reference back to the same recording segments.

4 Likes

where are the events stored (I use HassOS on proxmox and Frigate as Hassio addon) ?

For me I run NGINX in a separate docker container.

SSL is implemented within NGINX so that when request for https://mysiteHA.com is received NGINX send request to http://mylocalHA.com

in same manner, when request to https://mysitefrigate.com is received NGINX send request to http://mylocalFrigate.com. Before request is sent to frigate however, I have used NGINX built in authentication to force login by user before allow access to frigate.

There are other methods to enable HTTPS or provide Authentication but this is just current method I use.

1 Like

I am have issue with my config.yml i HA * Starting nginx nginx
…done.
Error parsing config: expected a dictionary for dictionary value @ data[‘cameras’][‘garage_driveway’][‘snapshots’][‘retain’] It works perfectly well on docker container but not HA. `
‘’'detectors:
cpu1:
type: cpu
cpu2:
type: cpu

mqtt:
host: 192.168.xx.xx
user: mikey
password: password

cameras:
garage_driveway:
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: 1
clips:
enabled: true
retain:
default: 1
front_driveway:
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: 1
clips:
enabled: true
retain:
default: 1
back_garden:
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 

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 '''

I have checked and checked but i cannot get rid of the error. Any help would be appreciated as i just getting to know Frigate.

Probably missing ‘default: 1’ compare with the documentation:

  retain:
    # Required: Default retention days (default: shown below)
    default: 10

I missed max_seconds in my config file. Thanks for clearing that up @blakeblackshear
Awesome work

iMiMx thanks, yes i missed the default: however i still have the same error in

* Starting nginx nginx
   ...done.
Error parsing config: expected a dictionary for dictionary value @ data['cameras']['garage_driveway']['snapshots']['retain']

???

It’s telling you where the problem likely is :slight_smile:

Did you delete the ‘1’ from ‘retain: 1’? So it is set solely on the ‘default’ key?

iMiMx thanks i have finally sorted it started again line by line.

Thanks for your help.

1 Like

Played yesterday with Frigate, Google Coral on Synology (DS920+) DSM 7 and HA in VMM.
So if anyone is interested but afraid of DSM 7 upgrade, can confirm that it works.


Will try and see (and probably fail) to get it working in Docker too…

Thanks for the reply.
Played a little bit with the settings. But it’s still not working.
With the RTSP Stream i’m getting a green picture.
And with the RTMP Stream it’s smearing again…

So no luck…

not sure you did this but verify the device resolution/framerate in vlc and make sure you using those values.