Skip to content

Instantly share code, notes, and snippets.

View hydroid7's full-sized avatar

hydroid7

  • Bayern, Germany
View GitHub Profile
@hydroid7
hydroid7 / generate_stop_motion.sh
Last active February 19, 2019 20:56 — forked from scips/generate_stop_motion.sh
Stop motion for hackers using Image Magick and ffmpeg
## 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