added video convertion scripts
authorRazvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Fri, 26 Feb 2010 11:08:55 +0000 (13:08 +0200)
committerRazvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Fri, 26 Feb 2010 11:09:14 +0000 (13:09 +0200)
scripts/video/convert-all-mts [new file with mode: 0755]
scripts/video/mts2avi [new file with mode: 0755]

diff --git a/scripts/video/convert-all-mts b/scripts/video/convert-all-mts
new file mode 100755 (executable)
index 0000000..d6a6620
--- /dev/null
@@ -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 (executable)
index 0000000..e26a822
--- /dev/null
@@ -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