Groups | Blog | Home
all groups > flash actionscript > march 2006 >

flash actionscript : MP3 Encoders


dizcofly
3/12/2006 10:22:05 PM
Hi,

I am having endless trouble with sound. I do 100+ voice files per project, so
I load dynamically:

voice = new Sound(this);
voice.onSoundComplete = function() {
play();
};
voice.loadSound("001.mp3", false);
voice.start();

This is working fine, as long as I use the sound editor that's making bad
quality files. (Acid Pro sounds dreadful on human voice.)

When I try 12 other programs that give better quality on human voice, Flash
turns them into just squeaky noises. ... I suspect the problem is that these
sound editors are using the Lame MP3 Encoding. None of them seem to have an
option to choose Fraunhofer MP3 encoding. I don't even know if that's the
problem anyway.

Again the problem is only with dynamically loaded sound. I have tried every
export option, both while saving the MP3 and while publishing the Flash movie,
and every combination of these possible options, I think.

Can someone recommend a program that works, or a solution inside Flash?

-- This project is due in the morning and I have 140 BAD quality sound files
waiting for improvement, please help. --

Thanks.


Wolf van Ween
3/12/2006 11:01:09 PM
No, you should have that option turned off. I was just asking...
I am using MixMeister, but I honestly don't do too much sound. Maybe there is
a problem with the processor load - do you have a high fps?
Try loading one of your sounds in a new empty swf and listen how it sounds. If
it's ok there, too much might be going on at once?
As for the re-compression, that should only happen if you have set these
sounds to use Stream sync on a timeline. In the example you've given above,
when you dynamically load and then start them, no re-compression should happen.
You don't have any sounds in the library, do you?
Wolf
dizcofly
3/12/2006 11:35:10 PM
Hi,

The sounds are not streaming (I am making a CD so I don't think I need that).
There are no other sounds in the library to interfere. To see the problem, I
posted mp3 and FLA file:
http://www.pixielounge.com/isti/

You can test the mp3 file - it plays fine in Windows Media Player etc, but not
in the Flash movie. Try all the publish options (I have), doesn't matter. You
can make these non-functional files with many programs, including Audacity,
WavePad, and quite a few others that I tested. I also tested every setting I
could find in each of these sound editors, this one is 128 kbps. In other
settings of the sound editors, wherever there was a setting I could set to 16,
I did. (based on unclear forum notes). But I also tried all the defaults etc.

Thanks :)

Wolf van Ween
3/13/2006 12:08:50 AM
This is absurd, totally abnormal. A bug I'd say. Why has nobody seen this so
far?
Anyway, what worked for me was to set the streaming parameter to true:
voice.loadSound("001.mp3", true);
Good luck
Wolf
dizcofly
3/13/2006 12:24:20 AM
I don't understand - did it work for you?
I opened it in Flash 8 (trial version) just to be sure, made sure streaming =
true, and still squeakies.
DId you hear something else? what export settings you used or... ?

Thanks, you are so kind to trouble with my problem. :)

Squeaky
Wolf van Ween
3/13/2006 12:57:52 AM
Sorry, Squeaky, I played around too much, and now I had another look. It wasn't
the 002test.mp3, but an edit of mine (with audacity) that played correctly.
The reason I went into the editor was that I realized that you have very low
volume, I added +12dB gain. I don't guess that's the reason, though, but
audacity automatically saved the file as 44,1 kHz mono.

And I guess flash doesn't check the bitrate, but just plays at 44.1kHz. That's
why you get Mickey Mouse.

Hope you can repeat this now :-)
Wolf
inchHigh
3/13/2006 2:28:27 AM
If I remember correctly flash is somewhat picky about sample rates, if you are
hearing squeaky (sped up) sounds it is probably due to this. Try sticking to
the 'standard' sample rates 11025, 22050, or 44100 and the mp3 should play
normally. (I think your sample was 16000). In general I would recommend 22050
for lower quality and 44100 for higher quality.

see these links:
http://www.draftlight.net/dnex/mp3player/mp3format.php
http://www.wimpyplayer.com/support/faqs/known.html#1

dizcofly
3/13/2006 9:55:47 AM
In Audacity, default sample rate is 44,100, default sample format 16-bit.
I also tried several other editors, all doing the same thing. I still don't
understand, how can I be getting the wrong sample rate in a dozen different
programs?

Wolf van Ween
3/13/2006 10:06:40 AM
Your mp3 is very definitely 16000 Hz sample rate. Maybe you have a faulty
encoder on your machine. Try on another computer. Or give me an email address
and I mail you the recoded mp3 for you to test.
Wolf
dizcofly
3/13/2006 2:14:28 PM
Audacity did require me to provide a file called "lame_enc.dll" which I
downloaded off the internet and placed directly into the Audacity program
folder. It doesn't seem like that should effect files generated by other
programs, but maybe I should place this file in the System folder or get a
different version of it? Is that what you mean?

Any time I see .dll, I kinda panic, since -way back when in about 1990- I once
deleted all the DLLs from my computer. I decided not to do that again.
;)
Wolf van Ween
3/13/2006 2:44:55 PM
Yes, try to download an actual version. Also, check what encoder your other
audio programs use. Last but not least, it wouldn't hurt to search for spyware.
If I were a major music label, I would put my spy stuff into an mp3 encoder :-)

As an aside, I've just checked my lame_env.dlls and indeed I have a different
one in every editor's directory!
dizcofly
3/13/2006 4:06:29 PM
Well, I have a solution now:

Open http://www.nch.com.au/wavepad/index.html to edit the files and remove
noise. (Of all 20 or so that I tested, this was easiest by far and good
quality on human voice.) Now save the WAV file as 8.00 Khz, 16bit, Mono. Some
of the other settings make fuzz.

Now open your WAV file in http://www.dbpoweramp.com/dmc.htm, and choose:
Constant Bitrate
128 kbps
mono
22050 or 44100

A note:
I still find it odd, that Wolf was able to open my file and re-Save it in
Audacity, and mail back to me a working copy. That was the same file I had
tested in Audacity already. I downloaded about 20 different sound editors
which all made the 'chipmunk effect' when their mp3s were used in Flash. I was
unable to find a problem with my computer. Placing the lame_enc.dll in
different locations and in all my System folders, did not change the problem.
No combination of settings in Flash and the sound editors helped. Uninstalling
iTunes, and running ad-Aware also did not solve the problem. dB powerAmp,
which also uses Lame encoding, is working while none of those other programs
do. A mystery.

Thanks so much for all the help on this.
:)
Wolf van Ween
3/13/2006 5:11:37 PM
Great to hear it works for you now, even if a bit of Voodoo was required. :-)
Good luck with your work
AddThis Social Bookmark Button