Last active
April 30, 2020 02:05
-
-
Save thobbs/55cd143fae3d6d1d5f3f5695c92b5739 to your computer and use it in GitHub Desktop.
Script to generate animations from progress images of work
This file contains hidden or 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
#!/bin/bash | |
mkdir ./animation | |
# make square 1200x1200 images | |
for fname in $@; do | |
echo "Converting $fname"; | |
newfname=$(printf "animation/%04d.jpg" "$a"); | |
convert $fname -thumbnail '1200x1200>' -background black -gravity center -extent 1200x1200 $newfname; | |
let a=a+1; | |
done | |
echo "Generating movie" | |
# create movie | |
avconv -framerate 4 -i animation/%04d.jpg -pix_fmt yuv420p -vcodec libx264 -vb 2500k -minrate 2500k -maxrate 2500k -bufsize 2500k -strict -2 -acodec aac -s 1200x1200 output.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment