No clip available for event
See original GitHub issueDescribe 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:
- Created 2 years ago
- Comments:11 (4 by maintainers)
Top GitHub Comments
Here’s a portion of my config:
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.