---
title: Using track structures to represent encoder delay explicitly
framework: quicktime-file-format
role: collectionGroup
role_heading: API Collection
path: quicktime-file-format/using_track_structures_to_represent_encode_delay_explictly
---

# Using track structures to represent encoder delay explicitly

Represent encoder delay explicitly with an edit list atom and sample group structures.

## Overview

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. important: A complete implementation using the sample group structures is required to explicitly represent the placement of the source signal in the encoded track. An incomplete implementation will result in unspecified interpretation by Apple software and tools. In the absence of the sample group structures, the classic solution of expecting an implicit encoding delay of 2112 samples and the edit list to start at the beginning of encoder delay will be assumed as described in the previous section. 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. note: Track duration uses the movie timescale instead of the media timescale used by media time. If the media timescale and movie timescale differ, the track duration may not be sample accurate. Sample group structures note: This implementation of sample group structures in QuickTime is designed to be compatible with the ISO Sample Group Structures definition and allow for future generalization. A full description of ISO 14996-12 Sample Group Structures is not required in order to provide explicit encoder delay representation. A short description of the more general characteristics of these structures is included in the descriptions below, followed by the information required for use with QuickTime. 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 note: The effect of using sample group structures in the track in this manner is that the edit list’s media time and track duration fields do not include encoder delay, as specified above in Edit list atom ('elst'). 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').

## Topics

### Sample group structures

- [Sample group description atom ('sgpd')](quicktime-file-format/sample_group_description_atom.md)
- [Sample-to-group atom ('sbgp')](quicktime-file-format/sample-to-group_atom.md)

## See Also

### Handling encoder delay

- [AAC encoding background](quicktime-file-format/background_aac_encoding.md)
- [The timing and synchronization problem](quicktime-file-format/the_timing_and_synchronization_problem.md)
- [Historical solution for implicit encoder delay](quicktime-file-format/historical_solution_implicit_encoder_delay.md)
- [Representing encoder delay explicitly](quicktime-file-format/example_representing_encoder_delay_explicitly.md)
- [Representing encoder delay with track structures](quicktime-file-format/summary_using_track_structures_to_represent_encoder_delay.md)
