X-Git-Url: http://git.pippins.net/embedvideo/.git/static/git-logo.png?a=blobdiff_plain;f=mkv2mp4;fp=mkv2mp4;h=463c3d3852884b68bbcb1fa80e613bad5993e8a7;hb=ffe1f69dcb8d98356599086af7e60dbffcf9e018;hp=0000000000000000000000000000000000000000;hpb=2ce0104bdcc993060f5726e31f0115cd32ec99cf;p=videoscripts%2F.git diff --git a/mkv2mp4 b/mkv2mp4 new file mode 100755 index 0000000..463c3d3 --- /dev/null +++ b/mkv2mp4 @@ -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"