|Extract content from a DVD||Viewing Page 3 of 4 -- Go To|
Processing and preparing VOB files
Once you have extracted all the titles and menus you want, you may be done. On the other hand you may still have some work to do. If you plan to open your VOB files in AviSynth you will want to use the DGDecode plugin, which requires that you index them with DGIndex first. DGIndex can also be used to demux VOB files, extracting separate video and audio files. It can also save individual frames as bitmap (BMP) files. If you need to extract subtitles into separate files, you can do it with VobSub.
Among the reasons you may need to extract the audio is to adjust the delay. When DVD Shrink extracts a title which starts in the middle of a VOB file it often gives you a file with audio that starts several hundred milliseconds before or after the video. Some programs are able to deal with those big delays, but many aren't. In fact some will only work when there is no delay. A program called DelayCut can fix those delays, either by trimming excess audio or padding it with silence.
Indexing and demuxing with DGIndex
DGIndex is one of the oldest DVD processing tools in use today. It is primarily used to create D2V files, which are essentially indexes to help AviSynth parse MPEG-2 (or MPEG-1) files. Both DGIndex and DGDecode, the AviSynth plugin, can be downloaded together. Due to licensing concerns, the program's author only offers the sourcecode on his website, but it can be downloaded from the homepage of the HC MPEG-2 encoder.
Opening VOB files
Start by dragging your VOB file(s) to the DGIndex window. If you have more than one VOB file in a set (ie VTS_01_1.VOB, VTS_01_2.VOB, VTS_01_3.VOB, etc, ...) you can select them all in Windows Explorer by holding down holding down the CTRL key while you click on each one. DGIndex will show you the list of files to be opened. Click the OK button.
1. Audio Options
- Select Output Method from the Audio menu and set it to Demux All Tracks.
2. Video Options
- Select Field Operation from the Video menu. Set it to Honor Pulldown Flags.
- Press the F5 key on your keyboard and DGIndex will read your VOB files to determine what type of video you have.
- The Information dialog appears automatically as DGIndex runs the Preview. If you're not sure whether you have PAL or NTSC video, whether it's interlaced or progressive, or whether there are pulldown flags, you can find all that out here. A Frame Rate of 29.97 fps and Video Type of Film means video encoded at 23.976 fps with Pulldown flags to turn it into NTSC. Before creating a D2V project file you will want to return to the Video options and switch from Honor Pulldown Flags to Force Film. You can stop the Preview at any time by pressing the ESC key on your keyboard.
3. Set Start/End Frames
- To extract a single frame as a bitmap file, use the < and > buttons to find the frame you want.
4. Create project / Demux audio and video / Save bitmap
- On the File menu you will find multiple output options.
A. Save Project
- Create a D2V project file for AviSynth and extract the audio streams. Audio streams will have a name that reflects whether they start before, after, or at the same time as the video.
B. Save Project and Demux Video
- Create a D2V project file for AviSynth and extract both the video and audio streams. Audio streams will have a name that reflects whether they start before, after, or at the same time as the video.
C. Save Bitmap
- Save the current frame as a bitmap (BMP) image file.
D. Demux Audio-Only Stream
- Extract audio streams to separate files. File names will not reflect whether they start before or after the video.
When DGIndex finishes processing your VOB files, you will have one or more additional files, which may include D2V project files (.D2V), Audio files (.AC3, .WAV, or .DTS), Bitmap files (.BMP), and log files from the processing operation (.log). In some cases DGIndex will find field order problems with your video. It will correct them and save an information file (.bad).
Convert still images to JPEG or PNG with MS Paint
If you are using a still image from a DVD menu, extracted as a bitmap by DGIndex, which you want to use in your own project you may find that you need it in a different format for compatibility with a particular piece of software. Most commonly this will mean converting to either JPEG or PNG. Fortunately Paint, the simple image editor which is a standard component of Windows, can do this easily.
Start by dragging your BMP file to the Paint window to open it. Then select Save As from the File menu.
In the Save dialog, you can select what format your new file should be in.
Correct audio delay
After you extract the audio from your VOB files with DGIndex, you should notice a delay value given in the filename. Ideally there will be no delay, in which case it will say DELAY 0ms. If the audio is supposed to start before the video it will have a negative value, such as DELAY -17ms. If it starts after the video it will look like DELAY 17ms.
In most cases a delay is nothing to worry about, but there are some cases where it may cause problems. Some software will assume there is no delay and won't have any way to adjust it when there is. If the delay is very large, hundreds of milliseconds for example, even software which can handle audio delays may have problems.
The solution to this is to either trim the beginning of the audio stream or pad it with silent audio. This is possible because audio files are broken into groups of samples called frames. Using DelayCut you can add or remove frames to compensate for audio delay. Keep in mind that each frame will have a set number of samples, so it may not be possible to get the delay to exactly 0. Dolby Digital (AC-3), for example, uses 32ms frames. That means if the delay is 40ms DelayCut will only be able to reduce it to 8ms. Fortunately, an 8ms delay isn't something you are likely to notice, so this isn't as big a deal as it might seem.
1. Open audio file
- Use the Browse button to select an audio file to correct. Before you open your file, make sure to note the amount of delay in the filename.
- Enter the delay from the filename in the Start msec field under Delay. Make sure to keep the number negative if the file from DGIndex says it is. Otherwise you will end up doubling the delay instead of removing it.
3. Not Fixed Delay
- DelayCut will determine how many frames to add or remove and then calculate a new delay. Keep in mind that it only works with entire frames, so the delay may just end up very small instead of 0.
4. Output file
- Use the Browse button to select the location of the output file. In the Select output file dialog you can click on the original and edit the name in the File name field. You should change it to reflect the new delay in case you want to use it in software which will set the delay based on this information.
- Click the PROCESS! button to save the delay corrected file.
One thing DGIndex can't do is extract subtitles from VOB files. Fortunately this is easy to do with VobSub. DVD subtitles are actually stored as subpictures, which just means they are a series of still images rather than actual text. There are also other types of subpictures, such as those used for things like the famous Follow the White Rabbit feature on The Matrix. Additionally, the menu highlights for menu buttons are also subpictures.
VobSub is actually a package of several subtitle tools. For extracting subtitles we will be using VobSub Configure.
Click the Open button. In the Open dialog you will need to change Files of type to Ifo and Vobs. The VOB files contain the subpicture streams, but the IFO files are required to get additional information about them, such as what language they are in.
Next you will be asked where you want to save your Subtitle files. It's best if you choose a location other than where the IFO and VOB files are. I usually just make a subfolder for them. When I save multiple subtitles from the same title, I also make separate subfolders for each language.
Finally, you will need to decide which subtitles to extract. In most cases you should only extract one stream at a time. That means removing all other streams, which you can do by selecing them on the right and then clicking the left arrow button.
Click the OK button and VobSub will extract your subtitle file. Repeat the process for any additional subtitles you wish to extract.