blakeblackshear / frigate

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

[Config Support]:time directories on disk do not reflect timezone #7440

Closed turboc1208 closed 1 year ago

turboc1208 commented 1 year ago

Describe the problem you are having

The files stored in the frigate/recordings/date/ directory do not reflect the correct timezone offset. For example, right now it's 9:00 AM. I have directories 10,11,12,13,14 and 15 already in the folder. I am running under docker. When I do an exec into the docker container and run the date command, it shows the correct date.

Version

0.12.1-367D724

Frigate config file

mqtt:
  enabled: True
  host: 192.168.x.xx
  port: 1883
  # NOTE: must be unique if you are running multiple instances
  topic_prefix: frigate
  # NOTE: must be unique if you are running multiple instances
  client_id: frigate
  user: xxxxxx
  password: xxxxxx
  #tls_ca_certs: /path/to/ca.crt
  # Optional: tls_client_cert and tls_client key in order to use self-signed client
  # certificates (default: None)
  # NOTE: certificate must not be password-protected
  #       do not set user and password when using a client certificate
  #tls_client_cert: /path/to/client.crt
  #tls_client_key: /path/to/client.key
  #tls_insecure: false
  stats_interval: 60

detectors:
  # Required: name of the detector
  Coral:
    # Required: type of the detector
    # Frigate provided types include 'cpu', 'edgetpu', and 'openvino' (default: shown below)
    # Additional detector types can also be plugged in.
    # Detectors may require additional configuration.
    # Refer to the Detectors configuration page for more information.
    type: edgetpu

# Optional: Database configuration
database:
  path: /media/frigate/frigate.db

# Optional: logger verbosity settings
logger:
  default: info
  logs:
    frigate.event: debug
    frigate.object_detection: info

# Optional: set environment variables
environment_vars:
  EXAMPLE_VAR: value

ffmpeg:
  global_args: -hide_banner -loglevel warning -threads 2
  hwaccel_args: preset-vaapi
  input_args: preset-rtsp-generic
  output_args:
    # Optional: output args for detect streams (default: shown below)
#    detect: -threads 2 -f rawvideo -pix_fmt yuv420p
    # Optional: output args for record streams (default: shown below)
    record: preset-record-generic
    # Optional: output args for rtmp streams (default: shown below)
    rtmp: preset-rtmp-generic

snapshots:
  enabled: False
  clean_copy: True
  timestamp: False
  bounding_box: False
  crop: False
  height: 175
  required_zones: []
  retain:
    # Required: Default retention days (default: shown below)
    default: 10
    # Optional: Per object retention days
    objects:
      person: 15

# Optional: Restream configuration
go2rtc:
  streams:
    hvac: rtsp://admin:xxxx@192.168.3.30:554/h264Preview_01_main
    hvac2: rtsp://admin:xxxx@192.168.3.30:554/h264Preview_01_sub

    sunroom: rtsp://admin:xxxx@192.168.3.31:554/h264Preview_01_main
    sunroom2: rtsp://admin:xxxx@192.168.3.31:554/h264Preview_01_sub

    doorbell: rtsp://admin:xxxx@192.168.3.32:554/h264Preview_01_main
    doorbell2: rtsp://admin:xxxx@192.168.3.32:554/h264Preview_01_sub

    shed: rtsp://admin:plough@xxxx:554/h264Preview_01_main
    shed2: rtsp://admin:plough@xxxx:554/h264Preview_01_sub

    drivewaygate: rtsp://admin:plough@xxxx:554/h264Preview_01_main
    drivewaygate2: rtsp://admin:plough@xxxx:554/h264Preview_01_sub

    driveway: rtsp://admin:plough@xxxx:554/h264Preview_01_main
    driveway2: rtsp://admin:plough@xxxx:554/h264Preview_01_sub

    twocar: rtsp://admin:plough@xxxx:554/h264Preview_01_main
    twocar2: rtsp://admin:plough@xxxx:554/h264Preview_01_sub

    onecar: rtsp://admin:plough@xxxx:554/h264Preview_01_main
    onecar2: rtsp://admin:plough@xxxx:554/h264Preview_01_sub
  webrtc:
    candidates:
      - 192.168.2.25:8555
      - stun:8555

objects:
  # Optional: list of objects to track from labelmap.txt (default: shown below)
  track:
    - person
    - car
    - dog
    - cat
    - bicycle
    - motorcycle
    - bus
    - boat
# Optional: jsmpeg stream configuration for WebUI
#live:
  # Optional: Set the name of the stream that should be used for live view
  # in frigate WebUI. (default: name of camera)
#  stream_name: main
#  height: 720
  # Optional: Set the encode quality of the jsmpeg stream (default: shown below)
  # 1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources.
#  quality: 8

# Optional: in-feed timestamp style configuration
# NOTE: Can be overridden at the camera level
timestamp_style:
  #           "tl" (top left), "tr" (top right), "bl" (bottom left), "br" (bottom right)
  position: "tl"
  format: "%m/%d/%Y %H:%M:%S"
  color:
    red: 255
    green: 255
    blue: 255
  thickness: 2
  #           "solid" (solid background in inverse color of font)
  #           "shadow" (shadow for font)
  effect: "solid"

