You are not logged in.

#1 2009-06-30 04:06:08

wreck
Member
Registered: 2008-03-22
Posts: 18

DVD to MKV with mencoder confusion

I apologize in advance if the questions that follow seem trivial.  I've read the relevant wiki article which only created more questions.  I understand the concept of mkv as a container similar to avi for video and audio files.  The wiki article provides the following example for encoding a single title/chapter with h264 into a .avi file for use in a mkv file.

#First passage: we are just collecting informations so the normal output is thrown away.
mencoder -dvd-device "$ISO" dvd://"$TITLE" -chapter "$CHAPTER" -o /dev/null -nosound -ovc x264 \
-x264encopts direct=auto:pass=1:turbo:bitrate=900:bframes=1:\
me=umh:partitions=all:trellis=1:qp_step=4:qcomp=0.7:direct_pred=auto:keyint=300 \
-vf scale=-1:-10,harddup

#Second passage: here we compress the video track using the informations from the first step.
mencoder -dvd-device "$ISO" dvd://"$TITLE" -chapter "$CHAPTER" -nosound -ovc x264 \
-x264encopts direct=auto:pass=2:bitrate=900:frameref=5:bframes=1:\
me=umh:partitions=all:trellis=1:qp_step=4:qcomp=0.7:direct_pred=auto:keyint=300 \
-vf scale=-1:-10,harddup -o video.avi

My first question would then be, how can I simply rip the entire DVD, including menus, into a single .avi file that will later be encapsulated with mkv?  This doesn't seem to be a problem with audio files, as mkvmerge allows for several audio track entries to be passed in the merge process:

mkvmerge -D audio.avi -A video.avi -o mymovie.mkv

Or do I have it all wrong?  Will I need to encode each chapter/title and corresponding audio track into an mkv and then merge the final mkv files into a single mkv?  Finally, how can I read a DVD disk or ISO file to view the chapter/title information?

Any and all advice is greatly appreciated.  Thanks!

Last edited by wreck (2009-06-30 04:07:59)

Offline

#2 2009-06-30 19:04:30

wreck
Member
Registered: 2008-03-22
Posts: 18

Re: DVD to MKV with mencoder confusion

It is clear to me now that video tracks on DVDs must be ripped individually as per the wiki article.  However, one question remains:

How can I read a DVD/ISO to view the chapter/title information using mencoder or mkvtoolnix?

Offline

#3 2009-06-30 19:16:08

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: DVD to MKV with mencoder confusion

not sure if this will help, but here goes anyway.

a while back a wrote a script that copies a standard dvd to disc, compresses the video via mencoder, then authors a new 4.3 GB dvd to be burnt.  very useful.

anyhow, part of this process involved extracting chapter and title info.  i didn't use mencoder or mkvtoolnix but here's what i did do:

DEV="/dev/sr0"
WD="/tmp/ripping"

# extract title info into a file
vobcopy -I $DEV > $WD/title.txt 2>&1

# find the longest title from looking at that file 
TITLE=$(awk '/Most\ chapters/ {print $6}' $WD/title.txt)

# extract the chapter info into another file
tcprobe -i $DEV -T $TITLE -d 8 > $WD/probe.txt 2>&1

# get the chapter markings by looking at that file 
egrep "\[Chapter ..\] " $WD/probe.txt | cut -d " " -f 4

Last edited by brisbin33 (2009-06-30 19:16:35)

Offline

Board footer

Powered by FluxBB