[MEncoder-users] Solution: transcoding from MKV(AC3+H264) to anything keeping AC3 soundtrack

Matthias Hopf mat at mshopf.de
Tue Mar 27 12:52:40 CEST 2007


On Mar 27, 07 10:43:23 +0200, Pierre Grimaud wrote:
> I have finally found a solution to this problem. As it turn out, it is
> mencoder's muxer that is at fault (AFAIK).

Must be the demuxer, as this issue only occurs when transcoding mkv
files.

> 1. Encode the video with -nosound option. Xvid or lavc works fine. Resize
> and apply required filters if you must.

-oac mp3lame works as well, and you have transcoded audio, at least for
reference.

> 2. Extract AC3 soundtrack. The best way to do that is to use mkvextract.
> I've not seen any other tool work (mplayer crashes, vlc does weird things)

mplayer -dumpaudio -dumpfile blub.ac3 in.mkv
works for me all the time.

> 3. remux with mkvtoolnix-gui. There, you got it. Of course, that is an MKV
> file.
> 3bis. I've heard reports of success remuxing with avimux on windows. That
> can give a nice AVI file.

Using VirtualDub for that. I think I already wrote that to the mailing list...

The issue is: Audio can be slightly off (-200 to 200ms), and you have to
detect that manually.
Also, if there are many broken AC3 frames (or garbage) in the file, A/V
sync can get lost (happened for me at least once).

> No matter how hard I've tried, I've NEVER been successful at remuxing an
> h264 recoded to Xvid (or lavc) and the original AC3 with mencoder. At least

Works fine if the original is TS (with -demuxer lavf only, though).
-demuxer lavf doesn't work well with mkv yet AFAICS.

Matthias

-- 
Matthias Hopf <mhopf at suse.de>      __        __   __
Maxfeldstr. 5 / 90409 Nuernberg   (_   | |  (_   |__          mat at mshopf.de
Phone +49-911-74053-715           __)  |_|  __)  |__  R & D   www.mshopf.de



More information about the MEncoder-users mailing list