This tutorial explains the process of converting an MPEG-1 or MPEG-2 DVD file into an AVI file containing MPEG-4(nbsp)ASP video (this is often incorrectly called “DivX” or “Xvid” - see the Common myths article for an explanation of the words DivX and Xvid and the difference between software and format).
There are several programs available online which allow you to convert DVDs to MPEG-4(nbsp)AVI, using tools such as the popular MEncoder. The difference between Avidemux and these other projects is that Avidemux allows you to edit the file before encoding it, and to do a visual check of what you are doing.
mplayer dvd://1 -dumpstream -dumpfile rippeddvd.vob
This will create a file in your working directory called rippeddvd.vob. This is an Avidemux compatible VOB file in MPEG format with the various audio streams included on the DVD.
Load this rippeddvd.vob file into Avidemux by either clicking the “Open” folder icon in the toolbar, or going File→Open.
You will now be presented with a dialog box with a dropdown list of audio stream choices. This is where you pick which audio track on your DVD you want to use for your video. Generally the default, or first in the list is the best choice. Click “OK” to begin indexing the MPEG. This may take a number of minutes depending on the speed of your machine.
Note: Avidemux does not read MPEG streams. It has been designed to read an MPEG stream index. An MPEG stream index is a plain text file containing a description of the MPEG and the location of frames throughout the stream. This file allows Avidemux to random seek and stay accurate. Said otherwise, without the index, Avidemux cannot handle MPEG files.
Some DVDs are coded as 23.976(nbsp)fps aka FILM (most movies actually). Some others are coded as 29.96(nbsp)fps (NTSC), soap for example. In the first case, the DVD player does an operation to convert it on the fly to NTSC format (telecine). So the MPEG header always says 29.96 as it will always be the final format.
Avidemux uses mpeg2dec to decode MPEG streams (with a little patch). mpeg2dec does not do the telecine on FILM movie (and that's better that way).
It means that Avidemux cannot tell the difference between FILM and NTSC. So if the MPEG looks progressive (not interlaced) and obvious desync appears (and gets worse and worse), use Video→Frame Rate and set it to 23.976.
For PAL MPEG, there is no problem, it is always 25(nbsp)fps.
If audio is present, Avidemux will try to guesstimate if the video is 23.976 by comparing audio and video duration.
Cropping removes the black borders along the top and bottom of the video in a widescreen format DVD. It allows more data to be used in encoding actual picture information. Without cropping, the sharp edges would radically reduce picture quality in these areas, as the MPEG based codecs do not handle them well. Always make sure you remove all borders completely, even if they're only half-black or unclean.
You probably want to resize the video to something smaller. Lower resolution means higher bits/pixel ratio, which may improve quality at lower bitrates that are typical for MPEG-4.
Also, AVI files do not contain aspect ratio information (but it can be stored inside the MPEG-4 bitstream), so you'll have to resize the video after cropping to get the correct aspect ratio. The aspect ratio is the shape of a pixel. On a PC it is mostly square, however, on a DVD it could be 4:3 or 16:9.
So, bring back up the video filter list.
Depending on the source, you may want to add more filters (subtitling, denoiser, deinterlacer, IVTC etc.).
At this point, the video is ready for any editing/cutting you may wish to do.
Now choose the video encoder from the drop down list. The two MPEG-4 encoders supported by Avidemux are Xvid and FFmpeg(nbsp)(libavcodec)(nbsp)MPEG-4. Both are very good and more or less comparable, so it's up to you which one you prefer. We'll use Xvid in this tutorial, as it's currently better supported in Avidemux and therefore recommended.
Click the Configure button and you will be presented with the Xvid Configuration window. It is highly recommended to use 2(nbsp)pass encoding so you can select your final file size. Don't worry about the final file size, and set the options as you would like to have them and click OK to save the settings.
Now use the Calculator, make sure Format is AVI, select your medium (i.e. final file size), and click Apply. This will automatically fill in the file size in the Xvid Configuration window. The calculation results will be displayed in the window. You can close this window now.
The first step is to choose which audio track to encode. By default the first audio track is selected which on a DVD should be the main language of the DVD (i.e. English for Region(nbsp)1). To choose another main audio track go to Audio→Main(nbsp)Track and use the drop down box to select the internal audio track you want, or if you desire you can choose an external audio source. If you want a second audio track to be encoded use Audio→Second(nbsp)Track.
At this point you want to check the audio sync. Turn on the filtered output preview mode and make sure the audio is synced, if it's not, use the Shift feature to correct this.
Next you must decide which encoder to use. MP3 via LAME is the most supported format. Keeping the default AC3 track is also a very good option for 5.1(nbsp)sound. Recompressing from an already lossy compression will never sound as good, the file size savings won't be too great in using another codec, and you will save time in not compressing the audio.
Finally you must decide if you need or want any filters.
Now select File→Save→Save Video and wait. Avidemux will do pass 1 then switch to pass 2 (including audio). The result will be an AVI file with MPEG-4(nbsp)ASP video and MP3 audio inside.