Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm converting DVD media to a MKV format video with mencoder:

mencoder dvd://4 -o output.mkv -oac mp3lame -ovc x264 -x264encopts crf=20:8x8dct:frameref=4:bframes=3:b_pyramid=normal:weight_b

But the output from file output.mkv indicate it's AVI format ?

RIFF (little-endian) data, AVI, 720 x 576, 25.00 fps, video: H.264 X.264 or H.264, audio: MPEG-1 Layer 3 (stereo, 48000 Hz)

share|improve this question

The output format isn't set automatically, you need an -of option.

At least in the version of mencoder that I use, there is no -of mkv, so I create an AVI file, and then use mkvmerge to convert (and mux the additional channels):

mencoder -of avi -o temp_en.avi -oac ... -ovc ... -alang en -slang en -vobsubout temp_en dvd://4
mencoder -of avi -o temp_de.avi -oac ... -ovc frameno -alang de -slang de -vobsubout temp_de dvd://4
mkvmerge -o output.mkv --lang 1:eng temp_en.avi --lang 1:ger -D temp_de.avi --lang 0:eng temp_en.idx --lang 0:ger temp_de.idx

These are from memory, so may not work exactly as posted.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.