PDA

View Full Version : Working with PGCs and titles


Dave82
22nd July 2003, 13:06
I created new IFOs with IFOEdit selecting the option "Create a new PGC for each VOB ID".What I got is two PGCs grouped in the same title (only the first one is an entry PGC) so that the movie stops at the end of the first PGC and I have to skip through chapters to jump to the second one, but I haven't got any "title 2" to jump to.

My question is: how can I edit the IFOs to make both PGCs "entry PGC"(1 PGC=1 title, with chapters restarting from 1 at each PGC) so that I can select them with the title key on the remote control?(don't care about graphic menues)

On the contrary, how can I change an entry PGC into a non entry PGC?Can I edit the IFOs (just like one can remove extra chapters due to chapters containing more than 1 cell) or do I have to change VOB IDs before creating the IFOs? How could I do it?

Derrow, wouldn't it be an interesting option to implement in IFOEdit?(I mean, when you choose "create a PGC for each vob id" you're allowed to check "create a title for each PGC".What about this?)

I would like to do it without complex authoring programs, but if I have to, could you please suggest a FREE one? ;)
Thanks in advance :)

I posted these questions also in this thread (http://forum.doom9.org/showthread.php?s=&threadid=57407), but I decided to open a new one because I realized they had become too different from its original subject

mpucoder
22nd July 2003, 15:36
Click on VTS_PGCITI, where you see "category mask" edit it (double click) to be 128 + title number (first title is 1, so first value is 129). For non-entry set it to 0.

That's the easy part, and may work. But you should also create an entry in video_ts.ifo, VMG_PTT_SRPT. These are 12-byte entries, so there should be no problem adding one without changing the file size. Just copy the first title's values, except for VTS_TTN (title number within the titleset) and the starting sector. You can get the starting sector from the title's PGC (cell 1 entry point sector).

Dave82
22nd July 2003, 16:08
Thanks mpucoder,you've been crystal-clear as usual :)
I'll try and let you know

Dave82
22nd July 2003, 18:27
Houston, we have a problem...
I did as you told me (and corrected the number of chapters in the two PGCs too)but I couldn't manage to change the starting sector.
I mean, now in PowerDVD I can see the possibility to select the two titles (right click, go to) but if I click on title 2 nothing happens and the movie goes on with title 1.Then I tried do get VTS sectors and IFOEdit restored the starting sector to the same value as PGC 1's one.That made me think, and I noticed that it says title set starting sector, so if the two PGC belong to the same titleset, it seems to me logical that they have the same title set starting sector.
Tried again with PDVD and still doesn't work.So (I suppose) there's something else to change :confused:
I noticed that in PGC 1, cell 1 has cell type 2, and in PGC 2 cell 1 has cell type 10.All the other cell have cell type 8.What does it mean?I changed them to 8 but still doesn't work (BTW, is it right to change them?)
PGC 1 has next PGC number=2.I changed previous PGC number in PGC 2 from 0 to 1.It doesn't work (do I have to change it anyway?)
I also tried to edit a post command in PGC 1:

1.Post Command (JumpVTS_TT) Jump to title: 2 [30 03 00 00 00 02 00 00]

It doesn't work, the movie stops at the end of PGC 1, and PDVD hangs on when I try to skip from the last chapter in PGC 1 to the first on in PGC 2.Could you tell me also the right command to let the titles play one after the other?

Why can't I jump to title 2?Please help me :(

mpucoder
22nd July 2003, 19:58
You are right about the sector - my bad - it is the starting sector of the titleset, so it should be the same as title 1.

I see what IfoEdit is doing, it's making a multi-PGC title (can you tell I've never actually tried this?). SO our problem really is to change 2 PGC title to 2 titles.
The title entry in video_ts.ifo should be right with the same sector as title one.
The first PGC should not link (next PGC) to the second.
The second PGC should be changed to title 2 entry, and not linked (prev PGC) to the first PGC.
The first cell of the second (or any) PGC should be type 2.

The cell types you've run into:
2 - system clock needs to reset
8 - seamless with previous
10 - seamless but clock needs to be reset.

I think that should do it. Did IfoEdit create any pre/post commands, or was that you?

maa
22nd July 2003, 20:15
What you're trying to do is exactly what I'm trying to prevent DVD Lab from doing - so if you like you can get the 30 day trial and see how it does what you want. (makes great menus)
It puts each film in the same title set and uses PGCs controlled by the VMG menu and VTS menu.

Dave82
22nd July 2003, 20:24
No, the command was just an idea of mine :p (BTW, would it be correct if there really were two titles?)
I changed all the next/prev PGC stuff to 0, and also changed cell type 10 to 2: still doesn't work :(
So I ripped VIDEO_TS.IFO and VTS_01_0.IFO from a DVD in which the first titleset has two indipendent titles (just what we want), and compared them to my IFOs.
I noticed that in PTT_SRPTI there are two Title Unit Search Pointers (TTUs), while in mine there is one.When I changed 1 to 2 I ended up with an empty TTU_2 (to wich I cannot add any chapter) and with a TTU_1 that contains more than 16 THOUSAND chapters :scared:
Any idea?

