January 16, 2007
Gapless MP3 loops in Flash
When encoding a sound loop as MP3, the encoder will add ugly gaps of silence at the beginning and end of your track, making the resulting file not very loopable at all. This is due to the way MP3 encoding works.
Although there are some instructions (scroll down to "Part 2") how to remove those gaps from your sound file, the amount of hackery involved is not for the faint of heart. The same guy also wrote a tool to automate the process but it's restricted to a maximum of 8 seconds of sound, and you can totally not buy a full version.
You're lucky if you're working in Flash however. The MP3 encoder inside the Flash IDE knows about the problem and will make sure any MP3 it compresses will loop without gaps. So:
- Have an uncompressed sound loop as WAV oder AIFF. If your loop is already an MP3, remove the silent padding at the beginning and end of the track and save it as WAV.
- Import the uncompressed sound into the library of your clip.
- In the sound properties, set the desired MP3 compression.
- Loop away.
Comments
thanks for a good tip
saved awful lot of time!
Wow this was absolutely perfect!! I was going crazy trying to remove the gap. After reading your post, I used 'Goldwave' to create a 24-bit wav file. Then imported it into Flash 8, I opened up the library window, right-clicked on the wav file. Then changed compression to 'mp3' just as you suggested. I also changed the bit rate to '160kbs', and quality to 'best'. Wow a COMPLETELY seamless loop.
Thanks so much, you're the best!!
Posted by Jesse (#)
The conversion utility at the compuphase website does not have any limit as I am converting bigger files with it. The mp3s however are missing the accurate bitrate date hence decoders (like winamp) report inaccurate durations. Pass it through Mp3directcut and all is well again!
Posted by Mutee (#)
Thank you, this was exactly the last unknown reason why I had this gap! As soon as I imported everything as you wrote, it's working like a charm
Posted by Denis Yashin (#)
Post a comment
Your comment will be published as soon as I approve it, usually within 24 hours.