[Support]: MQTT has_clip: true but clip reports "Could not create clip from recordings for front_door."
See original GitHub issueDescribe the problem you are having
The issue I’m looking to solve is being able to send a Home Assistant notification as soon as a person is detected then update the notification with a clip once the clip is available.
Right now I see events with “has_clip: true” but when I attempt to access the clip I receive the error “Could not create clip from recordings for front_door.” After a few seconds the clip does get generated and is then available but by that time HA has already updated the notification with the URL for the clip but it fails to load the clip.
Version
0.11.0-BE7B858
Frigate config file
{
"birdseye": {
"enabled": true,
"height": 1920,
"mode": "objects",
"quality": 1,
"width": 1080
},
"cameras": {
"backyard": {
"best_image_timeout": 60,
"birdseye": {
"enabled": true,
"mode": "objects"
},
"detect": {
"enabled": true,
"fps": 7,
"height": 480,
"max_disappeared": 35,
"stationary": {
"interval": 0,
"max_frames": {
"default": 300,
"objects": {}
},
"threshold": 50
},
"width": 640
},
"ffmpeg": {
"global_args": [
"-hide_banner",
"-loglevel",
"warning"
],
"hwaccel_args": "-c:v h264_cuvid",
"input_args": "-avoid_negative_ts make_zero -fflags nobuffer+genpts+discardcorrupt -flags low_delay -strict experimental -analyzeduration 1000M -probesize 1000M -rw_timeout 5000000",
"inputs": [
{
"global_args": [],
"hwaccel_args": [],
"input_args": [],
"path": "rtmp://10.15.0.132/bcs/channel0_sub.bcs?channel=0&stream=1&user=admin&password=mji89ikm",
"roles": [
"record",
"rtmp",
"detect"
]
}
],
"output_args": {
"detect": [
"-f",
"rawvideo",
"-pix_fmt",
"yuv420p"
],
"record": "-f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -c:a aac",
"rtmp": [
"-c",
"copy",
"-f",
"flv"
]
}
},
"ffmpeg_cmds": [
{
"cmd": "ffmpeg -hide_banner -loglevel warning -c:v h264_cuvid -avoid_negative_ts make_zero -fflags nobuffer+genpts+discardcorrupt -flags low_delay -strict experimental -analyzeduration 1000M -probesize 1000M -rw_timeout 5000000 -i rtmp://10.15.0.132/bcs/channel0_sub.bcs?channel=0&stream=1&user=admin&password=mji89ikm -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -c:a aac /tmp/cache/backyard-%Y%m%d%H%M%S.mp4 -c copy -f flv rtmp://127.0.0.1/live/backyard -r 7 -s 640x480 -f rawvideo -pix_fmt yuv420p pipe:",
"roles": [
"record",
"rtmp",
"detect"
]
}
],
"live": {
"height": 720,
"quality": 8
},
"motion": {
"contour_area": 30,
"delta_alpha": 0.2,
"frame_alpha": 0.2,
"frame_height": 50,
"improve_contrast": false,
"mask": "",
"mqtt_off_delay": 30,
"threshold": 25
},
"mqtt": {
"bounding_box": true,
"crop": true,
"enabled": true,
"height": 270,
"quality": 70,
"required_zones": [],
"timestamp": true
},
"name": "backyard",
"objects": {
"filters": {
"bicycle": {
"mask": null,
"max_area": 24000000,
"max_ratio": 24000000,
"min_area": 0,
"min_ratio": 0,
"min_score": 0.5,
"threshold": 0.7
},
"bus": {
"mask": null,
"max_area": 24000000,
"max_ratio": 24000000,
"min_area": 0,
"min_ratio": 0,
"min_score": 0.5,
"threshold": 0.7
},
"car": {
"mask": null,
"max_area": 24000000,
"max_ratio": 24000000,
"min_area": 0,
"min_ratio": 0,
"min_score": 0.5,
"threshold": 0.7
},
"cat": {
"mask": null,
"max_area": 24000000,
"max_ratio": 24000000,
"min_area": 0,
"min_ratio": 0,
"min_score": 0.5,
"threshold": 0.7
},
"dog": {
"mask": null,
"max_area": 24000000,
"max_ratio": 24000000,
"min_area": 0,
"min_ratio": 0,
"min_score": 0.5,
"threshold": 0.7
},
"motorcycle": {
"mask": null,
"max_area": 24000000,
"max_ratio": 24000000,
"min_area": 0,
"min_ratio": 0,
"min_score": 0.5,
"threshold": 0.7
},
"person": {
"mask": null,
"max_area": 24000000,
"max_ratio": 24000000,
"min_area": 1500,
"min_ratio": 0,
"min_score": 0.5,
"threshold": 0.7
}
},
"mask": "",
"track": [
"person",
"car",
"bicycle",
"motorcycle",
"bus",
"cat",
"dog"
]
},
"record": {
"enabled": true,
"events": {
"objects": [
"person",
"car",
"bicycle",
"motorcycle",
"bus",
"cat",
"dog"
],
"post_capture": 5,
"pre_capture": 0,
"required_zones": [],
"retain": {
"default": 60,
"mode": "motion",
"objects": {}
}
},
"expire_interval": 60,
"retain": {
"days": 10,
"mode": "all"
},
"retain_days": null
},
"rtmp": {
"enabled": true
},
"snapshots": {
"bounding_box": false,
"clean_copy": true,
"crop": false,
"enabled": true,
"height": null,
"quality": 70,
"required_zones": [],
"retain": {
"default": 60,
"mode": "motion",
"objects": {
"car": 60,
"person": 60
}
},
"timestamp": false
},
"timestamp_style": {
"color": {
"blue": 255,
"green": 255,
"red": 255
},
"effect": null,
"format": "%m/%d/%Y %H:%M:%S",
"position": "tl",
"thickness": 2
},
"ui": {
"dashboard": true,
"order": 0
},
"zones": {}
},
"front_door": {
"best_image_timeout": 60,
"birdseye": {
"enabled": true,
"mode": "objects"
},
"detect": {
"enabled": true,
"fps": 7,
"height": 576,
"max_disappeared": 35,
"stationary": {
"interval": 0,
"max_frames": {
"default": 300,
"objects": {}
},
"threshold": 50
},
"width": 720
},
"ffmpeg": {
"global_args": [
"-hide_banner",
"-loglevel",
"warning"
],
"hwaccel_args": "-c:v h264_cuvid",
"input_args": [
"-avoid_negative_ts",
"make_zero",
"-fflags",
"+genpts+discardcorrupt",
"-rtsp_transport",
"tcp",
"-timeout",
"5000000",
"-use_wallclock_as_timestamps",
"1"
],
"inputs": [
{
"global_args": [],
"hwaccel_args": [],
"input_args": [],
"path": "rtsp://admin:mji89ikm@10.15.0.131:554/cam/realmonitor?channel=1&subtype=1",
"roles": [
"record",
"rtmp",
"detect"
]
}
],
"output_args": {
"detect": [
"-f",
"rawvideo",
"-pix_fmt",
"yuv420p"
],
"record": "-f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -c:a aac",
"rtmp": [
"-c",
"copy",
"-f",
"flv"
]
}
},
"ffmpeg_cmds": [
{
"cmd": "ffmpeg -hide_banner -loglevel warning -c:v h264_cuvid -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://admin:mji89ikm@10.15.0.131:554/cam/realmonitor?channel=1&subtype=1 -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -c:a aac /tmp/cache/front_door-%Y%m%d%H%M%S.mp4 -c copy -f flv rtmp://127.0.0.1/live/front_door -r 7 -s 720x576 -f rawvideo -pix_fmt yuv420p pipe:",
"roles": [
"record",
"rtmp",
"detect"
]
}
],
"live": {
"height": 720,
"quality": 8
},
"motion": {
"contour_area": 30,
"delta_alpha": 0.2,
"frame_alpha": 0.2,
"frame_height": 50,
"improve_contrast": false,
"mask": "",
"mqtt_off_delay": 30,
"threshold": 25
},
"mqtt": {
"bounding_box": true,
"crop": true,
"enabled": true,
"height": 270,
"quality": 70,
"required_zones": [],
"timestamp": true
},
"name": "front_door",
"objects": {
"filters": {
"bicycle": {
"mask": null,
"max_area": 24000000,
"max_ratio": 24000000,
"min_area": 0,
"min_ratio": 0,
"min_score": 0.5,
"threshold": 0.7
},
"bus": {
"mask": null,
"max_area": 24000000,
"max_ratio": 24000000,
"min_area": 0,
"min_ratio": 0,
"min_score": 0.5,
"threshold": 0.7
},
"car": {
"mask": null,
"max_area": 24000000,
"max_ratio": 24000000,
"min_area": 0,
"min_ratio": 0,
"min_score": 0.5,
"threshold": 0.7
},
"cat": {
"mask": null,
"max_area": 24000000,
"max_ratio": 24000000,
"min_area": 0,
"min_ratio": 0,
"min_score": 0.5,
"threshold": 0.7
},
"dog": {
"mask": null,
"max_area": 24000000,
"max_ratio": 24000000,
"min_area": 0,
"min_ratio": 0,
"min_score": 0.5,
"threshold": 0.7
},
"motorcycle": {
"mask": null,
"max_area": 24000000,
"max_ratio": 24000000,
"min_area": 0,
"min_ratio": 0,
"min_score": 0.5,
"threshold": 0.7
},
"person": {
"mask": null,
"max_area": 24000000,
"max_ratio": 24000000,
"min_area": 1500,
"min_ratio": 0,
"min_score": 0.5,
"threshold": 0.7
}
},
"mask": "",
"track": [
"person",
"car",
"bicycle",
"motorcycle",
"bus",
"cat",
"dog"
]
},
"record": {
"enabled": true,
"events": {
"objects": [
"person",
"car",
"bicycle",
"motorcycle",
"bus",
"cat",
"dog"
],
"post_capture": 5,
"pre_capture": 0,
"required_zones": [],
"retain": {
"default": 60,
"mode": "motion",
"objects": {}
}
},
"expire_interval": 60,
"retain": {
"days": 10,
"mode": "all"
},
"retain_days": null
},
"rtmp": {
"enabled": true
},
"snapshots": {
"bounding_box": false,
"clean_copy": true,
"crop": false,
"enabled": true,
"height": null,
"quality": 70,
"required_zones": [],
"retain": {
"default": 60,
"mode": "motion",
"objects": {
"car": 60,
"person": 60
}
},
"timestamp": false
},
"timestamp_style": {
"color": {
"blue": 255,
"green": 255,
"red": 255
},
"effect": null,
"format": "%m/%d/%Y %H:%M:%S",
"position": "tl",
"thickness": 2
},
"ui": {
"dashboard": true,
"order": 0
},
"zones": {}
}
},
"database": {
"path": "/media/frigate/frigate.db"
},
"detect": {
"enabled": true,
"fps": 5,
"height": 720,
"max_disappeared": null,
"stationary": {
"interval": 0,
"max_frames": {
"default": 300,
"objects": {}
},
"threshold": 50
},
"width": 1280
},
"detectors": {
"cpu1": {
"device": "usb",
"num_threads": 8,
"type": "cpu"
}
},
"environment_vars": {
"PLUS_API_KEY": "44cc9543-9425-418b-8b51-164082ed1251:ad49e73cb2b6921ed1303d57f7567176dd4eb8d8"
},
"ffmpeg": {
"global_args": [
"-hide_banner",
"-loglevel",
"warning"
],
"hwaccel_args": "-c:v h264_cuvid",
"input_args": [
"-avoid_negative_ts",
"make_zero",
"-fflags",
"+genpts+discardcorrupt",
"-rtsp_transport",
"tcp",
"-timeout",
"5000000",
"-use_wallclock_as_timestamps",
"1"
],
"output_args": {
"detect": [
"-f",
"rawvideo",
"-pix_fmt",
"yuv420p"
],
"record": [
"-f",
"segment",
"-segment_time",
"10",
"-segment_format",
"mp4",
"-reset_timestamps",
"1",
"-strftime",
"1",
"-c",
"copy",
"-an"
],
"rtmp": [
"-c",
"copy",
"-f",
"flv"
]
}
},
"live": {
"height": 720,
"quality": 8
},
"logger": {
"default": "info",
"logs": {}
},
"model": {
"height": 320,
"labelmap": {},
"labelmap_path": null,
"path": null,
"width": 320
},
"motion": null,
"mqtt": {
"client_id": "frigate",
"host": "10.15.1.6",
"password": null,
"port": 1883,
"stats_interval": 60,
"tls_ca_certs": null,
"tls_client_cert": null,
"tls_client_key": null,
"tls_insecure": null,
"topic_prefix": "frigate",
"user": null
},
"objects": {
"filters": {
"person": {
"mask": null,
"max_area": 24000000,
"max_ratio": 24000000,
"min_area": 1500,
"min_ratio": 0,
"min_score": 0.5,
"threshold": 0.7
}
},
"mask": "",
"track": [
"person",
"car",
"bicycle",
"motorcycle",
"bus",
"cat",
"dog"
]
},
"plus": {
"enabled": false
},
"record": {
"enabled": true,
"events": {
"objects": [
"person",
"car",
"bicycle",
"motorcycle",
"bus",
"cat",
"dog"
],
"post_capture": 5,
"pre_capture": 0,
"required_zones": [],
"retain": {
"default": 60,
"mode": "motion",
"objects": {}
}
},
"expire_interval": 60,
"retain": {
"days": 10,
"mode": "all"
},
"retain_days": null
},
"rtmp": {
"enabled": true
},
"snapshots": {
"bounding_box": false,
"clean_copy": true,
"crop": false,
"enabled": true,
"height": null,
"quality": 70,
"required_zones": [],
"retain": {
"default": 60,
"mode": "motion",
"objects": {
"car": 60,
"person": 60
}
},
"timestamp": false
},
"timestamp_style": {
"color": {
"blue": 255,
"green": 255,
"red": 255
},
"effect": null,
"format": "%m/%d/%Y %H:%M:%S",
"position": "tl",
"thickness": 2
},
"ui": {
"use_experimental": false
}
}
Relevant log output
N/A
I could not find any relevant logs.
FFprobe output from your camera
# ffprobe version n5.1-2-g915ef932a3-20220731 Copyright (c) 2007-2022 the FFmpeg developers
built with gcc 12.1.0 (crosstool-NG 1.25.0.55_3defb7b)
configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-ffbuild-linux-gnu- --arch=x86_64 --target-os=linux --enable-gpl --enable-version3 --disable-debug --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libpulse --enable-libvmaf --enable-libxcb --enable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-mbedtls --enable-librist --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --disable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libdrm --enable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags=-pie --extra-libs='-ldl -lgomp' --extra-version=20220731
libavutil 57. 28.100 / 57. 28.100
libavcodec 59. 37.100 / 59. 37.100
libavformat 59. 27.100 / 59. 27.100
libavdevice 59. 7.100 / 59. 7.100
libavfilter 8. 44.100 / 8. 44.100
libswscale 6. 7.100 / 6. 7.100
libswresample 4. 7.100 / 4. 7.100
libpostproc 56. 6.100 / 56. 6.100
Frigate stats
No response
Operating system
UNRAID
Install method
Docker Compose
Coral version
CPU (no coral)
Network connection
Wired
Camera make and model
Amcrest AD410, Reolink RLC-520
Any other information that may be helpful
I’m wondering if has_clip is working correctly. I would assume it would not be true until the clip is ready. If this is not the case can I receive a recommendation on how to check when the clip is ready so I can use that to trigger adding it to my notification.
Issue Analytics
- State:
- Created a year ago
- Comments:8 (1 by maintainers)
Top GitHub Comments
has_clip just means that recording was enabled during the event. You are overriding the default output args and setting segment time to 60 seconds which means it will take much longer for the video to be available. I would recommend setting it to the default of 10 seconds or just removing the output args from your config if you aren’t customizing them.
I’ll take this as a decent comprimise.
Thanks for the help