blakeblackshear / frigate

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

[Support]: Storage Page Incorrect #7301

Closed halexh closed 1 year ago

halexh commented 1 year ago

Describe the problem you are having

The Overview section of the Storage page is displaying incorrect values.

image

The entire share space on my server that the frigate container is running on is 14 TB. I have used roughly 9.8 TB of it.

As you can see in the docker cli below, I am mounting a specific folder within this 14 TB share to the frigate container's /media/frigate/ directory. The result of running du -sh on that directory within the container is the following:

# du -sh /media/frigate/recordings/
6.8G    /media/frigate/recordings/
# du -sh /media/frigate/clips/
0       /media/frigate/clips/

Shouldnt I expect to at least see a Used size of 6.8 GB for recordings?

Version

0.12.1-367D724

Frigate config file

mqtt:
  host: <redacted>
  user: <redacted>
  password: <redacted>

detectors:
  coral:
    type: edgetpu
    device: usb

ffmpeg:
  hwaccel_args: preset-vaapi
  input_args: preset-rtsp-restream
  output_args:
    record: preset-record-generic-audio-aac

cameras:
  Doorbell:
    ffmpeg:
      inputs:
        - path: rtsp://<redacted>@<redacted>/h264Preview_01_main
          roles:
            - record
        - path: rtsp://<redacted>@<redacted>/h264Preview_01_sub
          roles:
            - detect

  Garage:
    ffmpeg:
      inputs:
        - path: rtsp://<redacted>@<redacted>/cam/realmonitor?channel=1&subtype=0
          roles:
            - record
        - path: rtsp://<redacted>@<redacted>/cam/realmonitor?channel=1&subtype=2
          roles:
            - detect
    detect:
      enabled: true
      width: 1920
      height: 1080
    record:
      enabled: true

  Back:
    ffmpeg:
      inputs:
        - path: rtsp://<redacted>@<redacted>/cam/realmonitor?channel=1&subtype=0
          roles:
            - record
        - path: rtsp://<redacted>@<redacted>/cam/realmonitor?channel=1&subtype=2
          roles:
            - detect
    detect:
      enabled: true
      width: 1920
      height: 1080
    record:
      enabled: true

  Porch:
    ffmpeg:
      inputs:
        - path: rtsp://<redacted>@<redacted>/cam/realmonitor?channel=1&subtype=0
          roles:
            - record
        - path: rtsp://<redacted>@<redacted>/cam/realmonitor?channel=1&subtype=2
          roles:
            - detect
    detect:
      enabled: true
      width: 1920
      height: 1080
    record:
      enabled: true

  Side:
    ffmpeg:
      inputs:
        - path: rtsp://<redacted>@<redacted>/cam/realmonitor?channel=1&subtype=0
          roles:
            - record
        - path: rtsp://<redacted>@<redacted>/cam/realmonitor?channel=1&subtype=2
          roles:
            - detect
    detect:
      enabled: true
      width: 1920
      height: 1080
    record:
      enabled: true
    motion:
      mask:
        - 1920,0,1075,0,560,0,346,0,0,0,0,422,126,346,230,290,348,239,443,204,567,163,694,134,824,112,962,92,1081,88,1178,88,1315,96,1430,110,1590,135,1742,172,1920,236
        - 0,1080,359,1080,0,600

  Front:
    ffmpeg:
      inputs:
        - path: rtsp://<redacted>@<redacted>/cam/realmonitor?channel=1&subtype=0
          roles:
            - record
        - path: rtsp://<redacted>@<redacted>/cam/realmonitor?channel=1&subtype=2
          roles:
            - detect
    detect:
      enabled: true
      width: 1920
      height: 1080
    record:
      enabled: true

# Optional: birdseye configuration
# NOTE: Can (enabled, mode) be overridden at the camera level
birdseye:
  # Optional: Enable birdseye view
  enabled: True
  # Optional: Restream birdseye via RTSP
  # NOTE: Enabling this will set birdseye to run 24/7 which may increase CPU usage somewhat.
  restream: False
  width: 1920
  height: 1080
  # Optional: Encoding quality of the mpeg1 feed
  # 1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources.
  quality: 1
  # Optional: Mode of the view. Available options are: objects, motion, and continuous
  #   objects - cameras are included if they have had a tracked object within the last 30 seconds
  #   motion - cameras are included if motion was detected in the last 30 seconds
  #   continuous - all cameras are included always
  mode: continuous

Relevant log output

N/A

FFprobe output from your camera

[{"return_code":0,"stderr":"","stdout":{"programs":[],"streams":[{"avg_frame_rate":"30/1","codec_long_name":"H.264/AVC/MPEG-4AVC/MPEG-4part10","height":1520,"width":2688},{"avg_frame_rate":"0/0","codec_long_name":"AAC(AdvancedAudioCoding)"}]}},{"return_code":0,"stderr":"","stdout":{"programs":[],"streams":[{"avg_frame_rate":"6/1","codec_long_name":"H.264/AVC/MPEG-4AVC/MPEG-4part10","height":1080,"width":1920},{"avg_frame_rate":"0/0","codec_long_name":"AAC(AdvancedAudioCoding)"}]}}]

Frigate stats

No response

Operating system

UNRAID

Install method

Docker CLI

Coral version

USB

Network connection

Wired

Camera make and model

Dahua IPC-T5442T-ZEB

Any other information that may be helpful

Docker CLI:

docker run
  -d
  --name='frigate'
  --net='swag'
  -e TZ="America/New_York"
  -e HOST_OS="Unraid"
  -e HOST_HOSTNAME="<redacted>"
  -e HOST_CONTAINERNAME="<redacted>"
  -e 'FRIGATE_RTSP_PASSWORD'='<redacted>'
  -e 'LIBVA_DRIVER_NAME'='iHD'
  -l net.unraid.docker.managed=dockerman
  -l net.unraid.docker.webui=<redacted>'
  -l net.unraid.docker.icon='https://raw.githubusercontent.com/yayitazale/unraid-templates/main/frigate.png'
  -p '5000:5000/tcp'
  -p '8554:8554/tcp'
  -p '8555:8555/tcp'
  -p '8555:8555/udp'
  -p '1984:1984/tcp'
  -v '/mnt/user/appdata/frigate':'/config':'rw'
  -v '/mnt/user/data/cameras/':'/media/frigate':'rw'
  -v '/etc/localtime':'/etc/localtime':'rw'
  --device='/dev/bus/usb'
  --device='/dev/dri/renderD128'
  --shm-size=256mb
  --mount type=tmpfs,target=/tmp/cache,tmpfs-size=400000000
  --restart unless-stopped
  --privileged 'ghcr.io/blakeblackshear/frigate:stable'
NickM-27 commented 1 year ago

Frigate only looks at the entire drive storage used, not the storage that is used specifically for recordings. This is because reading the specific storage use for that directory requires spinning up drives meanwhile checking the usage of the full volume does not. This would mean users drives never spin down which is a bad user experience.

github-actions[bot] commented 1 year 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.