Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Upload videos and/or snapshots before motion ends #5

Open
yuchenshi opened this issue Jan 5, 2025 · 1 comment
Open

[FR] Upload videos and/or snapshots before motion ends #5

yuchenshi opened this issue Jan 5, 2025 · 1 comment

Comments

@yuchenshi
Copy link
Contributor

Consider the situation when an intruder unplugs, snags, or destroys the machine running Frigate and this project (instead / in addition to the camera).

Hypothetically, a motion event may never reach its ending since the intruder is constantly active on the camera until Frigate simply stops working because the disk is destroyed, device is shutdown, or Internet is cut. At that point all is too late and no video can be uploaded.

What if a clip can be uploaded as soon as any clip is available while it's still in progress? This can help identify the intruder and get evidence even if the machine stops working before the event can end. If not, Frigate keeps updating the clip and the Python script can overwrite the video file with a newer version as it goes, until no more updates are made. I believe this can be done by watching the MQTT events but it requires a complicated upload + update strategy.

Alternatively / in addition, the snapshot image of each event can be uploaded too, which becomes available much faster than the clip, so at least there's something. This can shorten the window where an intruder can stop the uploading without leaving any evidence at all. If we upload the first available snapshot, the clip, and the last available snapshot (Frigate updates those too), then there will be no need to overwrite or delete anything. That seems like a good starting point to me.

(Many ideas borrowed from the original discussion thread: blakeblackshear/frigate#4315 )

@kankadev
Copy link
Owner

Thank you. I'll investigate this after getting healthy again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants