|08-25-2007, 12:46 PM||#1|
Join Date: Jan 2006
Tutorial: How to compress sound files for import
Most sounds Warcraft3 are saved as 22,050 khz, 16 bit, 1 channel (mono) pcm wave files. When you import your own sounds, they have to apply to these specifications, with the exception of music, which is saved in mp3 format. The downside of pcm wave-files is their filesize. Every kb counts, especially when it comes to BattleNet gaming.
Unfortunately, sounds for spells, abilities, units, interface, etc. have to be imported as *.wav files for Warcraft3 to accept them.
Fortunately however, we can bypass that restriction with the hybrid format of mp3-wave files, which is basically a wave-file header with an attached sound in the mp3 format.
With this wolf in sheepskin we can nonetheless benefit from mp3 audio compression.
Out of the wide range of commercial and non-commerical audio converters out there, I have found one which is freely available, very efficient, and has an enormous functionality in terms of audio compression.
As follows two ways how to convert your sound: a) using the command prompt only, b) using the BeSweet GUI
a) Compressing your sounds using the command prompt
Get BeSweet made by DSPGuru:
Have you extracted all the files from the zip into a new directory? - If so, then open up a new Windows command prompt, change to the directory containing the BeSweet.exe and execute it.
Cancel the call to go online. Have a read through the available options.
As follows an example syntax for BeSweet.exe which produced the desired results:
"C:\Programme\BeSweet\BeSweet.exe" -core( -input "d:\ArachnathidDeath1.wav" -output "d:\ArachnathidDeath1-New.wav" -wavmp3 ) -lame( -m m --scale 1 --noath -b 96 -p )
Sets your bitrate to 96kbps. That's right the point where we can save filesize.
Take extra care with the following option:
Sets the mode of the audio file to mono. With -m s you set the mode to stereo. Setting the mode to auto -m a works fine most of the times, so that's what I would actually recommend.
Yet keep in mind that you quickly end up with a distorted sound if this option is not set correctly.
Here's another syntax with the input file in stereo, and a bitrate of 128kbps
"C:\Programme\BeSweet\BeSweet.exe" -core( -input "d:\War3XMainGlueScreenMonster.wav" -output "d:\War3XMainGlueScreenMonster-New.wav" -wavmp3 ) -lame( -m s -b 128 -p ) -iobuffer( -in 0 )
b) Compressing your sounds using the BeSweet GUI
If you're more of a GUI-guy, you'd have to make the extra effort of setting up the GUI. This brings more control over the process of sound compression, and gives you a quick overview over the amount of possible options.
BeSweet (same as above)
Alternative path for the package BeSweet + BeSweetGUI + Ac3Machine:
Optionally the Lame compressor, i.e. the Lame exe
Note that for this procedure it is important to use DSPGuru's official GUI. The other BeSweet GUI, BeLight does not include the desired options for mp3-wave files.
Setting it up:
1) If you have not done so yet, extract the BeSweet package to a new directory. Let's call it "BeSweet".
2) Extract the GUI files into your BeSweet directory. Confirm overwriting the *.dll
3) Extract the Lame compressor into your BeSweet directory
4) Open the GUI
5) Set the Besweet.exe file path to the BeSweet.exe
6) Click on Lame1 and set the lame.exe file path
That's it for the file setup. As follows what it takes to convert your wave file to mp3-wave. I will only go through the options needed for our purpose; functions like batch processing, boost, normalizing, etc. are left open for your personal exploration.
1) Select your input file
2) Check through the configuration pages:
- Azid1: leave as is
- Azid2: uncheck if any is checked
- SSRC: leave as is, or set to 22050
- Lame1: To be sure about the options set "Mode" to mono if your input file is mono, to "Stereo" if your input file is stereo; Otherwise set the option to Auto
- Lame2: Check "Error Protection". Now the important part: Set "CBR" to 96 (or 128 for slightly higher quality)
- Lame3: Uncheck all
- 2Lame: Leave as is
- BeSweet: Uncheck SRRC, uncheck Boost; important: under Lame set MP3-WAVE
3) Select output file. Make sure to set a different folder or filename than the original
4) Confirm: Press WAV to WAV
The settings will be saved, btw. I'd yet recommend to save your settings as acustom setting profile.
Now listen to your soundfile with the audioplayer, winamp or any other software. If it plays well and sounds like the original, you can import it with WE.
Last edited by Doomhammer : 08-25-2007 at 01:08 PM.
|Sponsored Links - Login to hide this ad!|
|10-30-2007, 09:50 PM||#2|
Modeling & Gallery Moderator
oh my, you didn't post this where it belongs and only now I see it. I'll move where you should have posted it in the first place, so mike can take a look at it.__________________
|11-04-2007, 11:00 AM||#4|
Tools & Tutorials Moderator
I once tried coding this myself a long time ago (I mean embedding an mp3 into a wav container), but I guess I set some flags or whatever wrong, because it didn't work for me back then.
But with this tool it really works. Neat!
|11-06-2007, 09:34 PM||#8|
Join Date: Nov 2003
Erm, for me it seems to work when I just convert a sound to MP3, mono, 22050Hz at any Bitrate and add a .wav suffix instead of the .mp3.__________________
I made a new map, went to sound editor and replaced the human Town Hall sound with my MP3 just named to be a .wav; it works just fine ingame, on both Mac and PC. It even works if I use it as 3D sound. Is there another part of war3 where this does not work? Or was this whole tutorial unnecessary?!
I hope for you that it wasn't, because probably this was quite much work, I think...
Last edited by Waldbaer : 11-06-2007 at 09:38 PM.
|Thread Tools||Search this Thread|