[Vorbis] Compressing small (<2k) .wav files

Monty xiphmont at xiph.org
Fri Oct 8 11:19:28 PDT 2004




On Fri, Oct 08, 2004 at 10:54:11AM -0400, Greg Rezansoff wrote:
> Hi,
>     When I used oggenc to encode small PCM wav files (eg <2k), the size of the .ogg file is usually larger.
> I assume this is because of some sort of header or dictionary that gets placed at the beginning, and some technical reason.

Yes, exactly.


> Is there any way around this?  Its not a big issue for me, since
> most of the files I compress are much larger, and the compression is
> good.  It would be clever if the encoder were able to detect this
> somehow, and just store the files as raw PCM, and skip any fancy
> headers.

This 'problem' actually pops up for game developers on a semi-regular
basis as they generally have lots of small sound effects to compress.

Usually, the decide that all files will be compressed in the same mode
(and thus using the same header), so that they can write files minus
the 'setup header' (which is the large one at the beginning) and keep
that seperately, adding it back in before decompression.

I've planned to add that feature to the official Vorbisfile API for
some time now, and it's pretty certain to get in there eventually :-)

Monty


More information about the Vorbis mailing list