Skip to content

Instantly share code, notes, and snippets.

@behdad
Created April 12, 2016 20:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save behdad/072d9a3e09e1c8da7c62d2e61fe1c7f7 to your computer and use it in GitHub Desktop.
Save behdad/072d9a3e09e1c8da7c62d2e61fe1c7f7 to your computer and use it in GitHub Desktop.
#!/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