DVD Studio Pro GPRM based button jumps, scripting, DVDSP scripts

This has been an interesting week. For nearly three years I have wondered about how to reliably make GPRM based button jumps in DVD studio pro. For one reason or another they have never worked reliably and so I have avoided using them. Worse, I have advised others to avoid them, too.

This week, thanks largely to Jake Russell, we might have finally sorted out the GPRM based jumps. I created a simple project that makes use of two menus accessing the same track in DVDSP and set up several different ways to sort out which to return to after the track plays (depending on where you came from).

Every time I used a pre-script on a menu to identify it the GPRM based button jumps wouldn’t work. Actually, it was Jake that put two and two together… To cut a long story short we used a different method to identify the parent menu and not use pre-scripts.

That’s the first time it has worked reliably, so perhaps it can now be used in a real project…

For what it’s worth, the final project can be downloaded from here

Look for a file called GPRMBasedButton.zip which contains the scripts and the project file, plus a build that works.

DVD Studio Pro, Jukebox scripts, random playback

Thanks to Alex Blanc today – he worked through a lot of binary based maths with me to help answer a fairly challenging question… how to set up a user selected playlist so that it plays back in a random order.

The issue is actually very complex. Last year we developed a user selected playlist allowing the viewer to choose up to nine clips from a total of 24 on offer. If you consider that each viewer will make their own choice this is in itself a random playback engine. However, what if the viewer wants to select the first nine clips and then play those back randomly without repeating any clips? This is the challenge!

It turns out to be possible, but all of the available memory slots in DVDSP are used at some point in the scripting. We adapted the Jukebox scripts as our starting point and used the same basic script structure – i.e. a selection script, a playback control script, a pre- playback script to clear some of the registers, a script to clear all registers and a script with all of the ‘jump’ statements in it.

Alex’s mastery of the coding environment meant that no script was over long, and he also introduced me to the ‘XOR’ function… if you have never used any binary maths functions then this is a tricky one to explain. It basically looks at two given memory slots and compares the entries in them. If both are the same it evaluates to ‘true’ otherwise it gives a ‘false’ response. Quite why we used XOR is more obvious when you look at the scripts themselves.

They are not fully finished yet – some fine tuning to do and so on, but you can get to them by going here:

http://homepage.mac.com/halgernon

and looking for the item called Jukebox_randomiser.sit. You will also see the original jukebox files there, too.

The basic mechanics of the scripting is that the user chooses a clip to play. The value of the button they select is then lodged into a five bit long section within a 16 bit register (there are eight of these at our disposal). The script then adds one to a counter and sends you back to the menu for the next choice if the counter is less than 9. Once the ninth choice has been made the script sends you to a menu to play the choices back. To do this it first generates a random number between 0 and 9 and uses this to look within one of three memory slots where the choices are stored. It then masks off the two sets of five bits that it isn’t using and works with the five bits it needs. These are then blanked to be zeros so that when it next looks it knows whether or not the choice has been played. By repeating this process the script tracks what has been played. If the random number generator picks the same number a second time the script subtracts one from it to attempt to find a new number not yet chosen…

I told you it was complex!

In time I will tidy this set of scripts up and sort out the remaining ‘end jumps’ for the tracks that use the scripts, then build a disc image for folks to download and try out. Currently there is also a section within two of the scripts which should be tidied up as it is very long winded (we couldn’t think of the shorter way to do it…sigh), but otherwise it all works as it should. I will eventually add comments to the scripts as well so as to keep track of what is going on should anyone else want to use them.

DVD@ccess, activating URLs from a DVD, using DVD@ccess

Launching a URL, be it web based or file based, from a DVD adds to the overall experience that DVD authors can provide the viewers. On the Mac platform, the software which handles this and is built in to Mac OSX is called DVD@ccess. The alternative is called Interactual Player, and is far more prevalent on the windows platform.

Authoring discs on a Mac using DVD Studio Pro is a rewarding experience, but adding URL links and getting them to work on a PC is not. DVD@ccess is, at best, flaky when run on a PC – not that the software is unstable at all, more that it is totally unreliable. You cannot accurately predict whether the PC viewer will get the URLs launched in the way that you want them to.

It seems that some DVD Players on the PC, and some operating systems are more compatible than others.

I’m starting a list of those that do and don’t seem to work – so far more don’t than do! Please add your experiences here as well.

What doesn’t seem to work:

OS Software player
Win XP Pro Power DVD Player 6
Win XP Pro Windows media player 9
Win XP Pro Video Lan Client

MPEG2 encoders, software MPEG2 encoders, real time hardware MPEG2 encoders

It’s never easy, is it.

So many people have asked me recently about what is the best way of encoding footage for DVD that I thought I’d write the minor wisdoms of it here. There are lots of MPEG2 encoders available for computers, and some recent hardware products look like they could be good for some purposes. However, if you are on any kind of budget and need to encode to MPEG2 at a decent quality then you really have only a few options.

On an Apple computer you can use ‘Compressor’, which is decent enough but to my eye produces a washed out look most of the time – a little like a milky film over the top of the original pin-sharp video. Compressor excels in that it is free, can handle most challenges and gives you access to several useful filters and effects. It is based on the QuickTime MPEG component and as such differs little from the quicktime quality (apart from where you can specify more exact settings, etc). Compressor is bundled with Final Cut pro and DVD Studio Pro.

A better software encoder for the mac, for me, is BitVice. This superb encoder is really easy to use and produces remarkable results time after time. It is not free, but worth every penny, IMO. I have this on my Powerbook and use it when out and about or when I need a quick encode here and there. It has some excellent features – great digital noise reduction and the ability to specify Half D1 sizes too. Furthermore, it is well supported, widely used and seldom receives a word of complaint.

