PDA

View Full Version : How do I make a wav file smaller?


Francesca
04-07-2002, 11:21 AM
Being a bit of a try-it-and-see HTML learner, I'm not sure what this is called so I'm afraid I didn't know what to Google on.

I have created a some short wav files and I'd like to know how to make the file size smaller so that it's quicker for other people to download. For example, I have a one-second clip of me saying "hello" that I just spoke into the laptop microphone and saved, and it's 44KB - I am sure it should be smaller than that.

Advice much appreciated. Thanks.

Doug Bowe
04-07-2002, 11:32 AM
You want to send it somewhere?
Compress it into an MPEG file.

Francesca
04-07-2002, 11:35 AM
I'd like to put some sounds up on a site I'm making - sort of a "click here to hear so-and-so". Are mpegs suitable for this and how could I compress it into one?

Schnitte
04-07-2002, 12:24 PM
mpegs (flagship: the well-renounced MP3 format) have the advantage of compressing sound files *heavily*. If you convert a .wav into an .mp3 file, it will usually shrink quite a lot.
Mpeg converting software can be bought, but there's a lot of freeware on the net as well. If you do a Google search for "free converter mpeg wav" or something like this, you'll most leikely find what you need.

ski
04-07-2002, 12:41 PM
Your recording software (not sure what you're using) may also have some useful features. Since all you're doing is saying "hello", CD-quality isn't necessary. Sampling at a different rate lower than 44k wil help, as will making it mono instead of stereo. You could also go for 8 instead of 16 bit sound.

But if you already did all this, then your only next step is to go with mp3.

sailor
04-07-2002, 01:16 PM
Quite simple. Open it with SNDREC32 or any other audio program. Then "save as" and where it says "format" change from PCM or ACM to "MPEG Layer 3" and select the sampling rate, etc. then save.

Note that MPEG Layer 3 is the same codec used to compress WAV and MP3. You want to use WAV because MP3 is a streaming format and will make a slightly larger file for the same quality.

It is not difficult and you can just mess aorund and see what quality you like best but if you just want a few files feel free to email them to me and I'll compress them and send them back

Una Persson
04-07-2002, 01:23 PM
Originally posted by sailor
Note that MPEG Layer 3 is the same codec used to compress WAV and MP3. You want to use WAV because MP3 is a streaming format and will make a slightly larger file for the same quality.
Out of curiosity - about what magnitude of size difference would one expect between the two?

Bad Hat
04-07-2002, 01:39 PM
depending on the compression scheme, you can probably get about a 10 or 12 to 1 ration of wav to MP3 size. i think they can go even tighter these days, but i get nervous beyond that. also if you originally recorded or saved wav file in stereo if you change it to mono before compressing it, that will cut it in half on the spot.
CJ

Francesca
04-07-2002, 02:17 PM
Okay, thanks for the advice so far. I have a couple of queries/problems:

1. I downloaded a fairly intuitive audio converter (thanks Schnitte) and have worked out how to do a basic conversion from a wav to an mp3 file, but I am confused by the conversion frequency and bitrates. I have the conversion frequency set to default at 44100 KHz, and the bitrate set at 128 Kbps. Does that sound right? When I converted one of my files from wav to mp3 it went from 166K to 121K (and I did check the "mono" box) - does that sound about right? To be honest, I thought it would make more difference than that.

2. When I included it on the site I am building, instead of causing Windows Media Player to appear and play the sound when the link was clicked (as it had done with wav files), it links to a separate page which displays a blue clock briefly before displaying a sound box which plays the file. Is this a feature of mp3 files or is it because I haven't got the correct software to play mp3 files direct from websites?

Many thanks.

Mr2001
04-07-2002, 02:30 PM
Make sure you aren't using higher quality in the MP3 file than the original WAV - a mono voice recording should probably be encoded at 16-32 kbps.

glilly
04-07-2002, 02:35 PM
Converting a SMALL *.wav file can increase the size of the file! Or at least that was the experience I had with a slightly older mp3 encoder. mp3's can be about 1/10 the size of WAVs, but they must also put a little overhead that in short files actually makes them longer.

So, make sure after encoding that the file IS smaller.

Also, if this is going to be on a web page, not everyone will have mp3 players on their computers. I don't think the early versions of Win98 would be able to play (if the person hasn't downloaded a mp3 player).

