Log in

View Full Version : Why does PgcEdit's 'Import Title's Closing Clip' set parental control?


foobaz
18th December 2005, 23:26
I added a closing clip using PgcEdit's 'Import Title's Closing Clip' and it set parental control of the clip to a non-zero value which caused JetAudio to close and give an error message "Parental level of the Player is lower than that of the DVD disc." WinDVD just skipped over it and did not display the clip. I was able to fix it with the 'Remove Parental Management' function but I would like to know why it happened and how to prevent it from happening in the future. Usually this does not happen.

Any ideas anyone?

bigotti5
19th December 2005, 05:49
Usually the parental ID mask is copied from original.
The original doesn't have parental ID mask?

foobaz
19th December 2005, 15:44
Usually the parental ID mask is copied from original.
The original doesn't have parental ID mask?That's a good question but no, the original has a 0x0000 mask. So apparently the function is changing it somehow.

r0lZ
19th December 2005, 16:54
Strange. PgcEdit should copy the original value. I will verify that.
BTW, maybe it's better to reset it to 0 anyway?

r0lZ
19th December 2005, 18:41
Well, I have verified the code, and made a few tests. The parental ID is copied also when the title is imported.
However, I've just modified the code to cope with badly authored VMG_TT_SRPT tables (with a discrepancy in the End byte of table.) Might be a similar problem. See here (http://forum.doom9.org/showthread.php?p=753802#post753802) for details.

Could you also send me your IFOs (of both the original DVD and the DVD with the title to import)? < pgcedit at tiscali dot be >
Thanks.

r0lZ
22nd December 2005, 18:50
OK, I've analysed your IFOs. In fact, that exactly the opposite thing that happens.
All titles in the original DVD have a parental ID of 63488. The imported clip has no parental protection, and the ID is therefore 0.
After the import, everything is normal: the original titles are not changed, and the new title has still ID 0.
The problem is that an unprotected title is imported in a protected DVD. Since his ID is 0, it cannot be played on players with the parental protection enabled.

I wonder if I have to change that in the import title function. I may verify the IDs of the original titles, and if at least one is non-zero and the VMG_PTL_MAIT exists, ask the user if he wants to set the code to the same level, or remove completely the parental stuff from the DVD.
However, I don't understand fully how this parental stuff works. We don't have many DVDs with parental levels here in Europe. If someone can help, please let me know.

foobaz
23rd December 2005, 01:13
OK, I've analysed your IFOs. In fact, that exactly the opposite thing that happens.
All titles in the original DVD have a parental ID of 63488. The imported clip has no parental protection, and the ID is therefore 0.So I see. It is 0xF800. Assuming the F is just filler digits, that's a rating of 8 - adult, the most restricted level. But the movie is only PG-13. Hmmmm. So the player will not play anything at a "lower" setting than the titles with a "higher" rating.

The problem is that an unprotected title is imported in a protected DVD. Since his ID is 0, it cannot be played on players with the parental protection enabled.But parental protection is not set in my players.

I wonder if I have to change that in the import title function. I may verify the IDs of the original titles, and if at least one is non-zero and the VMG_PTL_MAIT exists, ask the user if he wants to set the code to the same level, or remove completely the parental stuff from the DVD.That would probably be a nice feature.

However, I don't understand fully how this parental stuff works. We don't have many DVDs with parental levels here in Europe. If someone can help, please let me know.I found the following:

http://dvd.sourceforge.net/dvdinfo/ifo_vmg.html
http://www.dvd-replica.com/DVD/vmgpml.php

added:

http://d47.yousendit.com/D/3FK1W4I3MTF1O2R0W5STBZCWKS/US20040213554.pdf

r0lZ
23rd December 2005, 04:31
So I see. It is 0xF800. Assuming the F is just filler digits, that's a rating of 8 - adult, the most restricted level. But the movie is only PG-13. Hmmmm. So the player will not play anything at a "lower" setting than the titles with a "higher" rating.I think it's not so simple. The "number" stored in the table of titles (VMG_TT_SRPT) is only an ID, not the parental level. The ID refers to the level defined in the VMG_PTL_MAIT table, and may be different for each VTS.
But as I said, I haven't analysed how it works yet. I may be wrong.

But parental protection is not set in my players.Hum, that's strange. Perhaps the strange behavious is caused by the fact that there are no parental IDs defined in the VMG_PTL_MAIT for the new VTS? If it's really the case, I must either complete the table and change the ID in VMG_TT_SRPT, or remove all. I'm not sure what I will do...

mpucoder
23rd December 2005, 04:48
The value in VMG_tt_SRPT and the PGC category of VMGM_PGCI_UT and VTS_PGCI are masks, not levels. If the mask is non-zero then the result of a bitwise AND with the value from VMG_PTL_MAIT, indexed by VTSN and level, must be non-zero to permit playback. If VMG_PTL_MAIT is missing, or too short, the test fails.

