Skip to content

Instantly share code, notes, and snippets.

Created Apr 17, 2020
What would you like to do?
from screen capture to video timelapse via CLI
# using scrot to capture screenshots every 10 seconds
# watch -n 10 scrot
for X in `ls -tr`; do
let counter++;
if (($counter < 100)); then res=0$counter; else res=$counter; fi;
if (($counter < 10)); then res=00$counter; fi;
mv $X img$res.png;
ffmpeg -framerate 24 -i img%03d.png -vf scale=720:-2 -y output.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment