[FFmpeg-devel] AAC decoder handles start of audio stream differently (2.6.2 vs. current git)
Gregory J Wolfe
gregory.wolfe at kodakalaris.com
Mon May 9 23:44:04 CEST 2016
> -----Original Message-----
> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces at ffmpeg.org] On Behalf
> Of Hendrik Leppkes
> Sent: Monday, May 09, 2016 5:27 PM
> To: FFmpeg development discussions and patches <ffmpeg-
> devel at ffmpeg.org>
> Subject: Re: [FFmpeg-devel] AAC decoder handles start of audio stream
> differently (2.6.2 vs. current git)
> On Mon, May 9, 2016 at 11:20 PM, Gregory J Wolfe
> <gregory.wolfe at kodakalaris.com> wrote:
> > I am in the process of upgrading our FFmpeg from 2.6.2 to the latest
> > git. One test I ran extracts audio from an AAC stream to a WAV file.
> > When I examine the audio using Audacity, the stream extracted using
> > the latest git is 1600 samples shorter, with the missing samples being
> > from the beginning of the audio stream. Coincidentally, the first
> > audio time stamp in the original audio stream is -1600 samples. So
> > does 2.6.2 have a bug that is fixed in the latest git, or was a bug
> > introduced into the latest git since 2.6.2?
> It is common for AAC to have padding at the beginning of the stream to
> prime the decoder, those samples being dropped is the proper way to do
> And your timestamp seems to confirm this.
> So sounds like latest ffmpeg is doing it right to me.
> - Hendrik
OK, thanks, that makes sense. The codec info says that the audio sample
delay is 1024 samples. So maybe that's the minimum amount, and in this
case the author/original software that created the audio stream used 1600
samples because it works out to exactly 1/30 second.
Greg Wolfe, Kodak Alaris
More information about the ffmpeg-devel