frigate: [Support]: I keep getting "unable to keep up with recording segments" and my footage skips a lot.

Describe the problem you are having

Per the title Log says “unable to keep up with recording segments”. I don’t remember ever getting this on 0.11. I am getting lots of skips in my recordings. The server is more powerful than the one I was using before, but the HDD is the same. The only difference is the Frigate version. What’s wrong with my config? I enabled G711 audio in my camera’s stream, this is the only difference, but Frigate does not accept it anyway. Even with AAC it doesn’t really work and never has. I tried a lot of different ways/presets. Do I have to completely disable audio in the camera to make this work?

Version

0.12.1-367D724

Frigate config file

####################################
########## FRIGATE CONFIG ##########

mqtt:
  enabled: false

detectors:
  tensorrt:
    type: tensorrt
    device: 0


model:
  path: /trt-models/yolov7-tiny-416.trt
  input_tensor: nchw
  input_pixel_format: rgb
  width: 416
  height: 416

ui:
  live_mode: jsmpeg
  timezone: Europe/London
  use_experimental: true

logger:
  default: info
  logs:
    frigate.event: info

database:
  path: /db/frigate.db

birdseye:
  enabled: True
  restream: False
  width: 1920
  height: 1080
    # 1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources.
  quality: 15
  mode: continuous

detect:
  width: 2592
  height: 1944
  fps: 5
  enabled: true
  max_disappeared: 60

objects:
  track:
    - person

record:
  enabled: True
  retain:
    days: 10
    mode: all
  events:
    retain:
      default: 10

snapshots:
  enabled: False
  timestamp: true
  bounding_box: False
  crop: False
  retain:
    default: 5

rtmp:
  enabled: False

timestamp_style:
    # "tl" (top left), "tr" (top right), "bl" (bottom left), "br" (bottom right)
  position: "tl"
    # Optional: Format specifier conform to the Python package "datetime" (default: shown below)
    #           Additional Examples:
    #             german: "%d.%m.%Y %H:%M:%S"
  format: "%m/%d/%Y %H:%M:%S"
  color:
    red: 255
    green: 255
    blue: 255
  thickness: 2
    # None (No effect),
    # "solid" (solid background in inverse color of font)
    # "shadow" (shadow for font)
  effect: shadow

###################################
########## CAMERA CONFIG ##########

cameras:
  frigate_street_front:
    enabled: True
    ffmpeg:
      hwaccel_args: preset-nvidia-h264
      output_args:
        record: preset-record-generic
      inputs:
        - path: rtsp://10.0.0.100:8554/frigate_street_front
          input_args: preset-rtsp-generic
          roles:
            - record
            - detect
    detect:
      enabled: true

  frigate_street_nw:
    enabled: True
    ffmpeg:
      hwaccel_args: preset-nvidia-h264      
      output_args:
        record: preset-record-generic
      inputs:
        - path: rtsp://10.0.0.100:8554/frigate_street_nw
          input_args: preset-rtsp-generic
          roles:
            - record
            - detect
    detect:
      enabled: true


  frigate_street_se:
    enabled: True
    ffmpeg:
      hwaccel_args: preset-nvidia-h264      
      output_args:
        record: preset-record-generic
      inputs:
        - path: rtsp://10.0.0.100:8554/frigate_street_se
          input_args: preset-rtsp-generic    
          roles:
            - record
            - detect
    detect:
      enabled: true

  frigate_backyard:
    enabled: True
    ffmpeg:
      hwaccel_args: preset-nvidia-h264      
      output_args:
        record: preset-record-generic
      inputs:
        - path: rtsp://10.0.0.100:8554/frigate_backyard
          input_args: preset-rtsp-generic
          roles:
            - record
            - detect
    detect:
      enabled: true

Relevant log output

