1 <HTML><HEAD><TITLE>xiph.org: Ogg Vorbis documentation</TITLE>
2 <BODY bgcolor="#ffffff" text="#202020" link="#006666" vlink="#000000">
3 <nobr><img src="white-ogg.png"><img src="vorbisword2.png"></nobr><p>
6 <h1><font color=#000070>
7 Ogg Vorbis encoding format documentation
10 <em>Last update to this document: July 2, 2002</em><br>
11 <em>Last update to Vorbis documentation: July 2, 2002</em><p>
15 </td><td valign=center>
16 As of writing, not all the below document
17 links are live. They will be populated as we complete the
24 <li><a href="packet.html">Vorbis packet structure</a>
25 <li><a href="envelope.html">Temporal envelope shaping and blocksize</a>
26 <li><a href="mdct.html">Time domain segmentation and MDCT transform</a>
27 <li><a href="resolution.html">The resolution floor</a>
28 <li><a href="residuals.html">MDCT-domain fine structure</a><p>
30 <li><a href="probmodel.html">The Vorbis probability model</a>
32 <li><a href="bitpack.html">The Vorbis bitpacker</a><p>
34 <li><a href="oggstream.html">Ogg bitstream overview</a>
35 <li><a href="framing.html">Ogg logical bitstream and framing spec</a>
36 <li><a href="vorbis-stream.html">Vorbis packet->Ogg bitstream
39 <li><a href="programming.html">Programming with libvorbis</a><p>
43 Ogg Vorbis is a general purpose compressed audio format
44 for high quality (44.1-48.0kHz, 16+ bit, polyphonic) audio and music
45 at moderate fixed and variable bitrates (40-80 kb/s/channel). This
46 places Vorbis in the same class as audio representations including
47 MPEG-1 audio layer 3, MPEG-4 audio (AAC and TwinVQ), and PAC.<p>
49 Vorbis is the first of a planned family of Ogg multimedia coding
50 formats being developed as part of the Xiph.org Foundation's Ogg multimedia
51 project. See <a href="http://www.xiph.org/">http://www.xiph.org/</a>
54 <h2>Vorbis technical documents</h2>
56 A Vorbis encoder takes in overlapping (but contiguous) short-time
57 segments of audio data. The encoder analyzes the content of the audio
58 to determine an optimal compact representation; this phase of encoding
59 is known as <em>analysis</em>. For each short-time block of sound,
60 the encoder then packs an efficient representation of the signal, as
61 determined by analysis, into a raw packet much smaller than the size
62 required by the original signal; this phase is <em>coding</em>.
63 Lastly, in a streaming environment, the raw packets are then
64 structured into a continuous stream of octets; this last phase is
65 <em>streaming</em>. Note that the stream of octets is referred to both
66 as a 'byte-' and 'bit-'stream; the latter usage is acceptible as the
67 stream of octets is a physical representation of a true logical
70 A Vorbis decoder performs a mirror image process of extracting the
71 original sequence of raw packets from an Ogg stream (<em>stream
72 decomposition</em>), reconstructing the signal representation from the
73 raw data in the packet (<em>decoding</em>) and them reconstituting an
74 audio signal from the decoded representation (<em>synthesis</em>).<p>
76 The <a href="programming.html">Programming with libvorbis</a>
77 documents discuss use of the reference Vorbis codec library
78 (libvorbis) produced by the Xiph.org Foundation.<p>
80 The data representations and algorithms necessary at each step to
81 encode and decode Ogg Vorbis bitstreams are described by the below
82 documents in sufficient detail to construct a complete Vorbis codec.
83 Note that at the time of writing, Vorbis is still in a 'Request For
84 Comments' stage of development; despite being in advanced stages of
85 development, input from the multimedia community is welcome.<p>
87 <h3>Vorbis analysis and synthesis</h3>
89 Analysis begins by seperating an input audio stream into individual,
90 overlapping short-time segments of audio data. These segments are
91 then transformed into an alternate representation, seeking to
92 represent the original signal in a more efficient form that codes into
93 a smaller number of bytes. The analysis and transformation stage is
94 the most complex element of producing a Vorbis bitstream.<p>
96 The corresponding synthesis step in the decoder is simpler; there is
97 no analysis to perform, merely a mechanical, deterministic
98 reconstruction of the original audio data from the transform-domain
102 <li><a href="packet.html">Vorbis packet structure</a>: Describes the basic analysis components necessary to produce Vorbis packets and the structure of the packet itself.
103 <li><a href="envelope.html">Temporal envelope shaping and blocksize</a>: Use of temporal envelope shaping and variable blocksize to minimize time-domain energy leakage during wide dynamic range and spectral energy swings. Also discusses time-related principles of psychoacoustics.
104 <li><a href="mdct.html">Time domain segmentation and MDCT transform</a>: Division of time domain data into individual overlapped, windowed short-time vectors and transformation using the MDCT
105 <li><a href="resolution.html">The resolution floor</a>: Use of frequency doamin psychoacoustics, and the MDCT-domain noise, masking and resolution floors
106 <li><a href="residuals.html">MDCT-domain fine structure</a>: Production, quantization and massaging of MDCT-spectrum fine structure
109 <h3>Vorbis coding and decoding</h3>
111 Coding and decoding converts the transform-domain representation of
112 the original audio produced by analysis to and from a bitwise packed
113 raw data packet. Coding and decoding consist of two logically
114 orthogonal concepts, <em>back-end coding</em> and <em>bitpacking</em>.<p>
116 <em>Back-end coding</em> uses a probability model to represent the raw numbers
117 of the audio representation in as few physical bits as possible;
118 familiar examples of back-end coding include Huffman coding and Vector
121 <em>Bitpacking</em> arranges the variable sized words of the back-end
122 coding into a vector of octets without wasting space. The octets
123 produced by coding a single short-time audio segment is one raw Vorbis
128 <li><a href="probmodel.html">The Vorbis probability model</a>
130 <li><a href="bitpack.html">The Vorbis bitpacker</a>: Arrangement of
131 variable bit-length words into an octet-aligned packet.
135 <h3>Vorbis streaming and stream decomposition</h3>
137 Vorbis packets contain the raw, bitwise-compressed representation of a
138 snippet of audio. These packets contain no structure and cannot be
139 strung together directly into a stream; for streamed transmission and
140 storage, Vorbis packets are encoded into an Ogg bitstream.<p>
144 <li><a href="oggstream.html">Ogg bitstream overview</a>: High-level
145 description of Ogg logical bitstreams, how logical bitstreams
146 (of mixed media types) can be combined into physical bitstreams, and
147 restrictions on logical-to-physical mapping. Note that this document is
148 not specific only to Ogg Vorbis.
150 <li><a href="framing.html">Ogg logical bitstream and framing
151 spec</a>: Low level, complete specification of Ogg logical
152 bitstream pages. Note that this document is not specific only to Ogg
155 <li><a href="vorbis-stream.html">Vorbis bitstream mapping</a>:
156 Specifically describes mapping Vorbis data into an
157 Ogg physical bitstream.
163 <a href="http://www.xiph.org/">
164 <img src="white-xifish.png" align=left border=0>
166 <font size=-2 color=#505050>
168 Ogg is a <a href="http://www.xiph.org">Xiph.org Foundation</a> effort
169 to protect essential tenets of Internet multimedia from corporate
170 hostage-taking; Open Source is the net's greatest tool to keep
171 everyone honest. See <a href="http://www.xiph.org/about.html">About
172 the Xiph.org Foundation</a> for details.
175 Ogg Vorbis is the first Ogg audio CODEC. Anyone may freely use and
176 distribute the Ogg and Vorbis specification, whether in a private,
177 public or corporate capacity. However, the Xiph.org Foundation and
178 the Ogg project (xiph.org) reserve the right to set the Ogg Vorbis
179 specification and certify specification compliance.<p>
181 Xiph.org's Vorbis software CODEC implementation is distributed under a
182 BSD-like license. This does not restrict third parties from
183 distributing independent implementations of Vorbis software under
186 Ogg, Vorbis, Xiph.org Foundation and their logos are trademarks (tm)
187 of the <a href="http://www.xiph.org/">Xiph.org Foundation</a>. These
188 pages are copyright (C) 1994-2002 Xiph.org Foundation. All rights