rtmp:
  enabled: false

detect:
  enabled: True
  width: 640
  height: 480
  fps: 5

record:
  enabled: True
  retain:
    days: 7
    mode: motion
  events:
    pre_capture: 5
    post_capture: 5
    objects:
      - person
      - dog
      - cat
      - car
      - bicycle
      - motorcycle
      - bus
      - boat
    retain:
      default: 14
      mode: active_objects
      objects:
        dog: 7
        car: 7
        cat: 2
        bicycle: 2
        motorcycle: 2
        bus: 2
        boat: 2

# Required
cameras:
  # Required: name of the camera
  driveway:
    enabled: true
    ffmpeg:
      hwaccel_args: preset-vaapi
      inputs:
        - path: rtsp://127.0.0.1:8554/driveway
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/driveway2
          input_args: preset-rtsp-restream
          roles:
            - detect
    motion:
      mask:
        - 0,720,322,720,304,657,233,616,186,549,82,550,43,211,166,80,169,0,0,0
        - 1280,181,1280,0,171,0,170,57
    live:
      stream_name: driveway
  drivewaygate:
    enabled: True
    ffmpeg:
      hwaccel_args: preset-vaapi
      inputs:
        - path: rtsp://127.0.0.1:8554/drivewaygate
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/drivewaygate2
          input_args: preset-rtsp-restream
          roles:
            - detect
    motion:
      mask:
        - 82,72,87,118,310,75,314,44,395,46,640,41,640,0,0,0,0,52
    live:
      stream_name: drivewaygate
  sunroom:
    enabled: true
    ffmpeg:
      hwaccel_args: preset-vaapi
      inputs:
        - path: rtsp://127.0.0.1:8554/sunroom
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/sunroom2
          input_args: preset-rtsp-restream
          roles:
            - detect
    detect:
      width: 640
      height: 360
    record:
      events:
        objects:
          - dog
          - person
    motion:
      mask:
        - 0,51,363,21,640,103,640,0,0,0
    live:
      stream_name: sunrooom
  hvac:
    enabled: true
    ffmpeg:
      hwaccel_args: preset-vaapi
      inputs:
        - path: rtsp://127.0.0.1:8554/hvac
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/hvac2
          input_args: preset-rtsp-restream
          roles:
            - detect
    motion:
      mask:
        - 452,52,860,64,1280,148,1280,0,0,0,0,119,106,83,356,32
        - 1280,181,1280,0,171,0,170,57
    live:
      stream_name: hvac
  doorbell:
    enabled: true
    ffmpeg:
      hwaccel_args: preset-vaapi
      inputs:
        - path: rtsp://127.0.0.1:8554/doorbell
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/doorbell2
          input_args: preset-rtsp-restream
          roles:
            - detect
    motion:
      mask:
        - 0,122,72,157,197,120,203,341,270,347,271,100,379,87,464,90,468,386,499,480,640,480,640,0,0,0
        - 1280,181,1280,0,171,0,170,57
    live:
      stream_name: doorbell
  shed:
    enabled: true
    ffmpeg:
      hwaccel_args: preset-vaapi
      inputs:
        - path: rtsp://127.0.0.1:8554/shed
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/shed2
          input_args: preset-rtsp-restream
          roles:
            - detect
    motion:
      mask:
        - 0,113,124,100,237,45,640,37,640,0,0,0
    live:
      stream_name: shed
  twocar:
    enabled: true
    ffmpeg:
      hwaccel_args: preset-vaapi
      inputs:
        - path: rtsp://127.0.0.1:8554/twocar
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/twocar2
          input_args: preset-rtsp-restream
          roles:
            - detect
    motion:
      mask:
        - 0,103,235,85,640,98,640,0,0,0
    live:
      stream_name: twocar
  onecar:
    enabled: true
    ffmpeg:
      hwaccel_args: preset-vaapi
      inputs:
        - path: rtsp://127.0.0.1:8554/onecar
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/onecar2
          input_args: preset-rtsp-restream
          roles:
            - detect
    motion:
      mask:
        - 0,113,196,113,204,43,394,52,415,62,461,68,460,0,0,0
    live:
      stream_name: onecar
ui:
  # Optional: Set the default live mode for cameras in the UI (default: shown below)
  live_mode: mse
  use_experimental: False
  timezone: America/Chicago
  time_format: browser
  date_style: short
  time_style: medium
  strftime_fmt: "%Y/%m/%d %H:%M"

birdseye:
  enabled: True
  mode: objects

# Optional: Telemetry configuration
telemetry:
  # Optional: Enable the latest version outbound check (default: shown below)
  # NOTE: If you use the HomeAssistant integration, disabling this will prevent it from reporting new versions
  version_check: True

Relevant log output

none

Frigate stats

No response

Operating system

Debian

Install method

Docker Compose

Coral version

USB

Any other information that may be helpful

No response

NickM-27 commented 1 year ago

This is working as expected. Like it says in the docs, the recordings directory file structure stores recordings in UTC time