Timelapse Scripting with Free Open Source Tools

Supposed you have some hundreds of files from your web cam (or Android phone) in a local directoy, just try the following:

#!/bin/bash
DATE=`date +%Y-%m-%d-%H-%M`
ls *.JPG | sed “s/^/file ‘/;s/$/’/” > files.txt
ffmpeg -f concat -i files.txt -c:v libx264 -profile:v high -crf 20 -movflags faststart timelapse$DATE.mp4

That’s basically the script that created this (early shot of a) timelapse on a Raspberry Pi. It automatically downloads photos from an old smartphone that is running ip webcam (Caution, the link leads to Google Play). Hint: If you’re impatient, don’t run ffmpeg on the Raspi… 🙂