Announcement: PowerShell script GenerateTimelapse released to GitHub

I have created a PowerShell script that can be easily installed, configured, and scheduled that will do the following:

  • Identify the folders containing timelapse images
  • Create a timelapse video for the previous day by default
  • Merge timelapse videos together in the event of multiple folders being created
  • Optionally upload the created videos to an authorised YouTube account
  • Clean up the source image files, remove empty source image folders, and remove output videos older than a specified retention date
  • Write results to a log file for analysis

The source can be found here:

Please raise issues with the script directly on the repository page. It is provided under the MIT License.


I created this to meet my use case requirements. It took a little longer than expected, but I was able to make the script loop through all timelapse folders, and merge videos together that were created because the server was rebooted, or NCS chose to use a new Timelapse folder.

I’ve been testing the script over the past three weeks, and it works very well. Each morning I have new videos generated and uploaded to my YouTube channel, unlisted, for me to review. The best part is how it cleans up after itself - it freed up so much space on my server, those images take up a LOT of space.

Please comment here if you have any feedback or need tips on installation.

Hi Dean,
Excellent work and thank you very much for sharing this. I am moving this into the section for Netcam Studio guides and tutorials since I am sure many will appreciate this.
Thanks,
Henrik

1 Like

I’ve updated the source code to manage the merge better - it now uses last write date, so the merged video will be in the correct order. Please fetch, clone, or otherwise refresh your local copy if you have this script installed.

Testing continues :smiley:

I’ve updated the source code to clean up items better and report on the number of items and folders removed more clearly. Please fetch, clone, or otherwise refresh your copy.

Testing continues :slight_smile:

I’ve added more error handling to the UploadTimelapse function, and adjusted the logic of CleanupTimelapse so it works on the Timelapse folders. The trick is variables are scoped to the functions they are in.

Please clone, fetch or otherwise update your installation!

Very pleased with the current version - everything is working as intended, and I am getting four timelapse videos uploaded every morning. Unless anyone raises any issues, we’re good now.

A little update to the script. This has fixed an issue where if there was only one directory for a source the rename process didn’t work as expected. I’ve tested the fix for two weeks and it is good now.

My library of timelapse videos is getting quite extensive.