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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Audio Priming - Handling Encoder Delay in AACExample—Representing Encoder Delay ExplicitlyThe goal is to represent the temporal position of 5 seconds of 48kHz PCM audio encoded in a 48kHz AAC soundtrack. Assume a media timescale of 48000 and an encoder delay of 2112. For convenience, assume a movietimescale of 48000 as well.Audio DataSource PCM audio data prior to encoding:Sample rate: 48000 per secondSample count: 240000 PCM samples (5 seconds)Duration in timescale ticks: 240000 (with media timescale the same as sample rate)AAC in the encoded sound track:Encoder delay: 2112 audio samplesSamples per AAC packet: 1024Decoder delay: 1024 samples (or 1 AAC packet)Number of AAC packets: 237 (=((2112+240000) / 1024) rounded up to an integer value)Sample count: 242688 (= 237 * 1024)Remainder samples: 576 (= 242688 - (2112 + 240000))The transformation from source PCM to encoded AAC results in a sound track with 237 AAC media samplescorresponding to 242688 PCM audio samples if decoded and presented in its entirety. Of that total, only 240000audio samples of source starting at sample offset 2112 (skipping the first 2111 samples) are to be presented.From this, the edit list atom and sample group atom described in “Track Structures” (page 430) are used torepresent the encoder delay.Track StructuresBased on the “Audio Data” (page 430), the following edit list and sample group atoms are used to representthe encoder delay.The edit list atom contains this data:Size: 28Type: ‘elst’Version: 0Flags: 0<strong>2012</strong>-<strong>08</strong>-<strong>14</strong> | © 2004, <strong>2012</strong> Apple Inc. All Rights Reserved.430

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

Saved successfully!

Ooh no, something went wrong!