If the file isn't significantly smaller, I'd stick with the WAV.

glilly
04-07-2002, 02:39 PM
OOPS, didn't see that you already had this experience.

Your files have been compressed a little, which is better than I got, but the overhead is still keeping you from getting the ~1/10 size you'd get if you compressed a 4-minute song.

Una Persson
04-07-2002, 02:42 PM
Originally posted by Bad Hat
depending on the compression scheme, you can probably get about a 10 or 12 to 1 ration of wav to MP3 size. i think they can go even tighter these days, but i get nervous beyond that. also if you originally recorded or saved wav file in stereo if you change it to mono before compressing it, that will cut it in half on the spot.
I think you may have misunderstood my query - sailor was talking about using MPEG Level 3 on a .wav and an .mp3 - so they should both have similar compression levels - but said that the .mp3 should be larger because of its streaming ability. I'm just wondering how much larger, assuming both types of file are MPEG Level 3 compressed.

Francesca
04-07-2002, 02:43 PM
Aha. Thanks Mr2001 - changing the bitrate to 32 kbs makes a big difference - it reduced at 295K to 54K and to my untrained ear it doesn't sound much worse at all. Thanks for that.

Now there's only the problem of getting it on the site itself so that clicking it brings up an audio player rather than another page which plays it.

Am I to understand that for those that have mp3 players on their computer, clicking the file will bring up the player, while for those that don't it will bring up the page that I get with the clock and the sound box?

sailor
04-07-2002, 02:50 PM
Anthracite, the difference in file size is small as it just eliminates the coding information which is repeated periodically in the streaming format. My guess is it was just like 2 %. I am making that number up but it's my guess right now. It is easy enough to convert an MP3 to WAV and see how much smaller it got.

Also I am not sure if MP3 allows the full range of sampling rates / channels / bytes per sample as WAV does. I prefer WAV because it seems more straightforward to manipulate with most audio programs. MP3 makes sense for streaming audio but not for files.

I also use DivX as it gives smaller files for equivalent quality but many people do not have the DivX codec and it is a pain to send them something and have them come back saying they can't "open" the file. But I do find DivX gives better compression than MPEG Layer3.

Then, of course, there is Real Audio which I absolutely hate so much I won't even mention it.

And then there are a hundred other formats which nobody uses.

Juggler
04-07-2002, 03:27 PM
It brings up a new page becuase you have Quicktime installed and it's the default player in Explorer. Some people have it installed and some don't, so I don't think you can change if it plays in a audioplayer or it opens a new page.

Urban Ranger
04-07-2002, 11:06 PM
Originally posted by sailor
Note that MPEG Layer 3 is the same codec used to compress WAV and MP3. You want to use WAV because MP3 is a streaming format and will make a slightly larger file for the same quality.

MPEG Layer 3 isMP3. MP3 is just a shorthand for MPEG 1 Layer 3.

ZipperJJ
04-07-2002, 11:33 PM
When someone clicks on your mp3, it's up to them what happens.

As far as I know, you can't just stream MP3s from your site unless you have something like a Shoutcast server. Otherwise, people have options.

If they have their browser set to automatically play stuff, then it will. My browser is set to ask me whether or not to download the file or to play from the site.

Then the end user's computer figures out what program they have set to play MP3s. Mine's configured to play them with windows media player. Others might have WinAmp, quicktime or real player or something else.

Most people have some sort of component installed that is set to play MP3s (even if by default). If you have a lot of MP3s you might want to provide a link to some free players. Here's some links you can provide, and they can choose:

windows media player (windows)
http://www.microsoft.com/windows/windowsmedia/players.asp

winamp (windows)
http://www.winamp.com/

itunes (mac)
http://www.apple.com/itunes/download/index.html

xmms (linux)
http://www.xmms.org/

real player (multi-platform)
http://www.real.com/realone/index.html?src=nodc

sailor
04-08-2002, 05:43 AM
>> MPEG Layer 3 isMP3. MP3 is just a shorthand for MPEG 1 Layer 3.

