Added some new scripts
[videoscripts/.git] / mkv2mp4small
diff --git a/mkv2mp4small b/mkv2mp4small
new file mode 100755 (executable)
index 0000000..463c3d3
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# step 1: convert the mkv to mpg ; many mkv files do not directly get converted to mp4
+mencoder "$1" -ovc lavc -lavcopts vcodec=mpeg1video -aid 0 -oac pcm -o delete_me.mpg
+
+# step 2: convert the mpg file to mp4
+mencoder -of lavf -lavfopts format=mp4 -oac lavc -ovc lavc -lavcopts \
+aglobal=1:vglobal=1:acodec=libfaac:vcodec=mpeg4:abitrate=128:vbitrate=640:keyint=250:mbd=1:vqmax=10:lmax=10:turbo  -af lavcresample=44100 \
+-vf harddup,scale=640:-3 "delete_me.mpg" -o "$1.mp4"
+
+# step 3: delete the temporary huge sized mpg file 
+rm "delete_me.mpg"