Monday, November 17, 2008

Enocding MKV or OGM to (XVID) AVI

Ever come across an OGM or a MKV file and try to rip it onto your DVD?
Tried burning either as a VCD/SVCD/DVD or data CD using your handy burner (Nero / Alcohol / etc)?

Didn't work, did it.

So, how does one do it?

1.  Get mplayer.  It comes with a handy little tool, mencoder.  That's what your really need.

2.  Use mencoder to translate, as follows:

"mencoder.exe "c:\video\video.mkv" -oac mp3lame -ovc xvid -xvidencopts pass=1 bitrate=1000 -o "c:\video\output.avi"

3.  Go grab a bite to eat.

You should be good to go!

A great idea is to dump it onto a pen drive which hooks into your home theatre system (or get something like this).


Details:
-- mencoder.exe = this should either be in your PATH or give the full path to the exe on your system

-- "c:\video\video.mkv" = this is the input file (either mkv or ogm)

-- -oac mp3lame = translates the audio to mp3 using LAME

-- -ovc xvid = translates the video to xvid (or just use "-o copy" to leave the video source as is)

-- -xvidencopts pass=1 bitrate=1000 (only to be used with "-ovc xvid" above)

(if you are wondering about what bitrate to use:  either don't specify the option or get a clue or use this calc )

-- -o "c:\video\output.avi" = output file


If you just want to encode one file format to xvid: use 2 pass for best results...
e.g.: mencoder input.avi -o output.avi -ovc xvid -xvidencopts pass=2:bitrate=3000

and add "-vf scale=320:240" if you want to rescale the video size.

No comments: