[Libav-user] LAME encoder delay

YIRAN LI mrfun.china at gmail.com
Wed Apr 13 04:32:07 CEST 2016

Hi guys,

I'm using LAME (standalone executable) to do audio encoding and use ffmpeg
for muxing. Until recently I noticed that LAME introduce some encoder delay
inside the audio (so that some silence inserted at the beginning of the
audio frame)

My program also uses ffmpeg API to open file and read frames/samples. Seems
by default ffmpeg doesn't handle this so that the silence got returned when
samples are decoded.

So I'd like to know, how to instruct ffmpeg to ignore this delay and only
return real data to me? If different encoders use different delays, can
ffmpeg handle them automatically? Or when muxing using ffmpeg, I should set
the encoder delay myself?

I saw in mp3dec there're code to get encoder delay values. But I'm writing
to an AVI file so I guess decoding is done by mpegaudiodec_template, inside
which seems there's nothing to handle the delay.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20160413/e835c327/attachment.html>

More information about the Libav-user mailing list