summaryrefslogtreecommitdiffstats
path: root/bin/ipod_movie
blob: 8f0cdb4b9c4bfed80c061459683135fefa7d8b29 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

in_name=$1
out_name=$( echo ${in_name} | sed 's/\(.*\)\..*/\1_ipod.mov/' )
aspect=$2

echo "Writing out ${in_name} in iPod format to ${out_name}..."
echo

ffmpeg -vcodec xvid -b 350 -bufsize 4096 -g 300 -acodec aac -ab 96 -ac 2 -i     "${in_name}" -s 320x240 -aspect ${aspect} "${out_name}"

if [[ $? -eq 0 ]]; then
    echo
    echo "done."
else
    echo
    echo "failed."
fi