r0lZ
23rd December 2005, 05:36
Thanks, mpucoder. As always, you have the answer.

I still don't understand some things:

1) The mask of the title imported by foobaz is 0. So, it should be playable anyway, no? But there is no mask defined for the new titleset in VMG_PTL_MAIT. Is it why it fails? I suppose so, since you said "If VMG_PTL_MAIT is missing, or too short, the test fails." But, IMO, the test should not occur at all when the mask is 0.

2) Why is it so complex? I though that a certain level of protection prohibits to see a title with a higher level. So, why is it needed to implement this mask stuff? Does it mean that in some circumstances, it is allowed to watch a title if the player is set, say, to level 4, but not if it is set to level 6? Seems so strange!

3) How is this mask stuff used by SetTmpPML? Is it used at all? Seems here, it's the level that is directly used. Is this command supposed to work even if VMG_PTL_MAIT is not defined?

4) Just to be sure: The mask for a title is defined in the PGC and in the VMG_TT_SRPT table. Why? Simple redundancy?

mpucoder
23rd December 2005, 06:02
The reason for the complexity is multi-national ratings. By using masks the author can devise whatever scheme is necessary for a multitude of rating systems, using up to 16 bits to define the "properties" (ie nudity, profanity, sexual situations, violence, drug use, etc).
But for a single country/rating system, it can be a simple bit for each level. Still, multiple levels can watch a given rating, so more than one bit gets set. Again the author can choose whether the multiple bits are in the MAIT (this level can view these rated scenes) or the PGC (this title/scene can be viewed by these levels. Most authoring programs that can set parental controls have their own scheme to simplify the interface.
And it does look like if the table exists parental controls are active. If the table does not include a VTS the action is undefined, in this case this player decided to not allow playback.
Best strategy would be to ensure that if the table exists it covers all VTSs. Expanding the table can be tricky, as it is indexed by nVTS*level + VTSn, ie adding a VTS cannot be done by adding eight entries at the end.

r0lZ
23rd December 2005, 06:56
Thanks again. I understand better now.

Adding new entries in MAIT is not very difficult with PgcEdit, but so far I suggest only to the user to completely remove the parental managment. It's simple and efficient! ;)

Last question: In the IFOs of foobaz, I've found parental masks also in the menu PGCs. Does it mean that the menus are also protected? I though the parental managment is limited to the title domains.

Oh, and what about SetTmpPML?

spyhawk
23rd December 2005, 07:57
@r0lZ, is the mask for all VTS in all levels of VMG_PTL_MAIT 0xF800?

3) How is this mask stuff used by SetTmpPML? Is it used at all? Seems here, it's the level that is directly used.Usually if there exists a VMG_PTL_MAIT, you would see SetTmpPML. And yes, it does work. Suppose a player's parental level is PG, and the DVD is rated R, and you encounter SetTmpPML(6). You will be prompted to enter a 4-digit password. If successful, the player will temporarily set the parental level to R, and allows playback. If unsuccessful, depending on the behavior of each software or dvd player, some will display the will-not-play screen, some will keep prompting you for a password.

Is this command supposed to work even if VMG_PTL_MAIT is not defined?I think so, but not 100% sure. However this command is useless if the player's parental setting is not turned on.

4) Just to be sure: The mask for a title is defined in the PGC and in the VMG_TT_SRPT table. Why? Simple redundancy?AFAIK, the mask must match in VMG_TT_SRPT table and the PGC category of the VTS.

If there are masks in the PGC category of the VTS and VMG_TT_SRPT table, and no VMG_PTL_MAIT table, then those masks are useless. Might as well clear it.

To reiterate mpucoder's explanations in newbie's terms, I will give an example. Suppose, you have in VMG_PTL_MAIT table:

Parental mask for level 8 in VTS 0 = 0x8000
.....
Parental mask for level 8 in VTS 4 = 0x8000
.....
Parental mask for level 4 in VTS 0 = 0x0800
.....
Parental mask for level 4 in VTS 4 = 0x0800
Parental mask for level 3 in VTS 0 = 0x0400
.....
Parental mask for level 3 in VTS 4 = 0x0400
Parental mask for level 2 in VTS 0 = 0x0200
.....
Parental mask for level 2 in VTS 4 = 0x0200
.....

In VTS 1/PGC 1 the mask is 0xFC00. The player's setting is PG-13 (PML 4 for US). The DVD is PG. You would take 0xFC00 & 0x800 = 0x800, then playback is allowed. If you change player's setting to G (PML 2), then the bitwise AND result will be zero, and playback is prohibited.

