blakeblackshear / frigate

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

[Config Support]: #7110

Closed mwolter805 closed 1 year ago

mwolter805 commented 1 year ago

Describe the problem you are having

Every ten seconds the four logs below are output to the Frigate docker container console which makes it difficult to use the logs for troubleshooting Frigate issues. Looked through the documents and couldn't not find how to disable the HTTP access logs. This level of logging is excessive and would like to know how to disable these.

Version

0.12.1-367D724

Frigate config file

# yaml-language-server: $schema=https://frigate.useatech.com/api/config/schema

cameras:

  driveway_left:
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/driveway_left_sub
          roles:
            - detect
        - path: rtsp://127.0.0.1:8554/driveway_left
          roles:
            - record
    live:
      stream_name: driveway_left_sub
    # detect:
    #   width: 1280
    #   height: 720
    motion:
      mask:
        - 0,0,0,119,60,108,115,85,105,40,80,0
        - 190,672,172,720,0,720,0,611,53,568,23,527,54,502,36,436,39,385,57,317,125,282,181,308,201,382,194,447,204,569,202,614
        - 1185,55,1185,25,1110,25,1110,55

  front_patio:
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/front_patio_sub
          roles:
            - detect
        - path: rtsp://127.0.0.1:8554/front_patio
          roles:
            - record
    live:
      stream_name: front_patio_sub
    detect:
      width: 1280
      height: 720
    motion:
      mask:
        - 98,0,23,176,53,246,65,292,71,348,87,389,92,446,105,504,165,514,311,558,331,586,400,603,426,648,419,720,0,720,0,0
        - 718,0,1002,0,969,66,997,156,1014,300,949,343,791,371,718,306,683,252,678,213,701,71,659,26
        - 1185,55,1185,25,1115,25,1115,55

  driveway_right:
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/driveway_right_sub
          roles:
            - detect
        - path: rtsp://127.0.0.1:8554/driveway_right
          roles:
            - record
    live:
      stream_name: driveway_right_sub
    detect:
      width: 1280
      height: 720
    motion:
      mask:
        - 774,126,839,128,945,171,993,232,931,305,850,314,833,370,832,414,824,467,682,493,582,470,595,373,695,314,691,276,722,212,713,126
        - 1185,55,1185,25,1115,25,1115,55
        - 1221,219,1258,315,1250,335,1181,265,1137,184,1173,151,1191,172

  doorbell:
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/doorbell_sub
          roles:
            - detect
        - path: rtsp://127.0.0.1:8554/doorbell
          roles:
            - record
    live:
      stream_name: doorbell_sub
    detect:
      width: 720
      height: 576
    motion:
      mask:
        - 0,305,39,107,127,26,172,64,243,21,274,62,363,82,408,152,325,186,240,159,210,185,142,219,127,282,176,361,197,439,94,576,0,555
        - 517,279,508,344,403,350,377,283,380,231,388,210,391,182,393,125,431,84,499,130
        - 715,0,715,25,655,25,655,0

  blvmgn:
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/blvmgn
    record:
      enabled: false
    detect:
      enabled: false
    snapshots:
      enabled: false

  i3mega:
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/i3mega
    record:
      enabled: false
    detect:
      enabled: false
    snapshots:
      enabled: false

      # - rtsp://user:password@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2

go2rtc:
  streams:
    driveway_left:
      - rtsp://user:pass@10.10.22.11/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif
    driveway_left_sub:
      - rtsp://user:pass@10.10.22.11/cam/realmonitor?channel=1&subtype=2&unicast=true&proto=Onvif
    driveway_right:
      - rtsp://user:pass@10.10.22.13/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif
    driveway_right_sub:
      - rtsp://user:pass@10.10.22.13/cam/realmonitor?channel=1&subtype=2&unicast=true&proto=Onvif
    front_patio:
      - rtsp://user:pass@10.10.22.12/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif
    front_patio_sub:
      - rtsp://user:pass@10.10.22.12/cam/realmonitor?channel=1&subtype=2&unicast=true&proto=Onvif
    doorbell:
      - rtsp://user:pass@10.10.22.21/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif&#backchannel=0
    doorbell_sub:
      - rtsp://user:pass@10.10.22.21/cam/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif&#backchannel=0
    blvmgn:
      - rtsp://user:pass@10.10.22.41:554/1/h264major
    i3mega:
      - rtsp://user:pass@10.10.22.42:554/1/h264major

ffmpeg:
  global_args: -hide_banner -loglevel warning
  # Intel-based CPUs (>=10th Generation) via Quicksync
  hwaccel_args: preset-intel-qsv-h264
  # 0.11.1 hwaccel_args: -c:v h264_qsv
  # Intel-based CPUs (<10th Generation) via Quicksync
  #hwaccel_args: -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p

  # hwaccel_args:
  #  - -hwaccel
  #  - vaapi
  #  - -hwaccel_device
  #  - /dev/dri/renderD128
  #  - -hwaccel_output_format
  #  - yuv420p
  input_args: preset-rtsp-generic
  # 0.11.1 input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1
  # input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 # stimeout changed to timeout in 0.11.0
  output_args:
    record: preset-record-generic-audio-aac
    # 0.11.1 detect: -f rawvideo -pix_fmt yuv420p
    # 0.11.1 record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -c:a copy
  # if sending h.265 from camera
  #    record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -c:a copy -tag:v hvc1
    # 0.11.1 rtmp: -c:v copy -c:a copy -f flv

