Conversion of DVDs (VOB files, etc)

Discuss about generic usage of MediaCoder.

Moderator: HuggiL

Posts: 3116
Joined: Tue Jun 23, 2009 2:45 pm
Location: Sydney, Australia

Conversion of DVDs (VOB files, etc)

Postby meRobs » Mon Dec 14, 2009 4:26 pm

[Updated 17 Dec 2011]

If the DVD has Copyright protection, it may be illegal in your country to copy or convert any of its content. For this reason, MediaCoder will fail on any attempt to do so. If it is legal to do so it may be ripped to the computer HDD with a freebie like DVDFab. Then, MediaCoder will access it.

When a movie (a DVD “Title”) is represented on a disc, the data is cut up into VOB chunks no bigger than 1 GB (see Fig. 1). The VOB files, the associated IFO files, which include navigation details, and the BUP files (copies of the IFOs) appear in a folder named: VIDEO_TS.
(!empty($user->lang['IMAGE'])) ? $user->lang['IMAGE'] : ucwords(strtolower(str_replace('_', ' ', 'IMAGE')))

These VOB cuts seem to cause a number of problems:
(1) the metadata in each VOB file will contain a value of Video Delay that is negative for all VOBs except the first, which may be positive or negative but is often zero. A negative video delay means that the video is ahead of the audio stream by as much as 20 frames or so (average of about 10).
The value of 'Video delay' may be found in MediaCoder by clicking 'Details of selected file (F8)', under the menu 'Item' (or use R-click). The video delay is listed under Audio since it represents the size & sign of the audio delay needed for sync.
(2) there are video frames that appear missing from each VOB join – the frames are neither accessible when an individual VOB is played in a software player nor when converted by an encoder.

1. Summary
In general, it is not advisable to convert VOB files and even worse to convert them when joined (via R-click 'Group'), for the reasons given below.
Despite this, an individual VOB may be converted and its delay corrected if the initial and final 0-1 sec is not required.

To convert a DVD Title – a Movie, Episode or an Extra, etc – convert its IFO file instead (see Section 4), from either the disc itself or from its ripped folder on HDD. An equivalent alternative is to use File > Add Track, which is also discussed below (Section 5).

Most of the testing for this study was done with MediaCoder build 4526. For more detailed information, see the link: viewtopic.php?f=17&t=8081&start=0
Later, differences for Build 4582 were noted and appropriate comments were added (below).

2. Conversion of a VOB
If an individual VOB with a non-zero video delay is converted (to AVI, WMV, etc) using MEncoder as video source, the start of the file will usually have an excess of audio and missing video frames at both ends. Moreover, its video will be out of sync with the audio because of its 'video delay'. I am not suggesting that a VOB is out of sync, per se, i.e., when played, because the player has access to the video-delay value in the header. I am saying that there is likely to be a problem if the VOB is converted, especially if MEncoder is used as the video source, rather than AviSynth (see also: viewtopic.php?f=17&t=8599&start=0)! Use of AviSynth may have other problems (see: viewtopic.php?f=17&t=8624&start=0).

As mentioned above, the video-delay for any VOB imported into MediaCoder may be read via 'Details of Selected File', listed under the Item menu. If the video-delay value is not listed here, it is because it is zero, which is often the case if it is the first VOB of a DVD title. In any case, the first VOB is likely to have only a small delay, less than 0.1 sec.

A VOB may be converted in MediaCoder while applying an audio delay equal to the stated 'video delay' (above). This will shift the audio earlier, avoiding any excess, and be in sync. However, the resultant space at the end will be filled by audio not in sync with the video.
There will also be missing frames (maybe ~0.5 sec) at the start and end of the converted file (see: viewtopic.php?f=17&t=8081&start=0).
To apply an Audio delay, see: viewtopic.php?f=17&t=8160&start=0

Of course, you will need to set up your requirements for the Video, Audio and Frame (resolution and frame rate). These will depend on the end use and are set on the Video, Audio and Picture tabs. As a starting point, set Auto Select for 'Source' and FFmpeg for 'Encoder' on both the Video and Audio tabs, then, change to suit the Format, etc.

