Gentoo Wiki



Why convert a DVD to [insert medium]?

The purpose of this HOWTO is to allow people to backup their movies onto other media, as most people don't have the luxury of a DVD burner.

NOTICE: If you're in the United States, backing up your movies is legal, but breaking CSS encryption isn't. See

Choosing Desired Method

There are two ways to do this, you can either take the easy route with media-video/tovid, or you can use media-video/avidemux to do some fine adjustment. Please choose the one you want to use and skip the other, the steps/packages do not need to be combined.

Installing Required Packages

emerge -av media-video/mplayer [media-video/avidemux or media-video/tovid] media-video/vcdimager

media-video/tovid is not currently available in portage so you will need this ebuild if you're taking the easy route. Look for the one with the most recent date: Directions on how to use it can be found at: HOWTO_Installing_3rd_Party_Ebuilds

Dumping Video From Your DVD Device or Source Files

Play the video first in mplayer to see if you have language problems (mplayer -v -dvd-device /dev/dvd) and if you do stop it right away and scroll up in your terminal to see the available options in the output, then use -aid to specify which one you want in mplayer and mencoder. Also it would be wise to determine if mplayer detects the size of your video correctly by playing it in mplayer (command above) and see if it looks deformed. If it is indeed deformed make sure you write down the correct aspect (4:3, or 16:9) for use with tovid as it uses mplayer to detect the aspect by default.

To extract the video from your DVD we will use mencoder's raw copy option (change your -dvd-device option as you see fit, or leave it out if mplayer knows where it is):

mencoder -ovc copy -oac copy -dvd-device [device | folder] dvd://[Title] -o movie-raw.mpg
mencoder -ovc copy -oac copy -dvd-device /dev/dvd dvd:// -o movie-raw.mpg

If for some odd reason you have the contents of your DVD in your filesystem, adjust the syntax of -dvd-device to the folder containing the DVD source files (aka \*.VOBs, \*.IFOs, and \*.BUPs). Replace [Title] with the title that you want converted (usually 1).

mencoder -ovc copy -oac copy -dvd-device ~/my_movie/ dvd:// -o movie-raw.mpg

Resizing and/or Re-encoding the Video Dump

Using media-video/tovid

Now its time to re-encode the video that is suitable for your VCD medium or player. Note that american NTSC is default and if you need PAL, use -pal as one of the options for tovid. Also, if you found that mplayer didn't detect the aspect of the video, use -full for 4:3 and -wide for 16:9, check out the man page for more information if you use another non-standard ratio (and mplayer doesn't detect it correctly). The -out only needs the PREFIX of the movie name, and not the entire thing as it will name itself using the right extension. You can also use tovid to encode to dvd media with -dvd instead of -vcd or -svcd, consult the man page for other mediums.

For a significant speed increase use -ffmpeg as one of the options, note that this is "EXPERIMENTAL" and doesn't support KVCD/KDVD, for the purpose of this HOWTO I'm going to leave it out to preserve compatibility.

For a VCD use:

tovid -vcd -in movie-raw.mpg -out movie

For SVCD use:

tovid -svcd -in movie-raw.mpg -out movie

Please skip the section directly below if you have already completed this set of instructions.

Using media-video/avidemux

WARNING: media-video/avidemux cannot split video according to medium like media-video/tovid can, if you cannot gauge the VCD ready resulting video file from media-video/avidemux (and the fact that it will fit on a standard CD), then you will either need a medium that is larger than a CD or another utility that can accurately split the video file.

Start avidemux2 and open the file that you just dumped your DVD to. When it prompts you for Indexing make sure you choose Yes. Choose the correct AAC audio stream (default is usually OK).

Then on the left where it says Video select VCD. Then choose Filters and then click Add. Choose Crop from the list and use the values to trim any black borders you might have (if neccessary, seek to a point in which you have enough brightness to tell by using the scrollbar.)

After clipping unnecessary borders, choose VCD Res from the side panel and choose "16:9" for Source if you have a widescreen DVD, and 4:3 for Destination. (Use 4:3 for source if it applies.) Close the filters box.

Change the Audio to FFm MP2, then select configure and choose 224bit.

This part is a bit trivial, choose Info from the top bar, and note if the frequency is 48000 or 44100 khz. Then open Filter under audio and choose 48 to 44.1 khz only if you noted 48000 khz, otherwise choose None.

Almost done! Now for Format choose MPEG PS A+V and then save your new file as movie.mpg.

Making VCD Image

Now that you have the output of the movie as movie.mpg, its time to make an image. Note that if tovid determined it will take two discs to fit your movie on the medium you defined, it will automatically name the output files according to disc, e.g. movie1.mpg and movie2.mpg. Just repeat the following steps for each video file it created. For other mediums or broken dvd playes, consult vcdimager --help and the vcdimager man page for any extra options you may need.

Using vcdimager, create your images for vcd:

vcdimager -c movie.cue -b movie.bin -l "DISCNAME" movie.mpg

And for svcd:

vcdimager -t svcd -c movie.cue -b movie.bin -l "DISCNAME" movie.mpg

Burning the Image

I recommend using cdrdao for burning this (example):

cdrdao write --driver generic-mmc --speed 4 --device ATAPI:/dev/cdrw image-name.cue

CONGRATULATIONS! You've made a VCD from a DVD!

See also

Retrieved from ""

Last modified: Fri, 05 Sep 2008 20:44:00 +0000 Hits: 17,205