question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Config Support]: Clips recording starting too late.

See original GitHub issue

Describe the problem you are having

Hi,

I’ve moved my install to a smaller server, and now the recorded clips are starting too late. The snapshot is correct, but the recording of the clips of the events start 10 seconds later or so.

Eg. snapshot time is 7:10:45, clip starts at 7:10:55 or so. It’s not always 10 seconds, and in rare cases the clip is fine, about one out of ten times.

CPU usage in the container is not an issue. I’m not using hardware acceleration.

Version

0.11.0

Frigate config file

detectors:
  coral_pci:
    type: edgetpu
    device: pci
mqtt:
  # Required: host name
  host: 192.168.1.7
  # Optional: port (default: shown below)
  port: 1883
  # Optional: topic prefix (default: shown below)
  # WARNING: must be unique if you are running multiple instances
  topic_prefix: frigate
  # Optional: client id (default: shown below)
  # WARNING: must be unique if you are running multiple instances
  client_id: frigate
  # Optional: user
  user: frigate
  # Optional: password
  # NOTE: Environment variables that begin with 'FRIGATE_' may be referenced in {}.
  #       eg. password: '{FRIGATE_MQTT_PASSWORD}'
  password: frigate
  # Optional: interval in seconds for publishing stats (default: shown below)
  stats_interval: 60

record:
  enabled: true
  retain:
    days: 0
    mode: motion
  events:
    pre_capture: 10
    post_capture: 10
    retain:
      default: 14
      mode: active_objects      
#    max_seconds: 90

cameras:
  flex_nw:
    mqtt:
      timestamp: False
      bounding_box: False
      crop: True
      quality: 100
      height: 1080
    ffmpeg:
      global_args:
        - -hide_banner
        - -loglevel
        - debug
        - -skip_frame 
        - nokey
        - -an
      input_args:
#        - -c:v
#        - h264_cuvid
        - -rtsp_transport
        - tcp
#      hwaccel_args:
#        - -hwaccel
#        - vaapi
#        - -hwaccel_device
#        - /dev/dri/renderD128
      inputs:
        - path: rtsp://192.168.1.4:7447/lt4UFRNGNfKb7rLG
          roles:
            - detect
            - rtmp
            - record
    snapshots:
      enabled: True
      timestamp: false
      bounding_box: true
      retain:
        default: 7
    #clips:
    #  enabled: True
    #  retain:
    #    default: 7
    objects:
      track:
        - person
        - car
        - truck
        - bicycle
        - motorcycle
        - cat
        - dog
        # Optional: save clips configuration
      filters:
        car:
          mask:
            - 530,522,473,205,0,276,0,626
            - 1256,113,1264,187,662,214,656,137
    detect:
      width: 1920
      height: 1080
      fps: 5
    motion:
      mask:
        - 691,1080,492,707,0,813,0,1080
        - 630,0,803,329,524,408,384,289,191,0
        - 1760,0,1674,325,1445,329,1233,0
    zones:
      oprit:
        coordinates: 673,1080,1569,671,1258,652,547,856
      vooroprit:
        coordinates: 1012,618,1209,780,622,1000,478,772
  # Name of your camera
  flex_n:
    mqtt:
      timestamp: False
      bounding_box: False
      crop: True
      quality: 100
      height: 576
    ffmpeg:
      global_args:
        - -hide_banner
        - -loglevel
        - debug
        - -skip_frame
        - nokey
        - -an
      input_args:
        - -rtsp_transport
        - tcp
