Scripts related to creating and distributing talks and media files
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
talk-scripts/encode.sh

60 lines
870 B

#!/bin/bash
#####
# TODO: b4taylor
# * Progress printing
if [ $# != "2" ] ; then
echo "Usage: encode input-video.format output_prefix";
exit 1;
fi
mkdir "encodes" 2> /dev/null
if [ ! -d "encodes" ] ; then
echo "Could not create directory: encodes"
exit 1
fi
mkdir "timings" 2> /dev/null
if [ ! -d "timings" ] ; then
echo "Could not create directory: timing"
exit 1
fi
TIC=`date +%s`
# Job1: avi (xvid, mp3)
./make-avi.sh $1 $2 &
# Job2: mp4 (h264, aac)
./make-mp4.sh $1 $2 &
# Job3: mpg (mpeg2, mp2)
./make-mpg.sh $1 $2 &
# Job4: ogg (theora, vorbis)
./make-ogg.sh $1 $2 &
# Job5: flv
./make-flv.sh $1 $2 &
wait
./make-thumbs.sh $1 $2
TOC=`date +%s`
LOG="$2.log"
for i in timings/$2*.log ; do
echo $i >> $LOG
cat $i >> $LOG
rm $i
done
{
echo "$1"
echo "Total: `expr $TOC - $TIC`"
} >> $LOG
mv $LOG "timings"