From 3acb43d511296e2fcc8e7cae111585c23643a142 Mon Sep 17 00:00:00 2001 From: Calin Burloiu Date: Wed, 8 Dec 2010 15:32:11 +0200 Subject: [PATCH] scripts/video: ffmpeg-mts2avi script added --- scripts/video/ffmpeg-mts2avi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 scripts/video/ffmpeg-mts2avi diff --git a/scripts/video/ffmpeg-mts2avi b/scripts/video/ffmpeg-mts2avi new file mode 100755 index 0000000..b1b8ad1 --- /dev/null +++ b/scripts/video/ffmpeg-mts2avi @@ -0,0 +1,24 @@ +#!/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 2; then + echo "Usage: $0 mts-file avi-file" + exit 1 +fi + +MTS_FILE=$1 +AVI_FILE=$2 + +if test ! -f $MTS_FILE; then + echo "Error: No such file $MTS_FILE" + exit 1 +fi + +# TODO: Establish the appropriate bitrates. +ffmpeg -i $MTS_FILE -f avi -acodec libmp3lame -ab 256k -ar 44100 -ac 2 -vcodec libx264 -vpre normal -b 1400k -r 30 -threads 0 $AVI_FILE + -- 2.20.1