Partial End Action Patch for DVDA

johnmeyer wrote on 10/28/2003, 12:03 AM
Many DVDA users want to put multiple MPEG2 files into DVDA and then want to have them play consecutively, while still having a Title menu structure to "point-click" navigate the DVD. Since DVDA currently lacks end actions, you can't do this.

However, I have come up with a real kludge that provides a solution to this specific problem. It is techy, geeky, and not pretty at all, but it works. You can read about it here:

Creating DVD Architect End Actions w/ IFOEDIT

Actually, the process is not difficult once you've figured out how to run IFOEDIT (the program used to patch the VIDEO_TS.IFO file). Also, as noted in the post, I am still have one problem that is not yet solved, although I expect I will solve it eventually, if anyone replys in that other forum.

Hopefully Sony will hurry up and release a new DVDA, and this won't be needed, but in the meantime, perhaps someone will find it useful. If you do decided to try it, back up your IFO and BUP files before you proceed. The VOB files are not affected (actually, ony the VIDEO_TS.IFO and VIDEO_TS.BUP files are changed).

Comments

RBartlett wrote on 10/28/2003, 1:52 AM
Smart work - thanks John. Should push Sony along now that the evidence of how straightforward this is ~generally~ is before them.
gold wrote on 10/28/2003, 8:07 AM
John,
Do you think it would be asking too much for Sony to release the source code to you for DVD-A so that you could add end actions yourself? If the code is in C++ I can help as needed. If you've got a clear understanding of what end actions translate to in DVD commands (which you seem to have) then coding them into the program itself would be the next logical step.
early morning thought,
appreciate your donating the time to find work arounds,
P.S. This particular problem hasn't been much of one for me since nanoedit can piece the chunks together without rerendering in a matter of a couple of minutes so that I can work within the limits of DVD-A. But I would like a workaround to add timeouts on menus and defining where to go on each button press and end of event--if you come up with something along those lines--even incomplete--please post it.
thanks,
Gold
RBartlett wrote on 10/28/2003, 10:50 AM
Share out the crown jewels? Even with proposing a bonded agreement, I doubt Sony could play ball. Maybe John will get an invite into the Madison offices? I think the developers pride would prevent Sony from enjoying John's findings. So lets have them prove they can do this themselves!

John has clearly identified what little extra dialect that DVDA needs to speak to go into the next league. Hopefully Sony have been internally testing a similar capability for weeks already. With those extra timeout actions you mentioned too Gold.

johnmeyer wrote on 10/28/2003, 1:07 PM
Thanks for the confidence in my programming abilities. I have run three different software companies, and obviously have some limited programming skills, but I'm not in the league with the folks in Madison.

As for how easy it is to add end actions, it is true that my approach only requires adding a few (less than ten) lines to most IFOs to achieve one particular end action. However, as part of figuring out how to do this -- and do it simply -- I ended up acquiring the entire DVD spec. It turns out there are dozens of different commands in the DVD spec that do almost the same thing. My educated guess is that some DVD players may not handle some of these commands in the exact way that was intended by the authors of the spec. Therefore, to produce a truly great authoring package that produces disks that play flawlessly on everything, will require detailed knowledge of the inner workings of actual DVD players. This is not unlike the problem many of us faced back in the 1980's when writing software for "IBM clone" computers. As you may remember, IBM's original 1981 PC had a certain core set of instructions hardwired into its motherboard (into the BIOS). These instructions were then "cloned" by Compaq and later by many other companies. However, the cloning -- due to legal restrictions -- was far from perfect, and if you wrote your software in certain ways, it would not run on some of the clone computers. The best-remembered example was Microsoft's "Flight Simulator." It ran great on IBM's computers, but not on many of their competitor's machines. A computer company offerring a "PC-compatible" computer had really arrived if it could run Flight Simulator.

So, back to DVDs. Sonic Foundry is now owned by Sony, and Sony makes DVD players. While I have offerred some pretty pessimistic scenarios as to why a fix for the lack of end actions has taken so long (e.g., the Sonic Foundry DVDA engineers left town), the positive scenario is that they may be working with the Sony engineers to understand how most DVD players actually implement the spec so that whatever scheme they use for end actions will work across the largest number of players.

