Created
April 17, 2020 20:09
-
-
Save Utopiah/6aae217c92b77757b4397d71bafceab6 to your computer and use it in GitHub Desktop.
from screen capture to video timelapse via CLI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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