X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=blobdiff_plain;f=old%2Fffmpeg-mts2avi-custom;fp=old%2Fffmpeg-mts2avi-custom;h=232471c46e1ace6158907d1a63b7be0fd43f6549;hb=cf141e97f6aaf93699b07ec844f5143b260fbede;hp=0000000000000000000000000000000000000000;hpb=f159138ee46507e6e5c3dacfd2ff43801a6bed81;p=video-handling.git diff --git a/old/ffmpeg-mts2avi-custom b/old/ffmpeg-mts2avi-custom new file mode 100755 index 0000000..232471c --- /dev/null +++ b/old/ffmpeg-mts2avi-custom @@ -0,0 +1,26 @@ +#!/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 4; then + echo "Usage: $0 mts-file avi-file resolution bitrate" + exit 1 +fi + +MTS_FILE="$1" +AVI_FILE="$2" +RESOLUTION="$3" +BITRATE="$4" +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 "$BITRATE" -r 25 -s $RESOLUTION -threads 0 "$AVI_FILE" +