[Etoys] Ogg Vorbis and Speex CODEC for Squeak eToys

Takashi Yamamiya tak at metatoys.org
Sun Mar 11 16:11:40 EDT 2007


Hi Andreas,

> Can you say a bit more about the Codec, like: What is the average
> compression ratio? Does it use a fixed or variable bit rate? How CPU
> intensive is compression/decompression?

You can choose compression ratio using "quality factor". Now I set the
default number as vorbis= 0.0 (you can choose -0.1 to 1.0), speex= 4
(0 to 10). In this condition:

- vorbis 35kbps
- speex 19kbps
- GSM 36kbps
- original data 352kbps (22050 Hz mono: see below)

It uses variable bit rate. I haven't masure CPU factor seriously
though, I didn't feel any problem on OLPC B2. I will test it later.

-- test code

src := FMSound majorChord asSampledSound.
src duration. "2.0"
src samples asByteArray size * 8 / src duration. "352800.0"

gsm _ src compressWith: GSMCodec.
gsm channels first size * 8 / src duration. "36432.0"
gsm asSound play.

vorbis _ src compressWith: OggVorbisCodec.
vorbis channels first size * 8 / src duration. "35252.0"
vorbis asSound play.

speex _ src compressWith: OggSpeexCodec.
speex channels first size * 8 / src duration. "18952.0"
speex asSound play.

Cheers,
- Takashi


More information about the Etoys mailing list