blakeblackshear / frigate

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

[Config Support]: Recordings filling up the disk space #7942

Closed alekc closed 1 year ago

alekc commented 1 year ago

Describe the problem you are having

I am constantly running into an issue where frigate is eating up all available space on the server. Turns out, that for every event, there are 3 files with identical stamp generated

I.e.

image

➜ ls -la total 59700 drwxr-xr-x 1 root root 108 Sep 25 04:38 . drwxr-xr-x 1 root root 14 Sep 25 04:11 .. -rw-r--r-- 1 root root 10246840 Sep 25 04:11 11.30.mp4 -rw-r--r-- 1 root root 10099576 Sep 25 04:11 11.40.mp4 -rw-r--r-- 1 root root 10185971 Sep 25 04:12 11.49.mp4 -rw-r--r-- 1 root root 10082821 Sep 25 04:38 38.19.mp4 -rw-r--r-- 1 root root 10160461 Sep 25 04:38 38.30.mp4 -rw-r--r-- 1 root root 10347375 Sep 25 04:38 38.39.mp4

is this a wanted behaviour?

Version

0.12.1-367d724

Frigate config file

mqtt:
  host: "mosquitto.hass.svc"
  port: 1883
logger:
  default: info
detect:
  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
  stationary:
    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
detectors:
  tensorrt:
    type: tensorrt
    device: 0 #This is the default, select the first GPU
objects:
  track:
    - person
    - car
    - bicycle
    - motorcycle
    - bus
    - bird
    - cat
    - dog
snapshots:
  enabled: True
  timestamp: True
  bounding_box: True
  crop: False
  clean_copy: False
model:
  path: /trt-models/yolov7-tiny-416.trt
  input_tensor: nchw
  input_pixel_format: rgb
  width: 416
  height: 416
record:
  enabled: True
  retain:
    days: 0
    mode: motion
  events:
    retain:
      default: 14
      objects:
        dog: 2
        cat: 2
        bird: 2
        car: 7
ffmpeg:
  hwaccel_args: preset-nvidia-h264
cameras:
  front:
    motion:
      mask:
        - 232,1440,224,261,1809,263,1797,347,2560,513,2560,0,0,0,0,1440
    zones:
      pavement:
        coordinates: 1637,1440,1307,449,587,447,0,1440
      garden:
        coordinates: 2560,550,2560,1440,1588,1440,1284,451
    ffmpeg:
      inputs:
        - path: rtsp://192.168.0.253:554/user=xxx&password=xxx&channel=1&stream=0.sdp
          roles:
            - detect
            - rtmp
    detect:
      width: 2560
      height: 1440
  top:
    motion:
      improve_contrast: true
      mask:
        - 1511,0,1295,450,758,514,0,1253,0,0
        - 3072,539,3072,0,2821,27,2791,347
        - 2870,1728,2772,1177,2166,1186,2124,1728
        - 1735,1211,1679,908,1526,830,1415,916,1408,1218,1593,1369
    zones:
      bbq:
        coordinates: 2604,1728,2230,802,615,810,0,1728
      parking:
        coordinates: 2880,527,2801,379,1403,374,1157,354,1098,475
    objects:
      filters:
        person:
          mask:
            - 1489,1275,1686,1275,1615,810,1455,852
    ffmpeg:
      inputs:
        - path: rtsp://192.168.0.39:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif
          roles:
            - detect
            - rtmp
    detect:
      width: 3072
      height: 1728
  back:
    motion:
      mask:
        - 2279,139,942,31,927,82,462,119,464,0,2560,0,2560,1440,2055,1440
    zones:
      car:
        coordinates: 2064,981,1374,533,1177,505,636,646,587,818,1247,1440
      pavement:
        coordinates: 287,1440,1335,1440,685,790,226,872
    ffmpeg:
      inputs:
        - path: rtsp://cctv:xxx!@192.168.0.59:554/H264/ch1/main/av_stream
          roles:
            - detect
            - rtmp
    detect:
      width: 2560
      height: 1440

Relevant log output

***

Frigate stats

No response

Operating system

Other

Install method

Docker CLI

Coral version

Other

Any other information that may be helpful

No response

NickM-27 commented 1 year ago

nothing you are showing here looks out of the ordinary, and nothing here shows anything relating to using lots of disk space. Frigate stores recordings in ~10 second segments (ffmpeg does its best, but it depends on the camera because the split has to be done on a keyframe)

alekc commented 1 year ago

fair enough, then it would mean that I will need to play around with retention periods. Currently averaging 40-55Gb a day :(