I am new to AfterEdit and have authored several dvd's that have
MANY different ways to play back the content. The first 6
PGRM's have 8 partitions each, PGRM 6 has 2 and PGRM 7 has 1.
This is so I can use them to keep track of which versions get
played back. One project has 15 tracks and 37 stories.
The DVD works fine, though sometime slow when it is still seeking
the 'right' random number. When I open this in AfterEdit and then
check for command line errors, I get about 32 messages like this
neatly copied to my clipboard:
#PGC Command Errors
#PreCommands from "DV GLB Par3.6.1»Video Title Sets»VTS 1»VTSM 1 Menus»English»VTSM PGC 14"
115: GoTo Line 117
*** Line value too large. Only 116 instruction lines in Pre-Command Area.
Is this perhaps due to a programming error in DVDSP, or might it be because
of the partitions. (I have not yet tried to get AfterEdit into it's 'hex' mode as
per one of the tutorials, "Understanding Hexadecimal, Nibble by Nibble
Why should we learn hexadecimal notation?"
Any wisdom is appreciated... thanks, Richard at SonicJourneys
DVDSP steals 8 of the 16 registers
I guess I didn't make it clear - When you write scripts in DVDSP you have only 8 registers, because it uses the other 8 for its own abstraction layer purposes. If you start over and do everything yourself, you have the use of all 16 registers, and you can accomplish what the abstraction layer did much more efficiently, taking a lot less code and avoiding a lot of seeking back to the front of the disc.
Also look at my hexadecimal article and try out some of the examples in Tracer, which should help.
Larry
"DVDSP Errors"
Larry,
thanks for your thorough reply to my post. There are lots of
GoTo commands in the DVDSP file. I stayed away from 16 registers because I wrote
a "1" into the registers at the selection the playback options. Then, when the story
was played, it added a 1 to make it 2..... (I also added a command to subtract
1 and keep the register at 2 IF it became greater than two....)
I will take a look at 16 registers which will also free up one for use in modulo functions.
I do have the DVD spec and will take a look.
Sonicjourneys
DVDSP Errors
Hi Sonicjourneys,
First, the GoTo commands are wrong, they are trying to go to a non-existent command. But since the players aren't crashing, probably the navigation "code" never executes those bad commands, depending on the results of the commands preceding them. Or perhaps the player treats it like a "break" command, which stops execution of navigation commands and continues normal playback.
When you are writing "programs", even if in the extremely limited DVD navigation language, it is nice to know what is happening. When you violate the rules, you are placing your fate in the hands of the programmers who wrote the player code, and you are likely to get different results on different players. This is even true when you don't break the rules on many players, but just do something a bit more complicated than the typical DVD navigation.
For example, many players do not implement the "rnd" (random) instruction properly if you give it small values. You are better off getting a large random number, say from 65535, and then dividing by the number of values you want and taking the remainder. (% command). Otherwise you will get the same sequence of numbers each time.
DVDSP's ability to split up registers, which was introduced very late in the game, even though Spruce had it in the code that Apple used as the basis for DVDSP, eliminates the need to do it yourself with hexadecimal understanding.
But if you are short of registers, you can throw away DVDSP's abstraction layer and get twice as many registers to work with, 16 instead of 8, hooray! (Blu-ray has 4,096 registers in HDMV mode, and that's without Java).
Also you are seeing the result of the original DVD spec's shortsightedness with disallowing navigation commands to jump from one VTS to another directly. Instead, they must always go to the VMG (video manager) first, which is at the beginning of the disc and therefore causes a lot of seeking. DVDSP normally puts all scripts in the VMG.
So if you want to get lean and mean, learn hexadecimal and "nuke the abstraction layer". But it requires learning a bit about the DVD spec and getting your mind around base-16 arithmetic.
Regards,
Larry
Post new comment