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.

No clip available for event

See original GitHub issue

Describe the bug For my MJPEG esp32 cameras I see around half of the events having no clip available. Looking into the logs, I consistently see this error:

2021-07-14T15:44:37.224138051Z frigate.events                 WARNING : Unable to create clip for bi
rdbath and event 1626277440.949275-icwlxf. There were no cache files for this event.

The event time is 8:44:00, the error was logged 37 seconds later.

I ran the following in another window (using docker exec): while true; do date; ls -ls bird*; df -h .; sleep 2; done and the output around the event time is:

Wed Jul 14 08:43:59 PDT 2021
3380 -rw-r--r-- 1 root root 3460292 Jul 14 08:43 birdbath-20210714084236.mp4
3076 -rw-r--r-- 1 root root 3145776 Jul 14 08:43 birdbath-20210714084321.mp4
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           477M   59M  419M  13% /tmp/cache
Wed Jul 14 08:44:01 PDT 2021
3380 -rw-r--r-- 1 root root 3460292 Jul 14 08:43 birdbath-20210714084236.mp4
3332 -rw-r--r-- 1 root root 3407920 Jul 14 08:44 birdbath-20210714084321.mp4
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           477M   60M  418M  13% /tmp/cache

The output around the error message is:

Wed Jul 14 08:44:37 PDT 2021
3380 -rw-r--r-- 1 root root 3460292 Jul 14 08:43 birdbath-20210714084236.mp4
3652 -rw-r--r-- 1 root root 3738429 Jul 14 08:44 birdbath-20210714084321.mp4
3076 -rw-r--r-- 1 root root 3145776 Jul 14 08:44 birdbath-20210714084403.mp4
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           477M   77M  401M  17% /tmp/cache
Wed Jul 14 08:44:39 PDT 2021
3652 -rw-r--r-- 1 root root 3738429 Jul 14 08:44 birdbath-20210714084321.mp4
3332 -rw-r--r-- 1 root root 3407920 Jul 14 08:44 birdbath-20210714084403.mp4
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           477M   60M  418M  13% /tmp/cache

In the camera config I have pre_capture: 2, so it seems to me that the 20210714084321.mp4 should work for that. I also have post_capture: 5 and the 20210714084403.mp4 recording should work for that (it’s actually still being written to by the time of the error, I can see the file increase in size in subsequent ls outputs).

This does look to me like it’s neither an ffmpeg issue nor a disk full issue. I’ll see whether I can add some info to the error message to print out what it expects.

NB: there seem to be a number of related issues, for example: #932 #896 #1096

Version of frigate 0.8.4-5043040⏎

Config file Include your full config file wrapped in triple back ticks.

mqtt:
  host: core.voneicken.com
  user: frigate
  password: f607ef782c520ccd75ce772f27e38716

cameras:
  gate:
    ffmpeg:
      inputs:
        - path: rtsp://phycam.voneicken.com/live/1/h264.sdp
          roles:
            - detect
            - rtmp
            - clips
            - record
      input_args:
        - -avoid_negative_ts
        - make_zero
        - -fflags
        - nobuffer
        - -flags
        - low_delay
        - -strict
        - experimental
        - -fflags
        - +genpts+discardcorrupt
        - -use_wallclock_as_timestamps
        - "1"
        - -stimeout
        - "5000000"
      output_args:
        rtmp: -c:v copy -an -f flv
    width: 768
    height: 432
    fps: 4
    clips:
      enabled: True
    snapshots:
      enabled: True
      timestamp: False
      bounding_box: True
    record:
      enabled: True
      retain_days: 3
    motion:
      mask:
        - 768,0,581,0,544,152,540,432,768,432
    objects:
      track: [ 'person', 'car', 'dog', 'cat', 'sheep', 'bycicle', 'motorcycle', 'truck', 'bus' ]

  birdbath:
    ffmpeg:
      inputs:
        - path: http://esp32-cam6.voneicken.com:81
          roles:
            - detect
            - rtmp
            - clips
      input_args:
        - -avoid_negative_ts
        - make_zero
        - -fflags
        - nobuffer
        - -flags
        - low_delay
        - -strict
        - experimental
        - -fflags
        - +genpts+discardcorrupt
        - -use_wallclock_as_timestamps
        - "1"
        - -r
        - "4"
      output_args:
        record: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v
 h264_vaapi -vf format=nv12,hwupload -r 4 -an
        clips: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v
