Quote:
Originally Posted by chicagocoyote
Maybe some day, handbrake/mplayer/libdvdcss will be able to deal
with this.
|
This is not a CSS problem. libdvdcss is doing it's job perfectly (otherwise you would not be seeing ANY scenes from the movie, forget about them being in the correct order). handbrake and mplayer deal with it fine too, if you know how to use them, and feed appropriate data to them correctly.
For starters:
(1) You need libdvdcss. You've already got that.
(2) You need to find the correct track to rip. Several people above have already told you how to do this.
(3) You need to rip using "dvdnav", not "dvd".
Those three steps should be enough to get you started.
While this is not CSS causing your issues, it
is a form of copy protection. The production of the DVD intentionally includes many bogus titles that have the various things messed up. Scene order is one such thing (but you will run into others - intentional bad sectors, etc.) When you rip with "dvd" it just runs down the scenes in the linear order it finds them. And that linear order has them mixed up in regards to viewing order. And if they threw in intentional bad sectors, "dvd" tries to read these too (in linear order) and chokes. "dvdnav" knows how to navigate the other tables on the DVD to rearrange the scenes into correct order. And dvdnav also navigates around the intentional bad sectors. "dvd" does not know how to do any of this. Another copy protection scheme you will run into is scrambled directory structure. You will see this if you mount the DVD and then run something like "du -sh" on the mountpoint. That will return something ridiculous, like 50Gb, which can't possibly fit on a DVD. With this copy protection scheme, if you do an "ls" on the mountpoint, you will almost always see 99 tracks. These two findings pretty much go hand in hand. You don't want to try to rip the entire DVD if you encounter this directory scrambling scheme. You will end up with one monstrous file that isn't going to be useful. Go for ripping the one track you need. The intentional bad sectors scheme will mess up an "entire DVD" rip as well, so don't try it. Of course, you won't know about the bad sectors until you TRY to rip it, and see all the errors. At that point, abort, and go for a different method. Remember, "dvdnav" is your friend.
Below are some commands you may want to investigate, since you said you want to learn. I cut-n-pasted them from several different PERL scripts I have written over the years to work with DVD's. Because I am not trying to create a tutorial on DVD copying, which is probably illegal in many localities, these commands are intentionally in random order. And some commands are quite archaic and won't work anymore with newer copy protection schemes. But this could serve as a good investigation/learning experience. But the commands below, chosen approprietly for the copy protection scheme at hand, applied in the correct order, should result in you being able to copy anything you want from the command line. I haven't found anything I couldn't copy yet - I use this to rip my personal DVD's and put them on my media server, or create backup copies of the DVD's I really love. I have not messed with Bluray yet, because I don't own any of those disks, so I have nothing to try to rip for my media server.
After you successfully rip a DVD, there's nothing wrong with switching from commandline to some GUI-based tool like handbrake or DVDshrink (run under Wine) if that's what you prefer to do for the remainder of the operations.
Some commands you might want to learn what they do:
---
dvdbackup -Mv -i /dev/dvd
mplayer -frames 0 dvd://$TITLE//$READ_DEVICE 2>&1 | egrep "^audio stream"
dvdxchap -t $TITLE $READ_DEVICE
mplayer -nocache -dumpstream -dumpfile $RIPFILE dvdnav://$TITLE//$READ_DEVICE 1>&2
vamps -v -a $AUDIO_STREAM <"$RIPFILE" >"$VOBFILE"
VIDEO_FORMAT=NTSC dvdauthor -o "$OUTPUTDIR" -x "$XMLFILE" 1>&2
tcrequant -i "$M2VFILE" -o "$SHRINKFILE" -f "$FACTOR"
growisofs -use-the-force-luke=notray -Z $WRITE_DEVICE -speed=$WRITE_SPEED -dvd-video "$OUTPUTDIR" 1>&2
mplayer -nocache -dumpvideo -dumpfile $M2VFILE dvdnav://$TITLE//$DEVICE
vamps -v -e $FACTOR -a $AUDIO_STREAM <"$VOBFILE" >"$MPGFILE"
mplayer -nocache -alang en -dumpaudio -dumpfile $AC3FILE dvdnav://$TITLE//$DEVICE
mplex -f 8 -o "$MPGFILE_TEMPLATE" "$MPLEXFILE" "$AC3FILE"
tcextract -i "$VOBFILE" -t vob -x mpeg2 > "$M2VFILE"
vobcopy -l -n $TITLE -t $VOBFILE
tcextract -i "$VOBFILE" -t vob -x ac3 -a "$AUDIO_TRACK" > "$AC3FILE"
cat > $XMLFILE << 'fubar'
<dvdauthor>
<vmgm />
<titleset>
<titles>
<pgc>
<vob file="movie1.mpg" chapters="$CHAP_LIST" />
</pgc>
</titles>
</titleset>
</dvdauthor>
fubar