[MEncoder-users] how to convert mkv to avi?

James Hastings-Trew jimht at shaw.ca
Wed Jul 1 21:35:52 CEST 2009


rulet1 at meta.ua wrote:
>> rulet1 at meta.ua writes:
>>     
>
> Well... I have used command mencoder -ovc copy -oac pcm -o your_output.avi
> your_mkv_file.mkv
> and got not readable file at all -- I even can't to know the size of the
> output file...
> I cannot use mencoder -ovc copy -oac copy -o your_output.avi
> your_mkv_file.mkv command because it is says:
>
> r at NGF:/media/disk-1/ФИЛЬМЫ$ er -ovc copy -oac copy -o 1.avi Дурное
> воспи_воспита
> ние.mkv
> MEncoder 2:1.0~rc2-0ubuntu19 (C) 2000-2007 MPlayer Team
> CPU: Intel(R) Pentium(R) 4 CPU 3.20GHz (Family: 15, Model: 4, Stepping: 9)
> CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
> Compiled with runtime CPU detection.
> success: format: 0  data: 0x0 - 0x56eec1a6
> [mkv] Track ID 1: video (V_MPEG4/ISO/AVC), -vid 0
> [mkv] Track ID 2: audio (A_AAC), -aid 0, -alang und
> [mkv] Will play video track 1.
> Matroska file format detected.
> VIDEO:  [avc1]  720x304  24bpp  25.000 fps    0.0 kbps ( 0.0 kbyte/s)
> [V] filefmt:31  fourcc:0x31637661  size:720x304  fps:25.00  ftime:=0.0400
> videocodec: framecopy (720x304 24bpp fourcc=31637661)
> Audio format 0x4134504d is incompatible with '-oac copy', please try '-oac
> pcm' instead or use '-fafmttag' to override it.
>   
Chances are then that the audio is in a format that isn't compatible 
with the .avi container (DTS, AC3, etc). I've seen a lot of "scene" 
releases that re-encode the video but drop the audio in "as is" from the 
source. So, you might have to re-encode the audio, as in:

mencoder -ovc copy -oac mp3lame -lameopts br=192:cbr:mode=0 -o 
your_movie.avi your_mkv_file.mkv

This is much less objectionable than re-encoding the video. However, 
with caution, I might mention that this will probably introduce a/v 
desync unless the input file is pristine. In general I've found mkv 
files have an audio delay of around 1 to 3 frames so you might need to 
fiddle with a -delay parameter (a good starting point is -delay 84). You 
also might need to include -noodml in the command-line depending on if 
your player supports ODML avi files or not. Some don't. Some need them 
if the file size exceeds 1Gb. Your mileage may vary.



More information about the MEncoder-users mailing list