From: Calin Burloiu Date: Tue, 14 Dec 2010 11:39:52 +0000 (+0200) Subject: ffmpeg-mts2avi-custom script added X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=281d56d47f3a00acd7169852a63d3e45e895b7ff;p=video-handling.git ffmpeg-mts2avi-custom script added --- diff --git a/ffmpeg-mts2avi-custom b/ffmpeg-mts2avi-custom new file mode 100755 index 0000000..6f3f649 --- /dev/null +++ b/ffmpeg-mts2avi-custom @@ -0,0 +1,25 @@ +#!/bin/bash +# +# Calin-Andrei Burloiu, 2010, calin.burloiu@gmail.com +# +# This script converts an MTS file into an AVI file, which +# contains an H.264 video stream and and an MP3 audio stream. +# + +if test $# -ne 3; then + echo "Usage: $0 mts-file avi-file resolution" + exit 1 +fi + +MTS_FILE="$1" +AVI_FILE="$2" +RESOLUTION="$3" +FFMPEG=/usr/bin/ffmpeg + +if test ! -f "$MTS_FILE"; then + echo "Error: No such: file $MTS_FILE" + exit 1 +fi + +$FFMPEG -i "$MTS_FILE" -f avi -acodec libmp3lame -ab 256k -ar 44100 -ac 2 -vcodec libx264 -vpre normal -b 1400k -r 30 -s $RESOLUTION -threads 0 "$AVI_FILE" +