Duplicating and Combining DVDs

Friends and relatives have home DVDs they wanted to copy for other friends and relatives. Turns out this is rather easy. Use k3b:

On the menu, choose Tools/Copy DVD. Don’t forget there are three tabs worth of data to check.

Recently I got a request to combine movies on two discs. Now it’s getting interesting. This is a lot like the camcorder to DVD project I did except it involves starting with DVDs as a source instead of miniDV tapes. A little research turned up ripping instructions. Between these two references, I had enough to do the job.

The first step was to use k3b to rip the discs into two ISO files, movie1.iso and movie2.iso. Assuming movie1.iso was in /mnt/bigfiles, you could check it with xine dvd:///mnt/bigfiles/movie1.iso.

If they’re OK, mount them on the loopback device:

mkdir /mnt/iso
mount movie1.iso /mnt/iso -t udf -o loop=/dev/loop3

Then copy the files from /mnt/iso/VIDEO_TS that are named VTS*.VOB. These are the actual movie parts. Rename them from VTS_01_1.VOB to movie1.vob so you can tell them apart from the second movie.

Unmount the ISO with umount /mnt/iso and repeat with the second movie.

Next, get convert them to mpeg2 files (from here):

tcextract -i movie1.vob -t vob -x mpeg2 > movie1.m2v
tcextract -i movie1.vob -a 0 -x ac3 -t vob > movie1.ac3
tcextract -i movie2.vob -t vob -x mpeg2 > movie2.m2v
tcextract -i movie2.vob -a 0 -x ac3 -t vob > movie2.ac3

mplex -f 8 -o movie1.mpg movie1.m2v movie1.ac3
mplex -f 8 -o movie2.mpg movie2.m2v movie2.ac3

Next, create the XML file both_movies.xml:

<?xml version="1.0"?>
<dvdauthor>
<vmgm />
<titleset>
<titles>
<audio lang="en"/>
<pgc>
<vob file="movie1.vob" />
<vob file="movie2.vob" />
</pgc>
</titles>
</titleset>
</dvdauthor>

mkdir both_movies-dir
dvdauthor -o both_movies-dir/ -x both_movies.xml

Test with xine: xine dvd:///`pwd`/both_movies-dir

You can also create menus with dvdwizard (German site) or dvdwizard dvdwizard 0.4.2c (English site). It’s all scripts, so extract it in /usr/local/src and run it with a script like this:
#!/bin/sh
export PATH=${PATH}:/usr/local/src/dvdwizard-0.4.2c
dvdwizard -l dvdwizard.log -T "Big Combined Movie" -N NTSC -A en -t "First Movie" movie1.mpg -t "Second Movie" movie2.mpg

This will author a DVD in the directory ./dvd. Test it with xine dvd:///`pwd`/dvd.

If it looks OK, create an ISO: mkisofs -dvd-video -udf -o both_movies.iso dvd/. Then burn the ISO with k3b. Use the Tools/Burn DVD ISO Image menu option.