Tuesday, May 3, 2011

Assignment 4.3

This code takes my initial animation of a reflective planet surface with dancing rings, reverses the frames, numbers the frames, then compiles it back together with any color border the user desires. 



#!/bin/bash
#Jaclyn Huchel

read -p "Name of Video :" name
read -p "Name of New Video (no spaces please) :" newname
read -p "Font Color :" color
read -p "Border Color :" bcolor

ffmpeg -i $name.avi -r 12 -f image2 $name-%04d.bmp
i=1

IMAGES=`ls *.bmp`
for IMG in $IMAGES
do
mogrify -flop -bordercolor $bcolor -border 10 -pointsize 50 -fill $color -font courier -annotate +100+100 "${i}" $IMG
i=$(($i+1))
done;

ffmpeg -f image2 -i $name-%04d.bmp -r 12 $newname.avi
rm *.bmp

No comments:

Post a Comment