Skip to content

Instantly share code, notes, and snippets.

/GFS

Created February 15, 2014 20:33
Show Gist options
  • Save anonymous/9024885 to your computer and use it in GitHub Desktop.
Save anonymous/9024885 to your computer and use it in GitHub Desktop.
#!/bin/bash
rm *.png run.mp4
for i in {3..192..3}
do
wget http://modeles.meteociel.fr/modeles/gfs/run/gfs-2-$i-3h.png
convert -pointsize 18 -font /path/to/font.ttf -fill red -draw "text 470,50 \"makhdoum by ubugnu ;-)\"" gfs-2-$i-3h.png gfs-2-$i-3h.png
done
j=1
for i in {3..192..3}
do
mv gfs-2-$i-3h.png image$j.png; ((j++))
done
rename 's/\d+/sprintf("%04d",$&)/e' *.png
convert *.png -delay 10 -morph 10 %04d.morph.png
#ffmpeg -r 1/0.5 -i image%d.png -r 30 -pix_fmt yuv420p run.mp4
ffmpeg -r 25 -vf scale="trunc(in_w/2)*2:trunc(in_h/2)*2" -i %04d.morph.png run.mp4
vlc run.mp4 &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment