Log in

View Full Version : OGG for short sound samples...


Jeff Evertt
02-04-2004, 05:24 PM
I've just been messing with this a little bit and was hoping there were some experts out there that could give me a jump start. Anyway, I've OGG compressed some MOD music and have been really happy with the results. So now, I've been trying it on some of my short sound samples.

I've tried converting with two methods: gold wave's saveas and command line oggenc. The second is nice in that it allows me to strip comments and sometimes save a bit more space. Generally, I'm getting pretty poor results (for the size, not quality). And on the really small samples (less than 5k or so), the ogg files are sometimes larger. I've also tried may lower bit rates and lower quality settings. Seems like the ogg headers are just really big.

And yes, the 100k plus samples do compress pretty well. I would expect a lower compression ratio, but for small sounds, what I'm finding is that it's not really useful at all (and in the end, the waves may compress better in the installer).

Anyone out there have some experience with this that they'd like to share?

Thanks,
-Jeff

Anthony Flack
02-04-2004, 10:11 PM
That's interesting. I'll be doing my sound soon too; so if it turns out OGG is not economical for the smaller samples, that's a very useful snippet of info. Interested to hear more.

gfm
02-04-2004, 11:04 PM
What settings are you using for the Ogg files?

Sample frequency? Bitrate?

In my experience, you can use a pretty low frequency and bitrate (especially with VBR) and get really good compression results without much quality loss.

princec
02-05-2004, 01:11 AM
You can get away with quality 0 or even -1 for subsecond sound effects, and they seem to end up pretty tiny. The OGG headers themselves actually zip quite well.

Cas :)

Jeff Evertt
02-05-2004, 09:01 AM
I've tried quality levels down to 0 and -1 and the full range of frequencies and bit rates. It seems like the headers are in the 5k range (does anyone know the actual size and if there is way to shrink them down? and what's actually in them?) - I've converted a couple of very small samples (1k-2k wave files) and ended up with ~5k OGG samples. Waves in the range of 5k to 10k seem to get about 0% to 30%.

And it's definitely the case that it doesn't matter as much for the small samples, I could just ship them as wave file. But, mostly, I'd just like to understand it a little better.

That's a good point about the headers zipping pretty well, I hadn't thought about that. I'll have to actually try it out and see.
-Jeff

princec
02-05-2004, 09:11 AM
7-zip managed to compress my 1.48mb of OGGs down to about 1.2mb, which isn't a bad saving. But even so, I suspect that for anything under 10k it's not worth using OGG.

Cas :)

Larry Hastings
02-05-2004, 09:25 AM
As always, the proof of the pudding is in the crust. Try it both ways, see which one is smaller, go with that. But I bet OGG is generally way smaller. :)

Anthony Flack
02-05-2004, 04:24 PM
I guess if you had lots of them, you could string all your tiny sound files back to back into a single sound file, OGG that, and have your program load it and chop it back up into the correct pieces. But in most cases I'm not sure the savings would justify the extra work.

Henrik
02-07-2004, 03:42 PM
Some form of ADPCM is probably best for really short samples.

Karukef
02-10-2004, 01:22 AM
If you are really serious about saving space I suggest you make a utility that takes all your original .wav samples and concatenate them into one big wav and ogg that. (Or several big wavs if you want different encoding settings for different samples). This utility should also make a file with the offset and length of each sample within the bigger file so you can extract them again ;)

Its some work so you have to be sure saving a few kilobytes is worth it for you. (And it will be a FEW kilobytes, because headers compress very well already as mentioned)