DVD Explorer

This article is an unpretentious attempt to understand the written data on a DVD. Of course, this text stays on line with the copyright rules.

1. Introduction

A quick view of a DVD with Windows Explorer allows you to locate in a subdirectory titled video_ts, and into files with *.IFO, *.DUP, and *.VOB extensions.

  • The IFO files give the important data to navigate such as:
    • The chapter's structure
    • The audio stream
    • Subtitling
  • The DUP files are the backup of the IFO files.
  • The VOB files hold the video and audio data with their encrypted system.

The video_ts.ifo and video_ts.vob files represent the first play item when the DVD is set up in a player. Usually, they ensure the display of the copyright warning and the menu for the language's choice.

The other files (vts_01_0.ifo, vts_01_0.vob, and so on) hold the film itself and the bonus features.

The suggested software deals with the data included in the IFO files and recreates the whole film structure with its chapters, its angles, and its cells.

2. IFO file format

On a DVD, the IFO files, as the others DVD files, are a compound of a 2048-byte record. Two formats of IFO files exist, identified by the 12 first bytes of the file:

  • "DVDVIDEO-VMG" for the video_ts.ifo file
  • "DVDVIDEO-VTS" for the other vts_*.ifo files

The first record hold general information, plus an offset table that defines, in the file, the first record position of the other tables. For information, the detailed structure of the file is given in an appendix (IFOrecord.zip). In the program, there is the CIFO class (source files: IFO.h and IFO.cpp) that provides FIO file reading. The data extraction employs two subroutines:

DWORD get4Bytes(PBYTE pBuffer);
WORD  get2Bytes(PBYTE pBuffer);

This technique solves the problem of the byte order (big endian to little endian) between the file writing formant and the (x86) machine representation. Only a small part of the data, the displayed part, is extracted from the file.

3. General Code Layout

The data are displayed in a standard MFC-CDialog application. It is generated with the Visual Studio Wizard (source files DVDExplorer.h, DVDExplorer.cpp, DVDExplorerDlg.h, DVDExplorerDlg.cpp, DVDExplorer.rc, Resource.h). The presenting the results is carried out with the Visual resource editor. It comprises mainly TREE_CONTROL and LIST_CONTROL (CTreeCtrl and CListCtrl).

The CMovie, CTitle, CChapter, CCell, CAngle, CUnit, CAdressMap, CTimeMapTable, CUnitManager classes ensure the internal representation of the read data (source files : Movie.h, Movie.cpp, ...). The organization of these data is ensured by class CDVD (DVD.h, DVD.cpp). This class also provides the posting interface with the CDVDExpDlg (DVDExplorerDlg.h/cpp) class.

Cutting in streams is ensured by the CStream, CAudio, CSubPicture, CAudioStream, CSubPictureStream, CStreamProcessing (Stream.h, Stream.cpp, ...) classes.

A CDirPickDlg (DirPickDlg.h, DirPickDlg.cpp) class manages the acquisition of a film folder to read. It is used to work the CDirTreeDlg class, derived from CTreeCtrl (DirTreeDlg.h, DirTreeDlg.cpp).

Trace in debug mode and a special error's display allows a highlight of the record format mistakes. The derived CDialog class CErrorDlg provides this last function (DirPickDlg.h, DirPickDlg.cpp).



About the Author

Georges Dumond

Courbevoie (France)

Downloads

Comments

  • Sort Program Chain into category

    Posted by DomZ on 08/16/2006 01:45pm

    I have done a lib the do the same job in .net but i would like to sort my Program Chain into category (Film, Extras, Menu). But i have no idea on how to do that ? Have you an idea on how to do ? Regards

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Live Event Date: November 20, 2014 @ 2:00 p.m. ET / 11:00 a.m. PT Are you wanting to target two or more platforms such as iOS, Android, and/or Windows? You are not alone. 90% of enterprises today are targeting two or more platforms. Attend this eSeminar to discover how mobile app developers can rely on one IDE to create applications across platforms and approaches (web, native, and/or hybrid), saving time, money, and effort and introducing apps to market faster. You'll learn the trade-offs for gaining long …

  • Live Event Date: October 29, 2014 @ 11:00 a.m. ET / 8:00 a.m. PT Are you interested in building a cognitive application using the power of IBM Watson? Need a platform that provides speed and ease for rapidly deploying this application? Join Chris Madison, Watson Solution Architect, as he walks through the process of building a Watson powered application on IBM Bluemix. Chris will talk about the new Watson Services just released on IBM bluemix, but more importantly he will do a step by step cognitive …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds