blakeblackshear / frigate

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

[Support]: Camera not recording #7545

Closed chrismcdowell25 closed 11 months ago

chrismcdowell25 commented 1 year ago

Describe the problem you are having

I am having an issue where the events are not being recorded to the hard drive. If I reboot Frigate they work for a bit and if I adjust some of the camera settings I can seem to get them to work for a bit but I am not getting anything that seems to be consistently pointing to an issue. I have... /dev/shm | 13.9 MB | 536.9 MB /tmp/cache | 9.8 MB | 1000 MB

Which seems to be enough.

The snapshots seem to pretty much always work but the event recording does not. I have tried lowering the quality but can't seem to find the issue.

Version

0.12.1-367d724

Frigate config file

mqtt:
  enabled: false
  host: mqtt
  topic_prefix: frigate
  client_id: frigate

logger:
  # Optional: default log level (default: shown below)
  default: info
  logs:
    watchdog.south_front: debug
    watchdog.north_front: debug

ffmpeg:
  hwaccel_args: preset-vaapi
  #input_args: preset-rtsp-udp
  #output_args: preset-record-generic-audio-copy

detectors:
  # Required: name of the detector
  #cputest:
    # 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: cpu
  coral:
    type: edgetpu
    device: "pci"
  #ov:
  #  type: openvino
  #  device: AUTO
  #  model:
  #    path: /openvino-model/ssdlite_mobilenet_v2.xml

#model:
#  width: 300
#  height: 300
#  input_tensor: nhwc
#  input_pixel_format: bgr
#  labelmap_path: /openvino-model/coco_91cl_bkgr.txt

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: 27
  # Optional: 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.
  # As a rule of thumb:
  #  - 15 - high sensitivity
  #  - 30 - medium sensitivity
  #  - 50 - low sensitivity
  contour_area: 25
  # 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.3
  # 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.3
  # Optional: Height of the resized motion frame  (default: 50)
  # 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: 55
  # Optional: motion mask
  # NOTE: see docs for more detailed info on creating masks
  #mask: 0,900,1080,900,1080,1920,0,1920
  # Optional: improve contrast (default: shown below)
  # Enables dynamic contrast improvement. This should help improve night detections at the cost of making motion detection more sensitive
  # for daytime.
  improve_contrast: True
  # Optional: Delay when updating camera motion through MQTT from ON -> OFF (default: shown below).
  #mqtt_off_delay: 30

birdseye:
  # Optional: Enable birdseye view (default: shown below)
  enabled: True
  # Optional: Restream birdseye via RTSP (default: shown below)
  # NOTE: Enabling this will set birdseye to run 24/7 which may increase CPU usage somewhat.
  restream: False
  # Optional: Width of the output resolution (default: shown below)
  width: 1920
  # Optional: Height of the output resolution (default: shown below)
  height: 1080
  # Optional: Encoding quality of the mpeg1 feed (default: shown below)
  # 1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources.
  quality: 6
  # 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: objects

objects:
  track:
    - person
    - car
    - truck
    - dog
    - motorcycle
    - bicycle

detect:
  # Optional: width of the frame for the input with the detect role (default: shown below)
  width: 1920
  # Optional: height of the frame for the input with the detect role (default: shown below)
  height: 1080
  # Optional: desired fps for your camera for the input with the detect role (default: shown below)
  # NOTE: Recommended value of 5. Ideally, try and reduce your FPS on the camera.
  fps: 10
  # Optional: enables detection for the camera (default: True)
  enabled: True
  # Optional: Number of frames without a detection before Frigate considers an object to be gone. (default: 5x the frame rate)
  max_disappeared: 50
  # Optional: Configuration for stationary object tracking
 # stationary:
    # Optional: Frequency for confirming stationary objects (default: shown below)
    # When set to 0, object detection will not confirm stationary objects until movement is detected.
    # If set to 10, object detection will run to confirm the object still exists on every 10th frame.
#    interval: 0
    # 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  

