Director FAQ || Notes ~ Short Index ~ Full Index ~ Search || Prev ~ Next ||

[8] Quicktime

NB: For more information on QuickTime, see Charles Wiltgen's QuickTime FAQ, available from:
(Mac) ftp://ftp.mcs.com//mcsnet.users/cwiltgen/QuickTime FAQ.pdf.sit
(Win)ftp://ftp.mcs.com//mcsnet.users/cwiltgen/QT-FAQ.ZIP

Caution: These files are in Acrobat (PDF) format, and you'll need to download Adobe's free reader (for Mac or Windows) to view and print it: http://www.adobe.com/Software.html


Director FAQ [8] Quicktime

[8.1] How can I control my QT movies via lingo?

The playback of digital video sprites can be controlled using the movieRate, movieTime, startTime, stopTime and volume sprite properties.

The movieRate allows you to start and stop playback, as well as adjusting its speed (eg, to simulate rewind and fast-forward operations).

The movieTime allows you to detect where you are in a movie, and jump to a different frame. You may also want to use the duration of cast property to compare the current movieTime with the length of the movie as a whole.

The startTime and stopTime properties allow you to specify a segment of the movie to be played back.

The volume property allows you to change the volume of a movie's soundtrack.

For examples of some of these properties in use, see the next two questions.

[top]


Director FAQ [8] Quicktime

[8.2] How can I reproduce the effects of the tempo channel "Wait for QuickTime movie to finish in channel x" setting using lingo?

To get your Director movie to pause on a frame until a digital video sprite has finished playing, put something like this in the frame script:
on exitFrame
  if the movieRate of sprite myVideoSprite <> 0 then go the frame
end exitFrame

This simply tests whether the sprite is still playing and, if it is, loops back on the same frame. Note that if the loop of cast property is true for the cast used in the sprite in question, this will never exit.

[top]


Director FAQ [8] Quicktime

[8.3] I don't want to loop this QT, but I need it to play again. What do I do?

To rewind and play again, reset the movieTime to the beginning and restart it using the movieRate:
on backToStart
  set the movieTime of sprite myVideoSprite = 0
  set the movieRate of sprite myVideoSprite = 1
end backToStart

It may sometimes be necessary, especially if you're also switching castmembers at the same time, to kickstart this process with liberal use of the updateStage command.

[top]


Director FAQ [8] Quicktime

[8.4] Does Director support the new features of QT2?

Yes and no. One of the things about QuickTime is that it provides some services to an application without the application having to know about them. So, for example, Director can import a MIDI file and reallocate its instruments without having any active support for MIDI QuickTime, because this ability is provided as part of the standard QT2 import dialog. Similarly, QT2-specific movies can be played onstage by Director, because playback is provided transparently by QuickTime.

However, Director does not presently include active support for QT2 specific features. So, for example, it does not allow you to alter the instrumentation of a QT MIDI file except at the moment of conversion.

Fuller support for QT2 has been mentioned as a feature expected in the next incremental update (4.04), but this remains to be seen.

[top]


Director FAQ [8] Quicktime

[8.5] What's the difference between preloading and prerolling?

Preloading means that the whole of a QuickTime file is read into RAM rather than being spooled from the disk in little chunks. This is the same process as preloading other castmembers. It can improve performance be reducing the amount of data that needs to be read from different parts of the disk at the same time.

Prerolling is a process specific to QT, which initializes QuickTime and prepares it for playback of a particular movie. It is an internal software call that developers of software using QT were recommended to use in earlier versions, but they often didn't without causing noticeable ill-effects. With QT2, failing to preroll is reported to cause a significant degradation of performance

Unfortunately, Director is one of those applications which doesn't preroll for QuickTime playback.

Apple have released a system extension to compensate for this and a few other problems, which is available from:

ftp://ftp.apple.com/dts/multimedia/quicktime/MMTuner/Apple MM Tuner.hqx

This is for the Macintosh only. Whether a similar fix is required or likely to be provided for QTW remains to be seen.

[top]


Director FAQ [8] Quicktime

[8.6] When should I use the directToStage property with my QT movies?

DirectToStage quicktime bypasses Director's offscreen buffering and draws the quicktime movie's graphics tracks directly into the stage window. This makes for somewhat better performance, but prevents Director from applying any of its own graphic effects. Ink effects and colorization are obviously out, but so is front-to-back ordering of sprites. Like sprites with the trails effect, directToStage quicktime is effectively drawn on top of everything already present.

Using directToStage is therefore a matter of what results you want. On the one hand better playback, on the other, no Director manipulation. The choice is yours.

At least, unless you are using Windows, or are planning to port your Macintosh movie. Director for Windows can *only* play Quicktime movies directToStage (whether this is a limitation of DfW or QTW I don't know), so the choice doesn't exist. Even if you are working on the Mac, therefore, if you are planning to port use directToStage for consistency.

[top]


Director FAQ [8] Quicktime

[8.7] How do I minimize stutter in my QT?

[top]


Director FAQ [8] Quicktime

[8.8] Any tips for QuickTime for Windows?

[The following is courtesy of Paul Farry (p.farry@cqu.edu.au)]

Quicktime for Windows performance is somewhat different to the Macintosh. If you are playing movies on the PC, then it is a good idea when you branch from one screen to another and BOTH contain quicktime movies (but different actual footage) make sure they are in the same channel. It appears that if you branch to another screen, but QuickTime is still there, the movies leave chunks out. (This is NOT consistent, so difficulty is encountered in submitting a bug report.)

Another tip is to always stop your QuickTime movies on your current screen before actually making the branch:

on stopQT
  repeat with count = 1 to 48
    put the castNum of sprite count into spcheck
    if spcheck > 0 then
      if the casttype of cast spcheck = #digitalVideo then
        set the movieRate of sprite count = 0
      end if
    end if
  end repeat
end stopQT

This handler is used for us on all our quicktime programs, and it seems to be working. BUT (there is always one), you will probably have to also do STARTS on your movies. Use the above handler, but instead of "movierate of sprite count = 0" set it to 1.

[top]


Director Web: Director FAQ: [8] Quicktime

Maricopa Center for Learning and Instruction (MCLI)
Maricopa County Community College District
HTML by Carey Smith, carey.smith@natinst.com

The Internet Connection at MCLI is Alan Levine --}
Comments to levine@maricopa.edu

URL: http://www.mcli.dist.maricopa.edu/director/faq/faq8.html