13.07.2015 Views

Quicktime File Format (2012-08-14).pdf

Quicktime File Format (2012-08-14).pdf

Quicktime File Format (2012-08-14).pdf

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Some Useful Examples and ScenariosCreating Video Tracks at 30 Frames per SecondActionOffsetThere is one action offset per condition (mouse overDownToIdle). This is the offset used to skip over thecondition and the following actions (the ActionRecord) for the condition. You need to update this valuewhen adding actions.ConditionThe condition field is roughly equivalent to a wired movie event. The actions associated with button statetransition condition are triggered when the transition occurs. You need to add or edit this field.ActionsFlash actions each have their own action tag code. QuickTime actions use a single QuickTime actions code:'AA'. You may add a list of actions to a single QuickTime actions tag.The format of the QuickTime actions tag is as follows:1 byte: // Tag = 'AA'2 bytes: // data length (size of the QTAtomContainer)n bytes // the data which is the QTAtomContainer holding the// wired actionsDoActionFor DoAction, you need to modify a subset of the defineButton2 fields in the same manner as describedabove. These fields are file length, the record header size portion, and the action record.Note that you need to write the length fields in little-endian format.Creating Video Tracks at 30 Frames per SecondThe duration of a video frame is stored in the time-to-sample atom contained within a sample table atom. Thisduration cannot be interpreted without the media’s time scale, which defines the units-per-second for theduration. In this example, each frame has the same duration, so the time-to-sample atom has one entry, whichapplies to all video frames in the media.As long as the ratio between frame duration and media time scale remains 1:30, any combination of valuescan be used for the duration and time scale. The larger the time scale the shorter the maximum duration. Sincea movie defaults to a time scale of 600, this is a good number to use. It is also the least common multiple for24, 25, and 30, making it handy for much of the math you are likely to encounter when making a movie.<strong>2012</strong>-<strong>08</strong>-<strong>14</strong> | © 2004, <strong>2012</strong> Apple Inc. All Rights Reserved.349

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!