objects:
  track:
    - person
    - dog
  filters:
    person:
      threshold: 0.79
    dog:
      threshold: 0.79
    cat:
      threshold: 0.79
    car:
      threshold: 0.79

detectors:
  coral:
    type: edgetpu
    device: pci

mqtt:
  host: 10.10.10.12
  port: 1883
  topic_prefix: frigate
  client_id: frigate
  user: user
  password: pass
  stats_interval: 60

record:
  enabled: True
  retain:
    days: 7 # added for 0.10.1
  events:
    pre_capture: 5
    post_capture: 5
    objects:
      - person
      - dog
      - cat
    required_zones: []
    # max_seconds: 300 # removed as of 0.11.0
    retain:
      default: 10
      mode: all # added for 0.10.1
      objects:
        person: 15

snapshots:
  enabled: True
  timestamp: False
  bounding_box: False
  crop: False
  height: 300
  required_zones: []
  retain:
    default: 10
    objects:
      person: 15

detect:
  width: 1280
  height: 720
  # width: 1920
  # height: 1080
  fps: 5
  enabled: True
  # Optional: Number of frames without a detection before frigate considers an object to be gone. (default: 5x the frame rate)
  max_disappeared: 25
  # Optional: Configuration for stationary object tracking
  stationary:
    # Optional: Frequency for running detection on stationary objects (default: shown below)
    # When set to 0, object detection will never be run on stationary objects. If set to 10, 
    # it will be run on every 10th frame.
    interval: 10
    # Optional: Number of frames without a position change for an object to be considered 
    # stationary (default: 10x the frame rate or 10s)
    threshold: 50
    # Optional: Define a maximum number of frames for tracking a stationary object (default: not set, track forever)
    # This can help with false positives for objects that should only be stationary for a limited amount of time.
    # It can also be used to disable stationary object tracking. For example, you may want to set a value for person,
    # but leave car at the default.
    # max_frames:
    #   # Optional: Default for all object types (default: not set, track forever)
    #   default: 3000
    #   # Optional: Object specific values
    #   objects:
    #     person: 1000

motion:
  # Optional: The threshold passed to cv2.threshold to determine if a pixel is different enough to be counted as motion. (default: shown below)
  # Increasing this value will make motion detection less sensitive and decreasing it will make motion detection more sensitive.
  # The value should be between 1 and 255.
  threshold: 25
  # Optional: Minimum size in pixels in the resized motion image that counts as motion (default: ~0.17% of the motion frame area)
  # 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: 100
  # Optional: Alpha value passed to cv2.accumulateWeighted when averaging the motion delta across multiple frames (default: shown below)
  # Higher values mean the current frame impacts the delta a lot, and a single raindrop may register as motion.
  # Too low and a fast moving person wont be detected as motion.
  delta_alpha: 0.2
  # Optional: Alpha value passed to cv2.accumulateWeighted when averaging frames to determine the background (default: shown below)
  # Higher values mean the current frame impacts the average a lot, and a new object will be averaged into the background faster.
  # Low values will cause things like moving shadows to be detected as motion for longer.
  # https://www.geeksforgeeks.org/background-subtraction-in-an-image-using-concept-of-running-average/
  frame_alpha: 0.2
  # Optional: Height of the resized motion frame  (default: 1/6th of the original frame height, but no less than 180)
  # This operates as an efficient blur alternative. Higher values will result in more granular motion detection at the expense of higher CPU usage.
  # Lower values result in less CPU, but small changes may not register as motion.
  frame_height: 180

database:
  path: /db/frigate.db

logger:
  # Optional: default log level (default: shown below)
  default: error # debug, info, warning, error, critical

Relevant log output

2023-07-10 13:24:02.311380582  172.18.0.2 - - [10/Jul/2023:13:24:02 -0700] "GET /api/stats HTTP/1.1" 200 4099 "-" "HomeAssistant/2023.6.3 aiohttp/3.8.4 Python/3.11" "10.10.10.30"
2023-07-10 13:24:06.305291816  127.0.0.1 - - [10/Jul/2023:13:24:06 -0700] "GET /api/version HTTP/1.1" 200 14 "-" "curl/7.74.0" "-"
2023-07-10 13:24:16.409131372  127.0.0.1 - - [10/Jul/2023:13:24:16 -0700] "GET /api/version HTTP/1.1" 200 14 "-" "curl/7.74.0" "-"
2023-07-10 13:24:10.309854145  172.18.0.2 - - [10/Jul/2023:13:24:10 -0700] "GET /api/stats HTTP/1.1" 200 4098 "-" "HomeAssistant/2023.6.3 aiohttp/3.8.4 Python/3.11" "10.10.10.30"

### Frigate stats

_No response_

### Operating system

Proxmox

### Install method

Docker Compose

### Coral version

M.2

### Any other information that may be helpful

docker-compose.yaml

services: frigate: container_name: frigate hostname: frigate restart: always image: ghcr.io/blakeblackshear/frigate:0.12.1 shm_size: "256mb" devices:

NickM-27 commented 1 year ago

The recommendation is to use the frigate UI logs and not the main docker logs.

Adjusting the nginx logs is currently not supported, there is a feature request to do this https://github.com/blakeblackshear/frigate/issues/6828