@maa: I was writing the message when you replied, sorry ;)
BTW, I would like to create a DVD without graphic menues: does DVD Lab give you this option?
Thanks

mpucoder
22nd July 2003, 21:34
This really is getting to be a project - maybe DVD Lab is the better choice.
I forgot about PTT_SRPT, and probably others.
PTT_SRPT is complex, it is actually 2 tables, the first is a list of pointers. If your game, here's what is needed to add a title:
1) write down what title 1 values are (probably PGCN 1, PGN 1) and what "end byte of PTT_SRPT" is.
2) We have to make room first, by adding 1 to the number of titles, but also adding 8 (4 bytes for the title, 4 bytes for each chapter in the new title) to the "end byte of PTT_SRPT" - refresh after this.
3) correct the title 1 pointer by adding 4 to it.
4) insert the pointer to title 2, its value is 5 greater than the old "end byte of PTT_SRPT" - refresh.
5) correct title 1 table
6) make title 2 table (PGCN 2, PGN 1)

Now I'm going over other tables, VTS_TMAPTI is by PGC, so it's OK
VTS_C_ADT is by VobID/CellID, so it should be OK.
VTS_VOBU_ADMAP is by VOBU, so it should be OK too.

btw, not adding 8 to the end address is what caused IfoEdit to loop through 65K of memory (16K entries).

mpucoder
22nd July 2003, 22:04
Just had a question - does the original have one or two chapters for the title? If it has 2 things need to change a little (adjust end of PTT_SRPT and title 2 pointer down by 4 bytes, this will remove title 1 chapter 2)

Dave82
22nd July 2003, 22:12
I have 9 chapters in the first title and 8 chapters in the second one.
BTW, I tried your way but after I followed point 2) IFOEdit gives mt an error message and doesn't open the IFO (even when I changed only the number of TTUs sometimes it couldn't open it :confused: )

mpucoder
23rd July 2003, 05:03
Ugh, getting too messy. I hoped this could be done simply.

maa
23rd July 2003, 14:23
The cell types you've run into:
2 - system clock needs to reset
8 - seamless with previous
10 - seamless but clock needs to be reset.
Ah - another perl of secret information - thanks mpucoder!

I have a film that has limited navigation and I'm trying to find out where this is implimmented. It allows next/previous chapter but no time search in PDVD. The usual P-UPs are not there. Could it be the cell type? - I'll check this.

Dave82
23rd July 2003, 14:51
Hey, I was able to do it, and the post command works too :D
The problem is I can't do it anymore :(
I mean, after changing the number of TTUs IFOEdit seems to have great difficulties in doing the refresh, and so I think I was just lucky when I did it: now I still have the error message

"IFOEdit.exe has generated errors and will be closed by Windows.
You will need to restart the program.
An error log is being created."

What does it mean? Do I have to change paramaters in a particular order not to have this problem? Is this a bug? Can you please try and let me know?

Thanks in advance

mpucoder
23rd July 2003, 15:37
The VTS_PTT is a unique table, the only one with no "number of entries" field. When IfoEdit interprets it, it uses the start location of the next VTS_PTT (or the "end byte of PTT_SRPT +1) to know where the end is.
All the values in VTS_PTT_SRPT need to be changed at once or you run the risk of a pointer being beyond "end byte of PTT_SRPT", and IfoEdit running amok (it should have a sanity check here, imo). Once again, I forgot this (I'm working on a lot of other things, including one very frustrating bug in Atmel's logic compiler) and apologize.

Best approach to change this table is work out all the values for VTS_PTT_SRPT first, and use the HexEdit button to enter them. The refresh after step 2, which was put there so that the pointers would show up in the display, was a big mistake.

Even if the values are wrong, make certain that each pointer is less than the next, and that the last pointer is less than the end byte location.
DVD values are little endian, which means they are read/entered left to right in a hex dump, just as you would write them on paper.

Dave82
23rd July 2003, 16:23
I tried with Hex Edit and it works perfectly :D
You really don't need to apologize, you make so much for this community, thanks ;)

Now I wanna try to rip a part of a DVD with 3 VOB IDs, create 3 PGCs but just 2 title (title 1 with 2 PGCs, title 2 with 1 PGC). I think I'm gonna manage to do it :sly: , I'll let you know.

Another question: what is going to happen now when I use the title key on the remote control of a standalone?Will I skip to title 2 or will a list of the available titles appear on the screen?

EDIT: OK, I got it. I opened a thread (http://forum.doom9.org/showthread.php?s=&threadid=58282) with a guide ;)