One final note on my workaround. It has the great advantage of only patching one file, and this is one of the smallest files in the DVD fileset. Also, the scheme of what I am doing is obvious: I just set a flag that tells the main menu handler which title to play next. The one downside is that without patching the titleset IFOs, the main program handler cannot differntiate between being called by the last title played and being called by the user pressing the title button (you can easily put the flag set into each VTS IFO as a Post operation just prior to the call back to the main PGC and this will eliminate the problem, but then you have to patch each and every VTS in addition to the VIDEO_TS.IFO file). As a result, the title button skips to the next titleset, and only actually brings up the main menus when the last titleset is being played. I'm now looking into ways I can use some of the system parameter flags to avoid this problem, but I'm a little wary because the state of these flags depends on the player, and not all players may set these flags in the same way (see my IBM PC history above).

I've learned a lot from this exercise, but in the end I sure wish Sony would just let me have a version that handled end actions. Think I'd make a good beta tester?
RichMacDonald wrote on 10/28/2003, 2:01 PM
John, I was waiting for you to add some more information before jumping in. Your post inspired me to do some background reading this morning, but I'm starting from scratch...and reading specs is not the same as doing. So I didn't feel sufficiently confident to add my $0.02.

My initial reaction to your technique was: "Nice hack, but the big case-statement is too ugly for it to be 'right'" :-) But now I see you were trying to keep the modifications in one file, so it makes sense. As far as the title button, it had occurred to me you could patch each VTS with a post command (and use the pre command to set the flag for the title action), but I see you thought of that as well. Without having ever used IFOEDIT, I don't see the significant downside of modifying each VTS. Is it just a tedium issue? It might be worth presenting the solution both ways.

All my reading of the DVD spec is second hand. Still looking for a copy that doesn't cost. I'm sure its out there. Care to mention where you got your copy?

How about preparing a simple DVD with end actions using another preparation tool, verifying it works properly, then using IFOEDIT to see how it was done? Think you might learn anything beyond what you already know?
JSWTS wrote on 10/28/2003, 3:19 PM
Ifoedit is a great tool, but figuring out how things were accomplished by reverse engineering can be a real task. Many have used this app to add features to projects created in ReelDVD (I have used it to prohibit user functions, menu buttons for audio or subtitle stream switching, etc). There is a nice pdf file created by a ReelDVD super user that has some application for DVD-A, or any authoring app for that matter. There is more than one way to allow for varying end user actions. I can tell you that monkeying around with the ifo files can render your project inoperable--so copying them and the corresponding bup files in a separate folder isn't a bad idea so you can simply revert back to the original if needed. You can just compile the project again, but copying these files is simple and certainly a faster remedy. Playlists are another and very easy way to allow for different end user actions with the exact same material. Maestro and DVD Studio Pro allow for this. It would be nice to see it find it's way into apps like DVD-A.

Jim
gold wrote on 10/28/2003, 4:02 PM
There should be a basic subset of commands that applies to all dvd players; I don't think you would be required to test for the player type. I am very impressed by the knowledge base of users; this thread could be one of the more educational ones. Microsoft had a link to the Mount Fuji spec on their website at one time; I too am interested in where you found the spec, John.
Gold
ftp://ftp.avc-pioneer.com/Mtfuji5/Spec/
is a link to these specs if this will help
johnmeyer wrote on 10/28/2003, 8:29 PM
I am quitting the forum because of the lack of moderator intervention. The hostility and off topic stuff has escalated dramatically in the past few months. This is supposed to be a professional forum, and the moderators are supposed to keep it that way. I enjoyed helping people, but I don't enjoy the hassles. This isn't supposed to be the Usenet.

However, before I go, I'm checking my active posts and answering a few last questions.

I got the spec from this site:

http://www.mpucoder.com

He charges $5 for three months' access to his site. Most of the raw specs are there along with a forum, although only about 1/3 of the posts get answers.
BillyBoy wrote on 10/28/2003, 10:26 PM
John get real. This is a peer to peer forum. There are no moderators. Someone from Sony will from time to time jump in and kill a thread if it gets too personal. It isn't their job to play wet-nurse to the more flighty members like yourself that easily get their shorts all bunched up and lack the ability to ignore threads or posters that get under their skin.

