Search code examples
cocoamacosencodingaudioaac

Audio Encoding: AAC files without the 1/10 second silence at the end of the track


I'm a little confused with an issue that I keep running into. I'm trying to create some sound loops for continuously playing, seamless background music.. everything's fine as long as I stay in AAC/ WAV/ etc, but as soon as I encode the files in AAC I run into a 1/10 of a second at end of the sound file.

I'm on the Mac, so I've tried encoding with iTunes, Compressor (included in Final Cut Pro), Adobe Soundbooth and finally Audacity. I keep getting that stupid 1/10 gap at the end of the track.

Is this something inherent in AAC encoding.. does the last package/frame/whatever-the-right-term-is have to be silent?

Any idea on how I can encode a sound file in AAC without getting that gap at the end?

Any help would be very much appreciated.


Solution

  • This is somewhat inherent to MP3 because "blocks" of the same length are written to the files instead of allowing to define the length of a block (like OGG/Vorbis does, for example). LAME seems to have a "gapless" feature that allows MP3 files of exact length.

    If understand the information on the Internet correctly (this hydrogenaudio.org forum entry for example, AAC suffers from the same problem and there seems to be a gapless tag that some encoders are able to set. In the provided link, it is said that a recent version of iTunes+Quicktime can insert such tags.