Creating a menu option on dvd studio pro that can randomly play all clips

I'm about to make a dvd that will be made up of around 150 different product still images of which some will have video. They will be split into 5 chapters depending on product type.
On the menu screen each chapter will have its own button but there will also be a play all button.
Is it possible that when playing all it can randomly choose clips from all chapters so that all the products are completely mixed. Does this have to be manually random from my end or is there an automatic random. Either way how do I do this and am I looking at doing this in the right way.
Does this need to be done on Final cut pro or DVD studio pro
I would really appreciate some help on this!!!

imac, Mac OS X (10.6.6)

Posted on Jan 12, 2011 5:12 AM

Reply
4 replies

Jan 21, 2011 5:07 PM in response to hargreavesimages

You've picked a good subject to start on!

This is possible to do in DVDSP, and the previous post has a detailed script that also tracks whether a clip has played before... i.e. no repeats.

If repeating isn't an issue then you can greatly simplify this by using the 'ran' function in a script. If repeating a clip is a problem then you've got a lot more work to do to ensure it doesn't happen. The example system shown previously is pretty advanced scripting, using bit shifting to track what has played. It is limited to 16 clips mind you, and 150 gets a bit more involved! The problem you've got is knowing what has played - keeping track of 150 clips is quite hard, and uses 9 1/2 registers... but we only have access to 8. In short, we need to find a way around this. Your second problem is putting 150 clips into a track and having 150 markers to split them... you need two tracks (there's a limit of 99 markers per track).

First, the easy bit... lets assume repeating is not a problem, but let's use a system that helps minimise the repeats (i.e. not a true random, but one that often gives a more pleasing result). For this we need to generate a random number between 1 and 150, then we need to go to the clip which corresponds to the chosen number. In your case, over two tracks, we have to do a bit of additional maths. Let's assume track 1 has 70 clips, and track 2 has 80

ran GPRM0, 65535 //creates a random number from 0 to 65535
mod GPRM0, 149 // selects a value using a modulus operation, from 0 to 149 (i.e. 150 possible)
add GPRM0, 49280 // this is the value of track 1 in your DVD
Jump indirect GPRM0 // jumps to the item.

Now, the magic here is knowing that track 1 has a value of 49,280 and that chapter 1 has the same value (i.e. the start of the track, and thus clip 1). Clip 2 is at marker 2 and has a value of 49,281... and so on. Track 2 has a value of 49408 and this will also be the value of clip 71.

So, by adding the track value to the random value generated we get the item value for a particular chapter (or clip). This then starts playback, but at the end of the playback it will continue to the next marker unless you set an end jump on the marker itself to tell the DVD player to return to the menu, or return to the random generator script.

Remember, this will not prevent repeats. To do this is much harder, and not at all random, as we have to create groups of clips that we can randomise within, and also randomly select a group to start with. You can probably randomise around 100 to 112 clips (with repeats). Beyond that you have not got the room to do the math in the 8 registers DVDSP gives you access to. If you want no repeats you can halve the number possible.. and it gets way more complex to do 🙂

Jun 29, 2011 9:54 AM in response to hargreavesimages

Hello:


I tried your method of scriping for random play and it worked beautifully until I found out I have two too many chapter markers and end jumps in my track (108). I thought creating a story would be a work around, but if I use your method above, I would need to know the value of the story, right? How in the world do I find that out? How did you even know track 1 has a source value of 49, 208?

Aug 1, 2011 3:39 PM in response to abedmonson

Sorry for taking so long to reply.


Track values, or values of any item in DVDSP can be found if you use a few simple scripts. In times gone by the Simulator allowed you to see the GPRM information as it was being written. You could literally watch the registers change as your project was simulated, and this was really handy. Sadly, one or two ProKit updates removed that from the simulator window (a good reason for not updating the ProKit software - I still run v5 just because I need to see those GPRMs).


Using a script entry such as 'get last item' would give you a numerical value. If you go from a track to a script you get to see the value... 49280 is the value of track 1.


Similarly, 32 is the value of Menu 1.


Scripts start at 1...


And so it goes - times are changing rapidly in the Apple world, and these archaic pieces of info are fast becoming lost. However, they can be really useful when scripting complex projects, and I lament the fact the simulator no longer shows the GPRM values.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Creating a menu option on dvd studio pro that can randomly play all clips

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.