Using track structures to represent encoder delay explicitly
Represent encoder delay explicitly with an edit list atom and sample group structures.
Overview
In QuickTime movie files (.mov) and related MPEG-4 files, AAC encoded audio is carried in a sound track as a series of media samples—each media sample corresponding to an AAC encoded audio packet. A track uses an edit list (see Edit list atom ('elst')) to indicate the range of time from the media samples to present. The edit list atom along with additional atoms known as Sample Group Structures, introduced in the Sample group structures section below, can now be used to explicitly represent encoder delay.
Edit list atom
See Edit atom ('edts') and Edit list atom ('elst') for details of edit lists in track atom structures.
A sound track of AAC encoded audio uses an edit list to indicate the placement of the source signal in the time represented by the encoded AAC packets. The media time field of the edit list must indicate the first sample to be presented and will correspond in time to the first audio sample following the encoder delay in that track. The edit list track duration field should be set to the duration of the source waveform in media samples. The edit list must not extend into the encoder delay or into any remainder samples of the encoded sound track. Note that for a single waveform encoded into a sound track, the sound track requires only a single edit list atom with one entry.
Sample group structures
Sample group structures of roll-group type with a constant roll distance are used to represent decoder dependencies for AAC encoded media. The sample group structures are intended to serve two purposes:
To indicate the amount of decoder delay in AAC packets
To signal to readers parsing QuickTime movies that the sound track includes explicit information for encoder delay and remainder samples for the AAC packets encoded in the file
Two sample group structure atoms are used to represent the amount of encoder delay and remainder samples which must be trimmed: Sample group description atom ('sgpd') and Sample-to-group atom ('sbgp').