Adding new encoding scripts and the template file.
[public/talk-scripts.git] / make-mp4.sh
1 V_BIT_RATE=768kb
2 A_BIT_RATE=128kb
3
4 LOG="timings/$2-mp4.log"
5 TIC=`date +%s`
6
7 ffmpeg -i $1 -v -1 -y\
8        -pass 1 -threads 0 -y \
9        -vcodec libx264 -b "$V_BIT_RATE"  -bt "$V_BIT_RATE" \
10        -vpre fastfirstpass \
11        "encodes/$2-first.mp4" 2> /dev/null
12
13 ffmpeg -i $1 -v -1 -y \
14        -pass 2 -threads 0 \
15        -vcodec libx264 -b "$V_BIT_RATE" -bt "$V_BIT_RATE" \
16        -vpre hq \
17        -acodec libfaac -ac 1 -ab "$A_BIT_RATE" \
18        "encodes/$2.mp4" 2> /dev/null
19
20 mv "ffmpeg2pass-0.log" "$2-ffmpeg2pass-0.log"
21 mv "x264_2pass.log" "$2-x264_2pass.log"
22
23 TOC=`date +%s`
24
25 echo "`expr $TOC - $TIC`" >> $LOG
26