Representing encoder delay with track structures
Use sample group structures to represent encoder delay for AAC sound tracks.
Overview
When using sample group structures in representing encoder delay for AAC sound tracks:
Include a version 1 sample group description atom with grouping type set to
‘roll’. Set default length to2(bytes) for audio entries. Follow that with the payload data: the typical value is-1, meaning one preceding AAC packet, which is the theoretical minimum decoder delay of 1024 samples.Include a version 0 sample-to-group atom with a
'roll'grouping type. By including this, you associate the AAC packets with the corresponding sample group description atom. All AAC packets including the encoder delay must be associated with the sample group in the table data’s sample count field. Typically, the sample count for this sample-to-group atom’s table data corresponds with the number of media samples in the track.
These two sample group structure atoms in addition to the edit list atom, properly composed, form a complete implementation to explicitly represent the temporal position of the source audio samples in an AAC encoded track.