-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Automatic Daily Recordings Export with Timelapse #11765
Comments
This can be done automatically with a system like home assistant, NodeRED, or even a simple bash script + cron job. It is also worth mentioning that in the next version of frigate the UI supports scrubbing recordings quickly automatically which replaces the need of time-lapses for many users. |
@NickM-27 Could you please point me to a working example where a bash script + cron job combination is being used? I cannot find any and was unable to reproduce this setup so far. |
https://www.cyberciti.biz/faq/how-do-i-add-jobs-to-cron-under-linux-or-unix-oses/ would be a good starting point. There's not much special about calling Frigate's api. Just need to get the start and end timestamp then make the api request in the script |
@NickM-27 I think you misunderstood my issue completely. I have no troubles using cron or writing http requests. My problem is that the specific endpoint of frigate I am aiming at expects/requires date parameter in unix that I don't know how to produce if said export is supposed to run daily for the last 24 hours (hence the unix parameter would always be different).
|
You just need to get the epoch time https://stackoverflow.com/questions/1092631/get-current-time-in-seconds-since-the-epoch-on-linux-bash and add 24 hours (in seconds) to it |
I see. I guess that means I don't get around coming up with some kind of script/backend that does that calculation for each call then? I cannot simply have it triggered by other tools that are only capable of sending out requests as configured. |
Yes, I am aware that this question was most likely asked a hundred times already, but I've been up and down all the documentation and simply cannot get a straight answer for this feature which is essential for a security cam system.
At the end of the day, I want my Frigate to export the daily recordings of a camera in the format configured in my config (as timelapse video). I can manually trigger this with an API call and the GUI on the web portal works terrific too. HOWEVER, it is not automatic and I have to sit there and wait until the process is complete.... For each camera.
Of course, that makes that feature completely useless in the day-to-day, so I want to ask you for how to create this daily export automatically. Possible the API call would be the easiest solution, but it requires the timestamp parameters by default:
POST /api/export//start//end/
How can I send the request simply for yesterday's 24 hours at the start of a new day?
The text was updated successfully, but these errors were encountered: