video handling scripts reform: unique all file conversion script; renaming; old scrip...
[video-handling.git] / old / ffmpeg-mts2webm
diff --git a/old/ffmpeg-mts2webm b/old/ffmpeg-mts2webm
new file mode 100755 (executable)
index 0000000..6d5ddaf
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/bash
+#
+# Calin-Andrei Burloiu, 2010, calin.burloiu@gmail.com
+#
+# This script converts an MTS file into an WebM file, which 
+# contains a V8 video stream and and a Vorbis audio stream.
+#
+
+if test $# -ne 2; then
+    echo "Usage: $0 mts-file avi-file"
+    exit 1
+fi
+
+MTS_FILE="$1"
+AVI_FILE="$2"
+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 webm -acodec libvorbis -ab 256k -ar 44100 -ac 2 -vcodec libvpx -b 1400k -r 25 -threads 0 "$AVI_FILE"
+