Open MrColumbo opened 1 month ago
Hi @MrColumbo,
Just side notes from yet another user
Upon discovering Telegram's integration with frigate-notify, I was also expecting to receive notifications with attached clips. But later, after having thoughts on this feature, I decided not to request it because:
Could you please describe how the HA sends Telegram notification with clip attached: current behavior, what you would like to improve, other special notes?
Thanks.
Hi @freefd
thanks for replying to my message and sharing your thoughts.
Well - the HA integration for whatever reason miss come notifications. There are 3 cameras capturing the same are with some overlap. When I look at frigate directly i see typically 3 events - one from each camera but somehow i often get just 2 notifications via HA. Since HA is just to used to send notifications and there i nothing else i do there with the cameras I thought it might be nice to try a different way fully independent from HA.
Hi @MrColumbo,
Good and strong description of the business case, but I'm asking more about the nature of HA's messaging. For example:
Because I see some trouble there: if HA sends a message immediately while the scene is still in action, how to see the clip online while it's still in the recording stage on the Frigate side.
Dear @0x2142, FYI, Telegram has two kinds of "Video Streaming":
If there are expectations of seeing a clip that is still being recorded on the Frigate side, the 2nd option should be considered. But I don't remember it being possible outside of group chat.
Probably, there is the 3rd option for that I can't easily say is possible: the call a user and stream real-time video from Frigate instead of video from the user's phone/workstation camera.
Long story short: without a deep dive into the Telegram API, I'd stick with option 2 (with explicit enabler from a configuration perspective!) from https://github.com/0x2142/frigate-notify/issues/98#issuecomment-2170548627.
Hi @freefd
my trigger fires at the end of an event
alias: Frigate send mp4 video to Telegram description: "" trigger:
....now that i am looking at it i am wondering if the condition is redundant since it is also the trigger ....
hope that helps
"{{ trigger.payload_json['type'] == 'end' }}"
Useful as a chocolate teapot.
Well... It seems, frigate-notify may partially behave the same way, but be more effective overall:
The user will still receive an instant message with a snapshot (steps
03 .. 07
of the sequence) as soon as something important appears in the camera's FOV and is detected by the Frigate.
Also, frigate-notify with "clip attachment" feature enabled should continue track the same event_Id
for type = end
, meaning that the clip recording is complete, and the clip can be sent to the user as a second Telegram message (steps 09 .. 15
of the sequence).
And, in-flight transcoding (step 13
of the sequence) can also be handy to support Video Streaming in Telegram if the clip is not AVC encoded, such as if the camera is streaming in the H.265 codec.
By the way, all my cameras were intentionally set up to stream H.264 to avoid codec issues in modern browsers due to patent wars. And just checked, files from their streams the Frigate stores as is:
$ ffprobe -v quiet -print_format json -show_streams 14.24.mp4 | jq .streams[0].codec_long_name -r
H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
Probably, Video Streaming will work OOB for me here :)
I think for the current moment, this is likely not something I will plan to add. However, I'll keep it on my list as something to potentially come back to later on.
A few of my thoughts:
/reviews
endpoint seems to automatically generate preview GIFs, which could be used instead. This might be a good middle ground since they're already being generated by Frigate. That being said, I'll need to figure out how quickly those are generated - and a quick check through some of mine show GIFs up to 2MB, so size may still be a consideration here.I just want to express my interest in this feature.
Thanks for your awesome work.
Currently I use homeassistant to receieve notfications and there i can send a clip directly to Telegram. I am wondering if this work with firagete-notify as well since it is quite nice like telegram shows a preview (like a thumbnail video) .
thanks and kind regards