Automated time-lapse? (SOLVED & WORKING!!)
Automated time-lapse? (SOLVED & WORKING!!)
I'm am wanting to create timelapse videos automatically. I have been using the manual export option on a per-clip basis, but I have a new project that requires the entire day of clips to be exported every day in a timelapse so that would be very time consuming.
I've seen some similar ideas with some searching, but not exactly what I'm trying to do, but it seems like it might be possible like this:
Define Storage Aux 2 as the second/final target with a clip age limit of 7 days and a delete action. Define Storage Aux 1 as an initial recording target with a clip age limit of 2 hours, Move to folder (Aux 2) action, Convert/Export Queue on move selected, configure re-encode video with Time-lapse multiplier of choice, Replace action for Where to save.
Then I would set the camera I want to do this for to use that AUX 1 storage and it will continuously create time-lapse exports for clips as they become 2 hours old. Does that sound right?
If so, great, because that's what I just set up as a test and we'll see what things look like in the morning. If there is a better/easier way though, I'd be glad to hear it!
Next I'll need to implement a script to use FFMPEG to combine the clips for each day. I wondered if I could just set BI to create one clip per day, but that seems dangerous to have such a large file created that is 24 hours long and then to have to export/convert that 24 hour long clip to a time-lapse in one shot.
For anyone interested in the rest of the process, after getting a single clip for each day, I'll use SyncBack Pro to upload the video to a specific folder in my Google Drive. Then I have Zapier automations set up to watch that folder and publish any video that shows up there to my YouTube channel. I tried to use the YT API to directly publish myself, but they've changed their API auth and it does not appear to be possible to use it "headless" at this point without being a large company with special arrangements in place (like Zapier evidently has).
I previously had the camera export a JPG image once per minute and upload that to a webserver where I would combine the images with FFMPEG and then the rest like I said above. This has been working, but the camera sometimes would glitch and stop creating export JPGs and even when it was running well, the resulting video was good, but not as beautiful as the exports from BI given the 20fps source material I have in BI versus 1 frame per minute with the JPG export method. I have some remote time-lapse cameras that will still have to use the 1 frame per minute method because I don't have BI available to handle those, but at least the cameras I have set up with BI can take advantage of the extra frames.
One example of a recent time-lapse export from BI of a particularly interesting storm can be found here: https://youtu.be/-ErxKpeUp8I You can see previous JPG-based exports if you browse that channel. If this new method works, I'll be upgrading my camera setup and adding at least one more view to better appreciate the storm motion from multiple directions.
I've seen some similar ideas with some searching, but not exactly what I'm trying to do, but it seems like it might be possible like this:
Define Storage Aux 2 as the second/final target with a clip age limit of 7 days and a delete action. Define Storage Aux 1 as an initial recording target with a clip age limit of 2 hours, Move to folder (Aux 2) action, Convert/Export Queue on move selected, configure re-encode video with Time-lapse multiplier of choice, Replace action for Where to save.
Then I would set the camera I want to do this for to use that AUX 1 storage and it will continuously create time-lapse exports for clips as they become 2 hours old. Does that sound right?
If so, great, because that's what I just set up as a test and we'll see what things look like in the morning. If there is a better/easier way though, I'd be glad to hear it!
Next I'll need to implement a script to use FFMPEG to combine the clips for each day. I wondered if I could just set BI to create one clip per day, but that seems dangerous to have such a large file created that is 24 hours long and then to have to export/convert that 24 hour long clip to a time-lapse in one shot.
For anyone interested in the rest of the process, after getting a single clip for each day, I'll use SyncBack Pro to upload the video to a specific folder in my Google Drive. Then I have Zapier automations set up to watch that folder and publish any video that shows up there to my YouTube channel. I tried to use the YT API to directly publish myself, but they've changed their API auth and it does not appear to be possible to use it "headless" at this point without being a large company with special arrangements in place (like Zapier evidently has).
I previously had the camera export a JPG image once per minute and upload that to a webserver where I would combine the images with FFMPEG and then the rest like I said above. This has been working, but the camera sometimes would glitch and stop creating export JPGs and even when it was running well, the resulting video was good, but not as beautiful as the exports from BI given the 20fps source material I have in BI versus 1 frame per minute with the JPG export method. I have some remote time-lapse cameras that will still have to use the 1 frame per minute method because I don't have BI available to handle those, but at least the cameras I have set up with BI can take advantage of the extra frames.
One example of a recent time-lapse export from BI of a particularly interesting storm can be found here: https://youtu.be/-ErxKpeUp8I You can see previous JPG-based exports if you browse that channel. If this new method works, I'll be upgrading my camera setup and adding at least one more view to better appreciate the storm motion from multiple directions.
Last edited by archaic0 on Fri Jun 21, 2024 5:22 pm, edited 1 time in total.
Re: Automated time-lapse?
I can't help you but good luck. Let us know how you get on.
Forum Moderator.
Problem ? Ask and we will try to assist, but please check the Help file.
Problem ? Ask and we will try to assist, but please check the Help file.
Re: Automated time-lapse?
Looks like this is working!
It did not appear to be working at first, but I just had a backlog of queued exports. Once that caught up, I had my new camera exports happening as expected.
I did change the storage setting from replace to export to a new file. Not sure if that was required, but it makes sense given the change to an mp4 with the export.
Now I have another issue… my current i7 server from 2012 handles 9 cameras fine, but it isn’t up to the task of a continuous export so it’s hardware upgrade time!
I’ll post some more details soon in case others want to explore this.
It did not appear to be working at first, but I just had a backlog of queued exports. Once that caught up, I had my new camera exports happening as expected.
I did change the storage setting from replace to export to a new file. Not sure if that was required, but it makes sense given the change to an mp4 with the export.
Now I have another issue… my current i7 server from 2012 handles 9 cameras fine, but it isn’t up to the task of a continuous export so it’s hardware upgrade time!
I’ll post some more details soon in case others want to explore this.
Last edited by archaic0 on Fri Jun 21, 2024 5:23 pm, edited 1 time in total.
Re: Automated time-lapse?
Confirmed, this method is fully working. It does cause my NVR to be at 100% CPU at all times though when my normal load is around 50-60% with all of my cameras going. I have new NVR hardware on order now though, so I'm hopeful a new machine will take care of that and ensure that I can keep up with constant exports.
Here is a test video: https://youtu.be/U4G-vqUgzCU
To set this up yourself: (also attached screen shots for reference)
Step 1: Go into the main Blue Iris settings, storage tab, configure Aux 2 with a location, type, size limit, age limit, and to delete when the limit is reached. This just ensures that the clips don't stack up forever. I'll be processing the time-lapses daily so I set a 3 day limit to give me a couple days to fix something in case there is a glitch.
Step 2: Also in the main Blue Iris settings, storage tab, configure Aux 1 with a location, type, size limit, time limit, to move to folder Aux 2 when the time limit is reached, enable Queue on move next to Convert/export. Configure the export settings to use MP4, re-encode video (not audio), enable Time-lapse, choose your speed multiplier and playback fps (1,000 and 30 work for me), and export to a final location for the MP4 file. One caveat here is that the time-lapse checkbox is disabled when this box opens and it took me a minute to figure out why. The Include audio track checkbox is checked by default and you have to clear that checkbox, but that doesn't fix the time-lapse checkbox until you also uncheck re-encode video and then check re-encode video again. So on this screen, clear the checkbox for audio, then clear the checkbox for re-encode video, then check the box for re-encode video, and the time-lapse checkbox will light up after that.
Step 3: Assuming you've already added a camera to Blue Iris, right-click on that camera and go into camera settings, record tab and set the folder to Aux 1.
These settings result in the camera video being recorded to Aux 1, then after a clip is 2 hours old it moves to Aux 2 and converts that clip to a time-lapse MP4, then after 3 days it deletes the clips. I chose 2 hours because my camera usually ends up making clips every 30 min based on the other storage settings in place (that I think are mostly default from what I remember). If your clips are longer, you may need to adjust that 2 hour setting. In my test case, I cloned an existing camera so I don't want to keep an extra copy of the original video clips. If you want to make time-lapses out of an existing camera channel and keep the clips, you'll need to experiment with the Aux 2 clip age limit setting, or just uncheck the limit clip age box for Aux 2 entirely.
I do see some other settings to combine video in the camera channel settings, but I have not experimented with that. In my use case I am making continuous 24 hour time-lapse videos forever, so I would be worried about trying to combine things in Blue Iris and accidentally creating clips too large to manage.
In my project, the next step will be using a script to move one day's worth of time-lapse MP4 files to a new folder, then using FFMPEG to combine those clips into one video, then moving the final video into a folder that is part of my Google Drive. I use an online service called Zapier to watch that Google Drive folder for new files and then automatically upload and publish those videos to my YouTube channel.
Here is a test video: https://youtu.be/U4G-vqUgzCU
To set this up yourself: (also attached screen shots for reference)
Step 1: Go into the main Blue Iris settings, storage tab, configure Aux 2 with a location, type, size limit, age limit, and to delete when the limit is reached. This just ensures that the clips don't stack up forever. I'll be processing the time-lapses daily so I set a 3 day limit to give me a couple days to fix something in case there is a glitch.
Step 2: Also in the main Blue Iris settings, storage tab, configure Aux 1 with a location, type, size limit, time limit, to move to folder Aux 2 when the time limit is reached, enable Queue on move next to Convert/export. Configure the export settings to use MP4, re-encode video (not audio), enable Time-lapse, choose your speed multiplier and playback fps (1,000 and 30 work for me), and export to a final location for the MP4 file. One caveat here is that the time-lapse checkbox is disabled when this box opens and it took me a minute to figure out why. The Include audio track checkbox is checked by default and you have to clear that checkbox, but that doesn't fix the time-lapse checkbox until you also uncheck re-encode video and then check re-encode video again. So on this screen, clear the checkbox for audio, then clear the checkbox for re-encode video, then check the box for re-encode video, and the time-lapse checkbox will light up after that.
Step 3: Assuming you've already added a camera to Blue Iris, right-click on that camera and go into camera settings, record tab and set the folder to Aux 1.
These settings result in the camera video being recorded to Aux 1, then after a clip is 2 hours old it moves to Aux 2 and converts that clip to a time-lapse MP4, then after 3 days it deletes the clips. I chose 2 hours because my camera usually ends up making clips every 30 min based on the other storage settings in place (that I think are mostly default from what I remember). If your clips are longer, you may need to adjust that 2 hour setting. In my test case, I cloned an existing camera so I don't want to keep an extra copy of the original video clips. If you want to make time-lapses out of an existing camera channel and keep the clips, you'll need to experiment with the Aux 2 clip age limit setting, or just uncheck the limit clip age box for Aux 2 entirely.
I do see some other settings to combine video in the camera channel settings, but I have not experimented with that. In my use case I am making continuous 24 hour time-lapse videos forever, so I would be worried about trying to combine things in Blue Iris and accidentally creating clips too large to manage.
In my project, the next step will be using a script to move one day's worth of time-lapse MP4 files to a new folder, then using FFMPEG to combine those clips into one video, then moving the final video into a folder that is part of my Google Drive. I use an online service called Zapier to watch that Google Drive folder for new files and then automatically upload and publish those videos to my YouTube channel.
Re: Automated time-lapse? (SOLVED & WORKING!!)
Good work. Thank you for that
Forum Moderator.
Problem ? Ask and we will try to assist, but please check the Help file.
Problem ? Ask and we will try to assist, but please check the Help file.
Re: Automated time-lapse? (SOLVED & WORKING!!)
One update. I neglected to check the box for adding the text overlay and I do want that for my project. In case someone else does as well, it is in the convert/export settings where you set the time-lapse speed multiplier. "Add text/graphic overlays from direct-to-disk BVR" should be checked.
The process in Blue Iris continues to work well. I have gone through a couple cameras though and I'm still looking for the "perfect" one. The first couple I've tried were cheap ones from Amazon and they melted in the direct sun of the roof. So much for "outdoor". They also do not perform well at night with a ton of noise added which obscures the real stars that are visible.
The process in Blue Iris continues to work well. I have gone through a couple cameras though and I'm still looking for the "perfect" one. The first couple I've tried were cheap ones from Amazon and they melted in the direct sun of the roof. So much for "outdoor". They also do not perform well at night with a ton of noise added which obscures the real stars that are visible.
Re: Automated time-lapse? (SOLVED & WORKING!!)
Very impressive. Thanks for sharing.
Re: Automated time-lapse? (SOLVED & WORKING!!)
Thanks!
Here is another time-lapse that came out of Blue Iris and a camera on my roof pointed at the sky.
https://youtu.be/S_K4AivKb_I
I'll have videos posted to that channel daily once I get my new cam server hardware installed and finish up my scripts.
Re: Automated time-lapse? (SOLVED & WORKING!!)
That was mesmerising to watch.
Great post and great info and appreciate you taking the time to post back, a lot of people wouldn’t and this is great info for anybody else wanting to do something similar.
Great post and great info and appreciate you taking the time to post back, a lot of people wouldn’t and this is great info for anybody else wanting to do something similar.
-
- Posts: 5
- Joined: Fri Apr 24, 2020 6:57 pm
Re: Automated time-lapse? (SOLVED & WORKING!!)
For stitching together daily clips, FFMPEG is indeed a powerful tool, but handling such scripts can get technical.
If you're looking for a more user-friendly alternative, especially if you're accustomed to using systems like iMovie but need something for Windows, you might want to check out options available at https://www.movavi.com/imovie-for-windows/. These tools offer intuitive interfaces for video editing, which might simplify your process further, especially when combining daily clips into a single, seamless time-lapse video.
If you're looking for a more user-friendly alternative, especially if you're accustomed to using systems like iMovie but need something for Windows, you might want to check out options available at https://www.movavi.com/imovie-for-windows/. These tools offer intuitive interfaces for video editing, which might simplify your process further, especially when combining daily clips into a single, seamless time-lapse video.
Last edited by travlynman on Mon Jul 29, 2024 12:26 pm, edited 1 time in total.