Advertisment

An Entire DVD Movie on a CD!

author-image
PCQ Bureau
New Update

Video compression is a boon; you can fit an entire DVD movie in a regular CD by compression. DivX is one of the most popular video compression formats today and we will see how it works. Please note that though you’re legally allowed to backup DVD movies for personal use, you cannot, in any way, distribute or share them.

Advertisment

Ripping the DVD



Ripping means stripping tracks off a medium in exactly the same manner as they are written on the medium (CD or DVD).

A DVD is divided into ‘titles’ and data is stored on them as VOB (Video Object) and IFO (Navigational Information) files.

The VOB files store the MPEG-2 video stream and AC3/ PCM/ MP2 audio stream. They also store subtitles in the form of transparent images that are superimposed on the movie while playing. Though the audio appears as tracks in different languages, the video stream can also be ‘multiangle’. The largest VOB on a DVD will obviously be the main movie. The movie is split into multiple 1 GB files, the information about which is stored in the VTS file (Video Title Set). For example, Vts_01 title will have files like Vts_01_01, Vts_ 01_02 and so on. 

Advertisment

A DVD ripper like SmartRipper rips files from a DVDThe corresponding IFO file will have information on how the VOBs could be played back and data on the subtitles and audio track to be used. Thus, the IFO file is called whenever a ‘title’ is called by the player. Let us look at the actual ripping process now.

There are several DVD rippers available on the web like vStrip, DVDecrypter and SmartRipper. For the sake of simplicity, we will use SmartRipper. Put your DVD into the DVD drive and start the SmartRipper application. It will detect the DVD, load it, select the largest VOB (the main movie) and show its information in the interface. This information includes total playing time, data rates, size and video information like format, TV system, aspect ratio and resolution. Note the video information, as you will need it during resizing/ cropping and compression stages. Highlight the title, select a target folder and hit the ‘Start’ button. The process of ripping takes time and you will have a set of VOBs, IFO and other files as final output. Ensure that you have sufficient space on hard disk to store these files (you will need the same amount of space on the hard disk as the capacity of the DVD disc). 

Extracting Audio and Video



We will now separate the video (MPEG 2) stream and audio (AC3 or WAV) for applying compression algorithms to them. This process is called Demuxing and we use a software called DVD2AVI for the purpose. Start the DVD2AVI application. Go to File, Open (or hit F3) and go to folder containing extracted VOBs. Select the first VOB in the list (say vts_01_1.vob) and click ‘Open’. The software detects the complete sequence of VOB files and shows them in a file list. Click ‘OK’. 

Advertisment

Encoding to DivX takes time and depends on machine configurationIn the ‘Video’ menu, select YUV as the color space and check that ‘Field Operation’ is set to ‘None’. Select the audio track. Usually, Track 01 is the first language (English) of the DVD. Also check ‘Demux’ in Dolby Digital options in the ‘Audio’ menu and hit F5 for preview. A statistics window will pop up and the movie will preview in the main window. Let the movie play for some time and note the Frame Type and Video Type as it proceeds. You need not do anything if the Video Type is PAL and Frame Type is Progressive. If Video Type shows FILM 95% or more and Frame Type as Progressive, then check ‘Forced FILM’ from the ‘Field Operation’ option in the ‘Video’ menu. Note the Aspect Ratio, hit ‘Esc’ to stop preview and Press F4 to save your project (remember the location). Close the application, once it is through with demuxing the AC3 from your movie. 

Encoding the video



Now, it is time to encode video to DivX (or any other compression algorithm of your choice). Though we’re using VirtualDub for the purpose, DVD2AVI can be used as well. Start VirtualDub and open the .AVS file you saved in the last step. Check ‘No Audio’ from the ‘Audio’ menu and ‘Fast Recompress’ from the ‘Video’ menu. Press Ctrl+C to open the video compression window and select the codec you want to use (DivX Pro 5.0 in this case). 

Configure the DivX codec according to the settings you want. The DivX encoder has a lot of settings, an explanation of which can be found at

www.divx.com/support/divx/guide.php. Hit F7 to save the DivX video file. Encoding takes time, so go out and have lunch or take a nap! Encoding time also depends on the machine configuration. DivX encoding uses raw CPU cycles, so faster the processor, lesser the encoding time.

Advertisment

Converting the audio



The audio file obtained from DVD2AVI was an AC3 file. You can keep the file as it is and add to video or downmix it to two channels (stereo) and encode it to MP3 to reduce final movie size. 

We should first downmix the AC3 file to a standard WAV file. Softwares for decoding AC3 audio to WAV are available on the Internet. Two of them are AC3Tool and Xfilez Inc.’s AC3 Decoder. While the latter is a simple decoder, the former allows you to experiment with several downmixing settings. Load your AC3 file into any decoder and save it as WAV. 

Encoding audio and muxing



Audio encoding and muxing can be done simultaneously. Now with the DivX video file and WAV audio file in hand, VirtualDub comes to the rescue again. Load the video file in VirtualDub. Set Video settings to ‘Direct Stream Copy’ and Audio to ‘WAV Audio’. Point to the WAV file obtained in the previous step and check ‘Full Processing Mode’ in audio. Go to Audio > Compression and select MPEG Layer 3 as the audio codec. Select encoding bit rate and sampling frequency (Note: higher bit rate and sampling frequencies mean better sound, but higher file sizes). 

For muxing, press Ctrl+I to invoke Audio/ Video Interleave options. Leave ‘Preload Audio’ to 500 ms and ‘Audio Skew correction’ to 0 ms (defaults). Change the ‘Interleave audio every’ setting to 2 frames (instead of default 1 frame). Click ‘OK’. Hit F7 to save your final encoded movie, sit back and relax while the audio encoding and muxing happens.



Burn your final DivX movie onto a CD-RW and there you are! Of course, you will need the DivX codec installed on the machine you want to play the movie on.

Ashish Sharma

Advertisment