3. Join (Group) VOBs and Convert
If, for example, the movie is Title 1 with only three VOB files in its Title (VTS set), its VIDEO_TS folder may resemble that shown in Fig. 1 (above). The VOBs may be loaded into MediaCoder and joined (select them all and R-click > Group). To place them in the correct order move files using Ctrl-arrow keys.

If all the VOBs of the set are joined-converted in MediaCoder with no audio delay applied, the video frames missing from the individually converted VOBs will also be missing, yet all the audio present in the VOBs will be included. As a result the video will be out of sync, getting progressively worse after each join. It will also be truncated shortly after the last non-black video frame and sometimes earlier!

4. Conversion of an IFO file
Which IFO? A DVD will usually contain more than one Title (see Fig. 1), each with its own IFO. It may be a multi-episode DVD, with each as a separate Title, or it may have a Movie in one Title and 'Extras' as others. To identify them, play the the DVD in a Player and note the duration and/or Title number for each Title. Compare this with the sizes of the VOBs as seen in Fig. 1. Better still, use the Add Track feature (Section 5), which offers more clues (chapters and duration).

The IFO file for a movie as Title 2 would be VTS_02_0.IFO (see Fig. 1, above). If the IFO is played in a software player it will contain all the movie and be in sync. Similarly, when the IFO file is converted to AVI, or whatever, MediaCoder will include all the movie and the converted file will have video & audio in perfect sync.

The IFO may be accessed from the HDD or directly from the DVD, if unprotected, and loaded into MediaCoder via File > Add File or use the 'Insert' key.

5. Conversion via Add Track
MediaCoder offers another option, via File > Add Track (or Ctrl-T), which opens a window to allow the DVD drive to be selected and then shows each DVD Title, referred to as Tracks. Note that since build 5215, the upper option “Track Type” is set at Blu-ray, by default, so, change it to DVD (if accessing a DVD). Then, the contents (chapters) of a chosen Track will be displayed at right with their starting times (Fig. 2). The last chapter in a DVD Title is often very short (~1 frame) and thus it will indicate the duration of that Track (Title). Note that in some builds of MediaCoder, the Add Track feature may not work (see viewtopic.php?f=17&t=9577&start=0).

(!empty($user->lang['IMAGE'])) ? $user->lang['IMAGE'] : ucwords(strtolower(str_replace('_', ' ', 'IMAGE')))
Fig. 2 Use of the Add Track feature

Choosing, for example, 'Track 2' for the above movie, the conversion will be identical to that for the IFO, after all, the Add Track function presumably operates via the IFO! Rather than an entire 'Track', a group of its chapters may be chosen, but, its audio sync may then be lost.

Add Track may be used to access DVD content if already on a HDD. Simply browse and select its VIDEO_TS folder using the button (“...”) beside the “Disc Root/URL” panel on the Add Track window. Sometimes, as with Build 4526, nothing may appear on any of the panels, but don't be fooled, as I was on earlier attempts. Just click “Add”, then “Close” and the item 'DVD' will appear on the input panel of MediaCoder, ready to go. Unfortunately, this will convert only the first VTS Title. This may be the main Movie/episode/clip that is desired, but it may not. In which case, load its IFO file instead, as described in Section 4.

The Add Track feature was improved by Build 4582. In this build, and others, such as 4740, use of Add Track for a VIDEO_TS folder on the HDD behaves as it would for the DVD itself. It accesses and display all tracks, as shown on the above Figure.

Note that if the default audio for the DVD is not what is wanted, change it on the Audio tab ('Audio ID'). However, when playing the chosen 'Track' in MediaCoder (click “Play”) the audio that plays will probably be the default audio for that DVD. Despite this, the transcoded file should contain the audio stream selected on the Audio tab.
Have you checked out the Tips & Guides for MediaCoder? Try:
Also, get older builds at:

Return to “Generic Discussions”

Who is online

Users browsing this forum: Google [Bot] and 13 guests