Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: moov atom
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: moov atom



Disciple 1 wrote:
> As the term is going around a lot, do you think you could expand a bit
> on what is called an Atom?

Let me begin by saying that you can create, edit, and deliver QuickTime
movies for the rest of your life, and never, ever, need to know what a
QuickTime atom is.

That said, a QuickTime atom is a general-purpose data container. It's
like a box: it can contain data, or other boxes, which in turn can
contain data, or still other boxes, and so on. Each type of atom has a
four-character code, such as 'moov' or 'trak', that tells you what kind
of atom it is.

A QuickTime movie file contains information about the movie, stored in a
'moov' atom -- which contains one 'trak' atom for each track in the
movie, a 'udat' atom for user data, and so on. This information tells
QuickTime what's actually in the movie and where it's stored.

If the movie is self-contained, the file generally contains an 'mdat'
atom as well. This contains all the movie data -- sound samples,
compressed video frames, and so on.

QuickTime needs to load the 'moov' atom into the computer's memory in
order to play a movie. It needs to access data from the 'mdat' atom only
a little at a time -- just when it's time to display that data.

When you save a self-contained fast-start movie, QuickTime puts the
'moov' atom at the front of the file (it's usually only 1 or 2 Kbytes),
followed by the movie data, arranged in chronological order. When you
download the file over the Internet, the 'moov' atom arrives right away,
so QuickTime can play the movie data as it comes in over the net.

If the 'moov' atom is at the end of the file, QuickTime doesn't know
what's in the movie or where it's stored, so it doesn't know what to do
with the movie data as it comes in, and the movie can't play until the
'moov' atom arrives at the end of the file.

When QuickTime creates a new movie, it always puts the 'moov' atom at
the front of the file.

When you open a movie and edit it, the data in the 'moov' atom changes.
When you save the movie, the 'moov' atom may be larger than it was, and
may no longer fit in the space it occupied in front of the movie data.
In that case, QuickTime marks the space at the front of the file as free
space, and stores the 'moov' atom at the end. If you do a Save As,
instead of a Save, QuickTime creates a new file and puts the 'moov' atom
at the front.

And that's probably a lot more than you'll ever need to know about
atoms.

But... you can find out a great deal more by reading the Introduction to
Atoms section in the QuickTime File Format Specification:
http://developer.apple.com/techpubs/quicktime/qtdevdocs/PDF/QTFileFormat.pdf
Interesting reading, but *very* technical. And it's a big file -- about
2 megabytes.

Enjoy,
-Steve




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.