frigate: [Support]: Recordings just stop and won't recover until restart

Describe the problem you are having

I’ve noticed some weird pattern recently with my Reolink E1 Zoom cameras. I’ve got the reolink cameras setup as recommended in the documentation but still seeing the behaviour. More often than not, recordings stop around 2:15am and by the time I wake up I can’t see any logs so it’s difficult to diagnose the issue. I’ve done some scowering but can’t seem to find a way to save logs to a file for review later so I’m wondering if this is achievable so I can check the logs once I’ve woken up and confirmed it happened again?

Once this has happened, recordings won’t resume again until I have restarted the frigate container. Just toggling the recording switch doesn’t start it up again.

Version

0.10.0-bfecee9

Frigate config file

logger:
  default: debug
  logs:
    peewee: info
mqtt:
  host: <redacted>
  port: 1883
  topic_prefix: frigate
  client_id: frigate
  user: <redacted>
  password: <redacted>
  stats_interval: 60
cameras:
  living_room:
    ffmpeg:
      inputs:
        - path: http://<ip>/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=user&password=pass
          roles:
            - rtmp
            - record
        - path: http://<ip>/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=user&password=pass
          roles:
            - detect
      output_args:    
        record: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy
      input_args:
        - -avoid_negative_ts
        - make_zero
        - -fflags
        - nobuffer+genpts+discardcorrupt
        - -flags
        - low_delay
        - -strict
        - experimental
        - -analyzeduration
        - 1000M
        - -probesize
        - 1000M
        - -rw_timeout
        - "5000000"
    detect:
      width: 896
      height: 672
      fps: 5
      max_disappeared: 25
    record:
      enabled: true
      retain:
        days: 7
        mode: all
      events:
        pre_capture: 3
        post_capture: 3
        objects:
          - person
          - cat
        retain:
          default: 365
          mode: active_objects
    snapshots:
      enabled: true
      timestamp: true
      bounding_box: true
      retain:
        default: 10
        objects:
          person: 14
    objects:
      track:
        - person
        - cat   
    motion:
      mask:
        - 2518,50,2516,124,1733,127,1739,48
  front_bedroom:
    ffmpeg:
      inputs:
        - path: http://<ip>/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=user&password=pass
          roles:
            - rtmp
            - record
        - path: http://<ip>/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=user&password=pass
          roles:
            - detect
      output_args:    
        record: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy
      input_args:
        - -avoid_negative_ts
        - make_zero
        - -fflags
        - nobuffer+genpts+discardcorrupt
        - -flags
        - low_delay
        - -strict
        - experimental
        - -analyzeduration
        - 1000M
        - -probesize
        - 1000M
        - -rw_timeout
        - "5000000"
    detect:
      width: 896
      height: 672
      fps: 5
      max_disappeared: 25
    record:
      enabled: true
      retain:
        days: 7
        mode: all
      events:
        pre_capture: 3
        post_capture: 3
        objects:
          - person
          - cat
        retain:
          default: 365
          mode: active_objects
    snapshots:
      enabled: true
      timestamp: true
      bounding_box: true
      retain:
        default: 10
        objects:
          person: 14
    objects:
      track:
        - person
        - cat   
    motion:
      mask:
        - 2518,50,2516,124,1733,127,1739,48
  back_bedroom:
    ffmpeg:
      inputs:
        - path: http://<ip>/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=user&password=pass
          roles:
            - rtmp
            - record
        - path: http://<ip>/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=user&password=pass
          roles:
            - detect
      output_args:    
        record: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy
      input_args:
        - -avoid_negative_ts
        - make_zero
        - -fflags
        - nobuffer+genpts+discardcorrupt
        - -flags
        - low_delay
        - -strict
        - experimental
        - -analyzeduration
        - 1000M
        - -probesize
        - 1000M
        - -rw_timeout
        - "5000000"
    detect:
      width: 896
      height: 672
      fps: 5
      max_disappeared: 25
    record:
      enabled: true
      retain:
        days: 7
        mode: all
      events:
        pre_capture: 3
        post_capture: 3
        objects:
          - person
          - cat
        retain:
          default: 365
          mode: active_objects
    snapshots:
      enabled: true
      timestamp: true
      bounding_box: true
      retain:
        default: 10
        objects:
          person: 14
    objects:
      track:
        - person
        - cat   
    motion:
      mask:
        - 2518,50,2516,124,1733,127,1739,48
  feeder:
    ffmpeg:
      inputs:
        - path: http://<ip>:8081
          roles:
            - record  
            - detect
      output_args:    
        record: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v libx264 -an
      input_args:
        - -avoid_negative_ts
        - make_zero
        - -fflags
        - nobuffer
        - -flags
        - low_delay
        - -strict
        - experimental
        - -fflags
        - +genpts+discardcorrupt
        - -r
        - "3" # <---- adjust depending on your desired frame rate from the mjpeg image
        - -use_wallclock_as_timestamps
        - "1"
    detect:
      enabled: false
      width: 640
      height: 480
      fps: 5
      max_disappeared: 25
    record:
      enabled: true
      retain:
        days: 0
        mode: all
      events:
        pre_capture: 3
        post_capture: 3
        objects:
          - person
          - cat
        retain:
          default: 7
          mode: active_objects
    rtmp:
      enabled: false
    snapshots:
      enabled: false
      timestamp: true
      bounding_box: true
      retain:
        default: 10
        objects:
          person: 14   
  doorbell:
    ffmpeg:
      inputs:
        - path: rtsp://user:pass@<ip>:554
          roles:
            - rtmp
            - record
        - path: rtsp://user:pass@<ip>:554/cam/realmonitor?channel=1&subtype=1
          roles:
            - detect
      output_args:
        record: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy
    detect:
      width: 720
      height: 576
      fps: 5      
      max_disappeared: 25
    record:
      enabled: true
      retain:
        days: 21
        mode: all
      events:
        pre_capture: 5
        post_capture: 5
        objects:
          - person
          - cat
        retain:
          default: 365
          mode: active_objects
    snapshots:
      enabled: true
      timestamp: true
      bounding_box: true
      retain:
        default: 10
        objects:
          person: 14
    motion:
      mask:
        - 62,365,145,376,230,353,497,361,583,430,720,418,720,165,720,127,720,0,0,0,0,318
    zones: 
      driveway:
        coordinates: 720,503,720,576,720,576,0,576,77,417,164,358,208,340,342,364,469,372,603,491
    objects:
      filters:
        person:
          mask:
            - 606,375,541,377,467,364,329,357,248,351,171,333,100,322,0,296,0,0,720,0,720,354
      track:
        - person
        - cat