So for foobaz's situation, since the title has mask 0, insert a new entry for VTS 5, for example, to all 8 levels with the matching mask for that level. You can't have the mask 0 for the imported title, since the mask result will be zero for all levels, and playback will not continue. So you must create a mask value such that the result will be non-zero. The easiest way is to get the mask value from the movie PGC.

None of these will be necessary if the user wants to clear Parental Management.

PS. @r0lZ, guess you got it while I'm typing offline. ;)

r0lZ
23rd December 2005, 08:37
Thanks, spyhawk. Yes, I've understood this stuff.

@r0lZ, is the mask for all VTS in all levels of VMG_PTL_MAIT 0xF800?No, the levels masks for levels 8 to 1 are 0x8000, 0x4000, 0x2000, 0x1000, 0x0800, 0x0400, 0x0200 and 0x0100, for all VTS (except, of course, the new, imported VTS, not defined.) Exactly like in your example.

I have not verified the ID in all PGCs, but seems the mask is always 0xF800, including for the menu PGCs. So, the DVD is playable with a parental level 4 or higher. Right?

BTW, to be sure that a PGC is always playable when the VMG_PTL_MAIT table exists, I suppose that the best ID to use is 0xFFFF.

And yes, there is a SetTmpPML(8) command in a VMGM menu. Obviously, in this command, the argument is a level, not a mask. Just wanted to be sure.

For your information, on this DVD, there is also another method used to jump to another PGC when the parental level is not suitable:1 Set gprm(0) =(mov) sprm(13:Parental level)
2 Set gprm(0) &=(and) 15
3 if ( gprm(0) >= 4 ) then { Goto line 5 }
4 (JumpSS) Jump to VTSM 5, Root menu (TTN 1)
5 LinkPGCN PGC 24

spyhawk
23rd December 2005, 18:12
I have not verified the ID in all PGCs, but seems the mask is always 0xF800, including for the menu PGCs. So, the DVD is playable with a parental level 4 or higher. Right?Correct.

BTW, to be sure that a PGC is always playable when the VMG_PTL_MAIT table exists, I suppose that the best ID to use is 0xFFFF.Yes. But this would mean that no matter what parental level is set in the player, the PGC is always playable. What if you have a video that you don't want the kids to see, unless the parental level is overridden with correct password. So you want to set the mask for the correct level.

In this case, since the mask is always 0xF800, to be consistent, set the imported title's mask to be 0xF800 (in PGC and VMG_TT_SRPT). Or to make it more robust, you can ask the user upon import what parental level the user likes to set, after checking that a VMG_PTL_MAIT exists. If the user chooses no parental level, i.e. to clear it, then set it to 0xFFFF. If the user chooses level 5, for example, then set it to 0x1000. Just retrieve the mask value for whatever the level in MAIT the user chooses. If there's no MAIT, then there's no need to ask the user and reset the mask for the imported title.

And yes, there is a SetTmpPML(8) command in a VMGM menu. Obviously, in this command, the argument is a level, not a mask. Just wanted to be sure.Yes. Usually the 2 parental checks go together: the mask check and the SPRM13 check. The SPRM13 check will control the flow of the DVD. In the code given above, if the parental level is 4 or higher, then it will go to PGC 24, else go to VTSM 5 root menu. There's also another control flow for SetTmpPML() as well. If correct password is entered, then playback continues, else it will display the will-not-play screen.

r0lZ
23rd December 2005, 18:37
Thanks for the precisions.

If the user chooses level 5, for example, then set it to 0x0800. Just retrieve the mask value for whatever the level in MAIT the user chooses. :confused: Not sure.
For level 5, the mask in MAIT is 0x1000. If I use that mask for a PGC, the user will need to set the player level precisely to 5. If the player is set, say, to level 6 (0x2000), the bitwise AND will fail.
I think that setting the mask for a particular PGC to allow level 5 and higher requires to use a bitwise OR of the masks in MAIT for levels 5 and above, giving 0xF000, which is correct.

spyhawk
23rd December 2005, 19:00
For level 5, the mask in MAIT is 0x1000.oops, I look up the wrong mask.

You're right. Bitwise OR is the way to do it.

foobaz
24th December 2005, 21:54
Wow. I didn't think this question would result in such a thorough investigation. I'd like to express my appreciaition for all of your seriously looking into this problem and eventually eliminating it in the future. You guys appear to be quite knowledgeable about this stuff. This forum is truly spectacular. Where else would I find people discussing details of the closely guarded DVD Spec? I would certainly like to learn a great deal more about the DVD Video Spec but as you know, it is virtually impossible to find online or in print due to the jealous monopoly enjoyed by Toshiba primarily and the DVD Forum group. I mentioned in another post (http://forum.doom9.org/showthread.php?t=104415) that I'd like to start a thread that lists online resources concerning the DVD Spec and have others contribute what they know or find on the web including personal knowledge, patents, technical papers, etc. What do you think? Would you be interested in contributing to this when you had a chance?