Provides classes for writing QuickTime movie files in pure Java.

Overview of the QuickTime movie file format

A QuickTime movie has a time dimension defined by a time scale and a duration. A movie always starts at time 0. The time scale defines the unit of measure for the movie's time value. The duration specifies how long the movie lasts.

Movie time:      0   1   2   3   4   5   6   7    ...   20
                 +---+---+---+---+---+---+---+---+---+---+
Movie time unit:          -->|   |<--                      For example: 1/60 sec.
Movie duration:  <---------------------------------------> For example: 20 time units.

A movie can contain one or more tracks. Each track refers to a media that can be interpreted within the movie's time coordinate system. Each track begins at the beginning of the movie. However, a track can end at any time. In addition the media in the track may be offset from the beginning of the movie. Tracks with media that does not commence at the beginning of a movie start with an empty edit entry.

Movie time:                0   1   2   3   4   5   6   7    ...   20
                           +---+---+---+---+---+---+---+---+---+---+
Track 1 (movie video):     XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Track 2 (movie audio):     XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Track 3 (preview audio):   ----XXXXXXXXXXXXX
Track 4 (poster graphics): ----X
                        -->|   |<-- track start time offset

A track is always associated with one media. The media contains control information that refers to the data that constitutes the track. Each media has its own time coordinate system, which defines the media's time scale and duration. A media's time coordinate system always starts at time 0, and it is independend of the time coordinate system of the movie that uses its data.

Media 1 (movie video):     0 1 2 3 4 5 6 7                  ...   40
                           +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                           XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Media 2 (movie audio):     0  1  2  3  4  5  6  7           ...   23
                           +--+--+--+--+--+--+--+--+--+--+--+--+--+-
                           XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Media 3 (preview audio):   0  1  2
                           +--+--+
                           XXXXXXX

Media 4 (poster graphics): 0
                           +
                           X

The track contains a list of references that identify portions of the media that are used in the track. In essence, this is an edit list of the media. Consequently a track can play the data in its media in any order and any number of times.

Edit List 3 (preview audio):   0  1  2  3  4
                               +--+--+--+--+
                               ---abcccafgab

Media 3 (preview audio):       0  1  2
                               +--+--+
                               abcdefg

A media describes the data for a track. The data is not actually stored in the media. Rather, the media contains references to its data. The data may reside in the movie file or in an external storage. The data referred to by the media may be used by more than one movie, though the media itself is not reused. If the data is stored in the movie, the samples of the media data can be interleaved with each other. Interleaving can occur after each sample, or after a chunk of samples.

Media 1 to 4 interlaved data:  1112221112221112221113332224

For more information about the QuickTime file format see the "QuickTime File Format Specification", Apple Inc. 2007-09-04. (qtff) http://developer.apple.com/documentation/QuickTime/QTFF/