3 # Calin-Andrei Burloiu, 2010, calin.burloiu@gmail.com
5 # This script converts an MTS file into an AVI file, which
6 # contains an H.264 video stream and and an MP3 audio stream.
10 echo "Usage: $0 mts-file avi-file resolution bitrate"
18 FFMPEG=/usr/bin/ffmpeg
20 if test ! -f "$MTS_FILE"; then
21 echo "Error: No such: file $MTS_FILE"
25 $FFMPEG -i "$MTS_FILE" -f mp4 -acodec libmp3lame -ab 256k -ar 44100 -ac 2 -vcodec libx264 -vpre normal -b "$BITRATE" -r 25 -s "$RESOLUTION" -threads 0 "$AVI_FILE"