[MEncoder-users] re: x264 encoding into mkv. (oops)

Everett everettraygun at gmail.com
Sun May 28 05:36:01 CEST 2006


sorry, my last post was in regard to the following message, which I sent 
yesterday.

Most of this video was great but I discovered it was messed up at the end!!
so I'm trying to re-encode tonight, adding the "harddup" filter at the end of 
the -vf chain, after reading in the documentation about a/v muxing sync 
issues.  I think this might solve the problem, the audio was still going, but 
the video was garbage.  


Date: Fri, 26 May 20	06 19:40:28 -0700
From: Everett <everettraygun at gmail.com>
Subject: [MEncoder-users] dvd rip -> x264 + ogg -> mkv or mp4
        containers,     using mencoder
To: mencoder-users at mplayerhq.hu
Message-ID: <200605261940.28963.everettraygun at gmail.com>
Content-Type: text/plain;  charset="us-ascii"

this is my first post.  forgive me if it's not helpful or if it's been gone 
over already.

I have found a solution/workaround for a problem that I had trouble finding an 
answer for.  I see that someone recently posted this problem in another form, 
i.e. how to get mencoder to encode for ipod.

this is the series of commands that I use to get an excellent rip of a dvd.  I 
do a streamdump of the dvd using 
$mplayer dvd://1 -dvd-device /mnt/<mydvdmount> -dumpstream -dumpfile rip.vob

here are the commands I used for disc one of the extended "lord of the rings, 
fellowship of the rings" :

<pass1>
$mencoder rip.vob -vf pullup,softskip,crop=720:352:0:62 -nosound -ovc x264 
-x264encopts bitrate=1000:subq=4:bframes=3:b_pyramid:weight_b:turbo=1:pass=1 
-ofps 24000/1001 -of rawvideo -o video.264

<pass2>
$mencoder rip.vob -vf pullup,softskip,crop=720:352:0:62 -nosound -ovc x264 
-x264encopts 
bitrate=1000:subq=6:frameref=6:4x4mv:8x8dct:me=3:bframes=3:b_pyramid:weight_b:pass=2 
-ofps 24000/1001 -of rawvideo -o video.264

<put video in mp4 format, mkvmerge doesn't accept raw x264 nor x264 in an avi 
file (properly)>
$MP4Box -fps 23.976025 -add video.264 video.mp4

<dump audio to wav>
$mplayer rip.vob -vo null -ao pcm:file="audio.wav"

<encode wav to ogg>
$oggenc -q8 audio.wav

<stick together in matroska file>
$mkvmerge -o rip.mkv audio.ogg video.mp4

<watch with mplayer>
$mplayer -fs rip.mkv
this makes a sweet rip with hiq ogg and x264 video.  the output format 
rawvideo encodes only the video, you can't encode audio at the same time.  I 
didn't want to anyway, since I wanted to use ogg.
You have to use .264 as the file extension for MP4Box (which I renamed as root 
to mp4box hahahahaha  wtf?).
(#mv /usr/local/bin/MP4Box /usr/local/bin/mp4box)

mp4box is part of mpeg4ip.  mkvmerge is part of mkvtoolnix.

for ipod, you would have to use faac or something for the audio, and of course 
you'd have to scale it or whatever down to the right size.  I don't have an 
ipod video (yet!!).
(also, you'd have to change the commands for mp4box to include the audio, and 
of course skip the mkvmerge step.)

I hope this helps someone.
I wanted to do it because I'm going to stick both the discs together into one 
file using mkvmerge.
-- 
http://www.shadowrise.com



More information about the MEncoder-users mailing list