[MPlayer-users] mencoder dvd -> avi question

Aaron Peterson aaron at alpete.com
Sun Mar 14 23:51:58 CET 2004


I have this process I go through to make divx encoded movie files from
dvds.  some of it i've pinched from various documentation, including the
mplayer home page, and some I've come up with on my own.  It seems to work
out okay, but I just thought I'd ask here if I could speed up the process
or make it more efficient, or if I'm doing anything stupid that I can
avoid.

I usually make a full screen size high quality divx first using this
command that i basically copied from the mplayer documentation:

cat *.vob | mencoder -oac copy -ovc lavc -lavcopts
vcodec=mpeg4:vqscale=3:vhq:v4mv:trell -ofps 23.976 -o first_pass.avi

Now, this turns out beautifully.  From here I can see how big the file is,
and generally try to do some things to make it smaller so it fits on 2
cds.  I always go through this first step though, because if it's small
enough like this already, why scale down the screen size or encode mp3
audio or anything else to make the size smaller?

The resulting file IS usually too big though, so I do something like this:

cat first_pass.avi | mencoder -oac mp3lame -lameopts preset=standard:vol=8
-ovc lavc -lavcopts vcodec=mpeg4:vhq:v4mv:trell -vf scale -zoom -xy 640 -o
second_pass.avi -

now, the two things I'm trying to accomplish are encoding the ac3 audio to
compressed mp3, and resize the picture to 640px wide (from 720 usually). 
My concern though is that I'm re-encoding the video to mpeg4 from video
that's already mpeg4.  would i perhaps be better off just to start over
with the .vobs and add the extra encoding options?

Lastly, I usually want to split the file into two close to evenly sized
parts.  I use a couple commands like this:

mencoder second_pass.avi -oac copy -ovc copy -ss 0 -endpos 00:45:00 -o
second_pass-1.avi
mencoder second_pass.avi -oac copy -ovc copy -ss 00:45:00 -o
second_pass-2.avi

two things concern me here.  one is that it was suggested to me a while
back that using -oac copy and -ovc copy on a stream could lose audio/video
sync when copying raw dvd video.  i.e.:

mplayer -dumpfile dvdcopy.vob -dumpstream dvd://1

is preferable to:

mencoder -oac copy -ovc copy -o dvdcopy.vob dvd://1

so, by using the previously mentioned commands to split an avi (with -oac
copy -ovc copy) am i risking losing audio/video sync?

secondly, when i look at the play time for a dvd title, say it's an hour
and a half.  when i use -ss 0 -endpos 00:45:00 in the first command and
-ss 00:45:00 in the second command, the files don't come out the same
size.  generally, not even close.  I'm curious if this is due to a
variable bitrate being used and so the first part of the movie might
require more or less storage space than the last, or if there is something
wrong with the method i'm trying to use to split them.

Aaron




More information about the MPlayer-users mailing list