h264_vaapi -vf format=nv12,hwupload -r 4 -an
        rtmp: -c:v h264_vaapi -vf format=nv12,hwupload -r 4 -an -f flv
    width: 1024
    height: 768
    clips:
      enabled: True
      pre_capture: 2
      post_capture: 5
      retain:
        default: 7
    snapshots:
      enabled: True
      timestamp: True
      bounding_box: True
    objects:
      track: [ 'bird', 'cat', 'dog', 'sheep' ]

ffmpeg:
  hwaccel_args:
    - -hwaccel
    - vaapi
    - -hwaccel_device
    - /dev/dri/renderD128
    - -hwaccel_output_format
    - yuv420p

detectors:
  cpu1:
    type: cpu

Frigate container logs

Include relevant log output here

Frigate stats

Output from frigate's /api/stats endpoint

FFprobe from your camera

Run the following command and paste output below

ffprobe <stream_url>

Computer Hardware

  • OS: Ubuntu 20.04
  • Install method: docker command
  • Virtualization: just docker
  • Coral Version: None
  • Network Setup: both cameras over wifi

Camera Info:

  • Manufacturer: esp32-cam
  • Resolution: XGA 1024x768
  • FPS: ~2

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
tvecommented, Jul 20, 2021

Here’s a portion of my config:

cameras:
  overview:
    ffmpeg:
      inputs:
        - path: http://esp32-cam3.voneicken.com:81
          roles:
            - detect
            - clips
            - record
            - rtmp
      input_args:
        - -avoid_negative_ts
        - make_zero
        - -fflags
        - nobuffer
        - -flags
        - low_delay
        - -strict
        - experimental
        - -fflags
        - +genpts+discardcorrupt
        - -use_wallclock_as_timestamps
        - "1"
        - -r
        - "1"
      output_args:
        record: -f segment -segment_time 600 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:
v h264_vaapi -qp 30 -vf format=nv12,hwupload -r 2 -an
        clips: -f segment -segment_time 10 -segment_format mp4 -g 10 -reset_timestamps 1 -strftime 1
 -c:v h264_vaapi -qp 28 -vf format=nv12,hwupload -r 2 -an
        rtmp: -c:v h264_vaapi -vf format=nv12,hwupload -r 2 -an -f flv
    width: 1600
    height: 1200
    record:
      enabled: True
      retain_days: 2
    clips:
      enabled: True
      pre_capture: 2
      post_capture: 5
      retain:
        default: 10
    snapshots:
      enabled: True
      timestamp: True
      bounding_box: True
    motion:
      mask:
        - 0,1200,1600,1200,1266,776,1093,830,917,782,772,717,669,797,519,843,320,690,0,685
    objects:
      track: [ 'person', 'bird', 'cat', 'dog', 'sheep' ]

ffmpeg:
  hwaccel_args:
    - -hwaccel
    - vaapi
    - -hwaccel_device
    - /dev/dri/renderD128
    - -hwaccel_output_format
    - yuv420p
0reactions
stale[bot]commented, Aug 19, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Frigate - sometimes there's no clips : r/homeassistant - Reddit
There's always a still image, but sometimes it saids "no clip available" above the still image. Sometime the clips exist, but most of...
Read more >
Mydlink app shows: "No clip found" error
if I do a motion real-time nothing shows in events or SD card. Live view fine. remote controls works - everything seems OK....
Read more >
No event clips showing but iMovie project… - Apple Community
No event clips showing but iMovie project has the media? I have iMovie v10.1.4. So, when you open a project, above the timeline...
Read more >
Event Response - Blink Support
When there is no active subscription, and no Local Storage configured, these features are not available in Event Response: Save Motion Clips; Save...
Read more >
Frigate - missing clips sometimes, "no cache file for this event"
So I'm only getting a snapshot for most events. I see it in the Frigate UI as a “No Clip Available” for a...
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