Add a few files
[scripts.git] / avchdtomp4.sh
old mode 100644 (file)
new mode 100755 (executable)
index e69de29..ccc5312
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# AVCHD to MP4 converter
+# ffmpeg cmdline taken from http://pvdm.xs4all.nl/wiki/index.php/Convert_an_AVCHD_/_MTS_file_to_MP4_using_ffmpeg
+
+OPTIND=1
+
+src=""
+dest=""
+verbose=0
+
+while getopts s:d:v option; do
+       case "$opt" in
+       s)
+               src=$OPTARG
+               ;;
+       d)
+               dest=$OPTARG
+               ;;
+       v)
+               verbose=1
+               ;;
+       esac
+done
+               
+
+
+IFS=$(echo -en "\n\b"); for i in $(find $src -name '*.MTS'); do ffmpeg -i "$i" -vcodec mpeg4 -b:v 15M -acodec libmp3lame -b:a 192k "${$i%.MTS}.mp4"; done
+
+