Your comment that you don't like hassles, flys in the face of your actual conduct. Everytime somebody decides to attack me in the Vegas forum, there is John Meyer in the thread adding his two cents and always pointing his finger in my direction. How "professional" is that?

In fact John Meyer is so "professional" he just got done calling me a rotten apple in the Vegas forum totally out of the blue.

To further educate you, this isn't a 'professional fourm'. Nowhere does Sony suggest that. As I said it is a peer to peer forum. Some people act more "professional" than others.
RBartlett wrote on 10/29/2003, 3:30 AM
Sonic Solutions Scenarist and what was DVD Maestro are probably what the player manufacturers test again. I guess the DVD spec is a superset to that which is likely to come out of these authoring mammoths.

The other way would be to reverse engineer a commercial disc. If you are in a country where this is permissible.

P.S. don't forget the power of the (ignore this user) click! We all bought into SoFo but there is nothing to say we should all get on as customers with varying perspectives. Please don't reply to this postscript.
farss wrote on 10/29/2003, 6:16 AM
The DVD bible is published by the DVD Forum. i think it's $5,000 per copy, one per company subject to non disclosure. If you have bought it and join the forum you only have to pay $15,000 for memebrship. Get the picture!

I wouldn't be surprised if one reason SoFo weren't in a big hurry adding all the fancy widgets is because so many of them don't work on some STB. I think it's VCDHelp that has a long list of Hollywood releases that have features that don't work on some players.

At least what we've got with DVDA either plays OK or just plain doesn't play, the menu highlighting issue would seem to be the only exception.
gold wrote on 10/29/2003, 8:02 AM
John,
There's only so many techical items one can cover with DVD-A 1C. There aren't many options with it; so there isn't a lot to discuss on how to use it. That's why I was excited about your involvement in adding end actions.
Thanks for the link to the DVD spec info.
[Aside: I taught a graduate course on video compression and communication a while back and thoroughly understand MPEG-2 [-1,-4,-7] and the other CODECS; however, I never got into DVD architecture as the course was based on transmitting video--not storing it. I usually learn more when I teach a course than when I take one. For example, did you know that birds of prey have two fovia and that colorblind children are likely to come from quadchromatic mothers? Maybe I should do a sequel on video storage so I can learn this stuff.]
At any rate I was really looking forward to following your enhancement efforts; it seems like you have an excellent handle on DVD Architecture. So please post any future successes with enhancements. I too miss the support that Sonic Foundry provided.
thanks,
Gold
SonyEPM wrote on 10/29/2003, 11:12 AM
First: Like all the rest of our apps, there's always some "MUST HAVE" feature that doesn't make it into a given release. We could have tried to add every single feature under the DVD spec into DVDA 1.0, and we would have wound up with a buggy mess that might have looked great on paper but didn't actually work (other companies make that product <g>). So we had to be realistic, and we chose things like high quality MPEG encoding, PAL/NTSC/24p, AC-3, no recompress, nice looking menus, burns to the widest possible variety of DVD drives, plays back in set top players, etc...sounds like a bunch of no brainer stuff but I am continually amazed at the number of competing apps that don't handle this kind of back-bone stuff with any kind of reliability.

Do we have quirks, and bugs, yes. I hope you'll agree that we have fixed most of the really problematic issues, and long time SF (now Sony) loyalists, which is most of you, know that its worth sticking around- the apps do get better and more feature rich with time, and we take care of our users during upgrade time.

All that said:

DVDA 1.0x will not magically surface with a bunch of new features. An update will be coming out with a new Sony splash screen but that's it for 1.0- a branding update only.

Second: I would like to make it clear that a new version of DVDA IS being worked on, we have listened to your feedback, when there's more to tell, you'll hear it in this forum. Please don't prod us for what/when/how much- nobody can reveal that.