#      hwaccel_args:
#        - -hwaccel
#        - vaapi
#        - -hwaccel_device
#        - /dev/dri/renderD128
      inputs:
        - path: rtsp://192.168.1.4:7447/Oyed89k7zkuKxlqz
          roles:
          - detect
          - rtmp
          - record
    snapshots:
      enabled: True
      timestamp: false
      bounding_box: true
      retain:
        default: 7
    #clips:
    #  enabled: True
    #  retain:
    #    default: 7
    objects:
      track:
        - person
        - bicycle
        - dog
        - cat
        # Optional: save clips configuration
    detect:
      width: 1024
      height: 576
      fps: 5
    zones:
      zijoprit:
        coordinates: 564,576,981,478,855,306,21,377,71,576
  # Name of your camera
  flex_sw:
    mqtt:
      timestamp: False
      bounding_box: False
      crop: True
      quality: 100
      height: 500
    ffmpeg:
      global_args:
        - -hide_banner
        - -loglevel
        - debug
        - -skip_frame
        - nokey
        - -an
      input_args:
#        - -c:v
#        - h264_cuvid
        - -rtsp_transport
        - tcp
#      hwaccel_args:
#        - -hwaccel
#        - vaapi
#        - -hwaccel_device
#        - /dev/dri/renderD128
      inputs:
        - path: rtsp://192.168.1.4:7447/eqFchgafmZoxHufA
          roles:
          - detect
          - rtmp
          - record
    snapshots:
      enabled: True
      timestamp: false
      bounding_box: true
      retain:
        default: 7
    #clips:
    #  enabled: True
    #  retain:
    #    default: 7
    objects:
      track:
        - person
        - car
        - truck
        - bicycle
        - motorcycle
        - cat
        - dog
        # Optional: save clips configuration
      filters:
        car:
          mask:
            - 982,396,967,234,651,214,589,347
            - 425,306,429,199,324,205,267,296
            - 189,177,186,257,118,271,21,266,24,197
    detect:
      width: 1024
      height: 576
      fps: 5
    motion:
      mask:
        - 1024,0,1024,245,955,247,869,125,923,0
        - 841,108,813,163,781,159,765,105,801,70,784,69
        - 432,0,653,0,693,97,675,196,534,306,463,250,383,99
        - 872,576,865,450,197,312,79,461,329,576
        - 211,137,305,150,308,177,230,191,150,200,140,152
  # Name of your camera

Relevant log output

not relevant, no errors.

Frigate stats

No response

Operating system

Proxmox

Install method

Docker Compose

Coral version

PCIe

Any other information that may be helpful

Debian VM on Proxmox, fully patched. PCIe Coral passed through.

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:36 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
blakeblackshearcommented, Oct 6, 2022

I wouldn’t because it would be inconsistent. If you want segments that don’t contain motion or active_objects to be saved for events, then specify all as your retain mode for events. The record mode pertains to all segments in the event inclusive of pre/post capture. They shouldn’t be treated any differently just because they are pre/post.

1reaction
lazygadgetcommented, Oct 4, 2022

I have this exact same issue. Frigate 0.11.0 is running in docker on ubuntu server with intel i5 gen 8 with usb coral. The snapshot shows for example a detected driving car but it is not visible in the recording because it started too late and the car drove away. The recording does start at some-point near the snapshot timestamp but I have in config Pre_capture: 10 so quite strange that it starts most often after the snapshot timestamp. The camera is hikvision and detection stream is 4fps with i-frame 4 and the recording stream is 20fps with i-frame 40.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Recorded Video starts too late | IP Cam Talk
In Blue Iris , i have the Camera set to 10 frames/sec and with a 1.5mb buffer in Video , Network IP ,...
Read more >
Camera Starts Recording Too Late - Reolink Support
If you find the camera doesn't start recording motions promptly, please refer to steps below to check: Step 1. Please increase the motion...
Read more >
Event recording too late - Cameras - Wyze Forum
I've noticed that motion events seems to begin recording from the moment ... timestamp can be several seconds before the event video starts....
Read more >
Change the camera's video recording settings on iPhone
On iPhone XS, iPhone XR, and later, tap the quick toggles in the top-right corner to switch between HD or 4K recording and...
Read more >
Recording - Frigate Docs
If you only used clips in previous versions with recordings disabled, you can use the following config to get the same behavior. This...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found