A third Mac based encoder would be MegaPEG.X Pro. This is also an incredibly versatile encoder, with shed loads of features, but to my mind is a little too complex to operate – even with the pre-sets. There are so many options to you it is easy to set it up incorrectly. I do like the output from MegaPEG, but getting there is tricky! It is comparable in cost to BitVice.

As for hardware on a Mac – if you are on a fairly tight sort of budget then you can look no further than a Wired Inc Mediapress Pro card. This useful piece of kit will take your video from the camera and encode in real time, giving you a lovely result. It doesn’t work on a firewire input, mind you – you need to either use component inputs or something like S-Video. It will, however, transcode a quicktime file at the same sort of quality as the live input, but it won’t do it in real time. The encodes I have got have been crystal clear, but somewhat dark if I leave things at the default settings. Not so dark as to cause a problem, but dark, nonetheless. I like to use the Mediapress card when I am in work, where we have one sitting inside a DP G4. The software for the Mediapress card is getting better – still not as intuitive as it could be, but clear enough – encoding takes a lot of RAM no matter how you do it, and the Mediapress card benefits from being in a fully loaded machine with a decent spec. The software can fail with some spectacular results if you try to use it in an underpowered machine – but support from Wired Inc is excellent.

ON a PC I only have a couple of options within the budget I work with (not very much money – certainly not in the thousands of pounds range). There are plenty of ‘TV” capture cards available as a hardware alternative, and these will encode to MPEG2, of course – just not at the quality I want. Therefore I go for software products on my PC (which is largely redundant and just sits around doing not very much at the moment) since it has plenty of processing power and RAM and is networked to my Macs. I am happy to shuffle files to it from the network, have it do the major grunt work and send them back when done.

I regularly use Canopus Procoder as it is probably the best software encoder in the range. I have tried TMPGEnc and am soon to look at Cinemacraft too, but TMPG produced nothing better than BitVice – and in some cases I found it worse. It does have some nifty features, mind you. Features are all well and good, but the output and flexibility of the software are paramount to me. As such, Procoder can take any format and convert it to any other – it can also handle standards conversions (NTSC to PAL and back) with ease and does a really decent job of that too. De-interlacing, gamma correction and all manner of other filters and effects can be applied, and then Procoder just gets on and does the job. It produces quality equivalent to Mediapress on the mac, better than BitVice most of the time and, although on a different platform with vastly different processors, etc, produces it a lot faster than BitVice too. I have yet to find a file Procoder can’t work with… or a task it can’t do – but I am not a very demanding user, overall.

So, which to use? The answer is fairly simple. If I have it available, I’ll use Canopus Procoder – it doesn’t tie up the Mac and so I can get on with other creative work whilst it chugs along. if I am working on my Powerbook, I’ll always use BitVice – there is nothing to better it for ease of use and quality so far. If I am in work and I need a real time encode then it has to be Mediapress.

There are alternatives out there – the Sonic SD range, for example. However – brilliant as these may be – I can’t afford one. Cinemacraft is the next option – I know it is used for a lot of high end encoding for DVD… again, I don’t have it and it is slightly out of the budget… but I could certainly see myself using it if I was suddenly given the budget I need! Both these options are PC based, of course.

Lastly, what of more humble encoders, such as the Fastcoder from LaCie? Well – this very promising little piece of hardware appears only to be available for NTSC at the moment. It is receiving good reviews and I’d like to have the opportunity to try it out. Also, don’t overlook things like the DVD recorders and the swathe of PVR kit such as the EyeTV. I don’t have one, but as soon as I can I’ll have a look at what they can do.

DVD Editing and Authoring with MyDVDEdit and DVD Studio Pro – targeting the loop point

Using DVD Studio Pro 3 from Apple enables us to create some exciting DVDs for Ultralab. An example of this would be the latest SummerSchool DVD which was completed before Christmas and is full of extraordinary examples of young peoples’ creativity.

As good as DVD Studio Pro is, there are some limitations which mean some things can’t be done in the way you want. In order to enhance the work you can do, you need to use an editor which works on the files you create with DVDSP. Such an editor would be MyDVDEdit by Jerome Cabanis. This small app lets you ‘look’ inside the DVD structures and alter the scripting that DVDSP writes for you so that you can make your DVDs even more interactive.

One example of this is to target the loop point in a motion menu… currently in DVDSP you can’t return back to the point in an animated menu where the buttons appear after watching your footage. You either have to sit through the entire opening animation, or the DVD has to contain a second menu which is static and has the buttons on it. This, of course, takes extra space on your disc. However, with MyDVDEdit you can very easily open up the VIDEO_TS folder, locate the menu and add the necessary lines of code to add this functionality.

I have written a brief tutorial available from MyDVDEdit.com (originally hosted over at Editorsbin.com ) which explains exactly how to do this using MyDVDEdit. I should add that this application is not alone – there is a far more fully featured application (which is also licensed by the DVD Forum, by the way) called TFDVDEdit – both are Mac based apps.

MyDVDEdit is shareware, TFDVDEdit is a fully professional editor. I get the distinct feeling that MyDVDEdit will continue in rapid development and will be adding more and more features as time goes by. The fact that it isn’t licensed by the DVD Forum shouldn’t put you off using it, but the old rules apply… always make a back up of your VTS folder and work on that. Neither Jerome, nor I, can be held responsible for anything that you do to your projects!

Thanks go to Alex Alexzander for the editorsbin site, and to Jake Russell, who started the whole idea in my head! Jake is part of the TFDVDEdit community, and a lot of good work is done over there about this kind of post build editing. Ian Sheppard is a good example of someone who began to develop this particular technique. Jake posted the first article I saw about it, and mine simply follows his work.