I know very well what is what, thank you very much. As I have explained many times before, MP3 describes two different things:
1- The MPEG Layer3 audio codec which is used in different file types including .WAV, .MP3, etc
2- One specific file type: .MP3

So, when someone says "an .MP3 file" , in this case "MP3" means the file type and is NOT shorthand for "MPEG 1 Layer 3". But if I say "an MP3-compressed file (of type WAV, MP3, etc)" then yes, MP3 is just a shorthand for MPEG 1 Layer 3.

Urban Ranger
04-08-2002, 12:38 PM
The extension .MP3 indicates the contents of the file is compressed with MPEG1 Layer 3.

sailor
04-08-2002, 04:26 PM
Urban Ranger, you keep citing me and posting comments which make it sound like I posted something wrong and you are correcting me. I believe everything I have posted is correct. If you believe anything I have posted is wrong please say so clearly. Identify what I said and explain why it is wrong so I can understand your point because so far I am not quite clear on whether you are trying to correct something I said or something else I am missing.

>> The extension .MP3 indicates the contents of the file is compressed with MPEG1 Layer 3

What's your point? That hardly contradicts or even corrects or adds to what I said earlier: "Note that MPEG Layer 3 is the same codec used to compress WAV and MP3" I had further said MP3 is streaming while WAV is not and I asked if anyone could tell me whether .MP3 files could use any of the compression levels or were limited to certain specific ones.

Mr2001
04-08-2002, 05:42 PM
The MP3 file type simply means MPEG Audio, not necessarily any specific MPEG version or layer. MPEG 1 Layer 3 is most commonly used, but Winamp won't complain if "Freezepop - Science Genius Girl.mp3" actually contains MPEG 2 Layer 1.

heptapod
04-08-2002, 07:01 PM
Get Flash 5.0
Import the .wav file into a scene. Make the .fla into a .swf. Rename the .swf to .mp3
The mp3 will be much smaller than a regular mp3, only a few hundred kilobytes rather than two or three megabytes.

sailor
04-08-2002, 07:37 PM
heptapod, if that is so it just means the default bitrate for swf is lower and you are getting lower quality but the compression is the same as if you used any other program in the same bitrate. By just using another program you gain nothing.

Mr2001
04-08-2002, 09:47 PM
Originally posted by sailor
By just using another program you gain nothing.
True in this case - going through Flash will just use a lower bit rate, add overhead, and dirty your file format - but not every case. Using a different MP3 encoder can give you better quality at the same bitrate, or the same quality at a lower bit rate. (I've heard that LAME is the best encoder in those terms.)

You can also use VBR encoding, which may not be supported by every encoder (though I think it works with all players). Variable bit rate is usually more efficient than constant bit rate (CBR), and the choice of encoder can make a big difference in quality. I suspect that choosing better VBR options in the same encoder will make more of a difference than switching encoders, though.

sailor
04-09-2002, 07:14 AM
Originally posted by Mr2001
The MP3 file type simply means MPEG Audio, not necessarily any specific MPEG version or layer. MPEG 1 Layer 3 is most commonly used, but Winamp won't complain if "Freezepop - Science Genius Girl.mp3" actually contains MPEG 2 Layer 1. I have some questions:
Besides MPEG could .MP3 files be compressed using other codecs (such as DivX) just like .WAV can use many different codecs?
Is DivX the same as some MPEG something or other?

sailor
04-11-2002, 06:20 PM
Nobody has answers? Comments?

Bryan Ekers
04-11-2002, 07:13 PM
DivX is sort-of the same as some MPEG or other.

The mpeg standard in question is MPEG4, a method of compression, but there are several different methods to acheive that compression, all of them claiming to be more efficient/faster than the others. DivX is just one variety. Do a casual search for "Mpeg4 codec" and you'll find about one billion websites (well, 2528). It's the beta/VHS wars writ large. If you download TV episodes through Morpheus or KaZaa, you'll have to collect Mpeg4 codecs by the dozen, since the people who make these recordings are notoriously inconsistent. Inconsiderate bastards.

And getting back to original question "How do I make a wav file smaller?", I offer this smart-ass remark, since the MP3 issue has been addressed to death:

"Throw it in with the whites."