-
-
Save hydroid7/2cb593a723437eafa89ac32ef0694d37 to your computer and use it in GitHub Desktop.
Stop motion for hackers using Image Magick and ffmpeg
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
## Rename file | |
j=1;for i in `ls | grep -E ".png|.jpg|.jpeg|.PNG|.JPG|.JPEG"`; do prt=$(printf '%04d' $j);j=$((j + 1));mv -v $i "$prt.JPG"; done | |
mogrify -crop 1920x1080+362+628 *.jpg | |
## or resize | |
mogrify -resize 1920x1080 *.jpg | |
## morph if necessary !!! takes time | |
convert *.jpg -delay 10 -morph 10 %05d.morph.jpg | |
## create movie | |
ffmpeg -r 25 -i %05d.morph.jpg output.mp4 | |
## or | |
ffmpeg -r 12 -i "%04d.JPG" totoro.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment