From: (Kevin the Drummer) Newsgroups: comp.os.linux.misc
Subject: dvdbackup, dvdshrink, transcode
User-Agent: slrn/ (Linux)
Date: 12 Jul 2006 23:19:42 GMT

I've backed up a few of my kids' DVDs since they're a bit hard on them. But, some of the DVDs inflate to be larger than will fit on a single-layer DVD suitable for playing in a DVD player. I've looked on the Net for some simple way to shrink the DVD video data back to a size that I can burn, and that will play in the player. The most comprehensive info I can find is 4 years old, now. There's been a lot of usability improvements in that time, in general. Is there something fairly new that I could look at, to learn how to solve my problem?

FWIW, I've been using dvdbackup & growisofs for DVDs that stay below the size limit. I've also used dvd::rip and a whole lot of command-line stuff to do other burning, which is a real pain, mainly because it creates coasters 80-90% of the time.

From: (Kevin the Drummer)
Newsgroups: comp.os.linux.misc
Subject: Re: dvdbackup, dvdshrink, transcode
User-Agent: slrn/ (Linux)
Date: 13 Jul 2006 15:41:58 GMT

Dances With Crows ( wrote:


Just had a look at that link. It looks promising.

From: "Amadeus W. M." (
Newsgroups: comp.os.linux.misc
Subject: Re: dvdbackup, dvdshrink, transcode
Date: Thu, 13 Jul 2006 15:56:13 -0400
User-Agent: Pan/ (As She Crawled Across the Table)

It is possible to shrink a DVD (even a dual-layer) to fit to a 4.3GB disk. The process is called requantization. In the transcode suite, that's done by tcrequant. You need to specify a requantization factor, which you must compute beforehand using elementary arithmetic, or, e.g., using streamanalyze.

You extract the video and audio channels separately from the DVD to orig_video and orig_audio. You keep the original audio, but you will want to requantize the video, so that...

requantized_video + orig_audio < 4.3GB

This gives you the size or requantized_video, and then the requantization factor is...

f = orig_video/requantized_video

This is what you must pass to tcrequant. Then, you multiplex back the requantized_video + orig_audio.

(ratio of original/requantized <= 1.5 yields good quality; above 2 is not good.)

Here is a little script that does this. If you have streamanalyze, you can use that to compute the requantization factor. Otherwise, just break the script after it extracts the video and audio, then look at the sizes.


# default values

factor=""                     # requantization factor (e.g. from streamanalyze)
title=1                       # 
audio=0                       # audio track; usually 0 for english
device=/dev/dvd               # input device (could be anything)
name=movie                    # name of the output 

while getopts "r:t:a:i:o:" opt
  case $opt in
      r) factor=$OPTARG;;
      t) title=$OPTARG;;
      a) audio=$OPTARG;;
      i) device=$OPTARG;;
      o) name=$OPTARG

shift $(($OPTIND-1))

echo "Output name: $name"
echo "Title: $title" 
echo "Audio track: $audio"
echo "DVD device: $device"
echo -n "Requantization: "
if [ -z $factor ]; then
    echo "NONE"
    echo "$factor"
echo ""

sleep 1

function getchapters {

    tcprobe -i $get_device -T $get_title -H 10 2>&1 | egrep "\[Chapter ..\] " | cut -d " " -f 4 | perl -pi -e 's/\n/,/' | perl -pi -e 's/,$//'

rm -f *.fifo

echo "Reading chapters..."
echo ""
getchapters $title $device > $name.chapters

echo "Extracting video and audio streams and requantizing..."
echo ""
mkfifo vid.fifo
mkfifo aud.fifo
# mkfifo sub.fifo

echo -n "Video..."
if [ -z $factor ] ; then
    echo " requantization"
    tcextract -i vid.fifo -t vob -x mpeg2 > $name.m2v &
    echo "...requantization factor: $factor"
    tcextract -i vid.fifo -t vob -x mpeg2 | tcrequant -f $factor > $name.m2v &

#echo "Extracting video..."
# tcextract -i vid.fifo -t vob -x mpeg2 > $name.m2v &
#tcextract -i vid.fifo -t vob -x mpeg2 | tcrequant -f $factor > $name.m2v &

echo "Audio..."
tcextract -i aud.fifo -t vob -x ac3 -a $audio > $name.ac3 &

# echo "Extracting subtitles..."
# tcextract -i sub.fifo -t vob -x ps1 -a 0 > $name.sub &

echo "tccat..."
# tccat -i $device -T $title -L -P | tee aud.fifo vid.fifo > /dev/null
#tccat -i $device -T $title -L -P | tee aud.fifo vid.fifo sub.fifo > /dev/null
# tccat -i $device -T $title,-1 -L | tee aud.fifo vid.fifo sub.fifo > /dev/null
# tccat -i $device -P $title -t dvd | tee aud.fifo vid.fifo > /dev/null
#tccat -i $device -P $title -t dvd | tee aud.fifo vid.fifo sub.fifo > /dev/null
# tccat -P $title -i $device -t dvd | tee aud.fifo vid.fifo sub.fifo
# tccat -P $title -i $device -t dvd | tee aud.fifo vid.fifo > /dev/null

time tccat -i $device -T $title,-1 -L | tee aud.fifo vid.fifo > /dev/null

echo "Multiplexing..."
echo ""
mplex -f 8 -S 0 -o $name.mpeg $name.m2v $name.ac3
# mplex -f 8 -S 0 -o movie.mpeg $name.m2v $name.ac3 $name.sub
# tcmplex does not work well with dvdauthor (audio is moving backwards);

# clean up - before author, to save space.
# rm -f *.fifo
# rm -f $name.m2v $name.ac3

echo "Authoring..."
echo ""
# dvdauthor -t -a ac3+en -c `cat $name.chapters` -o $name $name.mpeg
dvdauthor -t -c `cat $name.chapters` -o $name $name.mpeg && dvdauthor -T -o $name

From: (Kevin the Drummer)
Newsgroups: comp.os.linux.misc
Subject: Re: dvdbackup, dvdshrink, transcode
User-Agent: slrn/ (Linux)
Date: 18 Jul 2006 15:43:58 GMT

Florian Diesch ( wrote:

> I'm using k9copy ( for some time, now.

With the aid of lsdvd, streamanalyze, streamdvd, and dvdauthor, I managed to create a backup copy of the main title of a commercial DVD.

Is there a tool that will allow me to make a backup copy of multiple titles, preserving the navigation menus, of an encrypted commercial DVD? Will k9copy do this?

Florian Diesch replied "Yes". In a follow-up, Kevin elaborated on further results:

I uses lsdvd to find out that title 10 was the main title.

I used streamanalyze to find out that title 10 would fit on a single DVD.

I used streamdvd to rip title 10 off the DVD and put it into an MPEG, like so:

    streamdvd -i /dev/dvd -t 10 > backup.mpg

I used dvdauthor to create the DVD structure, like this:

    dvdauthor -t -o ./backup -f backup.mpg
    dvdauthor -T -o ./backup

I used growisofs to burn the DVD, like this:

    growisofs -dvd-compat -dvd-video -Z /dev/dvd ./backup

The DVD plays in the one DVD I tried. It skips quite a bit, but then so does the original, just not as much. I haven't tried the good DVD video player I've got yet.

I thought I should follow up with the specifics of how I got the above to work. I plan to try the same recipe using requantizing features of streamdvd, just to make sure I can get that to work.