[FFmpeg-devel] Exposing preroll and remainder info for aac and mp3.

Michael Niedermayer michaelni at gmx.at
Wed Jul 4 15:13:32 CEST 2012


On Tue, Jul 03, 2012 at 05:30:34PM -0700, Dale Curtis wrote:
> Hi all,
> We're running into problems with leading and trailing silence due to
> pre-roll and remainder with aac and mp3 encodes. To illustrate here's a
> demo showing the decoded output of a couple mp3 and aac files:

> http://rtoy.github.com/webaudio/codec-tests/plot-audio.html
> (requires Chrome or very recent Safari). Compare the aac and mp3 results
> with ogg.

the chromium browser from ubuntu cant handle above apparently, at least
it doesnt like aac/mp3 for me ...

> We're wondering what the best approach is here. Should ffmpeg/libav be
> cutting the codec specific preroll information before sending it on? Or
> should we simply expose this information through say
> AVCodecContext->metadata for downstream consumers to do what they wish with?

I dont know which way is better, its not so much a technical question
than it is one of what would in the end be more convenient for the
library users. Maybe its best we support both ways

> See the following for the AAC specific information:
> http://developer.apple.com/library/mac/#documentation/QuickTime/qtff/QTFFAppenG/QTFFAppenG.html
> The reason this is necessary is for sample accurate playback of clips which
> is important for applications like WebAudio.

are there some reference files (mp3/aac + wav refernce of what should
be the delay free output ?)
These would be very usefull to implement this as well as for
regression tests so it doesnt break in the future once it works.

> Has anyone looked into this before?

The issue has been mentioned years ago already but i dont remember
much beyond discussions

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

There will always be a question for which you do not know the correct awnser.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120704/4ebbb8d6/attachment.asc>

More information about the ffmpeg-devel mailing list