snapshots:
  # Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
  enabled: True
  # Optional: save a clean PNG copy of the snapshot image (default: shown below)
  clean_copy: True
  # Optional: print a timestamp on the snapshots (default: shown below)
  timestamp: False
  # Optional: draw bounding box on the snapshots (default: shown below)
  bounding_box: True
  # Optional: crop the snapshot (default: shown below)
  crop: True
  # Optional: height to resize the snapshot to (default: original size)
  height: 600
  # Optional: Restrict snapshots to objects that entered any of the listed zones (default: no required zones)
  required_zones: []
  # Optional: Camera override for retention settings (default: global values)
  retain:
    # Required: Default retention days (default: shown below)
    default: 20
    # Optional: Per object retention days
    objects:
      person: 30

cameras:
  north_front:
    ffmpeg:
      inputs:
        - path: rtsp://frigate:gogogadget123@10.0.1.120:554/onvif/profile2/media.smp
          #input_args: -re -stream_loop -1 -fflags +genpts
          roles:
            - record
        - path: rtsp://frigate:gogogadget123@10.0.1.120:554/onvif/profile4/media.smp
          #input_args: -re -stream_loop -1 -fflags +genpts
          roles:
            - detect
    motion:
      improve_contrast: True
      mask:    
        - 50,366,34,251,203,216,316,256,406,341,448,412,453,500,355,610,131,754
    #zones:  
    #  Entry:
    #   coordinates: 0,59,66,51,245,84,675,227,1073,463,1063,720,0,720
    #  StreetNF:
    #   coordinates: 1280,105,1050,0,108,0,107,38,350,101,569,173,800,258,924,305,1280,465
    record:
      enabled: True
      retain:
        days: 15
        mode: motion
      events:
        # Optional: Number of seconds before the event to include (default: shown below)
        pre_capture: 8
        # Optional: Number of seconds after the event to include (default: shown below)
        post_capture: 8
        # Optional: Objects to save recordings for. (default: all tracked objects)
        retain:
         default: 20
         mode: motion

  south_front:
    ffmpeg:
      inputs:
        - path: rtsp://frigate:gogogadget123@10.0.1.121:554/onvif/profile2/media.smp
          #input_args: -re -stream_loop -1 -fflags +genpts
          roles:
            - record
        - path: rtsp://frigate:gogogadget123@10.0.1.121:554/onvif/profile5/media.smp
          #input_args: -re -stream_loop -1 -fflags +genpts
          roles:
            - detect
    motion:
      improve_contrast: True
    #zones:  
    #  Driveway:
    #    coordinates: 0,59,66,51,245,84,675,227,1073,463,1063,720,0,720
    #  StreetSF:
    #    coordinates: 1280,105,1050,0,108,0,107,38,350,101,569,173,800,258,924,305,1280,465

    record:
      enabled: True
      retain:
        days: 15
        mode: motion
      events:
        # Optional: Number of seconds before the event to include (default: shown below)
        pre_capture: 8
        # Optional: Number of seconds after the event to include (default: shown below)
        post_capture: 8
        # Optional: Objects to save recordings for. (default: all tracked objects)
        retain:
         default: 20
         mode: motion

Relevant log output

