I created a loop Audacity which was 10.549s long, I exported it to mp3, now when I open the exported file via Audacity it now has a gap at the beginning making it 10.58s long. The loop I made that sounded perfectly inside Audacity becomes an imperfect loop when exported to mp3. Any ideas how to fix this?

  • I'd try export as WAV & see what happens. Will maybe eliminate whether it's the app itself or the export/conversion process.
    – Tetsujin
    Jul 10, 2015 at 8:19
  • @Tetsujin there is no problem with WAV export but I need the file as mp3. Apparently, I tried converting wav to mp3 using another tool but the gap is still there. The issue is probably with LAME converter.
    – IMB
    Jul 10, 2015 at 8:25
  • if you convert the mp3 back to wav is the gap still there? What happens if you use a different converter?
    – Tetsujin
    Jul 10, 2015 at 8:32

1 Answer 1


Problem: MP3 File has a gap

This is a known, acknowledged issue since at least 2000:

1 Why is a decoded MP3 longer than the original .wav file?

Because LAME (and all other MDCT based encoders) add padding to the beginning and end of each song. For an explination of why, see the questions below.

800 word long technical explanation pertaining to both decoder and encoder issues snipped.

LAME-enabled players should apparently automatically jump this gap:

LAME embeds the amount of padding in the ancillary data of the first frame of the MP3 file. (LAME INFO tag). The LAME decoder will use this information to remove the leading padding of an MP3 file.


Modifications to the decoder so that it will also remove the trailing padding have not yet been made.


You could try another encoder as mentioned, if you have access to the Fraunhofer version (IIRC it is available in iTunes and Windows Media Player). Alternatively, you may be able to compile/acquire a version of sox with libmad enabled. I think these will have similar issues, however.

The question is, do you definitely need an MP3 as mentioned in the comments? Are you using a player that only handles MP3s?

If it absolutely, definitely, positively has to be an MP3, no ifs ands or buts; and the Fraunhofer encoder also gives the same issue, you could have a look at a previous thread here on SU:

Best program to trim silence beginning and end of mp3 files?

  • Is there any update to this? Does the official lame decoder still not remove the trailing padding? If so, I assume this problem translates to all other software that decodes mp3s (eg, Chrome and web audio api)? Sep 23, 2018 at 6:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .