问题
My application needs to play sound files. The only cross-platform file format I can use is WAVE (I'm using QSound of the Qt framework).
The file sizes of these sounds are quite large and I'd like to know if there is a way to reduce it, without losing (too much) quality.
I need the file to be stereo.
回答1:
You can zip them (using zlib or similar), then uncompress them on demand. If you've got many minutes of continuous wav it may be worth looking into audio-specific lossless compression algorithms like FLAC.
回答2:
The only way to reduce the size of a wav file is to resample it to a lower bit rate or use less bits per sample. Wav files don't have compression capabilities like mp3 or ogg.
If you are using a 16 bit 44 khz file you can cut the file size in half by going to a 22khz sample rate, and all you will lose is some of the high frequencies.
回答3:
Why not use FLAC? It's the best way to do lossless compression of WAV without sacrificing any quality at all.
回答4:
I know this is an old question but I have not seen any one state using sound recorder.
- Open Sound recorder
- Drag desired file into it
- click file tab
- go down to properties
- select file conversion from drop box
- convert now
- select quality
- Click Ok
That should do it I had to do this for my telephone service as it only allows 2.5MB .wav format only. Shrunk the file down to less that 25% of what I had at 5MB.
How that helps
Christopher Michael Trade Movers www.trademovers.net
回答5:
You probably should have a look into the Phonon Module of Qt. It's cross-platform and supports the native formats of the different platforms. I think you can assume MP3 support for most of the OSes.
回答6:
By definition, WAV is uncompressed and lossless. In order to reduce the size of a WAV file, you will need to lower the bit rate or change the file format. Both, however, involve a loss in audio quality (unless you use FLAC or something like that).
Usually, you can change the bit rate from 41000 or 48000 Hz to 32000 Hz without losing much quality. Or, convert the file to some other format.
来源:https://stackoverflow.com/questions/916501/reducing-wav-sound-file-size-without-losing-quality