2023-08-20 19:44:17.186672949  [INFO] Starting Frigate...
2023-08-20 19:44:18.878619532  [2023-08-20 19:44:18] frigate.app                    INFO    : Starting Frigate (0.12.1-367d724)
2023-08-20 19:44:18.915479356  [2023-08-20 19:44:18] peewee_migrate                 INFO    : Starting migrations
2023-08-20 19:44:18.920114857  [2023-08-20 19:44:18] peewee_migrate                 INFO    : There is nothing to migrate
2023-08-20 19:44:18.933466417  [2023-08-20 19:44:18] detector.coral                 INFO    : Starting detection process: 291
2023-08-20 19:44:18.934287846  [2023-08-20 19:44:18] frigate.app                    INFO    : Output process started: 293
2023-08-20 19:44:18.939265215  [2023-08-20 19:44:18] frigate.app                    INFO    : Camera processor started for north_front: 298
2023-08-20 19:44:18.941809340  [2023-08-20 19:44:18] frigate.detectors.plugins.edgetpu_tfl INFO    : Attempting to load TPU as pci
2023-08-20 19:44:18.947226565  [2023-08-20 19:44:18] frigate.app                    INFO    : Camera processor started for south_front: 311
2023-08-20 19:44:18.947572586  [2023-08-20 19:44:18] frigate.detectors.plugins.edgetpu_tfl INFO    : TPU found
2023-08-20 19:44:18.948699279  [2023-08-20 19:44:18] frigate.app                    INFO    : Capture process started for north_front: 312
2023-08-20 19:44:18.953742714  [2023-08-20 19:44:18] frigate.app                    INFO    : Capture process started for south_front: 314
2023-08-20 19:48:09.002236356  [2023-08-20 19:48:09] ffmpeg.north_front.record      ERROR   : [segment @ 0x55cb0ebfb000] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
2023-08-20 19:48:09.002427220  [2023-08-20 19:48:09] watchdog.north_front           INFO    : Terminating the existing ffmpeg process...
2023-08-20 19:48:09.002794019  [2023-08-20 19:48:09] watchdog.north_front           INFO    : Waiting for ffmpeg to exit gracefully...
2023-08-20 19:48:52.152986138  [2023-08-20 19:48:52] frigate.http                   ERROR   : No recordings found for the requested time range
2023-08-20 19:48:52.216658618  [2023-08-20 19:48:52] frigate.http                   ERROR   : Event does not have recordings: 1692582426.329682-syt0bm
2023-08-20 19:49:05.242728634  [2023-08-20 19:49:05] frigate.http                   ERROR   : No recordings found for the requested time range
2023-08-20 19:49:05.305240799  [2023-08-20 19:49:05] frigate.http                   ERROR   : Event does not have recordings: 1692581199.657499-g6pd7k
2023-08-20 19:49:54.781882971  [2023-08-20 19:49:54] frigate.http                   ERROR   : No recordings found for the requested time range
2023-08-20 19:49:54.839189923  [2023-08-20 19:49:54] frigate.http                   ERROR   : Event does not have recordings: 1692582482.376523-j2blmg
2023-08-20 19:51:41.175694100  [2023-08-20 19:51:41] frigate.video                  ERROR   : north_front: Unable to read frames from ffmpeg process.
2023-08-20 19:51:41.175775135  [2023-08-20 19:51:41] frigate.video                  ERROR   : north_front: ffmpeg process is not running. exiting capture thread...
2023-08-20 19:51:49.023240244  [2023-08-20 19:51:49] watchdog.north_front           ERROR   : Ffmpeg process crashed unexpectedly for north_front.
2023-08-20 19:51:49.023446326  [2023-08-20 19:51:49] watchdog.north_front           ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-08-20 19:55:39.809493697  [2023-08-20 19:55:39] frigate.http                   ERROR   : No recordings found for the requested time range
2023-08-20 19:55:39.970734761  [2023-08-20 19:55:39] frigate.http                   ERROR   : Event does not have recordings: 1692582889.749427-06ijku
2023-08-20 19:56:50.784299691  [2023-08-20 19:56:50] frigate.http                   ERROR   : No recordings found for the requested time range
2023-08-20 19:56:50.946533132  [2023-08-20 19:56:50] frigate.http                   ERROR   : Event does not have recordings: 1692582960.957414-3zylmu
2023-08-20 19:56:57.420780317  [2023-08-20 19:56:57] frigate.http                   ERROR   : No recordings found for the requested time range
2023-08-20 19:56:57.582297078  [2023-08-20 19:56:57] frigate.http                   ERROR   : Event does not have recordings: 1692582918.41693-bf0k4x
2023-08-20 19:57:08.622805137  [2023-08-20 19:57:08] frigate.http                   ERROR   : No recordings found for the requested time range
2023-08-20 19:57:08.785119042  [2023-08-20 19:57:08] frigate.http                   ERROR   : Event does not have recordings: 1692582821.411079-ayabaw
2023-08-20 19:57:10.692344823  [2023-08-20 19:57:10] frigate.http                   ERROR   : No recordings found for the requested time range
2023-08-20 19:57:10.752461862  [2023-08-20 19:57:10] frigate.http                   ERROR   : Event does not have recordings: 1692582782.36528-i74ogm
2023-08-20 19:57:16.355661486  [2023-08-20 19:57:16] frigate.http                   ERROR   : Event does not have recordings: 1692582960.957414-3zylmu
2023-08-20 19:57:16.460465035  [2023-08-20 19:57:16] frigate.http                   ERROR   : Event does not have recordings: 1692582960.957414-3zylmu
2023-08-20 20:06:39.651528419  [2023-08-20 20:06:39] frigate.http                   ERROR   : No recordings found for the requested time range
2023-08-20 20:06:39.713478561  [2023-08-20 20:06:39] frigate.http                   ERROR   : Event does not have recordings: 1692583396.91054-4b2ysf
2023-08-20 20:06:43.785693966  [2023-08-20 20:06:43] frigate.http                   ERROR   : No recordings found for the requested time range
2023-08-20 20:06:43.848691857  [2023-08-20 20:06:43] frigate.http                   ERROR   : Event does not have recordings: 1692583499.447229-fh24rd
2023-08-20 20:40:07.989209775  [2023-08-20 20:40:07] ws4py                          ERROR   : Failed to receive data
2023-08-20 20:40:07.989217803  Traceback (most recent call last):
2023-08-20 20:40:07.989221336    File "/usr/local/lib/python3.9/dist-packages/ws4py/websocket.py", line 394, in once
2023-08-20 20:40:07.989224111      b = self.sock.recv(self.reading_buffer_size)
2023-08-20 20:40:07.989231036  ConnectionResetError: [Errno 104] Connection reset by peer
2023-08-20 21:15:33.874928842  [2023-08-20 21:15:33] frigate.http                   ERROR   : No recordings found for the requested time range
2023-08-20 21:15:33.930452649  [2023-08-20 21:15:33] frigate.http                   ERROR   : Event does not have recordings: 1692586006.876602-25r9p6
2023-08-20 21:16:07.793025910  [2023-08-20 21:16:07] frigate.http                   ERROR   : No recordings found for the requested time range
2023-08-20 21:16:07.856173350  [2023-08-20 21:16:07] frigate.http                   ERROR   : Event does not have recordings: 1692584078.856422-kpqsp7
2023-08-20 21:16:09.865811567  [2023-08-20 21:16:09] frigate.http                   ERROR   : No recordings found for the requested time range
2023-08-20 21:16:09.925118810  [2023-08-20 21:16:09] frigate.http                   ERROR   : Event does not have recordings: 1692584134.670519-t4tjss
2023-08-20 21:16:11.724851160  [2023-08-20 21:16:11] frigate.http                   ERROR   : No recordings found for the requested time range
2023-08-20 21:16:11.786072032  [2023-08-20 21:16:11] frigate.http                   ERROR   : Event does not have recordings: 1692584169.716739-v0mkol
2023-08-20 21:16:13.381424424  [2023-08-20 21:16:13] frigate.http                   ERROR   : No recordings found for the requested time range
2023-08-20 21:16:13.442374036  [2023-08-20 21:16:13] frigate.http                   ERROR   : Event does not have recordings: 1692584322.487426-tykyy4
2023-08-20 21:16:16.281183950  [2023-08-20 21:16:16] frigate.http                   ERROR   : No recordings found for the requested time range
2023-08-20 21:16:16.339330534  [2023-08-20 21:16:16] frigate.http                   ERROR   : Event does not have recordings: 1692584427.043257-yzi5st
2023-08-20 21:16:18.034130084  [2023-08-20 21:16:18] frigate.http                   ERROR   : No recordings found for the requested time range
2023-08-20 21:16:18.095614088  [2023-08-20 21:16:18] frigate.http                   ERROR   : Event does not have recordings: 1692584519.189434-qr32us
2023-08-20 21:16:19.482536892  [2023-08-20 21:16:19] frigate.http                   ERROR   : No recordings found for the requested time range
2023-08-20 21:16:19.542350373  [2023-08-20 21:16:19] frigate.http                   ERROR   : Event does not have recordings: 1692584531.409639-e6v93t
2023-08-20 21:16:22.477102947  [2023-08-20 21:16:22] frigate.http                   ERROR   : No recordings found for the requested time range
2023-08-20 21:16:22.541853147  [2023-08-20 21:16:22] frigate.http                   ERROR   : Event does not have recordings: 1692584720.119598-p0e5a8
2023-08-20 21:16:24.029043993  [2023-08-20 21:16:24] frigate.http                   ERROR   : No recordings found for the requested time range
2023-08-20 21:16:24.092441451  [2023-08-20 21:16:24] frigate.http                   ERROR   : Event does not have recordings: 1692584735.050445-a2vvq3
2023-08-20 21:16:26.514040731  [2023-08-20 21:16:26] frigate.http                   ERROR   : No recordings found for the requested time range
2023-08-20 21:16:26.575852041  [2023-08-20 21:16:26] frigate.http                   ERROR   : Event does not have recordings: 1692584930.079421-ksxvus
2023-08-20 21:16:28.271065081  [2023-08-20 21:16:28] frigate.http                   ERROR   : No recordings found for the requested time range
2023-08-20 21:16:28.332103873  [2023-08-20 21:16:28] frigate.http                   ERROR   : Event does not have recordings: 1692584974.600035-jx6yin
2023-08-20 21:16:31.268434595  [2023-08-20 21:16:31] frigate.http                   ERROR   : No recordings found for the requested time range
2023-08-20 21:16:31.328233222  [2023-08-20 21:16:31] frigate.http                   ERROR   : Event does not have recordings: 1692585143.140293-liy8qi
2023-08-20 21:16:34.483923887  [2023-08-20 21:16:34] frigate.http                   ERROR   : No recordings found for the requested time range
2023-08-20 21:16:34.532224184  [2023-08-20 21:16:34] frigate.http                   ERROR   : Event does not have recordings: 1692585375.20436-fu0wmy
2023-08-20 21:16:36.540663954  [2023-08-20 21:16:36] frigate.http                   ERROR   : No recordings found for the requested time range
2023-08-20 21:16:36.599447838  [2023-08-20 21:16:36] frigate.http                   ERROR   : Event does not have recordings: 1692585379.029562-oyn90d
2023-08-20 21:16:40.781610455  [2023-08-20 21:16:40] frigate.http                   ERROR   : No recordings found for the requested time range
2023-08-20 21:16:40.842536482  [2023-08-20 21:16:40] frigate.http                   ERROR   : Event does not have recordings: 1692585522.618014-py8n7d
2023-08-20 21:16:42.435159777  [2023-08-20 21:16:42] frigate.http                   ERROR   : No recordings found for the requested time range
2023-08-20 21:16:42.494975067  [2023-08-20 21:16:42] frigate.http                   ERROR   : Event does not have recordings: 1692585567.062705-wtj6e1
2023-08-20 21:59:37.805517973  [2023-08-20 21:59:37] ws4py                          ERROR   : Failed to receive data
2023-08-20 21:59:37.805524151  Traceback (most recent call last):
2023-08-20 21:59:37.805527541    File "/usr/local/lib/python3.9/dist-packages/ws4py/websocket.py", line 394, in once
2023-08-20 21:59:37.805530318      b = self.sock.recv(self.reading_buffer_size)
2023-08-20 21:59:37.805533311  ConnectionResetError: [Errno 104] Connection reset by peer
2023-08-21 08:31:14.143459766  [2023-08-21 08:31:14] frigate.object_processing      WARNING : Unable to create jpg because frame 1692628271.083057 is not in the cache
2023-08-21 08:31:19.731618280  [2023-08-21 08:31:19] frigate.object_processing      WARNING : Unable to create jpg because frame 1692628271.083057 is not in the cache
2023-08-21 08:31:19.731628320  [2023-08-21 08:31:19] frigate.object_processing      WARNING : Unable to save snapshot for 1692628238.896142-2cdokh.
2023-08-21 08:31:19.731630357  [2023-08-21 08:31:19] frigate.object_processing      WARNING : Unable to create clean png because frame 1692628271.083057 is not in the cache
2023-08-21 08:31:19.731632036  [2023-08-21 08:31:19] frigate.object_processing      WARNING : Unable to save clean snapshot for 1692628238.896142-2cdokh.
2023-08-21 08:31:19.732997729  [2023-08-21 08:31:19] frigate.object_processing      WARNING : Unable to create jpg because frame 1692628271.083057 is not in the cache
2023-08-21 09:33:53.059969585  [2023-08-21 09:33:53] frigate.object_processing      WARNING : Unable to create jpg because frame 1692632032.775326 is not in the cache
2023-08-21 09:33:53.063437276  [2023-08-21 09:33:53] frigate.object_processing      WARNING : Unable to create jpg because frame 1692632032.565569 is not in the cache
2023-08-21 10:09:53.228566957  [2023-08-21 10:09:53] frigate.object_processing      WARNING : Unable to create jpg because frame 1692634192.601467 is not in the cache
2023-08-21 10:41:36.779826439  [2023-08-21 10:41:36] frigate.object_processing      WARNING : Unable to create jpg because frame 1692636095.897336 is not in the cache
2023-08-21 11:13:04.370907318  [2023-08-21 11:13:04] frigate.object_processing      WARNING : Unable to create jpg because frame 1692637984.149158 is not in the cache
2023-08-21 17:01:23.588796168  [2023-08-21 17:01:23] frigate.object_processing      WARNING : Unable to create jpg because frame 1692658883.103802 is not in the cache
2023-08-21 18:16:02.594772159  [2023-08-21 18:16:02] frigate.object_processing      WARNING : Unable to create jpg because frame 1692663362.346099 is not in the cache
2023-08-21 18:46:06.061954623  [2023-08-21 18:46:06] frigate.http                   ERROR   : No recordings found for the requested time range
2023-08-21 18:46:06.122183946  [2023-08-21 18:46:06] frigate.http                   ERROR   : Event does not have recordings: 1692664953.695599-3i4zlv
2023-08-21 18:46:09.475186814  [2023-08-21 18:46:09] frigate.http                   ERROR   : No recordings found for the requested time range
2023-08-21 18:46:09.534235732  [2023-08-21 18:46:09] frigate.http                   ERROR   : Event does not have recordings: 1692664432.982129-5449ve
2023-08-21 18:46:12.070047805  [2023-08-21 18:46:12] frigate.http                   ERROR   : No recordings found for the requested time range
2023-08-21 18:46:12.128006229  [2023-08-21 18:46:12] frigate.http                   ERROR   : Event does not have recordings: 1692664209.799003-86pyrr
2023-08-21 19:07:06.082991957  [2023-08-21 19:07:06] frigate.object_processing      WARNING : Unable to create jpg because frame 1692666425.821096 is not in the cache

