Created
April 12, 2016 20:36
-
-
Save behdad/072d9a3e09e1c8da7c62d2e61fe1c7f7 to your computer and use it in GitHub Desktop.
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 | |
time for x in */img*.jpg; do | |
out=`dirname $x`/4`basename $x` | |
if test -f $out; then | |
echo Skipping $x | |
else | |
echo $x | |
time convert -geometry 25% \ | |
-pointsize 36 -fill white \ | |
-box '#00000050' -gravity southwest \ | |
-annotate +1+1 `echo "${x%/*}" | tr _ -` \ | |
$x $out | |
fi | |
done | |
find -name '4img*.jpg' | LANG=C sort > frames | |
fps=6 | |
time mencoder "mf://@frames" -mf fps=$fps \ | |
-ovc lavc -lavcopts vcodec=mpeg4 \ | |
-oac copy -audiofile soundtrack.mp3 \ | |
-o output${fps}fps.avi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment