Start screencapture in terminal, a single character will trigger a screencapture:
function _start_screencapture
{
for n in `seq -f %03g 0 100` ; do
if read -n 1 ; then
screencapture -t png ~/Desktop/capture-${n}.png
echo "Taken " ${n}
fi
done
}
alias start_screencapture=_start_screencapture
if the first 100 frames are reversible, then use this to copy the first 100 frames, in reverse order, to be the second 100 frames:
function copy_100_to_200
{
for n in `seq -f %03g 1 99` ; do
m=`expr 200 - $n`
cp capture-${n}.png capture-${m}.png
done
}
Crop the png in situ:
for n in *.png ; do mogrify -crop 973x862+290+184 $n ; echo $n ; done
where 973x862+290+184
needs to be obtained by taking the largest png
and find the biggest cropping area. 973x862+290+184
means: widthxheight+x+y
where (x,y) is the top-left corner of the crop rectangle.
Convert png to jpg:
for n in `seq -f %03g 0 199` ; do convert capture-${n}.png -quality 100% capture-${n}.jpg ; done
Create animated gif:
convert capture-*.jpg -delay 1 -loop 0 result.gif
Examples, created using patterns