Skip to content

Instantly share code, notes, and snippets.

@behdad
Created Apr 12, 2016
Embed
What would you like to do?
#!/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