FFprobe output from your camera

CAMERA 1

ffprobe version n5.1-2-g915ef932a3-20220731 Copyright (c) 2007-2022 the FFmpeg developers
  built with gcc 12.1.0 (crosstool-NG 1.25.0.55_3defb7b)
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-ffbuild-linux-gnu- --arch=x86_64 --target-os=linux --enable-gpl --enable-version3 --disable-debug --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libpulse --enable-libvmaf --enable-libxcb --enable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-mbedtls --enable-librist --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --disable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libdrm --enable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags=-pie --extra-libs='-ldl -lgomp' --extra-version=20220731
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
Input #0, rtsp, from 'rtsp://frigate:gogogadget123@10.0.1.121:554/onvif/profile2/media.smp':
  Metadata:
    title           : Media Presentation
    comment         : samsung
  Duration: N/A, start: -0.168000, bitrate: N/A
  Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709, progressive), 1920x1080, 15.17 tbr, 90k tbn
  Stream #0:1: Data: none
Unsupported codec with id 0 for input stream 1

CAMERA 1 PT2
Input #0, rtsp, from 'rtsp://frigate:gogogadget123@10.0.1.121:554/onvif/profile5/media.smp':
  Metadata:
    title           : Media Presentation
    comment         : samsung
  Duration: N/A, start: -0.213000, bitrate: N/A
  Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709, progressive), 1920x1080, 10.08 tbr, 90k tbn
  Stream #0:1: Data: none