Third: I HATE having to pull threads due to bickering or insults or whatever, but at times I have to do that (and just did over in the Vegas forum this am). Please stay cool- don't post for awhile if you can't. thanks
gold wrote on 10/29/2003, 1:27 PM
SonyEPM,
Thanks, this type of response is what we've been asking for and you supplied it. If I read your comment correctly there is an updated version of DVDA 1.0 in the works (with no new features just bug fixes or that it will be a no cost upgrade). You mention that DVD-A will not surface with a lot of new features but that our feedback is being listened to: purposely mysterious but encouraging none the less -- DVD-A 2? I understand that you would have to shoot us if you told us more, but I'm not clear on what you've already told us. And yes, the Sonic Foundry now Sony products are the least bug ridden that I have used; I commend you guys on quality.
Thanks,
Gold
farss wrote on 10/29/2003, 3:20 PM
Reading EPMs post the next release of DVDA will be a branding change only.
If I read his post correclty no bug fixes or enhancements.
There is a new version being worked on but no news for obvious reasons as to when or what will be in it.
gold wrote on 10/29/2003, 3:26 PM
Farss,
I think you read it correctly; no bug fixes just a new splash screen. Rereading I get this also.
thanks for clearing it up,
Gold
aussiemick wrote on 10/29/2003, 8:30 PM
Would be very helpfull if they advised us that a fix update was a week away, a month away or whatever approximate timeframe was possible.
BillyBoy wrote on 10/30/2003, 9:29 AM
They do generally say a day or two ahead of time. While it may be nice to know more in advance so you can plan your puchases accordingly what bugs me more are companies like Adobe announing a new version, like they did with Photoshop, then not shipping it for two months! They announced last month and won't ship till the end of next month. I hate that!
johnmeyer wrote on 10/30/2003, 12:44 PM
One last item to finish up (I want to finish what I started here).

Here's the completed guide for end actions (at least this one kind of end action). Everything seems to work. I couldn't find a way around editing the VTS IFO files. However, it is the same edit for each one, and only involves adding one line to each file (and you can cut and paste, so it goes really fast). Also, you now only have to edit the VIDEO_TS file in two places, so it comes out just about the same amount of work as my original approach. In the VIDEO_TS file, you need to add just two lines of code for each MPEG file in your project, plus five lines of overhead.

Here's the link to the guide:

End Actions Using IFOEdit
kameronj wrote on 11/18/2003, 11:55 AM
Wow.

That's all I have to say after reading the guide.

Wow.

Good work!!
johnmeyer wrote on 11/18/2003, 1:39 PM
Thanks!

It took awhile to get it right, but it really works, and works well. I've created many DVDs since creating the guide, and I can't tell you what a sense of freedom it provides to be able to create individual MPEG and AC3 files that I can later assemble into various DVDs.

I have a collection of almost 50 VHS tapes, and I want to create dozens of different DVDs for different people, each with different combinations of video. I could never keep all this video on my lmiited storage using DV AVI, but with MPEG, I only need about 300 GBytes. I just drag the files to DVDA that I need, author, then fix up the IFOs using the guide, and then burn the DVD. It takes about five minutes to do the patch. I always check using my DVD software player before I burn.
Cooldraft wrote on 3/13/2004, 9:26 AM
What if there is no PGC Command table under the VMGM_MAT? My video_ts goes from color 15 Y Cr CB to PGC Command Table start byte. Is this just because I have a static background for my menu?
johnmeyer wrote on 3/13/2004, 4:33 PM
The only reason for this first step in the instructions is to set register 11 to an initial value. I used register 11 to keep track of whether to simply go back to the main menu, or whether to go to the next chapter. I can't guarantee what I am about to say, but I think that if you simply skipped this step, the initial value of the register would probably still test to zero, and when you first play the DVD it will bring up the main menu. If not setting it explicitly ends up returning some other result, then the logic in my instructions will then play one of the chapters.

If you can figure out where your player first goes when the DVD first plays, you can insert the same "pre command" there.
[000000f4] 1.Pre Command Set GPreg<11> mov (set-val)<0> [71 00 00 0b 00 00 00 00 ]


Just make sure you insert it before the command that branches to the main menu.
Cooldraft wrote on 3/14/2004, 6:43 AM
Your instructions are great and everything works...but you knew that. Thanks.