[MEncoder-users] How to convert mkv to mkv?

Peter Cordes peter at cordes.ca
Sun Jul 29 22:01:08 CEST 2007


Carlo Wood wrote:
>Finally, I solved it like this:
>
>http://www.xs4all.nl/~carlo17/howto/encode.html

 A couple notes:
MP4Box has a -new option, so you don't have to rm -f the old .mp4.

 You can burn >4GB files on a DVD using UDF.
use genisoimage/growisofs -allow-limited-size.
That puts a size mod 4GB in the iso9660 filesystem, and the real size in the
UDF filesystem.  So make sure you mount the disc with UDF.  (/etc/fstab
usually forces iso9660).
The latest k3b supports this.

Are you sure -mc 0 -noskip -nosound is a good idea?  When encoding from a
DVD source, mencoder often has to do some sync correction.  I've found that
-sync -0.0834167 (2 frames, the delay reported by MP4Box) did the trick, and
made mencoder not skip any frames on an NTSC progressive track that had some
hard TC at the beginning and end, while without -delay it did skip some
frames.  (With 
-vf filmdint=io=30:24:verbose=1:dint_thres=256,softskip -ofps 24000/1001)
But you're only talking about transcoding an MKV.  They can have A/V sync
offsets set with mkvmerge --delay (not --sync, which actually adds/removes
samples), which are likely to be lost if you don't let mencoder process
audio.  (Or maybe they'd be preserved if you don't demux the audio from the
source mkv, but rather mkvmerge foo.mp4 --novideo source.mkv -o out.mkv.  I
don't think they'd be preserved if you demux to a raw AC3 file.)

 A/V sync is a major problem with making x264 encodes with mplayer/mencoder.
I think I've got something figured out that doesn't introduce any offsets
that build up if you repeat the process, but I think it's off on the first
encode.  Maybe there's a container offset in the source that gets lost...

-- 
#define X(x,y) x##y
Peter Cordes ;  e-mail: X(peter at cor , des.ca)

"The gods confound the man who first found out how to distinguish the hours!
 Confound him, too, who in this place set up a sundial, to cut and hack
 my day so wretchedly into small pieces!" -- Plautus, 200 BC



More information about the MEncoder-users mailing list