Unsupported codec with id 0 for input stream 1

CAMERA 2
Input #0, rtsp, from 'rtsp://frigate:gogogadget123@10.0.1.120:554/onvif/profile2/media.smp':
  Metadata:
    title           : Media Presentation
    comment         : samsung
  Duration: N/A, start: 0.006000, bitrate: N/A
  Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709, progressive), 1920x1080, 30 tbr, 90k tbn
  Stream #0:1: Data: none
Unsupported codec with id 0 for input stream 1

CAMERA 2 PT2
Input #0, rtsp, from 'rtsp://frigate:gogogadget123@10.0.1.120:554/onvif/profile4/media.smp':
  Metadata:
    title           : Media Presentation
    comment         : samsung
  Duration: N/A, start: -0.535000, bitrate: N/A
  Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709, progressive), 1920x1080, 10 tbr, 90k tbn
  Stream #0:1: Data: none
Unsupported codec with id 0 for input stream 1

Frigate stats

No response

Operating system

Other Linux

Install method

Docker Compose

Coral version

PCIe

Network connection

Wired

Camera make and model

Samsung/Hanwha QND-6010R

Any other information that may be helpful

version: "3.9" services: frigate: container_name: frigate privileged: true # this may not be necessary for all setups restart: unless-stopped image: ghcr.io/blakeblackshear/frigate:stable shm_size: "512mb" # update for your cameras based on calculation above devices:

