[Libav-user] ffmpeg decoder: Audio Priming handling.

rohit khali khali.rohit at gmail.com
Thu Sep 3 12:57:33 EEST 2020

Hi All,

Note: [AAC requires data beyond the source PCM audio samples in order to
correctly encode and decode audio samples due to the nature of the encoding
algorithm. AAC encoding uses a transform over consecutive sets of 2048
audio samples, applied every 1024 audio samples (overlapped). For correct
audio to be decoded, both transforms for any period of 1024 audio samples
are needed. For this reason, encoders add at least 1024 samples of silence
before the first ‘true’ audio sample, and often add more. This is called
variously “priming”, “priming samples”, or “encoder delay”. ]

I am wondering how does ffmpeg audio decoder handle audio priming. Do we
need to trim any part of decoded PCM audio OR ffmpeg decoders internally
handles the audio priming accordingly.

Thanks in advance.

Rohit Khali
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20200903/2f23fe4b/attachment.html>

More information about the Libav-user mailing list