After a couple of tries, I think I found a bug in MEncoder. I did a couple of google research, without success. I can't be the first to notice it, but did not find any documents on this topic.
When transcoding video with MEncoder using the .MKV container, I do not have any sound, except if I copy the audio stream.
Here is the command I've used :
Using mp3 gives the same result :
mencoder Tron.mov -o Tron.mkv -of lavf -oac faac -faacopts br=128:mpeg=4:object=2 -channels 2 -srate 48000 -ovc x264 -x264encopts threads=auto:bframes=0:partitions=all:8x8dct:subq=6:bitrate=1800
mencoder Tron.mov -o Weeds.S06E01.mencoder.mkv -of lavf -oac mp3lame -lameopts br=128 -ovc x264 -x264encopts threads=auto:bframes=0:partitions=all:8x8dct:subq=6:bitrate=1800
When I use the .AVI container (MEncoder seems manipulating this container better than the others). I have the sound.
There is one message in the log :
That could be a clue, but did not find relevant documentation.
x264 [info]: profile High, level 4.0
Pos: 0.0s 23f ( 0%) 0.00fps Trem: 1min 0mb A-V:0.084 [0:0]
VIDEO CODEC ID: 28f ( 0%) 39.87fps Trem: 3min 0mb A-V:0.034 [0:0]
AUDIO CODEC ID: 15002, TAG: 0
[matroska @ 0x62a2e0]Codec for stream 0 does not use global headers but container format requires global headers
[matroska @ 0x62a2e0]Codec for stream 1 does not use global headers but container format requires global headers
[matroska @ 0x62a2e0]No AAC extradata, unable to determine samplerate.
So, is there some tricks I did not find ? Or is it just bugged and useless to generate a clean .MKV in a single step ?
Thank you for your support !