Skip to content

Instantly share code, notes, and snippets.

@Utopiah
Created Apr 17, 2020
Embed
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
counter=0
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;
done
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