2023-07-27 05:38:12.267286217  [INFO] Starting Frigate...
2023-07-27 05:38:14.454945761  [2023-07-27 05:38:14] frigate.app                    INFO    : Starting Frigate (0.12.1-367d724)
2023-07-27 05:38:14.497220341  [2023-07-27 05:38:14] peewee_migrate                 INFO    : Starting migrations
2023-07-27 05:38:14.509360514  [2023-07-27 05:38:14] peewee_migrate                 INFO    : There is nothing to migrate
2023-07-27 05:38:14.534655211  [2023-07-27 05:38:14] frigate.app                    INFO    : Output process started: 866
2023-07-27 05:38:14.539646275  [2023-07-27 05:38:14] frigate.app                    INFO    : Camera processor started for frigate_street_front: 869
2023-07-27 05:38:14.545823867  [2023-07-27 05:38:14] frigate.app                    INFO    : Camera processor started for frigate_street_nw: 870
2023-07-27 05:38:14.553883919  [2023-07-27 05:38:14] frigate.app                    INFO    : Camera processor started for frigate_street_se: 871
2023-07-27 05:38:14.560161238  [2023-07-27 05:38:14] frigate.app                    INFO    : Camera processor started for frigate_backyard: 872
2023-07-27 05:38:14.560916236  [2023-07-27 05:38:14] detector.tensorrt              INFO    : Starting detection process: 864
2023-07-27 05:38:14.566928155  [2023-07-27 05:38:14] frigate.app                    INFO    : Capture process started for frigate_street_front: 875
2023-07-27 05:38:14.573195162  [2023-07-27 05:38:14] frigate.app                    INFO    : Capture process started for frigate_street_nw: 878
2023-07-27 05:38:14.578949344  [2023-07-27 05:38:14] frigate.app                    INFO    : Capture process started for frigate_street_se: 881
2023-07-27 05:38:14.585735613  [2023-07-27 05:38:14] frigate.app                    INFO    : Capture process started for frigate_backyard: 884
2023-07-27 05:38:15.476234333  [2023-07-27 05:38:15] frigate.detectors.plugins.tensorrt INFO    : [MemUsageChange] Init CUDA: CPU +189, GPU +0, now: CPU 260, GPU 248 (MiB)
2023-07-27 05:38:15.695521137  [2023-07-27 05:38:15] frigate.detectors.plugins.tensorrt INFO    : Loaded engine size: 34 MiB
2023-07-27 05:38:15.697033215  [2023-07-27 05:38:15] frigate.detectors.plugins.tensorrt WARNING : Using an engine plan file across different models of devices is not recommended and is likely to affect performance or even cause errors.
2023-07-27 05:38:16.626486368  [2023-07-27 05:38:16] frigate.detectors.plugins.tensorrt INFO    : [MemUsageChange] Init cuBLAS/cuBLASLt: CPU +193, GPU +1470, now: CPU 515, GPU 1754 (MiB)
2023-07-27 05:38:16.916109890  [2023-07-27 05:38:16] frigate.detectors.plugins.tensorrt INFO    : [MemUsageChange] Init cuDNN: CPU +111, GPU +50, now: CPU 626, GPU 1804 (MiB)
2023-07-27 05:38:16.919309849  [2023-07-27 05:38:16] frigate.detectors.plugins.tensorrt INFO    : [MemUsageChange] TensorRT-managed allocation in engine deserialization: CPU +0, GPU +34, now: CPU 0, GPU 34 (MiB)
2023-07-27 05:38:16.927456762  [2023-07-27 05:38:16] frigate.detectors.plugins.tensorrt INFO    : [MemUsageChange] Init cuBLAS/cuBLASLt: CPU +0, GPU +8, now: CPU 591, GPU 1796 (MiB)
2023-07-27 05:38:16.927461745  [2023-07-27 05:38:16] frigate.detectors.plugins.tensorrt INFO    : [MemUsageChange] Init cuDNN: CPU +1, GPU +8, now: CPU 592, GPU 1804 (MiB)
2023-07-27 05:38:16.927466361  [2023-07-27 05:38:16] frigate.detectors.plugins.tensorrt INFO    : [MemUsageChange] TensorRT-managed allocation in IExecutionContext creation: CPU +0, GPU +12, now: CPU 0, GPU 46 (MiB)
2023-07-27 05:41:08.885525340  [2023-07-27 05:41:08] frigate.record                 WARNING : Unable to keep up with recording segments in cache for frigate_backyard. Keeping the 5 most recent segments out of 9 and discarding the rest...
2023-07-27 05:41:08.889404405  [2023-07-27 05:41:08] frigate.record                 WARNING : Unable to keep up with recording segments in cache for frigate_street_front. Keeping the 5 most recent segments out of 9 and discarding the rest...
2023-07-27 05:41:08.896003680  [2023-07-27 05:41:08] frigate.record                 WARNING : Unable to keep up with recording segments in cache for frigate_street_nw. Keeping the 5 most recent segments out of 9 and discarding the rest...
2023-07-27 05:41:08.900249221  [2023-07-27 05:41:08] frigate.record                 WARNING : Unable to keep up with recording segments in cache for frigate_street_se. Keeping the 5 most recent segments out of 9 and discarding the rest...

