Log in

View Full Version : Number of titles on DVD


HyperHacker
21st December 2008, 12:36
Once I have a video DVD mounted, how do I determine the number of titles on it? I tried counting the VTS_* files in VIDEO_TS, but this doesn't work for all discs.

KenD00
23rd December 2008, 05:45
The number of titles is stored in the VMG in the file VIDEO_TS.IFO. You can use IfoEdit to figure out the offset where to look.

:rolleyes:

HyperHacker
23rd December 2008, 05:51
I mean how would I do it programmatically? Is there an online documentation of the file format?

KenD00
23rd December 2008, 06:09
Just checked my bookmarks, take a look here (http://dvd.sourceforge.net/dvdinfo/), check out IFO headers and VMG specific tables, TT_SRPT is the structure to look for ;).

:rolleyes:

HyperHacker
23rd December 2008, 06:36
OK, so at 0xC4 in VIDEO_TS.IFO is a "sector pointer"? The disc I'm looking at now has 1 here; does that mean I need to look at sector #1 of the disc itself? How do I know the number of bytes per sector, or is it the same for all DVDs?

KenD00
23rd December 2008, 06:57
Sector size on all DVD's is 2048 bytes, the sector offsets are relative to the beginning of the file VIDEO_TS.IFO. In your case the TT_SRPT structure starts at offset 0x800 of VIDEO_TS.IFO.

:rolleyes:

HyperHacker
23rd December 2008, 07:19
Thanks, that's all I needed to know. :) Is it possible to retrieve the names of the titles too, as you'd see on a scene select menu, or are those part of the menu graphics?

KenD00
23rd December 2008, 07:39
Theoretical its possible, title names can be stored in DVD-TEXT, but that itself is rarely used and no discs i saw which had DVD-TEXT had title names stored. However, my HD-DVD / Blu-Ray collection i grew over the last 2 years exceeds my DVD collection grown over 8 years ;).

:rolleyes:

HyperHacker
23rd December 2008, 07:43
OK, thanks. I guess I'll have to live with referencing them by number then. :p

jfcarbel
4th January 2009, 13:08
You might want to check out some of the open source libs that VLC player and many other DVD apps use as I believe their is a DVD library that can provide this information.

mousemurder
7th January 2009, 22:41
may i suggest that the source for lsdvd should be available at sourceforge.