[MEncoder-users] ripping dvd to matroska and h.264

Raimund Berger raimund.berger at gmail.com
Sat Apr 18 12:31:03 CEST 2009


Grozdan <microchip at telenet.be> writes:

>>
>> 2009/4/18 <inbox at reinertson.com>
>>
>>> i'm trying to follow the instructions given in
>>>
>>> http://en.gentoo-wiki.com/wiki/Ripping_DVD_to_Matroska_and_H.264
>>>
>>> to rip a dvd to an mkv container.  i think i've followed the instructions
>>> pretty carefully but two problems arise.  first, the sound is not synced
>>> with the video and second, there are no subtitles.  i've listed the sequence
>>> of commands below and i'd be grateful if someone would just review them to
>>> see if i've done anything obviously wrong.
>>>
>>> tia
>>>
> why do you use 1 fps as default duration for mkvmerge? it should be 23.976
> fps, eg
> --default-duration 0:23.976fps
>
> also you may want to add -ofps 24000/1001 when doing pullup. I would also
> suggest you try out the h264enc script which can make your life much easier
> and allows you to save the settings and tweak them further to your liking.
> Google it

Those guides over there are really crap. They might work in the best
case, if everything behaves nicely and the source material is top notch,
but what they specifically not deal with is all the problems that can
arise.

And I don't quite understand why people don't just consult the mplayer
docs, which have extensive and prominent sections specifically
addressing A/V issues.

That said, what I do these days is just rip directly to avi, using
mplayer only and transcoding the video to h264 while keeping the audio
as it is. Then dump the streams and remux them either to mp4 or mkv,
while optionally transcoding the audio to AAC with nero.

Generally, I've got good results with that procedure. The two things to
take care of is that mplayer might include a stream time offset in the
avi header which has to be taken into account when remuxing. And nero
will introduce a slight delay as well, usually in the range below 100ms.

So when I do transcode audio to AAC and want perfect sync I usually cut
off that delay by taking the stream through sox and trim it, in the "wav
domain".

The same when there's an offset in the avi header and I remux to mp4,
because offsets in mp4 are usually implemented via edit atoms which
aren't honored by many players on playback. So in that case I have to
manipulate the audio stream either, by either cutting or including
silence at the beginning.


More information about the MEncoder-users mailing list