- /dev/bus/usb:/dev/bus/usb # passes the USB Coral, needs to be modified for other versions

  - /dev/apex_0:/dev/apex_0 # passes a PCIe Coral, follow driver instructions here https://coral.ai/docs/m2/get-started/#2a-on-linux

- /dev/dri/renderD128 # for intel hwaccel, needs to be updated for your hardware

volumes:
  - /etc/localtime:/etc/localtime:ro
  - /data/config:/config
  - /mnt/video:/media/frigate
  - type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
    target: /tmp/cache
    tmpfs:
      size: 1000000000
ports:
  - "5000:5000"
  - "8554:8554" # RTSP feeds
  - "8555:8555/tcp" # WebRTC over tcp
  - "8555:8555/udp" # WebRTC over udp
environment:
  FRIGATE_RTSP_PASSWORD: "password"
  PLUS_API_KEY: "RRRRR"
  LIBVA_DRIVER_NAME: "radeonsi"
NickM-27 commented 1 year ago

Is there a reason why you are using different urls for detect and record? They have the same resolution so it doesn't seem like that makes sense.

I'd suggest just doing one connection to the camera

  north_front:
    ffmpeg:
      inputs:
        - path: rtsp://frigate:gogogadget123@10.0.1.120:554/onvif/profile2/media.smp
          roles:
            - detect
            - record
