blakeblackshear / frigate

NVR with realtime local object detection for IP cameras
https://frigate.video
MIT License
17.83k stars 1.63k forks source link

[Config Support]: no events registered #9848

Closed Strux-DK closed 5 months ago

Strux-DK commented 6 months ago

Describe the problem you are having

Apparently there's something wrong with my config, since Frigate doesn't register any events. I'm not sure what's wrong though. Everything's running fine, i can see the cameras feed, Frigate just decides to not register and save anything

Version

0.13.1-34fb1c2

Frigate config file

mqtt:
  enabled: False

birdseye:
  enabled: True
  restream: True
  quality: 8
  mode: continuous  

ffmpeg:
  hwaccel_args: preset-vaapi
#  hwaccel_args: preset-intel-qsv-h264
  output_args:
    # Makes sure video AND audio is recorded
    record: preset-record-generic-audio-copy

go2rtc:
  log:
    exec: trace
  streams:
    entrance:
      - "ffmpeg:http://192.168.1.30/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=...#video=copy#audio=copy#audio=opus"
    entrance_sub:
      - "ffmpeg:http://192.168.1.30/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=admin&password=..."
    garden:
      - "ffmpeg:http://192.168.1.31/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=LXCFrigate#video=copy#audio=copy#audio=opus"
    garden_sub:
      - "ffmpeg:http://192.168.1.31/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=admin&password=LXCFrigate"

  webrtc:
    candidates:
      - 192.168.1.19:6555

cameras:
# ENTRANCE
  entrance:
    enabled: True
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/entrance
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/entrance_sub
          input_args: preset-rtsp-restream
          roles:
            - detect
    zones:
      entrance_pathway:
        # Covers the pathway/parking space
        coordinates: 0,330,0,219,176,134,387,78,391,127

      entrance_road:
        # Covers the road
        coordinates: 222,131,388,87,382,42,208,65,0,130,0,228

      entrance_entryway:
        # Covers the entrance pathway and the grass
        coordinates: 603,217,619,130,541,108,513,127,391,97,332,135
    motion:
      mask:
        # The windows of the house, where the camera can see movement inside the house
        - 896,672,896,253,856,365,765,672
        # Timestamp
        - 0,34,0,0,269,0,267,34
    objects:
      track:
        - car
        - person
        - cat
      filters:
        person:
          # minimum width*height of the bounding box for the detected object
          min_area: 10000
          # minimum score for the object to initiate tracking
          min_score: 0.4
          # minimum decimal percentage for tracked object's computed score to be considered a true positive
          threshold: 0.7
        cat:
          min_score: 0.3
          threshold: 0.5
        car:
          min_score: 0.5

  # GARDEN
  garden:
    enabled: True
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/garden
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/garden_sub
          input_args: preset-rtsp-restream
          roles:
            - detect
    zones:  
      garden_fence:
        # Covers the fence towards neighbor, the fence door and the birdfeeder
        coordinates: 154,133,171,177,255,165,249,39,0,68,0,148
    motion:
      mask:
        # Covers bedroom window
        - 0,257,0,423,47,479,25,336
        # Timestamp
        - 271,0,270,35,0,35,0,0
    objects:
      track:
        - bird
        - person
        - cat
      filters:
        bird:
          min_score: 0.5
        person:
          # minimum width*height of the bounding box for the detected object
          min_area: 10000
          # minimum score for the object to initiate tracking
          min_score: 0.4
          # minimum decimal percentage for tracked object's computed score to be considered a true positive
          threshold: 0.7
        cat:
          min_score: 0.3
          threshold: 0.5

detect:
  enabled: true
  width: 640
  height: 480
  fps: 7

motion:
  # Minimum size in pixels in the resized motion image that counts as motion (default: 30)
  # Increasing this value will prevent smaller areas of motion from being detected. Decreasing will
  # make motion detection more sensitive to smaller moving objects.
    contour_area: 40

record:
  enabled: True
  expire_interval: 720
  # Retention settings for recordings in general
  retain:
    # Number of days to save recordings
    days: 2
    # Save only recordings with detectable motion, regardless of whether any objects were detected or not
    mode: motion
  # Events are when something, frigate is configured to register, is happening.
  events:
  # Seconds of recording before movement is registered, to also be saved
    pre_capture: 2
    # Seconds of recording after movement is disappeared, to also be saved
    post_capture: 5
    objects:
      - person
      - cat
      - car
    required_zones:
      - Front_garden_bedding
      - Front_garden_entryway
      - Front_garden_parking
    retain:
      # Number of days to retain/save recordings
      default: 30
      # This mode saves all recording segments with active/moving objects
      mode: active_objects

snapshots:
  enabled: True
  timestamp: True
  bounding_box: True
  required_zones:
  - Front_garden_bedding
  - Front_garden_entryway
  - Front_garden_parking
  retain:
    default: 90

rtmp:
  enabled: False

# Yes, the legacy software is capable of showing the timestamp, but i like all the configurations to be the same place
timestamp_style:
  position: "tl"
  format: "%d/%m/%Y %H:%M:%S"
  color:
    red: 255
    green: 255
    blue: 255
  thickness: 2

# Web interface settings
ui:
  # Set the default live mode for cameras in the UI
  live_mode: mse
  # Play around with this
  timezone: Europe/Copenhagen
  # Date and time style for the events overview
  strftime_fmt: "%d/%m/%Y %H:%M:%S"

Relevant log output

N/A

Frigate stats

No response

Operating system

Proxmox

Install method

Docker Compose

Coral version

CPU (no coral)

Any other information that may be helpful

No response

gregewing commented 6 months ago

I have similar issues, will watch what heppens to this ticket.

NickM-27 commented 6 months ago

your required zones are incorrect. You have created zones called entrance_pathway but then you are referencing it as Front_entrance_pathway in the required zones section. This is not how zones work.

You should follow the docs https://docs.frigate.video/configuration/zones#restricting-events-to-specific-zones which recommend setting the required zones on the camera level

hawkeye217 commented 6 months ago

The reason why you're not recording any events is because you've set required_zones at the global level rather than the camera level, and your zone names do not even match any of the zone names you've specified at the camera level.

You should remove the required_zones from the record and snapshots at the global level and specify them under each camera.

For example:

  # GARDEN
  garden:
    enabled: True
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/garden
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/garden_sub
          input_args: preset-rtsp-restream
          roles:
            - detect
    zones:  
      garden_fence:
        # Covers the fence towards neighbor, the fence door and the birdfeeder
        coordinates: 154,133,171,177,255,165,249,39,0,68,0,148
    snapshots:
      enabled: True
      required_zones:
      - garden_fence
    record:
      enabled: true
      events:
        required_zones:
        - garden_fence
gregewing commented 6 months ago

I resolved all my issues, by getting frigate configured correctly after some pointers from an expert.

github-actions[bot] commented 5 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.