PDA

View Full Version : Fat files with audio


d9085
05-09-2003, 10:49 PM
I'm back again with another question.

what is the secret to importing audio of lets say a minute long into my project and not having the file size bloom to an enormous figure. I am using Flash 5.0 and I am sure that it accepts only wav and mp3 files. I found a Flash project that I liked and wanted to see if I could do something simular. That project was 334k in size. Audio included. I recorded the audio from that project and saved it to a wav file (8 bit mono - unsigned) and it was 12453kb. Saved it as an MP3 (Layer3 16000hz mono 8kbps) and it ends up at 408k and sounds terrible. I know if I go higher, the filesize gets bigger.
Whats the secret???

RVK
05-09-2003, 10:52 PM
Is it a loop? because then you just need a small chunk which you can set to loop over and over in flash.

-R

d9085
05-09-2003, 11:09 PM
No it's not a loop. It's all one continuous piece of audio.

RVK
05-11-2003, 08:12 AM
Ok, I've seen a few sites like this myself, and I decided to see if I could figure it out. But I can't.

I saw a site with 3 large loops, and almost NO loading time?!? Sooo, I'd REALLY like to know how this is done. How can you make good quality sound files that are small and manageable

It would be a great piece of info to have on this forum too.

Thanks

-R

dadaniel
05-13-2003, 12:20 PM
maybe it was a MIDI(*.mid) - Soundfile!?

emergency_pants
05-13-2003, 01:38 PM
Perhaps you could use an external audio editor to compress your mp3 more efficiently and then link it as an external file.

As an aside, if your sound is set as an event sound, it will need to be preloaded before it starts to play. Alternatively, you can set your sound to streaming when you ask it to play. This means it will download while it plays. You could set, say, a 50k buffer and then start streaming your sound once 50k has been loaded (not sure of the AS for that). It will mean your sound starts very quickly after movie start.

But here is the MOST IMPORTANT THING. Make sure you have a damn good quality sample before you start to compress it.

In your example, you saved your audio file as an 8-bit wav... what hz? Probably low? 11,025? In addition to that, it had already been compressed for the site you recorded it from! What you need is a high quality 44,100 16-bit mono file to start with. No hiss. Otherwise, you are compressing a file which has been compressed once or twice already, and you'll get rubbish quality.

Slow fill drone and pad background sounds keep their quality better during compression than upbeat stuff with stop-starts and heavy snare drums and cymbals. it's a bit like compressing video. A still background and slowly moving foreground figure will encode to a better quality than a guy standing in front of moving traffic, waving his arms around.

a 128 mp3 (almost CD quality) is about 1mb per minute (very roughly). So, one minute at 32 is gonna be about 250k and not such a bad sound. You could really get it lower than that with some playing arouind and still get an ok quality sound.

Also, be aware that 3 minutes of audio is quite alot for a non-music website. Someone who isn't concentrating on the sound much, isn't going to notice that you have 1 minute and not three... unless you draw the user's attention to it!

Consider an external encoder. Use soft pad sounds. Loop seamlessly. Use as little audio as you can get away with. Don't put the volume up as high as possible. Use Flash's streaming capabilities. Most importantly, use high quality source audio files.

I hope that helps a bit.

B'man
05-17-2003, 11:22 PM
You can usually get away with a loop about 15-20 seconds long without a problem. Just make sure it's a WAV file with a clean loop before importing it ;p

d9085
05-17-2003, 11:28 PM
Thanks everyone...

geniegmu
05-21-2003, 03:08 PM
Hi, Im having a similar problem with audio and have read the posts but am still lost. Basically, I have long audio files that do not and cannot loop (they are parts of a speech). I need good audio quality and 22khz speech does it but also increases the file size enormously! Any suggestions on getting decent speech quality and keeping the file size down? I have media cleaner pro, soundedit, protools but am not sure what the best method to compress is with them - right now I am importing huge wav files at 44khz into Flash and letting it do the compression.

The reason I need to do this in Flash is that the user needs to control a movie that has good quality pictures in it (quicktime wasn't cutting it for the pictures and interactivity).

Thanks...
~A

emergency_pants
05-23-2003, 12:45 AM
Would it be possible to split the speech up into more manageable chunks for download, instead of downloading big files at a time?

That way, you could download the next section, while the first is being played back.

I can't really offer any more precise suggestions than I gave above, in regards to sound compresssion. I've never used Media CLeaner or soundEdit... sorry.

In flash you can compress you voice down to about 20kbps. Which will certainly sound compressed, but not too 'squelchy'. You will notice a marked difference between 20kbps and 16kbps.

I guess it depends on what balance you're client wants to strike between quality and filesize.... and the bottom line is that you can't have your cake AND eat it. :P