Log in

View Full Version : Can DVD menu structures be used to locate/access only user selectable chapters?


Fullmetal Encoder
22nd May 2012, 00:14
I am trying to write a program that will pull chapter start times from a DVD. There are a number of tools that can do this but all of the ones I've seen also identify non-chapter cells that would be irrelevant to the end-user. Thus, I would have to code filtering logic to discard those cells. I am trying to avoid this and find a more robust and less error prone method. My approach is to examine the menu structures of a DVD and determine from there which cells correspond to the menu selections that would be accessible to anyone viewing the DVD on a player. Is this approach feasible?

From what I've read about the specs online I need to locate the JumpVTS_PTT command for each menu button in the chapter menus. Though I'm a bit uncertain about that. Where exactly can I access the PTT reference to get at the correct corresponding chapter cell for each button?

Any help would be much appreciated.

Ghitulescu
22nd May 2012, 08:26
why don't you read the ifos?

Fullmetal Encoder
22nd May 2012, 20:46
why don't you read the ifos?

Well, that is what I am trying to do. But the problem is that I don't understand how the VTS_01_0.IFO connects to or locates the PTTs. In PGCEdit I can see the six buttons in the VTSM PGC which correspond to the menu buttons available to the user when playing the disk/files (in a particular VTSM PGC). I can also find (through PGCEdit) the command string in the VTS_01_0.VOB for that menu item (e.g. {73 04 00 07 00 04 00 03}) by simple hex search in that VOB. I can even access the commands in the VTSM PGC in my code. But I can't see how the VTS_01_0.IFO knows which PGC and PGN in the VTS VOBS to access when the button is actioned. If that information is found in VTS_01_0.VOB (and not the IFO) as it seems to be, then how does the VTS_01_0.IFO even know where to locate it in the VTS_01_0.VOB?

I can access the chapter start times I'm looking for for my example DVD by PGC and PGN (via VTS_PTT_SRPT) and if I do that for my DVD then I end up with references to 42 cells. But two of those cells don't contain meaningful content (one has a duration of 00:00:00.15 and the other contains DVD credits which I wish to exclude). Neither of those two cells are accessible from the episode chapter menus available to someone playing the DVD. So being able to access the chapters through the menus in the IFO file I can restrict my code to dealing only with the meaningful content of the DVD.

r0lZ
23rd May 2012, 08:50
Finding the "real chapters" by analysing the navigation is extremely complex.

You cannot assume that the chapters menu buttons jump directly to the chapter with a JumpVTS_PTT command. It's sometimes the case, but unfortunately, often, a much more complex method is used. For example, the chapter menu button may set a value in a GPRM, then jump to the post-commands, and to a PGC in the VMGM, and from that PGC, jump to the main movie, where the GPRM is compared to specific values to jump to the correct chapter (perhaps with a LinkCN). As you can see, in that case, you have to follow the navigation, record the GPRM changes, and build your chapter list dynamically. In other words, you have to write something like a unattended trace mode, to analyse the whole DVD. And even if you do that, you will still have "false positives", such as chapters that are not in the main movie. And there is also another problem: you cannot be sure that the menu you are analysing is really the chapter menu.

IMO, reading the VTS_PTT_SRPT table, and the corresponding cells table (to exclude the very short chapter that is often located at the end of the movie) is much easier, and less prone to errors. And you will have the complete list of chapters. (A chapter that is not accessible directly from the chapters menu is still a chapter, and IMO it must be kept.)

Fullmetal Encoder
24th May 2012, 22:20
Finding the "real chapters" by analysing the navigation is extremely complex.

You cannot assume that the chapters menu buttons jump directly to the chapter with a JumpVTS_PTT command. It's sometimes the case, but unfortunately, often, a much more complex method is used. For example, the chapter menu button may set a value in a GPRM, then jump to the post-commands, and to a PGC in the VMGM, and from that PGC, jump to the main movie, where the GPRM is compared to specific values to jump to the correct chapter (perhaps with a LinkCN). As you can see, in that case, you have to follow the navigation, record the GPRM changes, and build your chapter list dynamically. In other words, you have to write something like a unattended trace mode, to analyse the whole DVD. And even if you do that, you will still have "false positives", such as chapters that are not in the main movie. And there is also another problem: you cannot be sure that the menu you are analysing is really the chapter menu.

IMO, reading the VTS_PTT_SRPT table, and the corresponding cells table (to exclude the very short chapter that is often located at the end of the movie) is much easier, and less prone to errors. And you will have the complete list of chapters. (A chapter that is not accessible directly from the chapters menu is still a chapter, and IMO it must be kept.)

I was afraid it was going to turn out like that. Thanks for the feedback.