Maximizing Your Media:A Brief Guide To The Latest and Greatest QuickTime Media TypesBy Drew Colace |
CONTENTSIdentifying the Media |
In 1991, creating a QuickTime movie player or editor was relatively straightforward. Back then, there were two types of media to work with -- video and sound -- and a canvas of APIs. At the time, QuickTime demos featured trees swaying in the wind, clouds rolling overhead, and the moon cascading its light down through an evening sky -- and the movies were postage stamp size! Not the most compelling examples of multimedia. Now, don't get me wrong. I love QuickTime, but I'm glad those days are over! Today, QuickTime delivers the most dynamic media available -- professional quality video and sound, MPEG, 3D objects, sprites, text and MIDI, and its capabilities are continuing to grow. With QuickTime 2.5, it is easier now for movie tracks to act on one another, as is the case with our Tween track, which sends its information to another track to change it dynamically over time. The possibilities for truly exposive media content are there, yet so many QuickTime applications act as though we are still back in 1991 and can only deal with video and sound tracks. Well folks, it's many years later and it's time to get with the program. This Technote explains how you can make sure your QuickTime application isn't blind to any media types available to it and some simple things you can do with that media to add value to your application. |
Identifying the MediaSome applications, in an effort to make sure they can successfully edit or otherwise manipulate a particular movie's data, will take a look at the movie's media to see what types are available. In general, this was fine in the early days, since video and sound were the first two pioneering media types of the QuickTime frontier. But now, with the burgeoning of new media types, QuickTime applications are not necessarily taking full advantage of their capabilities by looking for particular media types. |
Using
|
theTrack = GetMovieIndTrackType(sourceMovie, trackIndex, VisualMediaCharacteristic, movieTrackCharacteristic); |
whereas a fully parameterized call to look for tracks with media of a certain type would look like:
theTrack = GetMovieIndTrackType(sourceMovie, trackIndex, VideoMediaType, movieTrackMediaType); |
You might use one of these calls in a routine like this:
Track theTrack; long trackIndex = 0; while(theTrack = GetMovieIndTrackType(sourceMovie, ++trackIndex, VisualMediaCharacteristic, movieTrackCharacteristic)) { // theTrack meets your search request so do something with it } |
Note: |
Using Video MediaVideo media is one of the first things you think about
when working with QuickTime, since so many "movies" are
pictures and sound. Video media can be found by calling
|
First Cool Thing: Using
|
Note: |
More recently introduced are the concepts of Track
References and Modifier Tracks. One way to provide more value to video
tracks is to add a text track which has descriptions of the various
parts of the video track. This idea has been promoted since the Text
track's introduction in QuickTime 1.5. Initially, the thought was to add
a text track to act as subtitling for movie dialog or as descriptive
text to identify a scene or sound clip. But now text tracks have a new
capability when you are using the Movie Controller interface. Text
track data can now be used as chapter or scene descriptors with its info
being displayed in a pop-up menu in the Movie Controller play bar.
Typically, the text track is hidden or disabled, although the track can
be displayed as well (its utility and aesthetic quality would seem to
detract from the controller's function). In order to get the movie
controller to display the chapter name in the play bar, you must create
a reference between the text track containing the scene names and one or
more of the other tracks in the movie. This is done using
AddTrackReference
. In the example below, the reference is
added from a video track to the text track. It could also be added from
a sound track, an MPEG track - just about any type.
AddTrackReference(videoTrack, textTrack, 'chap', nil);
Sound MediaQuickTime sound tracks have a media type of
Moving Sound Around
Yes, just playing sounds hardly stands out today. And since you have a
few new controls at your fingertips that can make your sound more
dynamic, it just might be time to start exercising that option. Using
|
Text MediaQuickTime Text tracks have a media type of
|
MPEG MediaMPEG media in QuickTime has had a dual life for some time. On the one hand, there has been support for MPEG media within QuickTime since version 2.0. The other hand is the 'but' as in "...but QuickTime 2.0 requires a special hardware decoder board to see or hear that MPEG media in QuickTime." Today, there is good news for QuickTime, MPEG and those
developers who want to take advantage of both because of the
introduction of the QuickTime MPEG Extension for Power
Macintosh. This extension lets all Power Macs play and use
MPEG media, type When you do get down to work with MPEG media that has video information, you might want to take advantage of a nice capability of the QuickTime MPEG Extension. It has the ability to set a rectangular clip region on visual MPEG media without any performance penalty. This can be especially useful for poorly captured and encoded MPEG media that show visual garbage along the edges of the video frame - unfortunately, an all too common occurence. Using scaling and clipping during runtime can handily hide the glitch. |
QuickDraw3D MediaQuickDraw3D media, recently introduced with QuickTime
2.5, has a media type of |
Sprite MediaQuickTime Sprites may be the most misunderstood media type that QuickTime supports, probably because its elements do not necessarily have to be confined to a timeline or run from beginning to end. But, to get started, you can think of using QuickTime Sprites in the traditional way -- a linear track moving from start to finish -- then grow from that point. |
QuickTime Music (MIDI) MediaQuickTime Music, often thought of as MIDI, has been available in QuickTime since version 2.0 but has recently been significantly enhanced in QuickTime 2.5. |
QuickTime, being more versatile and powerful today, calls out to your application to take full advantage of its capabilities Some people may think that flipbook animations, such as those provided by Java and animated GIFs, are the great. Well, I thought they were great, too, in 1987 when VideoWorks first came out, but with all the VERY COOL features that QuickTime 2.5 offers today, it is almost a crime against humanity not to do something with them. Therefore, you ought to use some of the methods discussed in this Note to find and manipulate the new media types. That way, your app can be the best it can be!
|
Thanks to the QuickTime engineering team for information, inspiration and perspiration!