Closed Rogue136198 closed 2 years ago
has_clip is just a very simple toggle that is essentially saying if recording is currently enabled for this camera.
The easiest way is just to wait until the type: "end"
message is fired and then go to show the clip.
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.
The easiest way is just to wait until the
type: "end"
message is fired and then go to show the clip.
I'll give that a try this evening. Thanks
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.
Yeah, I was just playing with this setting to see what would happen. I had it at the default 10s and it was still not working as I expected.
Okay, I gave type: "end"
a try and while it works it is far less than ideal.
There has to be a way to know when the clip is ready, no?
Okay, I gave
type: "end"
a try and while it works it is far less than ideal.There has to be a way to know when the clip is ready, no?
Can you elaborate on what is not ideal? Regardless of whether it is "end" or clip it will be ready at the end of the event so it's not clear what could be better.
In my automation I have a clip get sent as soon as end
occurs and it has worked great for many months.
There's also an existing request: https://github.com/blakeblackshear/frigate/issues/2128
Okay, I gave
type: "end"
a try and while it works it is far less than ideal. There has to be a way to know when the clip is ready, no?Can you elaborate on what is not ideal? Regardless of whether it is "end" or clip it will be ready at the end of the event so it's not clear what could be better.
In my automation I have a clip get sent as soon as
end
occurs and it has worked great for many months.
What is not ideal is often the clip is ready before the "end" of the event. Let's say you have somebody walking up to your front door and ringing the bell. As long as the person is standing there the event will not "end". However the clip would be generated by then. I know the clip would be generated because if I use "update" it would insert the clip before "end" but doing this comes at the cost of using 5-10 notifications out of the 500 permitted daily in the HA app.
There's also an existing request: #2128
It would appear this is right along the same lines as what I am looking for. I would not mind attempting to implement a new flag ("clip_ready") in the MQTT event to specify once the clip is finished recording but I dont know where to start.
From my point of view there's a major problem in what you're describing though. The clip for the event is not finished being processed until the event is over. Any solution which signaled that the clip was finished and ready before the event was over would be incorrect.
yes, a partial clip is available before the event is over, but I don't think we want that flagged as "clip ready" since it would just be a single 10 second segment.
With a segment time of 10 seconds, if you requested the events clip ~10 (might want to wait 12-15 just to be sure) seconds after the event started then it should get the clip you are looking for.
With a segment time of 10 seconds, if you requested the events clip ~10 (might want to wait 12-15 just to be sure) seconds after the event started then it should get the clip you are looking for.
I'll take this as a decent comprimise.
Thanks for the help
Describe 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
Relevant log output
FFprobe output from your camera
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.