Datasheet
HH
VS1053B OGG VORBIS ENCODER VSMPG
3.2 Compressing into Ogg Vorbis with a PC
The whole process of getting Ogg Vorbis files looks roughly like this:
• Preparation: Decode an MP3 / WMA / AAC etc file or preferably rip a CD to WAV
format and make sure that you have “oggenc” (Chapter 3.2.1).
• Compression to Ogg Vorbis (Chapters 3.2.2 and 3.2.3).
• Optional post-processing with VorbisGain (Chapter 3.3).
3.2.1 Preparation
If you intend to transcode (=recompress) MP3 files, you first have to convert them to 16-
bit RIFF WAV format (usually known for a “.wav” file name extension). However, before
you do that, please have a look at Chapter 3.1.2 for details on transcoding.
If you encode CDs, you have to make sure they are read initially into WAV format. It is
recommended to use CD sources for compression if possible.
When you have audio in WAV format, you can use oggenc to compress files, either in
stereo or mono.
Before continuing to the next stage, make sure you have the free Ogg Vorbis encoder
“oggenc”, minimum version 1.0.2 (2005).
3.2.2 Compressing CD-Quality Music
If we assume the input file is called file.wav and the output is to be called file.ogg, the
following parameters may be used.
It is assumed that the input audio is sampled at the CD 44.1 kHz sample rate. While
these commands will also work for other samplerates, quality and file sizes may differ.
For each quality setting, the table shows the command needed to convert the file, a
typical bit-rate for that quality, how many hours of music could be stored to a 1 gibibyte
memory card, and a short description of the mode. For comparison purposes, also an
uncompressed CD bitstream is shown in the table.
CD music compression
Command Typ. Hours/ Description
kbit/s 1 GiB
oggenc -q -1 file.wav 45 53 Smallest files size, better than 96 kbit/s MP3
oggenc -q 0 file.wav 64 37 Ok quality, equals 112 kbit/s MP3
oggenc -q 2 file.wav 96 25 Better than most 128 kbit/s MP3 files
oggenc -q 4 file.wav 128 19 Often CD transparent
oggenc -q 6 file.wav 192 12 CD quality almost always
CD 1411 1.7 Uncompressed CD
Rev. 1.70c 2012-11-16
Page 27(39)