chrismcdowell25 commented 1 year ago

I had the detect at a lower resolution but was getting some false positives. I'll have switched it over and will see if that helps.

chrismcdowell25 commented 1 year ago

This is another example of one that failed.

car(82%) 8/23/23, 7:33:04 PM -21m ago ( 32s ) south front

Frigate Log.txt

chrismcdowell25 commented 1 year ago

`mqtt: enabled: false host: mqtt topic_prefix: frigate client_id: frigate

logger:

Optional: default log level (default: shown below)

default: debug logs: watchdog.south_front: debug watchdog.north_front: debug

ffmpeg: hwaccel_args: preset-vaapi

input_args: preset-rtsp-udp

output_args: preset-record-generic-audio-copy

detectors:

Required: name of the detector

cputest:

# 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: cpu

coral: type: edgetpu device: "pci"

ov:

type: openvino

device: AUTO

model:

path: /openvino-model/ssdlite_mobilenet_v2.xml

model:

width: 300

height: 300

input_tensor: nhwc

input_pixel_format: bgr

labelmap_path: /openvino-model/coco_91cl_bkgr.txt

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: 27

Optional: 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.

As a rule of thumb:

- 15 - high sensitivity

- 30 - medium sensitivity

- 50 - low sensitivity

contour_area: 25

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.3

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.3

Optional: Height of the resized motion frame (default: 50)

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: 55

Optional: motion mask

NOTE: see docs for more detailed info on creating masks

mask: 0,900,1080,900,1080,1920,0,1920

Optional: improve contrast (default: shown below)

Enables dynamic contrast improvement. This should help improve night detections at the cost of making motion detection more sensitive

for daytime.

improve_contrast: True

Optional: Delay when updating camera motion through MQTT from ON -> OFF (default: shown below).

mqtt_off_delay: 30

birdseye:

Optional: Enable birdseye view (default: shown below)

enabled: True

Optional: Restream birdseye via RTSP (default: shown below)

NOTE: Enabling this will set birdseye to run 24/7 which may increase CPU usage somewhat.

restream: False

Optional: Width of the output resolution (default: shown below)

width: 1920

Optional: Height of the output resolution (default: shown below)

height: 1080

Optional: Encoding quality of the mpeg1 feed (default: shown below)

1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources.

quality: 6

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: objects

objects: track:

detect:

Optional: width of the frame for the input with the detect role (default: shown below)

width: 1920

Optional: height of the frame for the input with the detect role (default: shown below)

height: 1080

Optional: desired fps for your camera for the input with the detect role (default: shown below)

NOTE: Recommended value of 5. Ideally, try and reduce your FPS on the camera.

fps: 10

Optional: enables detection for the camera (default: True)

enabled: True

Optional: Number of frames without a detection before Frigate considers an object to be gone. (default: 5x the frame rate)

max_disappeared: 50

Optional: Configuration for stationary object tracking

stationary:

# Optional: Frequency for confirming stationary objects (default: shown below)
# When set to 0, object detection will not confirm stationary objects until movement is detected.
# If set to 10, object detection will run to confirm the object still exists on every 10th frame.

interval: 0

# 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  

snapshots:

Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)

enabled: True

Optional: save a clean PNG copy of the snapshot image (default: shown below)

clean_copy: True

Optional: print a timestamp on the snapshots (default: shown below)

timestamp: False

Optional: draw bounding box on the snapshots (default: shown below)

bounding_box: True

Optional: crop the snapshot (default: shown below)

crop: True

Optional: height to resize the snapshot to (default: original size)

height: 600

Optional: Restrict snapshots to objects that entered any of the listed zones (default: no required zones)

required_zones: []

Optional: Camera override for retention settings (default: global values)

retain:

Required: Default retention days (default: shown below)

default: 20
# Optional: Per object retention days
objects:
  person: 30

cameras: north_front: ffmpeg: inputs:

NickM-27 commented 1 year ago

Please don't use debug logs, they are not helpful in most cases and cause lots of clutter.

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