Skip to content

Instantly share code, notes, and snippets.

@Utopiah
Created April 17, 2020 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Utopiah/6aae217c92b77757b4397d71bafceab6 to your computer and use it in GitHub Desktop.
Save Utopiah/6aae217c92b77757b4397d71bafceab6 to your computer and use it in GitHub Desktop.
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