From: Razvan Deaconescu Date: Fri, 26 Feb 2010 11:08:55 +0000 (+0200) Subject: added video convertion scripts X-Git-Tag: getopt_long~149 X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=59bcaecbeee6aaf696d3592dd13cfbf963c70907;p=cs-p2p-next.git added video convertion scripts --- diff --git a/scripts/video/convert-all-mts b/scripts/video/convert-all-mts new file mode 100755 index 0000000..d6a6620 --- /dev/null +++ b/scripts/video/convert-all-mts @@ -0,0 +1,3 @@ +#!/bin/bash + +for i in $(find -regex '.*\.\(mts\|MTS\)' | sort); do ./mts2avi $i $i.avi; done diff --git a/scripts/video/mts2avi b/scripts/video/mts2avi new file mode 100755 index 0000000..e26a822 --- /dev/null +++ b/scripts/video/mts2avi @@ -0,0 +1,16 @@ +#!/bin/bash + +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 + +mencoder $MTS_FILE -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=5000:aspect=16/9 -fps 50 -vf scale=1024:576 -ffourcc XVID -o $AVI_FILE