Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Compressing wavs
Compressing wavs
Jan 28 2010, 1:27 am
By: Kimaru  

Jan 28 2010, 1:27 am Kimaru Post #1



Hi, I have this perfectly suiting song that would go fantastically with my map, but it's a 5 minute song which pumps my map size to 5 MB. I downloaded Audacity and tried slicing parts of the song off the end, hoping it would reduce the map size. After tons of reluctancy I got the portion of my song down to the most suiting 30 seconds, but the map size is still at 800 KB which is still too big. My goal is to get as much of the song as possible (with smooth loops) and keep the map size under 450 KB. I'm using low quality compression when I add the wavs to the map. Does anyone know of a "super" compressor or some way I can get the wav size smaller?

EDIT: I found an awesome compressor, which turned my 20 MB song (2 minutes) into 446 KB (the same 2 minutes). However, for some reason, when I add it to the map, it won't play it when I select "Play Selected"...anyone know why this is?

Post has been edited 1 time(s), last time on Jan 28 2010, 1:49 am by Kimaru.



None.

Jan 28 2010, 2:06 am Neki Post #2



Is it a wav file? Also, even though you get it down to 30 seconds, you still need to lower the quality of the sound so it's smaller. You also need to put it into 16-bit, so it will get auto-compressed. I usually use Sound Recorder and change it to the second lowest mono 16 bit quality, usually gets it down to 100~300kb.



None.

Jan 28 2010, 2:24 am NudeRaider Post #3

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

You can't compress wavs. It's a lossless format by definition and the only one that sc will accept. (Well there are newer formats that are also called wav that use some compression, but that's beyond anything sc will be able to handle.)

The only thing you can do is reduce quality / cut length.
So in Audacity you will want the following wave settings:
PCM, 11 kHz (or 8kHz if you're desperate), mono, 16 Bit (Sc automatically scales down the bits so its usually smaller than 8 Bit files)




Jan 28 2010, 2:30 am rockz Post #4

ᴄʜᴇᴇsᴇ ɪᴛ!

Wav files are simple, raw audio. Thus, you can easily figure out the file size.

The best compression quality for Starcraft is probably:
16 bit 11025 Hz, mono. = 16*11025*1 = 176 kbps = 22 kB/s

If we compare that to a "cd quality" wav file:
32 bit 44100 HZ, stereo. = 2822 kbps = 352 kB/s
we can see that it's quite larger.

If your 446 KB wav is 2 minutes, that would mean you had ~4 KB/s, which is TINY. Chances are it's corrupted or is no longer in a format which starcraft can read (there are many kinds of WAV files).

Typically Starcraft compresses 16 bit audio around 60%, so 22 kB/s turns into about 10 kB/s. At that ratio, you'd be able to support around 40 seconds of sounds to keep it around 400 kB wav file when compressed. That would leave you 50 kB for the map, which isn't hard to do if you use a map compressor.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Jan 28 2010, 5:48 am Heinermann Post #5

SDE, BWAPI owner, hacker.

There is always extra data in WAV files that you can remove with no impact on quality. It will require a hex editor though. You could look up details on the WAV file format specifications or post the sound so someone here can fix it up.




Jan 29 2010, 2:24 am Kimaru Post #6



Well I managed to find a wav compressor online and it successfully squished my 20 MB file into 1.3 MB, and with good quality, it works in my map and only makes it 405 KB. I think that's a steal.



None.

Jan 29 2010, 3:35 am Falkoner Post #7



Have you actually managed to make the sound play in StarCraft? Because somehow I doubt you managed to get it down that small, even if you lost most of your quality.



None.

Jan 29 2010, 6:11 am Kimaru Post #8



Yes, it plays. I'll upload it if you want.



None.

Jan 29 2010, 6:13 am rockz Post #9

ᴄʜᴇᴇsᴇ ɪᴛ!

sure



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Jan 29 2010, 6:24 am bobo Post #10



could u also give the website cuz i think alot of ppl would take high interest in it :)



None.

Jan 29 2010, 7:37 am NudeRaider Post #11

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Quote from Kimaru
Well I managed to find a wav compressor online and it successfully squished my 20 MB file into 1.3 MB, and with good quality, it works in my map and only makes it 405 KB. I think that's a steal.
The program is probably not what is so special about it.
Assuming the file originally was in standard cd quality: 44kHz, 16 Bit, Stereo
and the program saved it in poor quality: 11kHz, 8 Bit, Mono
that's 4*2*2 = 16 times smaller. 20MB / 16 = 1,25MB ~ 1,3MB

What really baffles me is that a file this large would only take up 350kB in your map (assuming the map itself is 55kB).
So, yes please, upload that map.




Jan 29 2010, 9:03 am Kimaru Post #12



Here it is.

Also for those who wanted the link to the site, here it is: http://www.blazemp.com/compress_wav_files.htm

Attachments:
Wav Test.scx
Hits: 4 Size: 392.08kb



None.

Jan 29 2010, 5:28 pm rockz Post #13

ᴄʜᴇᴇsᴇ ɪᴛ!

lol 6kHz. In any case, it's got a ton of empty space (and very little bass), so the compression is very good (73%). If it sounds goood, then go for it. Just compare the sound at 6kHz and 11 kHz and you'll see the difference.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Jan 29 2010, 9:43 pm Lethoth Post #14



This is an excellent program I use to compress sounds. You must put it PCM Format, 8bit, 8khz and 64kbps. That's the best the program can do.
Link for download: http://www.dbpoweramp.com/bin/dMC-R13.3-Ref-Trial.exe
What I do: first I compress the full song or the full sound. After that, I open the file with Audacity and make it the shorter possible, like deleting unused spaces at begin and end of the sound.
When it is ready and saved from Audacity, I compress it again and it reaches it's best compression.
Tip: The file loses some bass, give it more bass with Audacity.
Hope this helped,

~Lethoth



None.

Jan 30 2010, 2:05 am rockz Post #15

ᴄʜᴇᴇsᴇ ɪᴛ!

16 bit audio is smaller than 8 bit audio when compressed.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Jan 30 2010, 5:31 am Falkoner Post #16



Ah, that does make more sense depending on the song, but any song that high or low in the spectrum will sound horrible when compressed like that.



None.

Jan 30 2010, 6:03 am Neki Post #17



Quote from Falkoner
Ah, that does make more sense depending on the song, but any song that high or low in the spectrum will sound horrible when compressed like that.
Naw, anything at 11 KHz sounds fine. It's good enough for a Starcraft map at least, you'd be surprised the quality you can still get out of a clip even at low KHz. :P Usually, people won't even notice the difference in space versus quality.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:24 pm]
Vrael -- NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
[2024-4-30. : 5:08 pm]
Oh_Man -- https://youtu.be/lGxUOgfmUCQ
[2024-4-30. : 7:43 am]
NudeRaider -- Vrael
Vrael shouted: if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
Yeah I'm not a big fan of Westernhagen either, Fanta vier much better! But they didn't drop the lyrics that fit the situation. Farty: Ich bin wieder hier; nobody: in meinem Revier; Me: war nie wirklich weg
[2024-4-29. : 6:36 pm]
RIVE -- Nah, I'm still on Orange Box.
[2024-4-29. : 4:36 pm]
Oh_Man -- anyone play Outside the Box yet? it was a fun time
[2024-4-29. : 12:52 pm]
Vrael -- if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
[2024-4-29. : 11:17 am]
Zycorax -- :wob:
[2024-4-27. : 9:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[2024-4-27. : 7:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[2024-4-27. : 6:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
Please log in to shout.


Members Online: Roy