ffmpeg -i infile -f mp4 -vcodec mpeg4 -b 200k -aspect 4:3 -r 20.98 -s 320x240 -acodec libfaac -ar 48000 outfile
The only videos I routinely watch are of The Daily Show, so this little script encodes and renames them from
The.Daily.Show.2010.02.04.Rep.Anthony.Weiner.HDTV.XviD.avi to TDS-02.04.mp4
#! /bin/shIf you happen to use Prowl and want a notification when it is finished...
for i in `ls *.avi`
do
name=TDS-$(echo $i | cut -c 21-25).mp4
ffmpeg -i $i -f mp4 -vcodec mpeg4 -b 200k -aspect 4:3 -r 20.98 -s 320x240 -acodec libfaac -ar 48000 $name
done
num=$(ls | grep mp4 | wc -l)... or want to transfer them with ssh (using ssh keys):
dir=$(pwd)
url=https://prowl.weks.net/publicapi/add
app="Pod converter"
desc="Finished converting $num Daily Shows in $dir"
curl -k $url -F apikey=XXX -F application=$app -F description=$desc
mkdir mp4sTweak it a bit and you can have a basic method for encoding and automatically syncing your favorite videos while you sleep.
mv *.mp4 ./mp4s
scp -r -i ~/.ssh/SSH_FILENAME /path/to/mp4s mobile@IP:/var/mobile