detectors:
  coral:
    type: edgetpu
    device: usb
birdseye:
  enabled: true
  mode: continuous
  height: 1080
  width: 1920

Relevant log output

Can't access

FFprobe output from your camera

Detect URL
Input #0, flv, from 'http://<ip>/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=user&password=pass':
  Metadata:
    displayWidth    : 896
    displayHeight   : 672
  Duration: 00:00:00.00, start: 0.000000, bitrate: N/A
  Stream #0:0: Video: h264 (High), yuv420p(progressive), 896x672, 11 fps, 12 tbr, 1k tbn
  Stream #0:1: Audio: aac (LC), 16000 Hz, mono, fltp

Recording URL 
Input #0, flv, from 'http://<ip>/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=user&password=pass':
  Metadata:
    displayWidth    : 2560
    displayHeight   : 1920
  Duration: 00:00:00.00, start: 0.000000, bitrate: N/A
  Stream #0:0: Video: h264 (High), yuv420p(progressive), 2560x1920, 11 fps, 12 tbr, 1k tbn
  Stream #0:1: Audio: aac (LC), 16000 Hz, mono, fltp

Frigate stats

{
    "back_bedroom": {
        "camera_fps": 5.0,
        "capture_pid": 241,
        "detection_fps": 0.0,
        "pid": 231,
        "process_fps": 5.0,
        "skipped_fps": 0.0
    },
    "detection_fps": 0.0,
    "detectors": {
        "coral": {
            "detection_start": 0.0,
            "inference_speed": 10.18,
            "pid": 217
        }
    },
    "doorbell": {
        "camera_fps": 5.1,
        "capture_pid": 254,
        "detection_fps": 0.0,
        "pid": 234,
        "process_fps": 5.1,
        "skipped_fps": 0.0
    },
    "feeder": {
        "camera_fps": 8.3,
        "capture_pid": 244,
        "detection_fps": 0.0,
        "pid": 233,
        "process_fps": 8.3,
        "skipped_fps": 0.0
    },
    "front_bedroom": {
        "camera_fps": 5.0,
        "capture_pid": 237,
        "detection_fps": 0.0,
        "pid": 228,
        "process_fps": 5.0,
        "skipped_fps": 0.0
    },
    "living_room": {
        "camera_fps": 5.1,
        "capture_pid": 236,
        "detection_fps": 0.0,
        "pid": 226,
        "process_fps": 5.1,
        "skipped_fps": 0.0
    },
    "service": {
        "storage": {
            "/dev/shm": {
                "free": 263.6,
                "mount_type": "tmpfs",
                "total": 268.4,
                "used": 4.8
            },
            "/media/frigate/clips": {
                "free": 182073.5,
                "mount_type": "fuseblk",
                "total": 1000186.3,
                "used": 818112.8
            },
            "/media/frigate/recordings": {
                "free": 182073.5,
                "mount_type": "fuseblk",
                "total": 1000186.3,
                "used": 818112.8
            },
            "/tmp/cache": {
                "free": 17391.2,
                "mount_type": "overlay",
                "total": 121029.6,
                "used": 97446.3
            }
        },
        "temperatures": {},
        "uptime": 21286,
        "version": "0.10.0-bfecee9"
    }
}

Operating system

Debian

Install method

Docker CLI

Coral version

USB

Network connection

Wired

Camera make and model

Reolink E1 Zoom

Any other information that may be helpful

Relevant cameras in the config file are front_bedroom back_bedroom and living_room

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 28 (5 by maintainers)

Most upvoted comments

You can follow the progress here: https://github.com/blakeblackshear/frigate/pull/4055 there will be a beta before release

You can use the dev images from here: https://github.com/blakeblackshear/frigate/pkgs/container/frigate but do be aware that there may be bugs and the changes are undocumented (besides the source code itself)

As the documentation reads as these are additional args, not full replacement of existing args?

They are replacements, if they were additional then the args would be doubled up since the ones you included are also part of the default list.

an example of this is found here: https://docs.frigate.video/faqs#audio-in-recordings where it is suggested that you have to replace all the args to enable audio (instead of just adding -c:a aac)