FFprobe output from your camera

[{"return_code":0,"stderr":"","stdout":{"programs":[],"streams":[{"avg_frame_rate":"0/0","codec_long_name":"H.264/AVC/MPEG-4AVC/MPEG-4part10","height":1944,"width":2592},{"avg_frame_rate":"0/0","bit_rate":"64000","codec_long_name":"PCMA-law/G.711A-law"}]}}]

-> all cameras are the same model and config

Frigate stats

{"cpu_usages":{"%Cpu(s):":{"cpu":"id,","mem":"2.7"},"1":{"cpu":"0.0","mem":"0.0"},"106":{"cpu":"0.0","mem":"0.0"},"112":{"cpu":"1.3","mem":"1.5"},"1154":{"cpu":"0.0","mem":"0.0"},"118":{"cpu":"0.0","mem":"0.0"},"1189":{"cpu":"0.0","mem":"0.0"},"1195":{"cpu":"0.0","mem":"0.1"},"1200":{"cpu":"0.0","mem":"0.0"},"1202":{"cpu":"3.7","mem":"0.1"},"134":{"cpu":"0.0","mem":"0.0"},"135":{"cpu":"0.0","mem":"0.0"},"136":{"cpu":"0.0","mem":"0.0"},"149":{"cpu":"0.0","mem":"0.0"},"15":{"cpu":"0.0","mem":"0.0"},"16":{"cpu":"0.0","mem":"0.0"},"168":{"cpu":"0.0","mem":"0.0"},"187":{"cpu":"0.0","mem":"0.0"},"216":{"cpu":"0.0","mem":"0.0"},"24":{"cpu":"0.0","mem":"0.0"},"241":{"cpu":"0.0","mem":"0.0"},"25":{"cpu":"0.0","mem":"0.0"},"26":{"cpu":"0.0","mem":"0.0"},"263":{"cpu":"0.0","mem":"0.0"},"27":{"cpu":"0.0","mem":"0.0"},"271":{"cpu":"0.0","mem":"0.0"},"28":{"cpu":"0.0","mem":"0.0"},"280":{"cpu":"0.0","mem":"0.0"},"29":{"cpu":"0.0","mem":"0.0"},"290":{"cpu":"0.0","mem":"0.0"},"30":{"cpu":"0.0","mem":"0.0"},"303":{"cpu":"0.0","mem":"0.0"},"31":{"cpu":"0.0","mem":"0.0"},"32":{"cpu":"0.0","mem":"0.0"},"326":{"cpu":"0.0","mem":"0.0"},"348":{"cpu":"0.0","mem":"0.0"},"384":{"cpu":"0.0","mem":"0.0"},"41":{"cpu":"0.0","mem":"0.0"},"42":{"cpu":"0.0","mem":"0.0"},"425":{"cpu":"0.0","mem":"0.0"},"450":{"cpu":"0.0","mem":"0.0"},"475":{"cpu":"0.0","mem":"0.0"},"499":{"cpu":"0.0","mem":"0.0"},"80":{"cpu":"0.0","mem":"0.0"},"81":{"cpu":"0.0","mem":"0.0"},"82":{"cpu":"0.0","mem":"0.0"},"858":{"cpu":"0.0","mem":"0.5"},"863":{"cpu":"0.3","mem":"0.0"},"864":{"cpu":"12.7","mem":"3.4"},"866":{"cpu":"2.0","mem":"0.6"},"869":{"cpu":"13.0","mem":"0.6"},"872":{"cpu":"52.3","mem":"0.7"},"873":{"cpu":"26.3","mem":"0.7"},"874":{"cpu":"0.7","mem":"0.6"},"875":{"cpu":"5.0","mem":"0.6"},"877":{"cpu":"5.3","mem":"0.6"},"879":{"cpu":"0.0","mem":"0.1"},"880":{"cpu":"5.3","mem":"0.6"},"885":{"cpu":"11.3","mem":"0.8"},"886":{"cpu":"11.3","mem":"0.8"},"887":{"cpu":"5.3","mem":"0.6"},"888":{"cpu":"0.0","mem":"0.1"},"889":{"cpu":"10.7","mem":"0.9"},"89":{"cpu":"0.0","mem":"0.1"},"895":{"cpu":"0.0","mem":"0.1"},"896":{"cpu":"12.3","mem":"0.8"},"898":{"cpu":"0.0","mem":"0.1"},"900":{"cpu":"0.0","mem":"0.1"},"MiB":{"cpu":"12239.3","mem":"avail"},"PID":{"cpu":"%CPU","mem":"%MEM"},"Tasks:":{"cpu":"stopped,","mem":"0"},"top":{"cpu":"average:","mem":"24.76,"}},"detection_fps":22.7,"detectors":{"tensorrt":{"detection_start":0.0,"inference_speed":4.66,"pid":864}},"frigate_backyard":{"camera_fps":5.0,"capture_pid":887,"detection_enabled":1,"detection_fps":0.0,"ffmpeg_pid":896,"pid":874,"process_fps":5.0,"skipped_fps":0.0},"frigate_street_front":{"camera_fps":5.0,"capture_pid":875,"detection_enabled":1,"detection_fps":5.2,"ffmpeg_pid":885,"pid":869,"process_fps":5.0,"skipped_fps":0.0},"frigate_street_nw":{"camera_fps":5.1,"capture_pid":877,"detection_enabled":1,"detection_fps":12.1,"ffmpeg_pid":886,"pid":872,"process_fps":5.1,"skipped_fps":0.0},"frigate_street_se":{"camera_fps":5.1,"capture_pid":880,"detection_enabled":1,"detection_fps":5.4,"ffmpeg_pid":889,"pid":873,"process_fps":5.1,"skipped_fps":0.0},"gpu_usages":{"NVIDIA GeForce GTX 1080":{"gpu":"6 %","mem":"22.2 %"}},"service":{"last_updated":1690430774,"latest_version":"0.12.1","storage":{"/dev/shm":{"free":5335.6,"mount_type":"tmpfs","total":5368.7,"used":33.1},"/media/frigate/clips":{"free":458769.1,"mount_type":"ext4","total":2998506.7,"used":2416951.1},"/media/frigate/recordings":{"free":458769.1,"mount_type":"ext4","total":2998506.7,"used":2416951.1},"/tmp/cache":{"free":1915.6,"mount_type":"tmpfs","total":2000.0,"used":84.4}},"temperatures":{},"uptime":54,"version":"0.12.1-367d724"}}

Operating system

HassOS

Install method

HassOS Addon

Coral version

USB

Network connection

Wired

Camera make and model

Anpviz 5MP

Any other information that may be helpful

No response

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 135 (2 by maintainers)

Most upvoted comments

Please wait, I will finish the benchmarks and once I post all the results we can continue to discuss. I’m not done yet. I am not trying to prove anything. If the problem is my system, the problem is my system, I will accept that and ask for suggestions. I have not done the comparison and another script bench. Bear with.