<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.xiph.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=MrZeus</id>
	<title>XiphWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.xiph.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=MrZeus"/>
	<link rel="alternate" type="text/html" href="https://wiki.xiph.org/Special:Contributions/MrZeus"/>
	<updated>2026-06-08T09:47:45Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=FLAC&amp;diff=16830</id>
		<title>FLAC</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=FLAC&amp;diff=16830"/>
		<updated>2025-06-25T09:51:37Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* OggFLAC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:FLAC Logo.svg|frameless|right]]&lt;br /&gt;
&#039;&#039;&#039;FLAC&#039;&#039;&#039; stands for &#039;&#039;&#039;Free Lossless Audio Codec&#039;&#039;&#039;. FLAC is an [[wikipedia:audio compression|audio compression]] [[wikipedia:codec|codec]] that is [[wikipedia:lossless data compression|lossless]].  Unlike [[wikipedia:lossy data compression|lossy]] codecs such as [[Opus]], [[Vorbis]] and [[wikipedia:MP3|MP3]], it does not remove any information from the audio stream.&lt;br /&gt;
&lt;br /&gt;
On 2003 January 29th, the [[Xiph.Org Foundation]] announced the incorporation of FLAC under their flag, to go along with Vorbis, [[Theora]], and [[Speex]].&lt;br /&gt;
&lt;br /&gt;
== The Project ==&lt;br /&gt;
&lt;br /&gt;
The FLAC project consists of: &lt;br /&gt;
* the stream format &lt;br /&gt;
* libFLAC, a library of reference encoders and decoders, and a metadata interface &lt;br /&gt;
* libFLAC++, an object wrapper around libFLAC &lt;br /&gt;
* flac, a command-line wrapper around libFLAC to encode and decode .flac files &lt;br /&gt;
* metaflac, a command-line metadata editor for .flac files &lt;br /&gt;
* input plugins for various music players ([[wikipedia:Winamp|Winamp]], [[wikipedia:XMMS|XMMS]], [[wikipedia:Foobar2000|foobar2000]], and more in the works)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Free&amp;quot; means that the specification of the stream format is in the [[wikipedia:public domain|public domain]] (the FLAC project reserves the right to set the FLAC specification and certify compliance), and that neither the FLAC format nor any of the implemented encoding/decoding methods are covered by any patent. It also means that the sources for libFLAC and libFLAC++ are available under The New BSD license and the sources for flac and metaflac applications, and the plugins are available under the [[wikipedia:GPL|GPL]].&lt;br /&gt;
&lt;br /&gt;
== OggFLAC ==&lt;br /&gt;
&lt;br /&gt;
The FLAC codec comes with its own transport system, termed Native FLAC.&lt;br /&gt;
&lt;br /&gt;
A FLAC stream can also be encapsulated in an [[Ogg]] container, the result being termed OggFLAC.  &lt;br /&gt;
The details of how to do this are called [https://xiph.org/flac/ogg_mapping.html Ogg mapping].&lt;br /&gt;
&lt;br /&gt;
== Comparisons ==&lt;br /&gt;
&lt;br /&gt;
FLAC is distinguished from general lossless algorithms such as ZIP and gzip in that it is specifically designed for the efficient packing of audio data; while ZIP may compress a CD-quality audio file 20&amp;amp;ndash;40%, FLAC achieves compression rates of 30&amp;amp;ndash;70%.  &lt;br /&gt;
&lt;br /&gt;
While lossy codecs can achieve ratios of 80&amp;amp;ndash;90+%, they do this at the expense of discarding data from the original stream. Though FLAC uses a similar technique in its encoding process, it also adds &amp;quot;residual&amp;quot; data to allow the decoder to restore the original waveform flawlessly.&lt;br /&gt;
&lt;br /&gt;
FLAC has become the preferred lossless format for trading live music online.  It has a smaller file size than Shorten, and unlike MP3, it&#039;s lossless, which ensures the highest fidelity to the source material, which is important to live music traders. It has recently become a favorite trading format of non-live lossless audio traders as well.&lt;br /&gt;
&lt;br /&gt;
There are other lossless audio codecs: [http://www.wavpack.com/ WavPack] (marginally better compression, slower), [http://wiki.hydrogenaud.io/index.php?title=TAK Tom&#039;s lossless Audio Kompressor], [http://www.monkeysaudio.com/ Monkey&#039;s Audio] and [https://en.wikipedia.org/wiki/Category:Lossless_audio_codecs some others]. &lt;br /&gt;
&lt;br /&gt;
FLAC compiles on many platforms: most Unices (including Linux, *BSD, Solaris, and Mac OS X), DOS, Windows, BeOS, and OS/2. There are build systems for autoconf/automake, MSVC, Watcom C, and Project Builder.&lt;br /&gt;
&lt;br /&gt;
==  More information ==&lt;br /&gt;
&lt;br /&gt;
* [[FLACDecoders]]: List of decoders&lt;br /&gt;
* [[FLACEncoders]]: List of encoders&lt;br /&gt;
&lt;br /&gt;
== Non-PC playback support ==&lt;br /&gt;
&lt;br /&gt;
FLAC is supported by a wide range of devices.&lt;br /&gt;
&lt;br /&gt;
The [[PortablePlayers#Portable Vorbis Native Support Table|portable players Vorbis support matrix]] also contains information about FLAC support.&lt;br /&gt;
&lt;br /&gt;
Other examples of FLAC supporting devices are:&lt;br /&gt;
&lt;br /&gt;
* [[PortablePlayers/Flash#Cowon.2FiAudio_D2.2C_F2.2C_T2.2C_U3.2C_U2.2C_G3.2C_5.2C_G2.2C_U5.2C_7|iAudio]]: http://www.iaudio.com&lt;br /&gt;
* Kenwood Music Keg&lt;br /&gt;
* Naim HDX: http://www.naim-audio.com/products/hdx.html&lt;br /&gt;
* PhatNoise Home Media Player&lt;br /&gt;
* PhatNoise Phatbox&lt;br /&gt;
* [[PortablePlayers/Harddisk#Rio Karma|Rio Karma]]: http://www.digitalnetworksna.com/rioaudio/&lt;br /&gt;
* [[StaticPlayers#Slim_Devices_Squeezebox.2C_Squeezebox2.2C_Squeezebox3.2C_Transporter|SlimDevices Squeezebox]]: http://www.slimdevices.com&lt;br /&gt;
&lt;br /&gt;
FLAC is supported by the following chips and/or chipsets:&lt;br /&gt;
&lt;br /&gt;
* VLSI Solution OY&#039;s [http://www.vlsi.fi/en/products/vs1053.html VS1053b] decodes FLAC&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [https://xiph.org/flac/ Project homepage]&lt;br /&gt;
* [http://www.danrules.com/macflac/ MacFLAC] [[GUI]] frontend to encode/decode FLAC on [[Mac OS X]]&lt;br /&gt;
* [[Wikipedia: FLAC]]&lt;br /&gt;
* [http://losslessaudio.blogspot.co.uk/ The Lossless Audio Blog]&lt;br /&gt;
&amp;lt;!-- The Lossless Audio Blog has moved to http://www.losslessaudioblog.com/; update link in, say, July 2015 --&amp;gt;&lt;br /&gt;
* [http://www.audiograaf.nl/downloads.html Lossless Codec comparison]&lt;br /&gt;
&lt;br /&gt;
[[Category:FLAC]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Opus_Recommended_Settings&amp;diff=16690</id>
		<title>Opus Recommended Settings</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Opus_Recommended_Settings&amp;diff=16690"/>
		<updated>2018-12-14T13:15:23Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* Mono or Stereo */ tweak mono/stereo threshhold according to current source code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Recommended Bitrates =&lt;br /&gt;
Depending on the kind of audio you want to encode with Opus, you may want to use different bitrate (quality) settings.&lt;br /&gt;
&lt;br /&gt;
The settings in the table below are meant to &#039;&#039;&#039;start you off&#039;&#039;&#039; with a decent tradeoff between &#039;&#039;&#039;good quality&#039;&#039;&#039; and &#039;&#039;&#039;small file size&#039;&#039;&#039; (or &#039;&#039;&#039;bitrate usage&#039;&#039;&#039;, if you&#039;re streaming).&lt;br /&gt;
&lt;br /&gt;
You should test the suggested bitrate by actually &#039;&#039;&#039;listening&#039;&#039;&#039; to your encoded audio and then:&lt;br /&gt;
* tweaking the bitrate &#039;&#039;&#039;down&#039;&#039;&#039; if you think the quality is good, but the file size (or bitrate) is too big,&lt;br /&gt;
* tweaking the bitrate &#039;&#039;&#039;up&#039;&#039;&#039; if you think the quality is bad, and you can afford having bigger files (or a larger streaming bitrate).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Use Case&lt;br /&gt;
!Channels&lt;br /&gt;
!Bitrate (Kb/s)&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
|Low bandwidth HF/VHF digital radio&lt;br /&gt;
|1 (mono)&lt;br /&gt;
|Use &#039;&#039;&#039;[http://www.rowetel.com/?page_id=452 Codec&amp;amp;nbsp;2]&#039;&#039;&#039;&lt;br /&gt;
|Opus only supports bitrates &#039;&#039;&#039;down to 6&amp;amp;nbsp;Kb/s&#039;&#039;&#039;.&amp;lt;br&amp;gt;&lt;br /&gt;
Codec 2 handles ultra low bitrate speech at &#039;&#039;&#039;0.7&amp;amp;nbsp;-&amp;amp;nbsp;3.2&amp;amp;nbsp;Kb/s&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
|VoIP&lt;br /&gt;
|1&lt;br /&gt;
|10&amp;amp;nbsp;-&amp;amp;nbsp;24&lt;br /&gt;
|10&amp;amp;nbsp;Kb/s will deliver narrowband most of the time, 24&amp;amp;nbsp;Kb/s should give fullband.&amp;lt;br&amp;gt;&lt;br /&gt;
More details in &#039;&#039;&#039;[[Opus_Recommended_Settings#Bandwidth_Transition_Thresholds|the relevant table]]&#039;&#039;&#039; further down this page.&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;|Audiobooks / Podcasts&lt;br /&gt;
|1&lt;br /&gt;
|24&lt;br /&gt;
|Bitrates from here on up tend to deliver fullband audio.&lt;br /&gt;
|-&lt;br /&gt;
|2 (stereo)&lt;br /&gt;
|32&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Music Streaming / Radio&lt;br /&gt;
|2&lt;br /&gt;
|64&amp;amp;nbsp;-&amp;amp;nbsp;96&lt;br /&gt;
|Opus has better quality than MP3, AAC and [[Vorbis]] at these rates.&amp;lt;br&amp;gt;&lt;br /&gt;
(listening test results: &#039;&#039;&#039;[http://listening-tests.hydrogenaud.io/igorc/results.html 64&amp;amp;nbsp;Kb/s]&#039;&#039;&#039;, &#039;&#039;&#039;[http://listening-test.coresv.net/results.htm 96&amp;amp;nbsp;Kb/s]&#039;&#039;&#039;)&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=&amp;quot;3&amp;quot;|Music Storage&lt;br /&gt;
|2&lt;br /&gt;
|96&amp;amp;nbsp;-&amp;amp;nbsp;128&lt;br /&gt;
|Opus at 128&amp;amp;nbsp;KB/s (VBR) is pretty much &#039;&#039;&#039;[https://en.wikipedia.org/wiki/Transparency_(data_compression) transparent]&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
|6 (5.1 surround)&lt;br /&gt;
|128&amp;amp;nbsp;-&amp;amp;nbsp;256&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;|For surround sound, Opus uses &#039;&#039;&#039;[https://xiph.org/~xiphmont/demo/opus/demo3.shtml surround-sound bitrate allocation]&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
|8 (7.1 surround)&lt;br /&gt;
|256&amp;amp;nbsp;-&amp;amp;nbsp;450&lt;br /&gt;
|-&lt;br /&gt;
|Music Archiving&lt;br /&gt;
|1&amp;amp;nbsp;-&amp;amp;nbsp;8&lt;br /&gt;
|Use &#039;&#039;&#039;[[FLAC]]&#039;&#039;&#039;&lt;br /&gt;
|If you are archiving audio, use a &#039;&#039;&#039;[https://en.wikipedia.org/wiki/Audio_file_format#Lossless_compressed_audio_format lossless audio format]&#039;&#039;&#039; to prevent &#039;&#039;&#039;[https://en.wikipedia.org/wiki/Generation_loss generation loss]&#039;&#039;&#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Technical Details =&lt;br /&gt;
For the more technical Opus users, here are some details to help you fine-tune your decision on which bitrate best fits your needs.&lt;br /&gt;
&lt;br /&gt;
== Mono or Stereo ==&lt;br /&gt;
Opus tends to start &#039;&#039;&#039;downmixing stereo inputs to mono&#039;&#039;&#039; from roughly &#039;&#039;&#039;19&amp;amp;nbsp;Kb/s and lower&#039;&#039;&#039;.&lt;br /&gt;
You can check the details in the &#039;&#039;&#039;[https://github.com/xiph/opus/blob/master/src/opus_encoder.c#L149 opus_encoder.c]&#039;&#039;&#039; source file.&lt;br /&gt;
&lt;br /&gt;
You can force downmixing at any bitrate by using the following command-line parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;--downmix-mono&amp;lt;/code&amp;gt; - downmixes all input channels to mono&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;--downmix-stereo&amp;lt;/code&amp;gt; - downmixes all input channels to stereo (if there are more than 2 input channels, e.g. surround sound)&lt;br /&gt;
&lt;br /&gt;
== Bandwidth Transition Thresholds ==&lt;br /&gt;
The following table shows rough bitrates that you might want to use to encode audio that has &#039;&#039;&#039;[https://tools.ietf.org/html/rfc6716#section-2 limited frequency bandwidths]&#039;&#039;&#039;.&lt;br /&gt;
This could be useful if your audio has already been bandpassed, or should go through a bandpass filter (e.g. VoIP speech).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!rowspan=&amp;quot;3&amp;quot;|Bandpass Range (Hz)&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|Rough Bitrate Required (Kb/s)&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Mono&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|Stereo&lt;br /&gt;
|-&lt;br /&gt;
!Voice&lt;br /&gt;
!Music&lt;br /&gt;
!Voice&lt;br /&gt;
!Music&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;text-align:right;&amp;quot;|NarrowBand (3&amp;amp;nbsp;-&amp;amp;nbsp;4000)&lt;br /&gt;
|12&lt;br /&gt;
|15&lt;br /&gt;
|?&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;text-align:right;&amp;quot;|MediumBand (3&amp;amp;nbsp;-&amp;amp;nbsp;6000)&lt;br /&gt;
|15&lt;br /&gt;
|18-22&lt;br /&gt;
|?&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;text-align:right;&amp;quot;|WideBand (3&amp;amp;nbsp;-&amp;amp;nbsp;8000)&lt;br /&gt;
|16-20&lt;br /&gt;
|22-28&lt;br /&gt;
|?&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;text-align:right;&amp;quot;|SuperWideBand (3-12000)&lt;br /&gt;
|24-28&lt;br /&gt;
|28-32&lt;br /&gt;
|?&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;text-align:right;&amp;quot;|FullBand (3-20000)&lt;br /&gt;
|28-40&lt;br /&gt;
|32-64&lt;br /&gt;
|32-64&lt;br /&gt;
|64-128&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The details of Opus&#039; bandpass thresholds can be found in the &#039;&#039;&#039;[https://github.com/xiph/opus/blob/master/src/opus_encoder.c#L121 opus_encoder.c]&#039;&#039;&#039; source file.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;[http://wiki.hydrogenaud.io/index.php?title=Opus HydrogenAudio]&#039;&#039;&#039; wiki also has some great information on Opus and its usage.&lt;br /&gt;
&lt;br /&gt;
== Framesize Tweaking ==&lt;br /&gt;
Opus can encode frames of &#039;&#039;&#039;2.5&#039;&#039;&#039;, &#039;&#039;&#039;5&#039;&#039;&#039;, &#039;&#039;&#039;10&#039;&#039;&#039;, &#039;&#039;&#039;20&#039;&#039;&#039;, &#039;&#039;&#039;40&#039;&#039;&#039;, or &#039;&#039;&#039;60&amp;amp;nbsp;ms&#039;&#039;&#039;.  It can also combine multiple frames into packets of &#039;&#039;&#039;up to 120&amp;amp;nbsp;ms&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Opus uses a &#039;&#039;&#039;20&amp;amp;nbsp;ms&#039;&#039;&#039; frame size &#039;&#039;&#039;[https://tools.ietf.org/html/rfc6716#section-2.1.4 by default]&#039;&#039;&#039;, as it gives a decent mix of low latency and good quality.&lt;br /&gt;
&lt;br /&gt;
For real-time applications, sending fewer packets per second reduces the overall bitrate, since it reduces the overhead from &#039;&#039;&#039;[https://en.wikipedia.org/wiki/IPv6_packet#Fixed_header IP]&#039;&#039;&#039;, &#039;&#039;&#039;[https://en.wikipedia.org/wiki/User_Datagram_Protocol#Packet_structure UDP]&#039;&#039;&#039;, and &#039;&#039;&#039;[https://en.wikipedia.org/wiki/Real-time_Transport_Protocol#Packet_header RTP headers]&#039;&#039;&#039;.&lt;br /&gt;
However, it increases latency and sensitivity to packet losses, as losing one packet constitutes a loss of a bigger chunk of audio.&lt;br /&gt;
Unless operating at very low bitrates over RTP, there is no reason to use frame sizes above 20 ms, as those will have slightly lower quality for music encoding.&lt;br /&gt;
&lt;br /&gt;
For these reasons, the default 20&amp;amp;nbsp;ms frames are a good choice for most applications.&lt;br /&gt;
&lt;br /&gt;
== Trading Coding Efficiency with CPU Time ==&lt;br /&gt;
The Opus encoder uses its maximum algorithmic &#039;&#039;&#039;complexity&#039;&#039;&#039; setting of &#039;&#039;&#039;10&#039;&#039;&#039; &#039;&#039;&#039;[https://tools.ietf.org/html/rfc6716#section-2.1.5 by default]&#039;&#039;&#039;. This means that it does not hesitate to use CPU to give you the best quality encoding at a given bitrate.&lt;br /&gt;
&lt;br /&gt;
If the CPU usage is too high for the system you are using Opus on, you can try a lower complexity setting. The allowed values span from &#039;&#039;&#039;10&#039;&#039;&#039; (highest CPU usage and quality) down to &#039;&#039;&#039;0&#039;&#039;&#039; (lowest CPU usage and quality).&lt;br /&gt;
&lt;br /&gt;
[[Category:Opus]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Speex&amp;diff=16677</id>
		<title>Speex</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Speex&amp;diff=16677"/>
		<updated>2018-05-21T09:18:06Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* Usefulness, Speex DSP */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{historical}}&lt;br /&gt;
&lt;br /&gt;
= The Speex codec is deprecated! Xiph recommends you use the superior &#039;&#039;&#039;[[Opus]]&#039;&#039;&#039; codec instead. =&lt;br /&gt;
&lt;br /&gt;
== Website ==&lt;br /&gt;
The [http://www.speex.org/ Speex homepage] has all the project info.&lt;br /&gt;
&lt;br /&gt;
There is also a &#039;&#039;&#039;[[Speex FAQ]]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
See [[Speex hardware]] for a partial list of supported hardware&lt;br /&gt;
&lt;br /&gt;
== Usefulness, Speex DSP ==&lt;br /&gt;
In 2009, the source code of Speex was split into &#039;&#039;&#039;Speex Codec&#039;&#039;&#039; and &#039;&#039;&#039;Speex DSP&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
While the Codec part has been deprecated since 2013, the &#039;&#039;&#039;[https://git.xiph.org/?p=speexdsp.git;a=summary Speex DSP]&#039;&#039;&#039; part is still useful and still under development.&lt;br /&gt;
&lt;br /&gt;
It contains among others resampling code (written originally 2007 for the Speex codec) used by several other audio projects, including &#039;&#039;&#039;[https://git.xiph.org/?p=opus-tools.git Opus Tools]&#039;&#039;&#039; (actually OPUS TOOLS 0.1.9 from 2014 contains an outdated version of the resampling code from 2009 with minimal modifications).&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
These are some improvements that could be made to Speex.&lt;br /&gt;
&lt;br /&gt;
[mailto:speex-dev@xiph.org Let us know] if you&#039;d like to work on one of them.&lt;br /&gt;
&lt;br /&gt;
* Speech/signal processing (DSP design)&lt;br /&gt;
** Improve noise suppression (get rid of musical noise) and residual echo suppression&lt;br /&gt;
** Improve packet-loss concealment (PLC)&lt;br /&gt;
** Re-write the built-in voice activity detector (VAD)&lt;br /&gt;
** Improve the 2.15 kbps vocoder mode (there are even 4 unused bits left to use)&lt;br /&gt;
** Algorithmic optimizations (see if some searches can be simplified/approximated)&lt;br /&gt;
&lt;br /&gt;
* Complete fixed-point (DSP development)&lt;br /&gt;
** Wideband&lt;br /&gt;
** VBR&lt;br /&gt;
** Rest of the narrowband modes&lt;br /&gt;
** Preprocessor (noise suppression, AGC)&lt;br /&gt;
** Jitter buffer&lt;br /&gt;
** Arch-specific optimization&lt;br /&gt;
** More...&lt;br /&gt;
&lt;br /&gt;
* Tune (playing with parameters)&lt;br /&gt;
** Noise weighting filter&lt;br /&gt;
** Perceptual enhancement&lt;br /&gt;
&lt;br /&gt;
* Features (plain C programming)&lt;br /&gt;
** Implement maximum VBR bit-rate&lt;br /&gt;
** Implement peeling (write functions to strip some of the bits)&lt;br /&gt;
*** Peel high-band (wideband -&amp;gt; narrowband)&lt;br /&gt;
*** Transform 24.6 kbps mode to 15 kbps mode&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Use questions from the mailing list to create a [[Speex_FAQ|better FAQ]] on this wiki&lt;br /&gt;
** Update the Speex manual based on recent papers&lt;br /&gt;
** Improve libspeex documentation&lt;br /&gt;
** Write good example code&lt;br /&gt;
** Split off the documentation of SpeexDSP ... the latest release &amp;quot;speexdsp-1.2rc3.tar.gz&amp;quot; from 2015 still contains &amp;quot;The Speex Codec Manual Version 1.2 Beta 3&amp;quot; from 2007 ... it documents the codec part, not the DSP part, further [http://www.speex.org/downloads] contains some dead links, and it does not prominently document that only the codec is deprecated, but the DSP part is not&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [[Applications that use Speex]]&lt;br /&gt;
* [[Games that use Speex]]&lt;br /&gt;
* [[Wikipedia: Speex]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Speex]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Games_that_use_Vorbis&amp;diff=16666</id>
		<title>Games that use Vorbis</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Games_that_use_Vorbis&amp;diff=16666"/>
		<updated>2018-03-03T16:20:19Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: add Press X To Not Die (fun game!)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following games use [[Vorbis]], most frequently for their in-game music or sound effects:&lt;br /&gt;
&lt;br /&gt;
* All Games By [http://www.reflexive.com/index.php?CAT=Search&amp;amp;SEARCH=dev%3AReflexive+Entertainment&amp;amp;PAGE=GameList Reflexive Entertainment].&lt;br /&gt;
&lt;br /&gt;
* [http://www.mobygames.com/game/windows/007-nightfire 007: Nightfire]: Uses Ogg Vorbis for background soundtrack.&lt;br /&gt;
&lt;br /&gt;
* [http://www.asciisector.net/ Ascii Sector]: Space combat/exploration/trading game.  Uses Ogg Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.ageofconan.com/ Age of Conan — Hyborian Adventures]: Uses Ogg Vorbis for all audio.&lt;br /&gt;
&lt;br /&gt;
* [http://www.americasarmy.com/ America’s Army]: Uses Ogg Vorbis for main theme.&lt;br /&gt;
&lt;br /&gt;
* [http://www.amnesiagame.com/ Amnesia: The Dark Descent]: Uses Ogg Vorbis for all audio.&lt;br /&gt;
&lt;br /&gt;
* [http://assault.cubers.net/ AssaultCube]: A free fast paced first-person shooter with little hardware requirements for Windows, Linux and OS X. Uses Ogg Vorbis for all game sounds and music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.lionhead.com/bw2/ Black &amp;amp; White 2]: Uses Ogg Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.pyrogon.com/games/candycruncher/ Candy Cruncher]: This cute puzzle game from Brian Hook’s company, Pyrogon, uses Vorbis for the addictive music you hear while you race the clock.&lt;br /&gt;
&lt;br /&gt;
* [http://www.callofcthulhu.com/ Call of Cthulhu] is a first-person horror game that combines intense action and adventure elements. It uses Ogg Vorbis for music and speech.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mobygames.com/game/windows/catechumen Catechumen] is a Christian-themed FPS that uses Ogg Vorbis.&lt;br /&gt;
&lt;br /&gt;
* [http://www.civilization5.com/ Civilization V] is a turn-based strategy game that uses Ogg Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.atari.com/crashday/ Crashday]: Stunt racing game, developed by independent German studio Moon Byte. Uses Ogg Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://buenavistagames.go.com/product/chickenLittlePC.html Chicken Little]: Adventure game for children inspired by the motion picture in PC edition uses Vorbis for dialogs and music. (not sure if sound effects too)&lt;br /&gt;
&lt;br /&gt;
* [http://www.cossacks2.de/ Cossacks 2]: “Cossacks II: Napoleonic Wars” is a sequel of “Cossacks: European Wars”. Ogg Vorbis 1.0 files are in \data\music\&lt;br /&gt;
&lt;br /&gt;
* [http://www.darwinia.co.uk/ Darwinia]: The second title from Indy developer Introversion Software. Darwinia is a stylized retro — Tron meets Cannon Fodder. It uses Vorbis for all in game sound effects and music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.introversion.co.uk/defcon/ DEFCON]: The third title from Introversion Software.  Uses Vorbis for music, effects, everything, like Darwinia.&lt;br /&gt;
&lt;br /&gt;
* [http://devilmaycry.com/ Devil May Cry 4] (for the PC, at least): Uses (occasionally multichannel) Ogg Vorbis for ingame and cutscene music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.eidos.co.uk/gss/dxiw/ Deus Ex: Invisible War] by Ion Storm/Eidos: Uses Ogg Vorbis for music and voice (and possibly for sound fx too).&lt;br /&gt;
&lt;br /&gt;
* [http://diablo3.com Diablo III] uses Vorbis for audio.&lt;br /&gt;
&lt;br /&gt;
* [http://www.idsoftware.com/games/doom/doom3/ DOOM 3]:  The latest version of this famous first person shooter game from id software uses Vorbis for the theme music as well as their ambient and game sounds.&lt;br /&gt;
&lt;br /&gt;
* [http://mobygames.com/game/sheet/p,3/gameId,6505/ Duke Nukem: Manhattan Project]: This game from 3D Realms was released in 2002 and used Vorbis for their music. (Official website is down, using  Mobygames link)&lt;br /&gt;
&lt;br /&gt;
* [http://www.popcap.com/games/free/dynomite Dynomite]: Puzzle Bobble/Bust A Move clone for Windows by PopCap Games, with mouse control. Uses Ogg Vorbis for nearly all sound effects.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Eschalon:_Book_I Eschalon]: A classic-style roleplaying game, for Windows, Mac, and Linux.  Music is in &#039;&#039;Ogg Vorbis&#039;&#039; format.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mobygames.com/game/enclave/ Enclave] by Starbreeze/Black Label Games: Uses Ogg Vorbis for music (and possibly for sound fx and voice too).&lt;br /&gt;
&lt;br /&gt;
* [http://www.eve-online.com EVE Online] by CCP Games, the Icelandic-homed space-based single-shard persistent world game uses Ogg Vorbis for its music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.lionhead.com/fabletlc/ Fable: The Lost Chapters]: Uses Ogg Vorbis for music and cutscenes (Ancient libVorbis version, 1.0 RC2).&lt;br /&gt;
&lt;br /&gt;
* [http://farcry.ubi.com/ FarCry] by Crytek: uses Ogg Vorbis for music and effects.&lt;br /&gt;
&lt;br /&gt;
* [http://www.freedom-fighters.co.uk/ Freedom Fighters] by IO Interactive: String search reveals “libVorbis I 20011217” in freedom.exe.&lt;br /&gt;
&lt;br /&gt;
* [http://www.siriusgames.dk/index.php?pageid=67 Gangland] by MediaMobsters: Uses Ogg Vorbis for music and cutscenes (Data\streams\). Encoded with Xiph.Org libVorbis I 20020717. Decoder library: FMOD 3.71.&lt;br /&gt;
&lt;br /&gt;
* [http://www.rockstargames.com/vicecity/ Grand Theft Auto: Vice City] by Rockstar Games/Rockstar North uses Ogg Vorbis to store music, radio, ambient sounds, police messages and cutscene audio. Players can also store their custom tracks (accessible in-game via the “User Track Player” radio station) in Ogg Vorbis.&lt;br /&gt;
&lt;br /&gt;
* [http://www.rockstargames.com/sanandreas/ Grand Theft Auto: San Andreas] by Rockstar Games/Rockstar North uses Ogg Vorbis to store music, radio, ambient sounds, police messages and cutscene audio. Players can also store their custom tracks (accessible in-game via the “User Track Player” radio station) in Ogg Vorbis.&lt;br /&gt;
&lt;br /&gt;
* [http://www.gothic3.com/ Gothic 3] by Piranha Bytes: Vorbis is used in the Ogg container for everything (music, speech, effects) except of the intro video. For example: Music @ 256 kb/s, Speech @ 86 kb/s. About 18 hours of speech compressed to 700 MB.&lt;br /&gt;
&lt;br /&gt;
* [http://www.guiltygearx2reload.com/ Guilty Gear XX]: The PC version, at least, uses Ogg Vorbis for all the music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.guitarherogame.com/gh2/ Guitar Hero II] by Red Octane (Activision), XBox360 platform only (multichannel Vorbis with 5 or 6 channels per song)&lt;br /&gt;
&lt;br /&gt;
* [http://halo.bungie.org/ Halo]: Mac and PC versions of Halo use Ogg Vorbis for all audio, it seems. The Xiph license and dynamically linked libraries of Ogg and Vorbis are included in the Halo directory. XBox version does not use Ogg Vorbis.&lt;br /&gt;
&lt;br /&gt;
* [http://harrypotter.ea.com/cofs/index.html Harry Potter II (Chamber of Secrets)]: This is unsubstantiated, it was reported on one of the vorbis mailing lists, but there is little evidence either way on this title.  EA has been supportive of Vorbis though, so it’s not entirely impossible.  If anyone can give us a yay or nay on this, please do.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mightandmagicgame.com/HeroesV/ Heroes of Might and Magic V]: Uses Vorbis for audio and Theora for video.&lt;br /&gt;
&lt;br /&gt;
* [http://www.eidosinteractive.com/games/info.html?gmid=118 Hitman 2]: uses Vorbis. (PC only or consoles too?)&lt;br /&gt;
&lt;br /&gt;
* [http://www.codemasters.com/igi2/front.htm IGI2: Covert Strike]: Not a Norwegian first-person shooter.&lt;br /&gt;
&lt;br /&gt;
* [http://www.inthegroove.com In The Groove]: The premier dance game created by [http://www.roxorgames.com Roxor Games, Inc.] Uses Vorbis for all of the in-game music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.agdinteractive.com/games/kq1/ King&#039;s Quest I]: King&#039;s Quest I: Quest for the Crown (Enhanced) is a fan remake of the original Sierra classic.  Uses Ogg Vorbis for sound and Ogg Theora for cutscene movies.&lt;br /&gt;
&lt;br /&gt;
* [http://www.p3int.com/KULT/ KULT Heretic Kingdoms] by 3D People/Project 3 Interactive: Uses Vorbis (1.0) for music, voice and sound effects.&lt;br /&gt;
&lt;br /&gt;
* Recent Legacy of Kain Games: On the PC, both &#039;&#039;&#039;Soul Reaver 2&#039;&#039;&#039; and &#039;&#039;&#039;Blood Omen 2&#039;&#039;&#039; by Crystal Dynamics/Eidos use Ogg Vorbis for music and sound effects. (Source: [http://www.thelostworlds.net/FAQ.HTML#ogg])&lt;br /&gt;
&lt;br /&gt;
* [http://www.ncsoft.net/eng/ncgames/lineage2_intro.asp Lineage II]: NCSoft Corporation’s 3D MMORPG Lineage II uses Ogg Vorbis for its music. They use 1.0beta3, though.&lt;br /&gt;
&lt;br /&gt;
* [http://www.liveforspeed.net/ Live for Speed]: Online racing simulator uses Ogg for all audio and sound effects.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mobygames.com/game/lock-on-modern-air-combat Lock On: Modern Air Combat]: Published by Ubisoft; CD-ROM contains over 1800 Ogg Vorbis files for speech.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mafia-game.com/ Mafia: The City Of Lost Heaven]: Not sure about any console version, but PC version is reported to use Ogg Vorbis.&lt;br /&gt;
&lt;br /&gt;
* [http://www.popcap.com/games/magicmatch Magic Match]: A very elaborate &amp;quot;Match 3&amp;quot; casual game that uses Ogg Vorbis for its audio.&lt;br /&gt;
&lt;br /&gt;
* [http://www.capcom.co.jp/rockmanx8/ Mega Man X8]: The PC version of Mega Man X8 makes use of Vorbis for music and dialogue during cutscenes.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mobygames.com/game/gamecube/metal-gear-solid-the-twin-snakes Metal Gear Solid: The Twin Snakes]: Uses Ogg Vorbis for all speech in the game.&lt;br /&gt;
&lt;br /&gt;
* [http://minecraft.net Minecraft]: Uses Ogg Vorbis for music and sound effects.&lt;br /&gt;
&lt;br /&gt;
* MotoGP: This motorcycle racing sim uses Vorbis for the music and allows players to drop their own .ogg files into the music dir to listen to them in-game.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mystrevelation.com/ Myst IV: Revelation]: Fourth game in the Myst series. Uses Ogg Vorbis for all music, speech and sound effects.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mystvgame.com/ Myst V: End of Ages]: Fifth and final game in the Myst series. Uses Ogg Vorbis for all music, speech and sound effects.&lt;br /&gt;
&lt;br /&gt;
* Nascar Racing Games from Papyrus: They had this to say about their decision and experience:&lt;br /&gt;
&amp;lt;blockquote style=&amp;quot;background-color: #eeeeee&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;We’re using a lot of spoken audio in this title (a first for us) and your codec has allowed us to reduce more than 350MB of audio data to about 40MB, a huge savings of memory and disk space! We are very impressed.&amp;quot; — Tom Faiano, Producer&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;blockquote style=&amp;quot;background-color: #eeeeee&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;Incorporating Ogg Vorbis into our codebase was quite painless, and in the end, even refreshing. No fuss no muss. Thank you for your efforts!&amp;quot; — Bill Farquhar, Soundguy du jour&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://www.nexuiz.com/ Nexuiz], a fast-paced FPS with roots in Quake I, uses Vorbis for background music. The minstagib mod uses Vorbis for all of its sound.&lt;br /&gt;
&lt;br /&gt;
* [http://www.codemasters.com/flashpoint/ Operation Flashpoint]: This highly successful military simulation/action game from Codemasters uses Vorbis for the in-game music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.orunner.com/ Ostrich Runner] by Geleos: This funny Russian cartoon-style game for kids and not only kids uses Ogg Vorbis for sound, speech and music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.ysagoon.com/glob2/ Globulation 2]: State of the art GPL-ed strategy game!&lt;br /&gt;
&lt;br /&gt;
* [http://www.penumbragame.com Penumbra: Black Plague]: Uses Ogg Vorbis for all audio.&lt;br /&gt;
&lt;br /&gt;
* [http://www.psobb.com/index.php Phantasy Star Online: Blue Burst]:  Uses Ogg Vorbis for music, stored in data/ogg.&lt;br /&gt;
&lt;br /&gt;
* [http://www.gopostal.com/ Postal 2]: Probably not the game we want to use to showcase Vorbis, but it’s being used in this Unreal-engine-powered ultra-violent game.&lt;br /&gt;
&lt;br /&gt;
* [http://www.praetoriansgame.com/ Praetorians]: This very successful game from Pyro Studios uses Vorbis for its music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.pressxtonotdie.com/ Press X To Not Die]: This interactive action-comedy film uses Vorbis for its audio and Theora for its video.&lt;br /&gt;
&lt;br /&gt;
* [http://www.psychonauts.com/ Psychonauts]: Has vorbis.dll and vorbisfile.dll.&lt;br /&gt;
&lt;br /&gt;
* [http://www.quake4game.com/ Quake 4]: Quake 4 is the fourth title in the series of Quake FPS computer games. All game music, speech and sound effects make use of Vorbis.&lt;br /&gt;
&lt;br /&gt;
* [http://www.restricted-area.net/ Restricted Area]: by Master Creating uses Ogg Vorbis for music and VP3 for videos.&lt;br /&gt;
&lt;br /&gt;
* Ricochet: An addictive version of Break out.&lt;br /&gt;
&lt;br /&gt;
* [http://www.rockband.com/ Rock Band]: XBox360 version uses the same type of multichannel Vorbis files as Guitar Hero II, but with more channels to handle the drums and vocals separately.&lt;br /&gt;
&lt;br /&gt;
* [http://www.rockmanager.net/ Rock Manager]: Vorbis is used in this “new rock’n roll management sim for PC from Pan Vision and Monsterland”.&lt;br /&gt;
&lt;br /&gt;
* [http://www.sacred2.com/ Sacred 2] by Studio II: uses multichannel(!) Ogg Vorbis for music, speech and sound effects.&lt;br /&gt;
&lt;br /&gt;
* [http://www.s2games.com/savage/ Savage]: This S2 Games “RTSS” hybrid genre game uses Vorbis for all the in-game music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.serioussam.com/se/ Serious Sam: The Second Encounter]: uses Vorbis for the music, although it is slightly obfuscated so as not to be easily playable by standard Ogg Vorbis players.&lt;br /&gt;
&lt;br /&gt;
* [http://www.serioussam2.com/ Serious Sam 2]: not only uses Vorbis for the music but even Theora for the videos&lt;br /&gt;
&lt;br /&gt;
* [http://www.totalwar.com/community/warlord.htm Shogun: Total War]: Shogun uses Vorbis, but only to distribute — everything is decompressed to wav during the install.&lt;br /&gt;
 &lt;br /&gt;
* [http://www.singles2.com/englisch/index.html Singles 2]: Uses Ogg Vorbis for sound&lt;br /&gt;
&lt;br /&gt;
* [http://www.lart.pl/en/portfolioItem.php?id=91 Ski Jumping 2004]: A commerical game that accurately models the activity of ski jumping. The game also contains over 700 Ogg Vorbis files.&lt;br /&gt;
&lt;br /&gt;
* [http://mobygames.com/game/sheet/p,3/gameId,3453/ Star Trek: Away Team]: Vorbis is used for all sound in the game — music, voiceover and SFX. This squad-based strategy game is set in the Star Trek Next Generation universe. (Official website is down, using Mobygames link)&lt;br /&gt;
&lt;br /&gt;
* [http://starcraft2.com/ StarCraft II]: Uses Vorbis for audio&lt;br /&gt;
&lt;br /&gt;
* StoneLoops! Of Jurassica ([http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=315210057&amp;amp;mt=8 Apple iTunes App Store link]): Colorful puzzle game for the iPhone/iPod Touch that uses Ogg Vorbis for audio.&lt;br /&gt;
&lt;br /&gt;
* [http://supertux.lethargik.org/ Super Tux]: Uses Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.splintercell3.com/ Tom Clancy’s Splinter Cell Chaos Theory]: .LS0 files are in fact Ogg Vorbis files.&lt;br /&gt;
&lt;br /&gt;
* [http://www.lucasarts.com/games/swrepubliccommando/ Star Wars Republic Commando]: Vorbis is used in the ambient and game music in this latest action game from LucasArts.&lt;br /&gt;
&lt;br /&gt;
* [http://www.reflexive.net/index.php?PAGE=game_detail&amp;amp;AID=30 Swarm]: A fun little arcade shooter.&lt;br /&gt;
&lt;br /&gt;
* [http://www.swat4.com/ SWAT 4]: SWAT 4 uses Ogg Vorbis for audio files.&lt;br /&gt;
&lt;br /&gt;
* [http://www.croteam.com/talosprinciple/ The Talos Principle] is a first-person puzzle game that uses Ogg Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.there.com/ There]: uses both Ogg Vorbis for the sound effects and Ogg Speex for realtime group voice chat, a first for an immersive consumer-oriented world.&lt;br /&gt;
&amp;lt;blockquote style=&amp;quot;background-color: #eeeeee&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;Voice has become a very popular part of our product!&amp;quot; — David Weekly, a There developer&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://www.wesnoth.org The Battle for Wesnoth]: uses Ogg Vorbis for it&#039;s music and for most of it&#039;s sounds.&lt;br /&gt;
&lt;br /&gt;
* [http://www.riddickgame.com/ The Chronicles of Riddick: Escape From Butcher’s Bay (Director’s Cut)]: Uses Vorbis for all audio and Theora for cutscenes.&lt;br /&gt;
&lt;br /&gt;
* [https://thimbleweedpark.com/ Thimbleweed Park]: Retro-looking point-and-click adventure, [https://blog.thimbleweedpark.com/tracking_talkies using Ogg Vorbis for its music, character voices and sound effects].&lt;br /&gt;
&amp;lt;blockquote style=&amp;quot;background-color: #eeeeee&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;[The characters&#039; dialog is] around 6GB of .wav files and we needed to compress them for inclusion in the game. We used .ogg files due to it being free of the patent and licensing issues that .mp3 has, although either would have worked.&amp;quot; — Ron Gilbert&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://www.thethinggames.com/ The Thing]: Uses Vorbis&lt;br /&gt;
&amp;lt;blockquote style=&amp;quot;background-color: #eeeeee&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;The original multilanguage distro took three CDs, and went down to  only one after I converted all wavs to oggs. Nifty :) Sadly enough,  marketing decided to not have one language per CD anyway (probably to  annoy people who migrate) :/ Thanks for a very cool (and easy to use) lib/format!&amp;quot; — Vincent Penquerc’h&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://www.asahi-net.or.jp/~cs8k-cyu/windows/tt_e.html Torus Trooper]: Frantic 3D shootemup, using Vorbis for the music. (see also the [http://www.emhsoft.net/ttrooper/ Linux port] and [http://www.apple.com/downloads/macosx/games/action_adventure/torustrooper.html MacOS version])&lt;br /&gt;
&lt;br /&gt;
* [http://www.trackmania.com/ TrackMania] uses Vorbis for music in menu and tracks. [music in self-made tracks also need to be in Vorbis]&lt;br /&gt;
&lt;br /&gt;
* [http://www.mikeoldfield.com/ Tr3s Lunas] (aka Music VR episode 1): This game, featuring the music of Mike Oldfield, uses Vorbis for the music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.tribesvengeance.com Tribes: Vengance] by Irration Games/Sierra use Ogg Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mobygames.com/game/gamecube/true-crime-new-york-city True Crime: New York City]: GameCube version contains over 11,500 Ogg Vorbis files. It is likely that other platform ports also use the same files (note that the [http://www.mobygames.com/game/xbox/true-crime-new-york-city Xbox version] uses Windows Media Audio files in place of Ogg Vorbis files)&lt;br /&gt;
&lt;br /&gt;
* [http://tuxtype.sourceforge.net/ Tuxtyping 2]: Educational typing tutor for kids of all ages! &lt;br /&gt;
&lt;br /&gt;
* [http://www.ufo-aftershock.com/ UFO: Aftershock]: Uses Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.ufo-afterlight.com/ UFO: Afterlight]: Uses Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.atari.com/us/games/unreal2/pc Unreal 2]: PC version uses Vorbis, usage on consoles not confirmed.&lt;br /&gt;
&amp;lt;blockquote style=&amp;quot;background-color: #eeeeee&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;We went with Ogg Vorbis due to its excellent playback and compression, and we used it not only for music but also all of the in-game voice. Without it, we never would have been able to fit on two CDs.&amp;quot; — [http://www.4unrealers.com/entrevistas/263/ 4unrealers.com]&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://www.unrealtournament.com/ut2003/ Unreal Tournament 2003]: This overwhelmingly-popular multiplayer first person shooter PC title uses Vorbis for its music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.unrealtournament.com/ut2004/ Unreal Tournament 2004]: Yet another Unreal game which uses Vorbis for the music (What about effects and voice? Does anyone know?). The readme file of the demo even mentions Speex!&lt;br /&gt;
&lt;br /&gt;
* [http://sc2.sourceforge.net/ The Ur-Quan Masters]: Port of Star Control 2 to modern computers. Toys for Bob released the source of this amazing game under the GPL in 2002. Ogg Vorbis is used for the dialogue and the background music.&lt;br /&gt;
&lt;br /&gt;
* [http://uru.ubi.com/ Uru: Ages Beyond Myst]: Spinoff from the Myst series. Uses Ogg Vorbis for all music, speech and sound effects.&lt;br /&gt;
&lt;br /&gt;
* [http://mobygames.com/game/sheet/p,3/gameId,8635/ Lionheart — Legacy of the Crusader]: An 3/4 RPG from Black Isle. Uses Vorbis for all audio. Thanks to all the guys that made Vorbis great.. (I even donated money myself, someday maybe I can convince the company to kick in some bucks as well). Official site is down, using mobygames link.&lt;br /&gt;
&lt;br /&gt;
* [http://www.global-gaming.com/Dominion/ Urban Dominion] (beta): First Person Massively Multiplayer Online Role-Playing Game by Global-Gaming. Uses Ogg Vorbis for the sound system.&lt;br /&gt;
&lt;br /&gt;
* [http://www.vietcong-game.com/ Vietcong]: Vietnam War First Person Shooter by Pterodon. Uses Ogg Vorbis I believe for the background music.&lt;br /&gt;
&lt;br /&gt;
* [http://vegastrike.sourceforge.net/ Vega Strike]: It is a free spacesim. Ogg Vorbis files are stored in \music\ .&lt;br /&gt;
&lt;br /&gt;
* [http://www.gathering.com/wingsofwar/ Wings Of War]: It is an arcade shooter in times of WWI. Game has ogg.dll, vorbis.dll and vorbisfile.dll — but *.ogg files are not accessible.&lt;br /&gt;
&lt;br /&gt;
* [http://jonof.edgenetwork.org/winbuild/ WinBuild]: Winbuild is a port of Ken Silverman’s [http://www.advsys.net/ken/buildsrc/default.htm original Build engine demo] (for DOS) to Windows. It uses Vorbis compression for the music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.worldofwarcraft.com/ World of Warcraft]: popular massively multiplayer online role-playing game from Blizzard Entertainment use Vorbis for speech and sound effects.&lt;br /&gt;
&lt;br /&gt;
* [http://www.zax-game.com/ Zax — The Alien Hunter]: A large 3/4 view action adventure game.&lt;br /&gt;
&lt;br /&gt;
[[Category:Vorbis]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GranulePosAndSeeking&amp;diff=16665</id>
		<title>GranulePosAndSeeking</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GranulePosAndSeeking&amp;diff=16665"/>
		<updated>2018-03-02T12:04:15Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* References */ fix formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Granulepos encoding and How seeking really works ==&lt;br /&gt;
&lt;br /&gt;
This describes how to seek on a multiplexed Ogg stream containing logical bitstreams with granuleshift, such as [[Theora]], [[Kate]], [[CMML]] or [[OggText]].&lt;br /&gt;
The purpose is to locate the earliest page that is required for rendering a given time offset.&lt;br /&gt;
Due to the fact that two time-seeking operations are required, this procedure is commonly referred to as a &amp;quot;&#039;&#039;&#039;double seek&#039;&#039;&#039;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Definitions ===&lt;br /&gt;
Let&#039;s define &#039;&#039;&#039;time&#039;&#039;&#039; to mean &#039;&#039;&#039;the time represented by a GranulePos value&#039;&#039;&#039;. Hence the &amp;quot;time&amp;quot; of a page is the &amp;quot;time represented by the page GranulePos&amp;quot; header field.&lt;br /&gt;
&lt;br /&gt;
Define &#039;&#039;&#039;seek&#039;&#039;&#039; to mean: for each &#039;&#039;&#039;logical&#039;&#039;&#039; bitstream, locate the &#039;&#039;&#039;bytewise-latest page&#039;&#039;&#039; in the bitstream with a &#039;&#039;&#039;time before the target time&#039;&#039;&#039;, then choose the &#039;&#039;&#039;bytewise-earliest&#039;&#039;&#039; among these pages. If two or more pages have the same time (aka. GranulePos value), seeking must locate the bytewise-earlier page.&lt;br /&gt;
&lt;br /&gt;
==== Granules and Granuleshift ====&lt;br /&gt;
&lt;br /&gt;
We use the term &#039;&#039;&#039;granule&#039;&#039;&#039; to refer to time measured in the units of the codec. For audio codecs this is &#039;&#039;usually&#039;&#039; samples, and for video codecs it is &#039;&#039;usually&#039;&#039; frames or fields.&lt;br /&gt;
&lt;br /&gt;
In some formats, pages have a dependency on the data of an earlier page; for example in [[Theora]], interframes have a dependency on an earlier keyframe -- the keyframe data is required to decode the interframe. We encode both the time of the page and the time of the page it depends on into the granulepos. In order to do this we treat the granulepos as a bitfield as follows: &lt;br /&gt;
&lt;br /&gt;
 +---------------------+-------------+&lt;br /&gt;
 | prev_granule        | offset      |&lt;br /&gt;
 +---------------------+-------------+&lt;br /&gt;
&lt;br /&gt;
Then if a page has time in units of codec granules &amp;lt;tt&amp;gt;curr_granule&amp;lt;/tt&amp;gt;, and the page it depends on has time&lt;br /&gt;
&amp;lt;tt&amp;gt;prev_granule&amp;lt;/tt&amp;gt;, we define &amp;lt;tt&amp;gt;offset&amp;lt;/tt&amp;gt; as the difference between these:&lt;br /&gt;
&lt;br /&gt;
 offset = curr_granule - prev_granule&lt;br /&gt;
&lt;br /&gt;
We refer to the number of bits used to encode the offset as the &amp;quot;granuleshift&amp;quot;. This is fixed for all pages in&lt;br /&gt;
that track (logical bitstream). So we encode the later page&#039;s granulepos as: &lt;br /&gt;
&lt;br /&gt;
 granulepos = (prev_granule &amp;lt;&amp;lt; granuleshift) | offset&lt;br /&gt;
&lt;br /&gt;
When decoding, we can extract the current_granule from a granulepos by simply adding these fields:&lt;br /&gt;
&lt;br /&gt;
 curr_granule = prev_granule + offset&lt;br /&gt;
&lt;br /&gt;
Which expands to this expression of the page granulepos:&lt;br /&gt;
&lt;br /&gt;
 curr_granule = (granulepos &amp;gt;&amp;gt; granuleshift) + (granulepos &amp;amp; ((1 &amp;lt;&amp;lt; granuleshift) - 1)))&lt;br /&gt;
&lt;br /&gt;
Keyframes, and other data with no dependency on earlier packets, are encoded with:&lt;br /&gt;
&lt;br /&gt;
 prev_granule = curr_granule, offset = 0&lt;br /&gt;
&lt;br /&gt;
=== Seeking within Single-Track files ===&lt;br /&gt;
&lt;br /&gt;
To locate the earliest page in a track (a logical bitstream) required for rendering a given time offset:&lt;br /&gt;
&lt;br /&gt;
# seek to the desired time&lt;br /&gt;
# read the prev_granule out of the granulepos&lt;br /&gt;
# seek to the time represented by the prev_granule&lt;br /&gt;
&lt;br /&gt;
=== Seeking within Multitrack files ===&lt;br /&gt;
&lt;br /&gt;
To locate the earliest page in a multitrack file (a physical bitstream) required for rendering &#039;&#039;&#039;all&#039;&#039;&#039; tracks from a given time offset:&lt;br /&gt;
&lt;br /&gt;
# seek to the desired time&lt;br /&gt;
# scan forward until a page has been seen from all of the tracks that use granuleshift; while doing so, record the prev_granule of the bytewise-earliest page encountered from each track&lt;br /&gt;
# seek to the minimum of the prev_granules of those pages&lt;br /&gt;
&lt;br /&gt;
It is useful to put a bound on the forward scan; the distance scanned&lt;br /&gt;
only depends on the way the stream is constructed, so it can be large&lt;br /&gt;
if pages in a particular logical bistream is sparse.&lt;br /&gt;
&lt;br /&gt;
=== But how do I &amp;quot;seek to the desired time&amp;quot;?===&lt;br /&gt;
The above assumes that you already know how to seek to a particular GranulePos within the stream efficiently. &lt;br /&gt;
&lt;br /&gt;
This isn&#039;t as simple as it sounds, because the Ogg format does not include an index. The lack of an index is a &#039;&#039;&#039;feature&#039;&#039;&#039; rather than a deficiency and it is one of the primary reasons to use Ogg over some other formats.&lt;br /&gt;
&lt;br /&gt;
Because Ogg doesn&#039;t have in index:&lt;br /&gt;
* infinite streams and partial streams are automatically supported by correctly written applications&lt;br /&gt;
* there is no risk of truncation or minor corruption making a stream unseekable&lt;br /&gt;
* no memory is required to store an index&lt;br /&gt;
* no bandwidth is wasted to transmit it&lt;br /&gt;
* seeking granularity is not limited to the precision of the index&lt;br /&gt;
&lt;br /&gt;
On the other hand, non-indexed formats require a bit more intelligence from the application using them, so many applications have gotten it wrong (although some intelligence is also needed in a well written application for indexed formats, so that it can seek with a corrupted index or below the index granularity).&lt;br /&gt;
&lt;br /&gt;
====Do NOT build your own index====&lt;br /&gt;
If you are thinking about seeking within an Ogg file by building your own complete index: &#039;&#039;&#039;STOP! This is not a good procedure.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Building an index may seem simple, but it requires a costly read of the &#039;&#039;&#039;entire&#039;&#039;&#039; stream (which may be gigabytes in size, or even infinite).&lt;br /&gt;
&lt;br /&gt;
There is a better way.&lt;br /&gt;
&lt;br /&gt;
====Bisection Search====&lt;br /&gt;
The correct way to seek to a particular granule value in Ogg is by using a [http://en.wikipedia.org/wiki/Bisection_method bisection search]:&lt;br /&gt;
&lt;br /&gt;
# Seek to the middle of the stream&lt;br /&gt;
# obtain sync&lt;br /&gt;
# compare your target granule position with the current position.&lt;br /&gt;
# If the target is less than the current position, repeat these steps on the left side.&lt;br /&gt;
# If it&#039;s greater, repeat it on the right side.&lt;br /&gt;
&lt;br /&gt;
By applying this recursive algorithm, you are guaranteed to find your target location much faster than building an index for the whole stream.&lt;br /&gt;
&lt;br /&gt;
To correctly support chaining, you should first use this kind of search to locate the stream endpoints. Then, the above approach can be applied within the streams, to seek to any location within a chained file.&lt;br /&gt;
&lt;br /&gt;
Doing this correctly is somewhat more complicated than it seems, due to the existence of &#039;&#039;&#039;continued pages&#039;&#039;&#039; and the risk of a small valid page being contained within a packet. Both of these challenges can be addressed, but the solution is left as an exercise for the reader. (Hint: The maximum Ogg page size is always &#039;&#039;&#039;smaller than 64 KBytes&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
This Bisection Search is very good compared to the alternatives (a linear scan of the whole file), often taking just a couple of reads to locate the correct location in a file gigabytes in size, but the truly obsessive can out-perform the bisection on average, by using the local bitrate to pick a better target than the half way point used in a bisection search ([http://en.wikipedia.org/wiki/Secant_method Secant method]).&lt;br /&gt;
&lt;br /&gt;
Be careful about the worst case becoming linear (see [http://en.wikipedia.org/wiki/Brent%27s_method Brent&#039;s method]). The improvement possible from better-than-bisection approaches is probably only relevant for seeking across a high latency network. In typical low-latency applications, the added complexity may not be worth the cost.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
From an Email by Monty, [http://web.archive.org/web/20031201054855/http://www.xiph.org/archives/theora-dev/200209/0040.html 13th Sept 2002]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note that this document is obsolete, and incorrect with respect to seeking in multiplexed streams.&#039;&#039;&#039; It does accurately describe the rationale behind the two-part granulepos scheme (option 3 below) now use in Theora, Dirac, CMML and other codecs in Ogg.&lt;br /&gt;
&lt;br /&gt;
===Monty&#039;s email===&lt;br /&gt;
Folks have noticed that the documentation is semi-silent about how to properly encode the granule position and interleave synchronization of keyframe-based video. The primary reasons for this:&lt;br /&gt;
&lt;br /&gt;
* we at Xiph hadn&#039;t had to do it yet&lt;br /&gt;
* there are several easy possibilities, and the longer we had to think about it before mandating One True Spec, the better that spec would likely be.&lt;br /&gt;
&lt;br /&gt;
The lack of a painfully explicit spec has led to the theory that it&#039;s not possible; that&#039;s not true, there are a few ways to do it. Several require no extension to Ogg stream v 0. A last way requires an extra field (a point against it), but does not actually break any stream that currently exists.&lt;br /&gt;
&lt;br /&gt;
The time has come to lay down the spec as we&#039;re currently building the real abstraction layers in a concrete Ogg framework now where the Ogg engine, the codecs, and the overarching Ogg control layers are neatly put into boxes connected in formalized ways.&lt;br /&gt;
&lt;br /&gt;
Below I go into detail about each scheme in a &#039;thinking aloud&#039; sort of way. This is not because I haven&#039;t already given the matter sufficient thought, it is because I wish to give the reader sufficient background information to understand why one way is better than the others.&lt;br /&gt;
&lt;br /&gt;
This is not a call for input so much as an educational effort (and a public sanity check of my thinking; please do pipe up if it appears I missed a salient point).&lt;br /&gt;
&lt;br /&gt;
==== Starting Assumptions ====&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Ogg is not a non-linear format.&#039;&#039;&#039; It is not a replacement for the scripting system of a DVD player. It is a media transport format designed to do nothing more than deliver content, in a stream, and have all the pieces arrive on time and in sync. It is not designed to *prevent* more complex use of content, it merely does not implement anything beyond a linear representation of the data contained within. If you want to build a real non-linear format, build it *from* Ogg, not *into* Ogg. This has been the intent from day 1.&lt;br /&gt;
# &#039;&#039;&#039;The Ogg layer does not know specifics of the codec data it&#039;s multiplexing into a stream.&#039;&#039;&#039; It knows nothing beyond &#039;Oooo, packets!&#039;, that the packets belong to different buckets, that the packets go in order, and that packets have position markers. Ogg does not even have a concept of &#039;time&#039;; it only knows about the sequentially increasing, unitless position markers. It is up to higher layers which have access to the codec APIs to assign and convert units of framing or time.&lt;br /&gt;
# &#039;&#039;&#039;Given pre-cached decode headers, a player may seek into a stream at any point and begin decode.&#039;&#039;&#039; It may be the case that audio may start after video by a fraction of a second, or video might be blank until the stream hits the next keyframe, but this simplest case must just work, and there will be sufficient information to maintain perfect cross-media sync.&lt;br /&gt;
# (This departs from current reality, but it will be the reality very soon; vorbisfile currently blurs the careful abstraction I&#039;m about to describe) &#039;&#039;&#039;Seeking at an arbitrary level of precision is a distributed abstraction in the larger Ogg picture.&#039;&#039;&#039; At the lowest-level Ogg stream abstraction, seeking is one operation: &amp;quot;find me the page from logical stream &#039;n&#039; with granule position &#039;x&#039;&amp;quot;. All more complex seeking operations are a function of a higher-level layer (with knowledge of the media types and codec in use) making intelligent use of this lowest Ogg abstraction. The Ogg stream abstraction need deal with nothing more complex than &#039;find this page&#039;.&lt;br /&gt;
&lt;br /&gt;
The various granulepos strategies for keyframes concern this last point.&lt;br /&gt;
&lt;br /&gt;
The complication with video is that frames often depend on previous and possibly future frames. This happens in a larger, general category of codecs whose streams may not begin decode from just any packet as well as packets that may not represent an entire frame, or even a fixed-time sampling algorithm.&lt;br /&gt;
&lt;br /&gt;
It is a mistake to design a seeking system tied to an exact set of very specific cases. While one could implement an explicit keyframe mechanism at the Ogg level, this mechanism would not cover any of the other interesting seeking cases while, as I&#039;ll show below, the mechanism would not actually be necessary.&lt;br /&gt;
&lt;br /&gt;
There will be a few complaints that Ogg is being unnecessarily subtle and shifts a great deal of complexity into software which a few extra page header fields could eliminate.&lt;br /&gt;
&lt;br /&gt;
Consider the following:&lt;br /&gt;
&lt;br /&gt;
# Ogg was designed to impose a roughly .5-1% over the raw packet data over a wide range of packet usage patterns. &#039;A few extra fields&#039; begins inflating that figure for specific special cases that only apply to a few stream types. Right now there is no header field that is not general to every stream. There is no fat in the page headers.&lt;br /&gt;
# The Ogg-level seeking algorithm is exceptionally simple and can be described in a single sentence: &amp;quot;Find the earliest page with a granulepos less than but closest to &#039;x&#039;&amp;quot;. This shifts the onus of assembling more complex seeking operation requiring knowledge of a specific media type into a higher layer that has knowledge of that media type. The higher layer becomes responsible for determining for what &#039;x&#039; Ogg should search. The division of labor is clear and sensible.&lt;br /&gt;
# Complex, precise seeking operations are still contained entirely within the framework, just at a higher layer than Ogg-stream. At no time is an application developer required to deal with seeking mechanisms within an Ogg stream or to manually maintain stream&lt;br /&gt;
synchronization.&lt;br /&gt;
&lt;br /&gt;
==== High level handwaving: How seeking really works ====&lt;br /&gt;
&lt;br /&gt;
The granulepos is intended to mean, roughly, &#039;If I stop decode at the end of this page, I will get data from my decoder up to position &#039;granulepos&#039;. The granulepos simultaneously provides seeking information and a &#039;length-of-stream&#039; indicator. Depending on the codec, it can also usually be used to indicate a timebase, but that isn&#039;t our problem right now.&lt;br /&gt;
&lt;br /&gt;
By inference, the granulepos is also used to construct a value &#039;y&#039; such that &#039;if I begin decode *from* point &#039;y&#039;, I will get data&lt;br /&gt;
beginning at position &#039;granulepos&#039;. Although in some codecs, y == granulepos, that is not necessarily the case when decode can&#039;t begin at any arbitrary packet. The granulepos encoding method candidates I will now describe affect exactly the &#039;granulepos&#039; to &#039;y&#039; conversion process. Note also that none of these affect Ogg, only the higher decision-making layers... Different circumstanced necessitated by different codecs can lead to different valid choices, all of which work as far as Ogg is concerned. However, for our I-/P-/B-frame video case, there is a pretty clear winner.&lt;br /&gt;
&lt;br /&gt;
===== Strategy 1: Straight Granulepos, Keyframes Are Not Our Problem. =====&lt;br /&gt;
  &lt;br /&gt;
In this scheme, the granulepos is a simple frame counter. The seeking decision-maker in the codec&#039;s framework plugin is responsible for determining if a frame is a keyframe or not, and if it can&#039;t begin decode from a given frame, it must request another earlier frame until it finds a keyframe. If the codec so desires, it can store &#039;what is my keyframe?&#039; information in the stream packets.&lt;br /&gt;
&lt;br /&gt;
This case means that each seek to a *specific* frame in a video stream will generally result in two Ogg seeks; a first seek to the the requested frame, then a second seek backwards to find that frame&#039;s keyframe.&lt;br /&gt;
&lt;br /&gt;
A larger concern is the semantic accuracy of the granulepos; it&#039;s intended to reflect position accurately when decoding forward. In this scheme, it&#039;s fine for a P-frame to update the counter (as it can be decoded going strictly forward), but B frames will also advance the counter; they can&#039;t be decoded without subsequent P or I frames. Thus, the semantic value of granulepos no longer strictly represents &#039;we can decode up to &#039;granulepos&#039; at the end of this frame&#039;.&lt;br /&gt;
&lt;br /&gt;
===== Strategy 2: Granulepos Represents Keyframes Only =====&lt;br /&gt;
&lt;br /&gt;
In this scheme, only keyframes update the granulepos (monotonically or non-monotonically). It simplifies the seeking process to a keyframe as an Ogg-level seek to page &#039;x&#039; will always yield a page with a keyframe. In addition, granulepos will also always mean &#039;we can decode up to *at least* this point in the stream. If the stream is truncated at P or B frames past granulepos, the extra frames can be discarded. (A special case would need to be defined to terminate a stream that doesn&#039;t end on an I frame).&lt;br /&gt;
&lt;br /&gt;
The difficulty with this scheme is that it presents slightly more for the software level decoder to track; a proper frame number could not be determined internally without tracking from an I frame. Also, the granulepos an Ogg page would not necessarily map to the last packet on the page, or even any packet on that page; multiple sequential pages could have the same granulepos. It is conceptually slightly messy, although the &#039;messiness&#039; does not make it at all impractical.&lt;br /&gt;
&lt;br /&gt;
===== Strategy 3: Granulepos Encodes Some State =====&lt;br /&gt;
&lt;br /&gt;
In some ways, this strategy is the most semantically &#039;over clever&#039;, but also the easiest to implement and the one that gives the most correct, up to date sync information. Pending comments, it is the I/P/B video strategy I currently favor.&lt;br /&gt;
&lt;br /&gt;
The granulepos is 64 bits, a size that is absolutely necessary if, for example, it represents the PCM sample count in an audio codec. When being used to encode video frame number, however, it is comparatively absurdly large*.&lt;br /&gt;
&lt;br /&gt;
* note that although granulepos is not permitted to wrap around, we can simply begin a new logical stream segment with a new serial number should a 30fps video stream ever hit the ten-billion year mark.&lt;br /&gt;
&lt;br /&gt;
Thus we clearly have room to skim a few bits off the bottom of granulepos to represent I, P or B frame. These bits are not used as flags, but rather, frame representation becomes a counting problem; We do this such that the count is still always strictly increasing.&lt;br /&gt;
&lt;br /&gt;
For example, we know that I frames will never be more than 256 frames apart and P frames no more than 31 B frames apart, the granulepos of an I frame can be defined to always be granulepos | 0xff == 0. If we can have up to seven intervening P frames, they could be numbered in granulepos-of-iframe + 0x20, 0x40, 0x60... 0xe0. B frames between the I and P frames would use the remaining five bits and be numbers as sub-I and sub-P frames 1 through 31. Thus, starting from zero, the frames/packets in the pattern IPBBPBBI would be numbered 0x000, 0x020, 0x021, 0x022, 0x040, 0x041, 0x042, 0x100.&lt;br /&gt;
&lt;br /&gt;
If we wish to preserve the ability to represent a timebase, the granulepos number for I frames need not be increased monotonically and shifted; it can be used to represent the frame number. The above example becomes 0x000, 0x020, 0x021, 0x022, 0x040, 0x041, 0x042, 0x700. To get real frame number (from an I frame), we just shift granulepos &amp;gt;&amp;gt; 8. This scheme can be taken further or modified to get frame number from any video frame.&lt;br /&gt;
&lt;br /&gt;
In this way, we can always seek, first time, to a desired key frame page (by seeking to Ogg page &#039;x&#039; where x | 0xff == 0). In addition, each frame still has a unique frame number and also a clear &#039;group&#039; number, potentially useful information to the decoder. Lastly, granulepos is still semantically correct, although it is now, in a sense, representing a whole.fractional frame number for buffering purposes.&lt;br /&gt;
&lt;br /&gt;
===== Strategy 4: Extra &#039;Seekpos&#039; Field / Straw Man =====&lt;br /&gt;
&lt;br /&gt;
Another possibility requires extension of the current Ogg page format. Although older players would reject any such extended pages as invalid, we do have versioning and typing fields, so there&#039;s not actually any compatibility problems with current Ogg pages... in the future.&lt;br /&gt;
&lt;br /&gt;
The idea in this scheme is to keep the current granulepos as a frame number field (ala scheme 1), but also add a new field &#039;seekpos&#039; that is used, rather than granulepos, in seeking. The seekpos would represent the number of the last keyframe that passed by.&lt;br /&gt;
&lt;br /&gt;
Advantages:&lt;br /&gt;
&lt;br /&gt;
# The net effect of this strategy is to modify scheme 1 to only require one bisection seek rather than two.&lt;br /&gt;
# Some amount of code simplification (over scheme 1) at the decision-making level.&lt;br /&gt;
&lt;br /&gt;
Disadvantages:&lt;br /&gt;
&lt;br /&gt;
# The Ogg format will need to be revved. No current (ala 1.0) Ogg code will understand the new pages.&lt;br /&gt;
# The header becomes larger, from a minimum size of 27 bytes to a minimum size of 35.&lt;br /&gt;
# This strategy only enhances keyframes; it is of no use in other odd seeking cases.&lt;br /&gt;
# Gives no more information than scheme 3, but is still more complicated, both in code and API (Ogg would have to understand keyframes).&lt;br /&gt;
&lt;br /&gt;
Thus, there&#039;s no substantial reason to prefer extending the format over a scheme that&#039;s possible within the existing framework. Note that schemes 1-3 can all be implemented within the Ogg stream today.&lt;br /&gt;
&lt;br /&gt;
Monty&lt;br /&gt;
&lt;br /&gt;
[[Category:Ogg]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GranulePosAndSeeking&amp;diff=16664</id>
		<title>GranulePosAndSeeking</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GranulePosAndSeeking&amp;diff=16664"/>
		<updated>2018-03-01T22:24:15Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* But how do I &amp;quot;seek to the desired time&amp;quot;? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Granulepos encoding and How seeking really works ==&lt;br /&gt;
&lt;br /&gt;
This describes how to seek on a multiplexed Ogg stream containing logical bitstreams with granuleshift, such as [[Theora]], [[Kate]], [[CMML]] or [[OggText]].&lt;br /&gt;
The purpose is to locate the earliest page that is required for rendering a given time offset.&lt;br /&gt;
Due to the fact that two time-seeking operations are required, this procedure is commonly referred to as a &amp;quot;&#039;&#039;&#039;double seek&#039;&#039;&#039;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Definitions ===&lt;br /&gt;
Let&#039;s define &#039;&#039;&#039;time&#039;&#039;&#039; to mean &#039;&#039;&#039;the time represented by a GranulePos value&#039;&#039;&#039;. Hence the &amp;quot;time&amp;quot; of a page is the &amp;quot;time represented by the page GranulePos&amp;quot; header field.&lt;br /&gt;
&lt;br /&gt;
Define &#039;&#039;&#039;seek&#039;&#039;&#039; to mean: for each &#039;&#039;&#039;logical&#039;&#039;&#039; bitstream, locate the &#039;&#039;&#039;bytewise-latest page&#039;&#039;&#039; in the bitstream with a &#039;&#039;&#039;time before the target time&#039;&#039;&#039;, then choose the &#039;&#039;&#039;bytewise-earliest&#039;&#039;&#039; among these pages. If two or more pages have the same time (aka. GranulePos value), seeking must locate the bytewise-earlier page.&lt;br /&gt;
&lt;br /&gt;
==== Granules and Granuleshift ====&lt;br /&gt;
&lt;br /&gt;
We use the term &#039;&#039;&#039;granule&#039;&#039;&#039; to refer to time measured in the units of the codec. For audio codecs this is &#039;&#039;usually&#039;&#039; samples, and for video codecs it is &#039;&#039;usually&#039;&#039; frames or fields.&lt;br /&gt;
&lt;br /&gt;
In some formats, pages have a dependency on the data of an earlier page; for example in [[Theora]], interframes have a dependency on an earlier keyframe -- the keyframe data is required to decode the interframe. We encode both the time of the page and the time of the page it depends on into the granulepos. In order to do this we treat the granulepos as a bitfield as follows: &lt;br /&gt;
&lt;br /&gt;
 +---------------------+-------------+&lt;br /&gt;
 | prev_granule        | offset      |&lt;br /&gt;
 +---------------------+-------------+&lt;br /&gt;
&lt;br /&gt;
Then if a page has time in units of codec granules &amp;lt;tt&amp;gt;curr_granule&amp;lt;/tt&amp;gt;, and the page it depends on has time&lt;br /&gt;
&amp;lt;tt&amp;gt;prev_granule&amp;lt;/tt&amp;gt;, we define &amp;lt;tt&amp;gt;offset&amp;lt;/tt&amp;gt; as the difference between these:&lt;br /&gt;
&lt;br /&gt;
 offset = curr_granule - prev_granule&lt;br /&gt;
&lt;br /&gt;
We refer to the number of bits used to encode the offset as the &amp;quot;granuleshift&amp;quot;. This is fixed for all pages in&lt;br /&gt;
that track (logical bitstream). So we encode the later page&#039;s granulepos as: &lt;br /&gt;
&lt;br /&gt;
 granulepos = (prev_granule &amp;lt;&amp;lt; granuleshift) | offset&lt;br /&gt;
&lt;br /&gt;
When decoding, we can extract the current_granule from a granulepos by simply adding these fields:&lt;br /&gt;
&lt;br /&gt;
 curr_granule = prev_granule + offset&lt;br /&gt;
&lt;br /&gt;
Which expands to this expression of the page granulepos:&lt;br /&gt;
&lt;br /&gt;
 curr_granule = (granulepos &amp;gt;&amp;gt; granuleshift) + (granulepos &amp;amp; ((1 &amp;lt;&amp;lt; granuleshift) - 1)))&lt;br /&gt;
&lt;br /&gt;
Keyframes, and other data with no dependency on earlier packets, are encoded with:&lt;br /&gt;
&lt;br /&gt;
 prev_granule = curr_granule, offset = 0&lt;br /&gt;
&lt;br /&gt;
=== Seeking within Single-Track files ===&lt;br /&gt;
&lt;br /&gt;
To locate the earliest page in a track (a logical bitstream) required for rendering a given time offset:&lt;br /&gt;
&lt;br /&gt;
# seek to the desired time&lt;br /&gt;
# read the prev_granule out of the granulepos&lt;br /&gt;
# seek to the time represented by the prev_granule&lt;br /&gt;
&lt;br /&gt;
=== Seeking within Multitrack files ===&lt;br /&gt;
&lt;br /&gt;
To locate the earliest page in a multitrack file (a physical bitstream) required for rendering &#039;&#039;&#039;all&#039;&#039;&#039; tracks from a given time offset:&lt;br /&gt;
&lt;br /&gt;
# seek to the desired time&lt;br /&gt;
# scan forward until a page has been seen from all of the tracks that use granuleshift; while doing so, record the prev_granule of the bytewise-earliest page encountered from each track&lt;br /&gt;
# seek to the minimum of the prev_granules of those pages&lt;br /&gt;
&lt;br /&gt;
It is useful to put a bound on the forward scan; the distance scanned&lt;br /&gt;
only depends on the way the stream is constructed, so it can be large&lt;br /&gt;
if pages in a particular logical bistream is sparse.&lt;br /&gt;
&lt;br /&gt;
=== But how do I &amp;quot;seek to the desired time&amp;quot;?===&lt;br /&gt;
The above assumes that you already know how to seek to a particular GranulePos within the stream efficiently. &lt;br /&gt;
&lt;br /&gt;
This isn&#039;t as simple as it sounds, because the Ogg format does not include an index. The lack of an index is a &#039;&#039;&#039;feature&#039;&#039;&#039; rather than a deficiency and it is one of the primary reasons to use Ogg over some other formats.&lt;br /&gt;
&lt;br /&gt;
Because Ogg doesn&#039;t have in index:&lt;br /&gt;
* infinite streams and partial streams are automatically supported by correctly written applications&lt;br /&gt;
* there is no risk of truncation or minor corruption making a stream unseekable&lt;br /&gt;
* no memory is required to store an index&lt;br /&gt;
* no bandwidth is wasted to transmit it&lt;br /&gt;
* seeking granularity is not limited to the precision of the index&lt;br /&gt;
&lt;br /&gt;
On the other hand, non-indexed formats require a bit more intelligence from the application using them, so many applications have gotten it wrong (although some intelligence is also needed in a well written application for indexed formats, so that it can seek with a corrupted index or below the index granularity).&lt;br /&gt;
&lt;br /&gt;
====Do NOT build your own index====&lt;br /&gt;
If you are thinking about seeking within an Ogg file by building your own complete index: &#039;&#039;&#039;STOP! This is not a good procedure.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Building an index may seem simple, but it requires a costly read of the &#039;&#039;&#039;entire&#039;&#039;&#039; stream (which may be gigabytes in size, or even infinite).&lt;br /&gt;
&lt;br /&gt;
There is a better way.&lt;br /&gt;
&lt;br /&gt;
====Bisection Search====&lt;br /&gt;
The correct way to seek to a particular granule value in Ogg is by using a [http://en.wikipedia.org/wiki/Bisection_method bisection search]:&lt;br /&gt;
&lt;br /&gt;
# Seek to the middle of the stream&lt;br /&gt;
# obtain sync&lt;br /&gt;
# compare your target granule position with the current position.&lt;br /&gt;
# If the target is less than the current position, repeat these steps on the left side.&lt;br /&gt;
# If it&#039;s greater, repeat it on the right side.&lt;br /&gt;
&lt;br /&gt;
By applying this recursive algorithm, you are guaranteed to find your target location much faster than building an index for the whole stream.&lt;br /&gt;
&lt;br /&gt;
To correctly support chaining, you should first use this kind of search to locate the stream endpoints. Then, the above approach can be applied within the streams, to seek to any location within a chained file.&lt;br /&gt;
&lt;br /&gt;
Doing this correctly is somewhat more complicated than it seems, due to the existence of &#039;&#039;&#039;continued pages&#039;&#039;&#039; and the risk of a small valid page being contained within a packet. Both of these challenges can be addressed, but the solution is left as an exercise for the reader. (Hint: The maximum Ogg page size is always &#039;&#039;&#039;smaller than 64 KBytes&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
This Bisection Search is very good compared to the alternatives (a linear scan of the whole file), often taking just a couple of reads to locate the correct location in a file gigabytes in size, but the truly obsessive can out-perform the bisection on average, by using the local bitrate to pick a better target than the half way point used in a bisection search ([http://en.wikipedia.org/wiki/Secant_method Secant method]).&lt;br /&gt;
&lt;br /&gt;
Be careful about the worst case becoming linear (see [http://en.wikipedia.org/wiki/Brent%27s_method Brent&#039;s method]). The improvement possible from better-than-bisection approaches is probably only relevant for seeking across a high latency network. In typical low-latency applications, the added complexity may not be worth the cost.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
From an Email by Monty, [http://web.archive.org/web/20031201054855/http://www.xiph.org/archives/theora-dev/200209/0040.html 13th Sept 2002]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note that this document is obsolete, and incorrect with respect to seeking in multiplexed streams.&#039;&#039;&#039; It does accurately describe the rationale behind the two-part granulepos scheme (option 3 below) now use in Theora, Dirac, CMML and other codecs in Ogg.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Folks have noticed that the documentation is semi-silent about how to properly encode the granule position and interleave synchronization of keyframe-based video. The primary reasons for this:&lt;br /&gt;
&lt;br /&gt;
* we at Xiph hadn&#039;t had to do it yet&lt;br /&gt;
&lt;br /&gt;
* there are several easy possibilities, and the longer we had to think about it before mandating One True Spec, the better that spec would likely be.&lt;br /&gt;
&lt;br /&gt;
The lack of a painfully explicit spec has led to the theory that it&#039;s not possible; that&#039;s not true, there are a few ways to do it. Several require no extension to Ogg stream v 0. A last way requires an extra field (a point against it), but does not actually break any stream that currently exists.&lt;br /&gt;
&lt;br /&gt;
The time has come to lay down the spec as we&#039;re currently building the real abstraction layers in a concrete Ogg framework now where the Ogg engine, the codecs, and the overarching Ogg control layers are neatly put into boxes connected in formalized ways. Below I go into detail about each scheme in a &#039;thinking aloud&#039; sort of way. This is not because I haven&#039;t already given the matter sufficient thought, it is because I wish to give the reader sufficient background information to understand why one way is better than the others. This is not a call for input so much as an educational effort (and a public sanity check of my thinking; please do pipe up if it appears I missed a salient point).&lt;br /&gt;
&lt;br /&gt;
==== Starting Assumptions: ====&lt;br /&gt;
&lt;br /&gt;
1) Ogg is not a non-linear format. It is not a replacement for the scripting system of a DVD player. It is a media transport format&lt;br /&gt;
designed to do nothing more than deliver content, in a stream, and have all the pieces arrive on time and in sync. It is not designed to *prevent* more complex use of content, it merely does not implement anything beyond a linear representation of the data contained within. If you want to build a real non-linear format, build it *from* Ogg, not *into* Ogg. This has been the intent from day 1.&lt;br /&gt;
&lt;br /&gt;
2) The Ogg layer does not know specifics of the codec data it&#039;s multiplexing into a stream. It knows nothing beyond &#039;Oooo, packets!&#039;, that the packets belong to different buckets, that the packets go in order, and that packets have position markers. Ogg does not even have a concept of &#039;time&#039;; it only knows about the sequentially increasing, unitless position markers. It is up to higher layers which have access to the codec APIs to assign and convert units of framing or time.&lt;br /&gt;
&lt;br /&gt;
3) Given pre-cached decode headers, a player may seek into a stream at any point and begin decode. It may be the case that audio may start after video by a fraction of a second, or video might be blank until the stream hits the next keyframe, but this simplest case must just work, and there will be sufficient information to maintain perfect cross-media sync.&lt;br /&gt;
&lt;br /&gt;
4) (This departs from current reality, but it will be the reality very soon; vorbisfile currently blurs the careful abstraction I&#039;m about to describe) Seeking at an arbitrary level of precision is a distributed abstraction in the larger Ogg picture. At the lowest-level Ogg stream abstraction, seeking is one operation: &amp;quot;find me the page from logical stream &#039;n&#039; with granule position &#039;x&#039;&amp;quot;. All more complex seeking operations are a function of a higher-level layer (with knowledge of the media types and codec in use) making intelligent use of this lowest Ogg abstraction. The Ogg stream abstraction need deal with nothing more complex than &#039;find this page&#039;.&lt;br /&gt;
&lt;br /&gt;
The various granulepos strategies for keyframes concern this last point.&lt;br /&gt;
&lt;br /&gt;
The basic issue with video from which complexity arises is that frames often depend on previous and possibly future frames. This happens in a larger, general category of codecs whose streams may not begin decode from just any packet as well as packets that may not represent an entire frame, or even a fixed-time sampling algorithm. It is a mistake to design a seeking system tied to an exact set of very specific cases. While one could implement an explicit keyframe mechanism at the Ogg level, this mechanism would not cover any of the other interesting seeking cases while, as I&#039;ll show below, the mechanism would not actually be necessary.&lt;br /&gt;
&lt;br /&gt;
There will be a few complaints that Ogg is being unnecessarily subtle and shifts a great deal of complexity into software which a few extra page header fields could eliminate. Consider the following:&lt;br /&gt;
&lt;br /&gt;
1) Ogg was designed to impose a roughly .5-1% over the raw packet data over a wide range of packet usage patterns. &#039;A few extra fields&#039; begins inflating that figure for specific special cases that only apply to a few stream types. Right now there is no header field that is not general to every stream. There is no fat in the page headers.&lt;br /&gt;
&lt;br /&gt;
2) The Ogg-level seeking algorithm is exceptionally simple and can be described in a single sentence: &amp;quot;Find the earliest page with a granulepos less than but closest to &#039;x&#039;&amp;quot;. This shifts the onus of assembling more complex seeking operation requiring knowledge of a specific media type into a higher layer that has knowledge of that media type. The higher layer becomes responsible for determining for what &#039;x&#039; Ogg should search. The division of labor is clear and&lt;br /&gt;
sensible.&lt;br /&gt;
&lt;br /&gt;
3) Complex, precise seeking operations are still contained entirely within the framework, just at a higher layer than Ogg-stream. At no time is an application developer required to deal with seeking mechanisms within an Ogg stream or to manually maintain stream&lt;br /&gt;
synchronization.&lt;br /&gt;
&lt;br /&gt;
==== High level handwaving- How seeking really works ====&lt;br /&gt;
&lt;br /&gt;
The granulepos is intended to mean, roughly, &#039;If I stop decode at the end of this page, I will get data from my decoder up to position &#039;granulepos&#039;. The granulepos simultaneously provides seeking information and a &#039;length-of-stream&#039; indicator. Depending on the codec, it can also usually be used to indicate a timebase, but that isn&#039;t our problem right now.&lt;br /&gt;
&lt;br /&gt;
By inference, the granulepos is also used to construct a value &#039;y&#039; such that &#039;if I begin decode *from* point &#039;y&#039;, I will get data&lt;br /&gt;
beginning at position &#039;granulepos&#039;. Although in some codecs, y == granulepos, that is not necessarily the case when decode can&#039;t begin at any arbitrary packet. The granulepos encoding method candidates I will now describe affect exactly the &#039;granulepos&#039; to &#039;y&#039; conversion process. Note also that none of these affect Ogg, only the higher decision-making layers... Different circumstanced necessitated by different codecs can lead to different valid choices, all of which work as far as Ogg is concerned. However, for our I-/P-/B-frame video case, there is a pretty clear winner.&lt;br /&gt;
&lt;br /&gt;
===== Strategy 1: Straight Granulepos, Keyframes Are Not Our Problem. =====&lt;br /&gt;
  &lt;br /&gt;
In this scheme, the granulepos is a simple frame counter. The seeking decision-maker in the codec&#039;s framework plugin is responsible for determining if a frame is a keyframe or not, and if it can&#039;t begin decode from a given frame, it must request another earlier frame until it finds a keyframe. If the codec so desires, it can store &#039;what is my keyframe?&#039; information in the stream packets.&lt;br /&gt;
&lt;br /&gt;
This case means that each seek to a *specific* frame in a video stream will generally result in two Ogg seeks; a first seek to the the requested frame, then a second seek backwards to find that frame&#039;s keyframe.&lt;br /&gt;
&lt;br /&gt;
A larger concern is the semantic accuracy of the granulepos; it&#039;s intended to reflect position accurately when decoding forward. In this scheme, it&#039;s fine for a P-frame to update the counter (as it can be decoded going strictly forward), but B frames will also advance the counter; they can&#039;t be decoded without subsequent P or I frames. Thus, the semantic value of granulepos no longer strictly represents &#039;we can decode up to &#039;granulepos&#039; at the end of this frame&#039;.&lt;br /&gt;
&lt;br /&gt;
===== Strategy 2: Granulepos Represents Keyframes Only =====&lt;br /&gt;
&lt;br /&gt;
In this scheme, only keyframes update the granulepos (monotonically or non-monotonically). It simplifies the seeking process to a keyframe as an Ogg-level seek to page &#039;x&#039; will always yield a page with a keyframe. In addition, granulepos will also always mean &#039;we can decode up to *at least* this point in the stream. If the stream is truncated at P or B frames past granulepos, the extra frames can be discarded. (A special case would need to be defined to terminate a stream that doesn&#039;t end on an I frame).&lt;br /&gt;
&lt;br /&gt;
The difficulty with this scheme is that it presents slightly more for the software level decoder to track; a proper frame number could not be determined internally without tracking from an I frame. Also, the granulepos an Ogg page would not necessarily map to the last packet on the page, or even any packet on that page; multiple sequential pages could have the same granulepos. It is conceptually slightly messy, although the &#039;messiness&#039; does not make it at all impractical.&lt;br /&gt;
&lt;br /&gt;
===== Strategy 3: Granulepos Encodes Some State =====&lt;br /&gt;
&lt;br /&gt;
In some ways, this strategy is the most semantically &#039;over clever&#039;, but also the easiest to implement and the one that gives the most correct, up to date sync information. Pending comments, it is the I/P/B video strategy I currently favor.&lt;br /&gt;
&lt;br /&gt;
The granulepos is 64 bits, a size that is absolutely necessary if, for example, it represents the PCM sample count in an audio codec. When being used to encode video frame number, however, it is comparatively absurdly large*.&lt;br /&gt;
&lt;br /&gt;
* note that although granulepos is not permitted to wrap around, we can simply begin a new logical stream segment with a new serial number should a 30fps video stream ever hit the ten-billion year mark.&lt;br /&gt;
&lt;br /&gt;
Thus we clearly have room to skim a few bits off the bottom of granulepos to represent I, P or B frame. These bits are not used as flags, but rather, frame representation becomes a counting problem; We do this such that the count is still always strictly increasing.&lt;br /&gt;
&lt;br /&gt;
For example, we know that I frames will never be more than 256 frames apart and P frames no more than 31 B frames apart, the granulepos of an I frame can be defined to always be granulepos | 0xff == 0. If we can have up to seven intervening P frames, they could be numbered in granulepos-of-iframe + 0x20, 0x40, 0x60... 0xe0. B frames between the I and P frames would use the remaining five bits and be numbers as sub-I and sub-P frames 1 through 31. Thus, starting from zero, the frames/packets in the pattern IPBBPBBI would be numbered 0x000, 0x020, 0x021, 0x022, 0x040, 0x041, 0x042, 0x100.&lt;br /&gt;
&lt;br /&gt;
If we wish to preserve the ability to represent a timebase, the granulepos number for I frames need not be increased monotonically and shifted; it can be used to represent the frame number. The above example becomes 0x000, 0x020, 0x021, 0x022, 0x040, 0x041, 0x042, 0x700. To get real frame number (from an I frame), we just shift granulepos &amp;gt;&amp;gt; 8. This scheme can be taken further or modified to get frame number from any video frame.&lt;br /&gt;
&lt;br /&gt;
In this way, we can always seek, first time, to a desired key frame page (by seeking to Ogg page &#039;x&#039; where x | 0xff == 0). In addition, each frame still has a unique frame number and also a clear &#039;group&#039; number, potentially useful information to the decoder. Lastly, granulepos is still semantically correct, although it is now, in a sense, representing a whole.fractional frame number for buffering purposes.&lt;br /&gt;
&lt;br /&gt;
===== Scheme Four: Extra &#039;Seekpos&#039; Field / Straw Man =====&lt;br /&gt;
&lt;br /&gt;
Another possibility requires extension of the current Ogg page format. Although older players would reject any such extended pages as invalid, we do have versioning and typing fields, so there&#039;s not actually any compatibility problems with current Ogg pages... in the future.&lt;br /&gt;
&lt;br /&gt;
The idea in this scheme is to keep the current granulepos as a frame number field (ala scheme 1), but also add a new field &#039;seekpos&#039; that is used, rather than granulepos, in seeking. The seekpos would represent the number of the last keyframe that passed by.&lt;br /&gt;
&lt;br /&gt;
advantages:&lt;br /&gt;
&lt;br /&gt;
1) The net effect of this strategy is to modify scheme 1 to only require one bisection seek rather than two. Some amount of code simplification (over scheme 1) at the decision-making level.&lt;br /&gt;
&lt;br /&gt;
disadvantages:&lt;br /&gt;
&lt;br /&gt;
1) The Ogg format will need to be revved. No current (ala 1.0) Ogg code will understand the new pages.&lt;br /&gt;
&lt;br /&gt;
2) The header becomes larger, from a minimum size of 27 bytes to a minimum size of 35.&lt;br /&gt;
&lt;br /&gt;
3) This strategy only enhances keyframes; it is of no use in other odd seeking cases.&lt;br /&gt;
&lt;br /&gt;
4) Gives no more information than scheme 3, but is still more complicated, both in code and API (Ogg would have to understand keyframes).&lt;br /&gt;
&lt;br /&gt;
Thus, there&#039;s no substantial reason to prefer extending the format over a scheme that&#039;s possible within the existing framework. Note that schemes 1-3 can all be implemented within the Ogg stream today.&lt;br /&gt;
&lt;br /&gt;
Monty&lt;br /&gt;
&lt;br /&gt;
[[Category:Ogg]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GranulePosAndSeeking&amp;diff=16663</id>
		<title>GranulePosAndSeeking</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GranulePosAndSeeking&amp;diff=16663"/>
		<updated>2018-03-01T16:30:13Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* Definitions */ fix weird formatting due to open bracket&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Granulepos encoding and How seeking really works ==&lt;br /&gt;
&lt;br /&gt;
This describes how to seek on a multiplexed Ogg stream containing logical bitstreams with granuleshift, such as [[Theora]], [[Kate]], [[CMML]] or [[OggText]].&lt;br /&gt;
The purpose is to locate the earliest page that is required for rendering a given time offset.&lt;br /&gt;
Due to the fact that two time-seeking operations are required, this procedure is commonly referred to as a &amp;quot;&#039;&#039;&#039;double seek&#039;&#039;&#039;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Definitions ===&lt;br /&gt;
Let&#039;s define &#039;&#039;&#039;time&#039;&#039;&#039; to mean &#039;&#039;&#039;the time represented by a GranulePos value&#039;&#039;&#039;. Hence the &amp;quot;time&amp;quot; of a page is the &amp;quot;time represented by the page GranulePos&amp;quot; header field.&lt;br /&gt;
&lt;br /&gt;
Define &#039;&#039;&#039;seek&#039;&#039;&#039; to mean: for each &#039;&#039;&#039;logical&#039;&#039;&#039; bitstream, locate the &#039;&#039;&#039;bytewise-latest page&#039;&#039;&#039; in the bitstream with a &#039;&#039;&#039;time before the target time&#039;&#039;&#039;, then choose the &#039;&#039;&#039;bytewise-earliest&#039;&#039;&#039; among these pages. If two or more pages have the same time (aka. GranulePos value), seeking must locate the bytewise-earlier page.&lt;br /&gt;
&lt;br /&gt;
==== Granules and Granuleshift ====&lt;br /&gt;
&lt;br /&gt;
We use the term &#039;&#039;&#039;granule&#039;&#039;&#039; to refer to time measured in the units of the codec. For audio codecs this is &#039;&#039;usually&#039;&#039; samples, and for video codecs it is &#039;&#039;usually&#039;&#039; frames or fields.&lt;br /&gt;
&lt;br /&gt;
In some formats, pages have a dependency on the data of an earlier page; for example in [[Theora]], interframes have a dependency on an earlier keyframe -- the keyframe data is required to decode the interframe. We encode both the time of the page and the time of the page it depends on into the granulepos. In order to do this we treat the granulepos as a bitfield as follows: &lt;br /&gt;
&lt;br /&gt;
 +---------------------+-------------+&lt;br /&gt;
 | prev_granule        | offset      |&lt;br /&gt;
 +---------------------+-------------+&lt;br /&gt;
&lt;br /&gt;
Then if a page has time in units of codec granules &amp;lt;tt&amp;gt;curr_granule&amp;lt;/tt&amp;gt;, and the page it depends on has time&lt;br /&gt;
&amp;lt;tt&amp;gt;prev_granule&amp;lt;/tt&amp;gt;, we define &amp;lt;tt&amp;gt;offset&amp;lt;/tt&amp;gt; as the difference between these:&lt;br /&gt;
&lt;br /&gt;
 offset = curr_granule - prev_granule&lt;br /&gt;
&lt;br /&gt;
We refer to the number of bits used to encode the offset as the &amp;quot;granuleshift&amp;quot;. This is fixed for all pages in&lt;br /&gt;
that track (logical bitstream). So we encode the later page&#039;s granulepos as: &lt;br /&gt;
&lt;br /&gt;
 granulepos = (prev_granule &amp;lt;&amp;lt; granuleshift) | offset&lt;br /&gt;
&lt;br /&gt;
When decoding, we can extract the current_granule from a granulepos by simply adding these fields:&lt;br /&gt;
&lt;br /&gt;
 curr_granule = prev_granule + offset&lt;br /&gt;
&lt;br /&gt;
Which expands to this expression of the page granulepos:&lt;br /&gt;
&lt;br /&gt;
 curr_granule = (granulepos &amp;gt;&amp;gt; granuleshift) + (granulepos &amp;amp; ((1 &amp;lt;&amp;lt; granuleshift) - 1)))&lt;br /&gt;
&lt;br /&gt;
Keyframes, and other data with no dependency on earlier packets, are encoded with:&lt;br /&gt;
&lt;br /&gt;
 prev_granule = curr_granule, offset = 0&lt;br /&gt;
&lt;br /&gt;
=== Seeking within Single-Track files ===&lt;br /&gt;
&lt;br /&gt;
To locate the earliest page in a track (a logical bitstream) required for rendering a given time offset:&lt;br /&gt;
&lt;br /&gt;
# seek to the desired time&lt;br /&gt;
# read the prev_granule out of the granulepos&lt;br /&gt;
# seek to the time represented by the prev_granule&lt;br /&gt;
&lt;br /&gt;
=== Seeking within Multitrack files ===&lt;br /&gt;
&lt;br /&gt;
To locate the earliest page in a multitrack file (a physical bitstream) required for rendering &#039;&#039;&#039;all&#039;&#039;&#039; tracks from a given time offset:&lt;br /&gt;
&lt;br /&gt;
# seek to the desired time&lt;br /&gt;
# scan forward until a page has been seen from all of the tracks that use granuleshift; while doing so, record the prev_granule of the bytewise-earliest page encountered from each track&lt;br /&gt;
# seek to the minimum of the prev_granules of those pages&lt;br /&gt;
&lt;br /&gt;
It is useful to put a bound on the forward scan; the distance scanned&lt;br /&gt;
only depends on the way the stream is constructed, so it can be large&lt;br /&gt;
if pages in a particular logical bistream is sparse.&lt;br /&gt;
&lt;br /&gt;
=== But how do I &amp;quot;seek to the desired time&amp;quot;?===&lt;br /&gt;
The above assumes that you already know how to seek to a particular GranulePos within the stream efficiently. &lt;br /&gt;
&lt;br /&gt;
This isn&#039;t as simple as it sounds, because the Ogg format does not include an index. The lack of an index is a feature rather than a deficiency and it is one of the primary reasons to use Ogg over some other formats.&lt;br /&gt;
&lt;br /&gt;
Because Ogg doesn&#039;t have in index, infinite streams and partial streams are automatically supported by correctly written applications. There is no risk of truncation or minor corruption making a stream unseekable. No memory is required to store an index, no bandwidth is wasted to transmit it, and seeking granularity is not limited to the precision of the index.&lt;br /&gt;
&lt;br /&gt;
On the other hand, non-indexed formats require a bit more intelligence from the application using them, so many applications have gotten it wrong (although some intelligence is also needed in a well written application for indexed formats, so that it can seek with a corrupted index or below the index granularity).&lt;br /&gt;
&lt;br /&gt;
If you are thinking about seeking within an Ogg file by building your own complete index: &#039;&#039;&#039;STOP! This is not a good procedure.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Building an index may seem simple, but it requires a costly read of the entire stream (which may be gigabytes in size, or even infinite).  There is a better way.&lt;br /&gt;
&lt;br /&gt;
The correct way to seek to a particular granule value in Ogg is by using a [http://en.wikipedia.org/wiki/Bisection_method bisection search]:&lt;br /&gt;
&lt;br /&gt;
# Seek to the middle of the stream&lt;br /&gt;
# obtain sync&lt;br /&gt;
# compare your target granule position with the current position.&lt;br /&gt;
# If the target is less than the current position, repeat these steps on the left side.&lt;br /&gt;
# If it&#039;s greater, repeat it on the right side.&lt;br /&gt;
&lt;br /&gt;
By applying this recursive algorithm, you are guaranteed to find your target location much faster than building an index for the whole stream.&lt;br /&gt;
&lt;br /&gt;
To correctly support chaining, you should first use this kind of search to locate the stream endpoints. Then, the above approach can be applied within the streams, to seek to any location within a chained file.&lt;br /&gt;
&lt;br /&gt;
Doing this correctly is somewhat more complicated than it seems, due to the existence of &#039;&#039;&#039;continued pages&#039;&#039;&#039; and the risk of a small valid page being contained within a packet. Both of these challenges can be addressed, but the solution is left as an exercise for the reader. (Hint: The maximum Ogg page size is &amp;lt; 64 KBytes)&lt;br /&gt;
&lt;br /&gt;
This Bisection Search is very good compared to the alternatives (a linear scan of the whole file), often taking just a couple of reads to locate the correct location in a file gigabytes in size, but the truly obsessive can out-perform the bisection on average, by using the local bitrate to pick a better target than the half way point used in a bisection search ([http://en.wikipedia.org/wiki/Secant_method Secant method]).&lt;br /&gt;
&lt;br /&gt;
Be careful about the worst case becoming linear (see [http://en.wikipedia.org/wiki/Brent%27s_method Brent&#039;s method]). The improvement possible from better-than-bisection approaches is probably only relevant for seeking across a high latency network. In typical low-latency applications, the added complexity may not be worth the cost.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
From an Email by Monty, [http://web.archive.org/web/20031201054855/http://www.xiph.org/archives/theora-dev/200209/0040.html 13th Sept 2002]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note that this document is obsolete, and incorrect with respect to seeking in multiplexed streams.&#039;&#039;&#039; It does accurately describe the rationale behind the two-part granulepos scheme (option 3 below) now use in Theora, Dirac, CMML and other codecs in Ogg.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Folks have noticed that the documentation is semi-silent about how to properly encode the granule position and interleave synchronization of keyframe-based video. The primary reasons for this:&lt;br /&gt;
&lt;br /&gt;
* we at Xiph hadn&#039;t had to do it yet&lt;br /&gt;
&lt;br /&gt;
* there are several easy possibilities, and the longer we had to think about it before mandating One True Spec, the better that spec would likely be.&lt;br /&gt;
&lt;br /&gt;
The lack of a painfully explicit spec has led to the theory that it&#039;s not possible; that&#039;s not true, there are a few ways to do it. Several require no extension to Ogg stream v 0. A last way requires an extra field (a point against it), but does not actually break any stream that currently exists.&lt;br /&gt;
&lt;br /&gt;
The time has come to lay down the spec as we&#039;re currently building the real abstraction layers in a concrete Ogg framework now where the Ogg engine, the codecs, and the overarching Ogg control layers are neatly put into boxes connected in formalized ways. Below I go into detail about each scheme in a &#039;thinking aloud&#039; sort of way. This is not because I haven&#039;t already given the matter sufficient thought, it is because I wish to give the reader sufficient background information to understand why one way is better than the others. This is not a call for input so much as an educational effort (and a public sanity check of my thinking; please do pipe up if it appears I missed a salient point).&lt;br /&gt;
&lt;br /&gt;
==== Starting Assumptions: ====&lt;br /&gt;
&lt;br /&gt;
1) Ogg is not a non-linear format. It is not a replacement for the scripting system of a DVD player. It is a media transport format&lt;br /&gt;
designed to do nothing more than deliver content, in a stream, and have all the pieces arrive on time and in sync. It is not designed to *prevent* more complex use of content, it merely does not implement anything beyond a linear representation of the data contained within. If you want to build a real non-linear format, build it *from* Ogg, not *into* Ogg. This has been the intent from day 1.&lt;br /&gt;
&lt;br /&gt;
2) The Ogg layer does not know specifics of the codec data it&#039;s multiplexing into a stream. It knows nothing beyond &#039;Oooo, packets!&#039;, that the packets belong to different buckets, that the packets go in order, and that packets have position markers. Ogg does not even have a concept of &#039;time&#039;; it only knows about the sequentially increasing, unitless position markers. It is up to higher layers which have access to the codec APIs to assign and convert units of framing or time.&lt;br /&gt;
&lt;br /&gt;
3) Given pre-cached decode headers, a player may seek into a stream at any point and begin decode. It may be the case that audio may start after video by a fraction of a second, or video might be blank until the stream hits the next keyframe, but this simplest case must just work, and there will be sufficient information to maintain perfect cross-media sync.&lt;br /&gt;
&lt;br /&gt;
4) (This departs from current reality, but it will be the reality very soon; vorbisfile currently blurs the careful abstraction I&#039;m about to describe) Seeking at an arbitrary level of precision is a distributed abstraction in the larger Ogg picture. At the lowest-level Ogg stream abstraction, seeking is one operation: &amp;quot;find me the page from logical stream &#039;n&#039; with granule position &#039;x&#039;&amp;quot;. All more complex seeking operations are a function of a higher-level layer (with knowledge of the media types and codec in use) making intelligent use of this lowest Ogg abstraction. The Ogg stream abstraction need deal with nothing more complex than &#039;find this page&#039;.&lt;br /&gt;
&lt;br /&gt;
The various granulepos strategies for keyframes concern this last point.&lt;br /&gt;
&lt;br /&gt;
The basic issue with video from which complexity arises is that frames often depend on previous and possibly future frames. This happens in a larger, general category of codecs whose streams may not begin decode from just any packet as well as packets that may not represent an entire frame, or even a fixed-time sampling algorithm. It is a mistake to design a seeking system tied to an exact set of very specific cases. While one could implement an explicit keyframe mechanism at the Ogg level, this mechanism would not cover any of the other interesting seeking cases while, as I&#039;ll show below, the mechanism would not actually be necessary.&lt;br /&gt;
&lt;br /&gt;
There will be a few complaints that Ogg is being unnecessarily subtle and shifts a great deal of complexity into software which a few extra page header fields could eliminate. Consider the following:&lt;br /&gt;
&lt;br /&gt;
1) Ogg was designed to impose a roughly .5-1% over the raw packet data over a wide range of packet usage patterns. &#039;A few extra fields&#039; begins inflating that figure for specific special cases that only apply to a few stream types. Right now there is no header field that is not general to every stream. There is no fat in the page headers.&lt;br /&gt;
&lt;br /&gt;
2) The Ogg-level seeking algorithm is exceptionally simple and can be described in a single sentence: &amp;quot;Find the earliest page with a granulepos less than but closest to &#039;x&#039;&amp;quot;. This shifts the onus of assembling more complex seeking operation requiring knowledge of a specific media type into a higher layer that has knowledge of that media type. The higher layer becomes responsible for determining for what &#039;x&#039; Ogg should search. The division of labor is clear and&lt;br /&gt;
sensible.&lt;br /&gt;
&lt;br /&gt;
3) Complex, precise seeking operations are still contained entirely within the framework, just at a higher layer than Ogg-stream. At no time is an application developer required to deal with seeking mechanisms within an Ogg stream or to manually maintain stream&lt;br /&gt;
synchronization.&lt;br /&gt;
&lt;br /&gt;
==== High level handwaving- How seeking really works ====&lt;br /&gt;
&lt;br /&gt;
The granulepos is intended to mean, roughly, &#039;If I stop decode at the end of this page, I will get data from my decoder up to position &#039;granulepos&#039;. The granulepos simultaneously provides seeking information and a &#039;length-of-stream&#039; indicator. Depending on the codec, it can also usually be used to indicate a timebase, but that isn&#039;t our problem right now.&lt;br /&gt;
&lt;br /&gt;
By inference, the granulepos is also used to construct a value &#039;y&#039; such that &#039;if I begin decode *from* point &#039;y&#039;, I will get data&lt;br /&gt;
beginning at position &#039;granulepos&#039;. Although in some codecs, y == granulepos, that is not necessarily the case when decode can&#039;t begin at any arbitrary packet. The granulepos encoding method candidates I will now describe affect exactly the &#039;granulepos&#039; to &#039;y&#039; conversion process. Note also that none of these affect Ogg, only the higher decision-making layers... Different circumstanced necessitated by different codecs can lead to different valid choices, all of which work as far as Ogg is concerned. However, for our I-/P-/B-frame video case, there is a pretty clear winner.&lt;br /&gt;
&lt;br /&gt;
===== Strategy 1: Straight Granulepos, Keyframes Are Not Our Problem. =====&lt;br /&gt;
  &lt;br /&gt;
In this scheme, the granulepos is a simple frame counter. The seeking decision-maker in the codec&#039;s framework plugin is responsible for determining if a frame is a keyframe or not, and if it can&#039;t begin decode from a given frame, it must request another earlier frame until it finds a keyframe. If the codec so desires, it can store &#039;what is my keyframe?&#039; information in the stream packets.&lt;br /&gt;
&lt;br /&gt;
This case means that each seek to a *specific* frame in a video stream will generally result in two Ogg seeks; a first seek to the the requested frame, then a second seek backwards to find that frame&#039;s keyframe.&lt;br /&gt;
&lt;br /&gt;
A larger concern is the semantic accuracy of the granulepos; it&#039;s intended to reflect position accurately when decoding forward. In this scheme, it&#039;s fine for a P-frame to update the counter (as it can be decoded going strictly forward), but B frames will also advance the counter; they can&#039;t be decoded without subsequent P or I frames. Thus, the semantic value of granulepos no longer strictly represents &#039;we can decode up to &#039;granulepos&#039; at the end of this frame&#039;.&lt;br /&gt;
&lt;br /&gt;
===== Strategy 2: Granulepos Represents Keyframes Only =====&lt;br /&gt;
&lt;br /&gt;
In this scheme, only keyframes update the granulepos (monotonically or non-monotonically). It simplifies the seeking process to a keyframe as an Ogg-level seek to page &#039;x&#039; will always yield a page with a keyframe. In addition, granulepos will also always mean &#039;we can decode up to *at least* this point in the stream. If the stream is truncated at P or B frames past granulepos, the extra frames can be discarded. (A special case would need to be defined to terminate a stream that doesn&#039;t end on an I frame).&lt;br /&gt;
&lt;br /&gt;
The difficulty with this scheme is that it presents slightly more for the software level decoder to track; a proper frame number could not be determined internally without tracking from an I frame. Also, the granulepos an Ogg page would not necessarily map to the last packet on the page, or even any packet on that page; multiple sequential pages could have the same granulepos. It is conceptually slightly messy, although the &#039;messiness&#039; does not make it at all impractical.&lt;br /&gt;
&lt;br /&gt;
===== Strategy 3: Granulepos Encodes Some State =====&lt;br /&gt;
&lt;br /&gt;
In some ways, this strategy is the most semantically &#039;over clever&#039;, but also the easiest to implement and the one that gives the most correct, up to date sync information. Pending comments, it is the I/P/B video strategy I currently favor.&lt;br /&gt;
&lt;br /&gt;
The granulepos is 64 bits, a size that is absolutely necessary if, for example, it represents the PCM sample count in an audio codec. When being used to encode video frame number, however, it is comparatively absurdly large*.&lt;br /&gt;
&lt;br /&gt;
* note that although granulepos is not permitted to wrap around, we can simply begin a new logical stream segment with a new serial number should a 30fps video stream ever hit the ten-billion year mark.&lt;br /&gt;
&lt;br /&gt;
Thus we clearly have room to skim a few bits off the bottom of granulepos to represent I, P or B frame. These bits are not used as flags, but rather, frame representation becomes a counting problem; We do this such that the count is still always strictly increasing.&lt;br /&gt;
&lt;br /&gt;
For example, we know that I frames will never be more than 256 frames apart and P frames no more than 31 B frames apart, the granulepos of an I frame can be defined to always be granulepos | 0xff == 0. If we can have up to seven intervening P frames, they could be numbered in granulepos-of-iframe + 0x20, 0x40, 0x60... 0xe0. B frames between the I and P frames would use the remaining five bits and be numbers as sub-I and sub-P frames 1 through 31. Thus, starting from zero, the frames/packets in the pattern IPBBPBBI would be numbered 0x000, 0x020, 0x021, 0x022, 0x040, 0x041, 0x042, 0x100.&lt;br /&gt;
&lt;br /&gt;
If we wish to preserve the ability to represent a timebase, the granulepos number for I frames need not be increased monotonically and shifted; it can be used to represent the frame number. The above example becomes 0x000, 0x020, 0x021, 0x022, 0x040, 0x041, 0x042, 0x700. To get real frame number (from an I frame), we just shift granulepos &amp;gt;&amp;gt; 8. This scheme can be taken further or modified to get frame number from any video frame.&lt;br /&gt;
&lt;br /&gt;
In this way, we can always seek, first time, to a desired key frame page (by seeking to Ogg page &#039;x&#039; where x | 0xff == 0). In addition, each frame still has a unique frame number and also a clear &#039;group&#039; number, potentially useful information to the decoder. Lastly, granulepos is still semantically correct, although it is now, in a sense, representing a whole.fractional frame number for buffering purposes.&lt;br /&gt;
&lt;br /&gt;
===== Scheme Four: Extra &#039;Seekpos&#039; Field / Straw Man =====&lt;br /&gt;
&lt;br /&gt;
Another possibility requires extension of the current Ogg page format. Although older players would reject any such extended pages as invalid, we do have versioning and typing fields, so there&#039;s not actually any compatibility problems with current Ogg pages... in the future.&lt;br /&gt;
&lt;br /&gt;
The idea in this scheme is to keep the current granulepos as a frame number field (ala scheme 1), but also add a new field &#039;seekpos&#039; that is used, rather than granulepos, in seeking. The seekpos would represent the number of the last keyframe that passed by.&lt;br /&gt;
&lt;br /&gt;
advantages:&lt;br /&gt;
&lt;br /&gt;
1) The net effect of this strategy is to modify scheme 1 to only require one bisection seek rather than two. Some amount of code simplification (over scheme 1) at the decision-making level.&lt;br /&gt;
&lt;br /&gt;
disadvantages:&lt;br /&gt;
&lt;br /&gt;
1) The Ogg format will need to be revved. No current (ala 1.0) Ogg code will understand the new pages.&lt;br /&gt;
&lt;br /&gt;
2) The header becomes larger, from a minimum size of 27 bytes to a minimum size of 35.&lt;br /&gt;
&lt;br /&gt;
3) This strategy only enhances keyframes; it is of no use in other odd seeking cases.&lt;br /&gt;
&lt;br /&gt;
4) Gives no more information than scheme 3, but is still more complicated, both in code and API (Ogg would have to understand keyframes).&lt;br /&gt;
&lt;br /&gt;
Thus, there&#039;s no substantial reason to prefer extending the format over a scheme that&#039;s possible within the existing framework. Note that schemes 1-3 can all be implemented within the Ogg stream today.&lt;br /&gt;
&lt;br /&gt;
Monty&lt;br /&gt;
&lt;br /&gt;
[[Category:Ogg]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Bounties&amp;diff=16659</id>
		<title>Bounties</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Bounties&amp;diff=16659"/>
		<updated>2017-11-28T10:30:11Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: split paras in header&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;These are proposed bounty projects, similar to http://gnome.org/bounties/ &lt;br /&gt;
or the [http://ghostscript.com/article/58.html Ghostscript bug bounty] program.&lt;br /&gt;
&lt;br /&gt;
We don&#039;t have the same level of funding but could start a pot with $10-$100 and&lt;br /&gt;
let people contribute to specific bounties through PayPal.&lt;br /&gt;
&lt;br /&gt;
=== Xiph Quicktime Plugin ===&lt;br /&gt;
[http://www.xiph.org/quicktime/ QuickTime Components] is now a project hosted on xiph.org.&lt;br /&gt;
&lt;br /&gt;
You have to write a Quicktime Plugin for the Ogg container and the Xiph Codec Family.&lt;br /&gt;
[http://qtcomponents.sf.net qtcomponents] provides support for Ogg Vorbis and MNG. This could be used as start.&lt;br /&gt;
Xiph Quicktime Plugin has to support encoding/decoding for:&lt;br /&gt;
* Ogg Media container&lt;br /&gt;
**[http://qtcomponents.sf.net qtcomponents] &#039;&#039;has an operational pluggable API for import, it needs some work to be long term supportable.  It does not have a pluggable API for exporting at this time.&#039;&#039;&lt;br /&gt;
* Support for Chained Ogg Streams&lt;br /&gt;
**[http://qtcomponents.sf.net qtcomponents] &#039;&#039;imports chained files as multiple tracks in QuickTime.  It does not create chained files during export.&#039;&#039;&lt;br /&gt;
* Support for Icecast Streams (sending is optional)&lt;br /&gt;
**[http://qtcomponents.sf.net qtcomponents] &#039;&#039;implements nothing towards this item.  First up is a reverse-engineering effort, as the specifications for a streaming media handler have not been published.&#039;&#039;&lt;br /&gt;
* Support for Xiph Codec Family: Vorbis, Theora, FLAC, Speex, Writ&lt;br /&gt;
**[http://qtcomponents.sf.net qtcomponents] &#039;&#039;has code for Vorbis and Speex (not working at the moment) and there is code at [http://damien.drix.free.fr/qtflac/ Damien Drix&#039;s site] for FLAC (decode only).&#039;&#039;&lt;br /&gt;
It must also be possible to use the Xiph codecs in .mov files in combination with other quicktime codecs.&lt;br /&gt;
*[http://qtcomponents.sf.net qtcomponents] &#039;&#039;supports embedding media encoded with Xiph codes into .mov files.&#039;&#039;&lt;br /&gt;
The plugin should work with at least QuickTime 6.x and 7.x on Mac OS X and Windows. (Mac OS 9 would be nice but probably isn&#039;t as important.)&lt;br /&gt;
&lt;br /&gt;
All work must be released under the GPL.&lt;br /&gt;
&lt;br /&gt;
Proposed bounty: 100€&lt;br /&gt;
&lt;br /&gt;
=== Aggressive low-bitrate libvorbis encoding improvements for Vorbis I ===&lt;br /&gt;
libvorbis has a lot of room for improvement in all quality/bitrate departments, particularly at the lower quality levels / bitrates.  There are many directions from which to approach this problem.&lt;br /&gt;
&lt;br /&gt;
To claim this bounty, the following criteria would have to be met:&lt;br /&gt;
* A 25%-or-better reduction in bitrate for quality levels -1, 0, 1 on a reasonable testsuite while maintaining qualitative equivilence (or improvement) in community testing.&lt;br /&gt;
* No overall qualitative/bitrate regressions in quality levels 2 upwards&lt;br /&gt;
* Output ogg files compatible with Vorbis I spec&lt;br /&gt;
* Changes under suitable license for re-integration with Xiph.Org libvorbis&lt;br /&gt;
&lt;br /&gt;
Proposed bounty: 200€&lt;br /&gt;
&lt;br /&gt;
=== iPod playback support ===&lt;br /&gt;
The [http://ipodlinux.sourceforge.net/ Linux on iPod] project has vorbis decode working (with alternate firmware) at a good fraction of realtime. It should be a small matter of optimization to get it working&lt;br /&gt;
for useful playback.&lt;br /&gt;
&lt;br /&gt;
Proposed bounty: 100€&lt;br /&gt;
&lt;br /&gt;
=== Ogg Vorbis Bitrate Peeling ===&lt;br /&gt;
:Note: a bounty for this project has been posted on [https://launchpad.net/ launchpad.net]: [https://launchpad.net/bounties/ogg-vorbis-bitrate-peeling  Add bitrate peeling to the standard libvorbis encoding library].&lt;br /&gt;
&amp;lt;p&amp;gt;Ogg Vorbis bitrate peeling has been a topic brought up time and again to combat MP3 enthusiasts. But this feature does not actually exist, only the mere possibility abounds. This bounty is set to change that.&amp;lt;/p&amp;gt;&lt;br /&gt;
The peeler must meet the following criteria:&lt;br /&gt;
* Any Vorbis stream can be converted (not transcoded) to a lower quality setting&lt;br /&gt;
* Resulting streams would be identical or nearly identical to a stream generated by encoding the original source to the selected quality&lt;br /&gt;
* This process is reasonably fast (that is, signifigantly faster than re-encoding from source)&lt;br /&gt;
The following must also be accomplished to claim this bounty:&lt;br /&gt;
* The encoding libraries must be updated to create &amp;lt;em&amp;gt;peelable&amp;lt;/em&amp;gt; Vorbis streams natively&lt;br /&gt;
* Old Vorbis streams must be &amp;lt;em&amp;gt;peelable&amp;lt;/em&amp;gt; already, or convertable with a utility in order to be made &amp;lt;em&amp;gt;peelable&amp;lt;/em&amp;gt;&lt;br /&gt;
* If older streams are not natively &amp;lt;em&amp;gt;peelable&amp;lt;/em&amp;gt;, old &amp;lt;em&amp;gt;unpeelable&amp;lt;/em&amp;gt; Vorbis streams must be identifiable and discernable from &amp;lt;em&amp;gt;peelable&amp;lt;/em&amp;gt; streams in such a way as to facilitate transcoding streams from the old format&lt;br /&gt;
* All work submitted must be licenced under a BSD style licence (excepting circumstances where other licences may conflict)&lt;br /&gt;
&lt;br /&gt;
Proposed bounty: 100€&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Main_Page&amp;diff=16655</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Main_Page&amp;diff=16655"/>
		<updated>2017-11-23T20:53:38Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* Timed Text/Metadata */ copied/pasted Martin&amp;#039;s suggestion&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In an effort to bring open-source ideals to the world of multimedia, the [[Xiph.Org Foundation]] develops a multitude of amazing products.  This wiki describes our free and open protocols and software.&lt;br /&gt;
&lt;br /&gt;
== Demonstrations of Xiph technologies ==&lt;br /&gt;
&lt;br /&gt;
Want to hear or see Xiph in action?  These projects are using our codecs, formats, or libraries.&lt;br /&gt;
&lt;br /&gt;
=== Audio ===&lt;br /&gt;
&lt;br /&gt;
* [[OpusSupport]]: List of software and services supporting the [[Opus]] codec&lt;br /&gt;
* [[VorbisStreams|Vorbis Streams]]: Stations streaming with the [[Vorbis]] codec&lt;br /&gt;
* [[Games that use Vorbis]]: Games using the Vorbis codec for music or sound effects&lt;br /&gt;
* [[VorbisHardware|Vorbis Hardware]]: Hardware players using the Vorbis codec&lt;br /&gt;
* [[VorbisSoftwarePlayers|Vorbis Software Players]]: list of media players with out-of-box support for Vorbis&lt;br /&gt;
&lt;br /&gt;
=== Video ===&lt;br /&gt;
&lt;br /&gt;
* [[TheoraHardware|Theora Hardware]]: Hardware using the [[Theora]] video codec&lt;br /&gt;
* [[TheoraSoftwarePlayers|Theora Software Players]]: list of media players with Theora support&lt;br /&gt;
* [[List of Theora videos]]: Sources for video encoded with Theora&lt;br /&gt;
&lt;br /&gt;
== Projects/Formats ==&lt;br /&gt;
&lt;br /&gt;
=== Container Formats ===&lt;br /&gt;
&lt;br /&gt;
* [[Ogg]]: Media container. This is our native format and the recommended container for Xiph codecs.&lt;br /&gt;
** [[Ogg Skeleton]]: Skeleton information on all logical content bitstreams in Ogg.&lt;br /&gt;
** [[MIMETypesCodecs|Specification of MIME types and respective codecs parameter]]&lt;br /&gt;
* [[SpeexRTP]]: RTP payload format for voice&lt;br /&gt;
* [[VorbisRTP]]: RTP payload format for general audio&lt;br /&gt;
* [[TheoraRTP]]: RTP payload format for video&lt;br /&gt;
* [[XSPF]]: XML Sharable Playlist Format&lt;br /&gt;
&lt;br /&gt;
=== Codecs ===&lt;br /&gt;
====Compressed Audio/Video====&lt;br /&gt;
* [[OpusFAQ|Opus]]: Lossy, low-latency, general-purpose audio codec&lt;br /&gt;
* [[Vorbis]]: Lossy audio codec with a [[Tremor|fixed point decoder]]&lt;br /&gt;
* [[FLAC]]: Free Lossless Audio Codec&lt;br /&gt;
* [[Theora]]: Lossy video codec&lt;br /&gt;
* [[Speex]]: Speech codec (obsoleted by [[OpusFAQ|Opus]])&lt;br /&gt;
====Uncompressed Audio/Video====&lt;br /&gt;
* [[OggPCM]]: Audio codec&lt;br /&gt;
====Timed Text/Metadata====&lt;br /&gt;
* [[OggKate|Kate]]: Format for lyrics and subtitles&lt;br /&gt;
* [[CMML]]: Continuous Media Markup Language, used for [http://www.annodex.net/ Annodex] and subtitles (xine, vlc, gstreamer, and DirectShow support; obsoleted by [[OggKate|Kate]])&lt;br /&gt;
&lt;br /&gt;
=== Software ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Software for distributing media&#039;&#039;&#039;&lt;br /&gt;
** [[Icecast Server|Icecast]]: Streaming server&lt;br /&gt;
** [[IceS]]: Source client for Icecast servers&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Libraries&#039;&#039;&#039;&lt;br /&gt;
** [[OggPlay]]: library for synchronised Xiph media playback&lt;br /&gt;
**[[XiphQT]]: Quicktime component to play the main Xiph formats&lt;br /&gt;
** [[VorbisCommentEdit]]: Macintosh Framework making it easy to incorporate the editing of [[VorbisComment|Vorbis Comments]]&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Other software&#039;&#039;&#039;&lt;br /&gt;
** [[OggComponent/VorbisComponent]]: Wrappers to integrate Vorbis into Mac OS X (does not yet support encoding)&lt;br /&gt;
** [http://xiph.org/paranoia/ cdparanoia]: CDDA extractor/ripper&lt;br /&gt;
&lt;br /&gt;
=== Community ===&lt;br /&gt;
&lt;br /&gt;
*[[How to help]]&lt;br /&gt;
*[[Spread Open Media]]: project to promote Xiph formats.&lt;br /&gt;
**[[MailOgging]]: provides templates for anyone willing to contact a company requesting them to add support for Xiph formats.&lt;br /&gt;
*[[People]]: Who&#039;s who in Xiph.&lt;br /&gt;
&lt;br /&gt;
=== Work in Progress ===&lt;br /&gt;
* [[Work In Progress]]: codecs and software still in the research and development stages.&lt;br /&gt;
* [[Todo]]: To-do list for various Xiph projects.&lt;br /&gt;
&lt;br /&gt;
== Project management ==&lt;br /&gt;
&lt;br /&gt;
* [[AdminProcesses]]: who&#039;s in charge of what project&lt;br /&gt;
* [[MonthlyMeeting]]: page with information on Xiph&#039;s MonthlyMeeting&lt;br /&gt;
* [[MailingLists]]: list of Xiph&#039;s mailing lists&lt;br /&gt;
* [[Bounties]]: list of bounties that you can take to improve Xiph&#039;s projects&lt;br /&gt;
&lt;br /&gt;
== Resources for Video and Audio programmers ==&lt;br /&gt;
&lt;br /&gt;
* [[Ambisonics]]: page with technical information on Ambisonics&lt;br /&gt;
* [[Videos|Educational Videos]] about audio/video technology.&lt;br /&gt;
* [[Resources and papers on Audio, Music and Speech|Courses and papers on Audio, Music and Speech]]: page with links to MIT and other universities&#039; content&lt;br /&gt;
* [[Oggless]]: for ideas on how to use the different Xiph codecs outside Ogg&lt;br /&gt;
&lt;br /&gt;
== Wiki internal ==&lt;br /&gt;
&lt;br /&gt;
* [[XiphInfra:List of services]]: List of services the Xiph.Org Foundation uses.&lt;br /&gt;
* [[Translations]]: Do you feel like helping us with some translation work?&lt;br /&gt;
* [[XiphWiki:Sandbox]]: Test page for testing your Wiki-editing skills.&lt;br /&gt;
* [[XiphWiki:Copyrights]]: License used for all content posted on the XiphWiki.&lt;br /&gt;
* [[Logos]]: Logos of the various Xiph projects.&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Main_Page&amp;diff=16653</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Main_Page&amp;diff=16653"/>
		<updated>2017-11-23T16:00:59Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* Demonstrations of Xiph technologies */ add list of software supporting Opus&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In an effort to bring open-source ideals to the world of multimedia, the [[Xiph.Org Foundation]] develops a multitude of amazing products.  This wiki describes our free and open protocols and software.&lt;br /&gt;
&lt;br /&gt;
== Demonstrations of Xiph technologies ==&lt;br /&gt;
&lt;br /&gt;
Want to hear or see Xiph in action?  These projects are using our codecs, formats, or libraries.&lt;br /&gt;
&lt;br /&gt;
=== Audio ===&lt;br /&gt;
&lt;br /&gt;
* [[OpusSupport]]: List of software and services supporting the [[Opus]] codec&lt;br /&gt;
* [[VorbisStreams|Vorbis Streams]]: Stations streaming with the [[Vorbis]] codec&lt;br /&gt;
* [[Games that use Vorbis]]: Games using the Vorbis codec for music or sound effects&lt;br /&gt;
* [[VorbisHardware|Vorbis Hardware]]: Hardware players using the Vorbis codec&lt;br /&gt;
* [[VorbisSoftwarePlayers|Vorbis Software Players]]: list of media players with out-of-box support for Vorbis&lt;br /&gt;
&lt;br /&gt;
=== Video ===&lt;br /&gt;
&lt;br /&gt;
* [[TheoraHardware|Theora Hardware]]: Hardware using the [[Theora]] video codec&lt;br /&gt;
* [[TheoraSoftwarePlayers|Theora Software Players]]: list of media players with Theora support&lt;br /&gt;
* [[List of Theora videos]]: Sources for video encoded with Theora&lt;br /&gt;
&lt;br /&gt;
== Projects/Formats ==&lt;br /&gt;
&lt;br /&gt;
=== Container Formats ===&lt;br /&gt;
&lt;br /&gt;
* [[Ogg]]: Media container. This is our native format and the recommended container for Xiph codecs.&lt;br /&gt;
** [[Ogg Skeleton]]: Skeleton information on all logical content bitstreams in Ogg.&lt;br /&gt;
** [[MIMETypesCodecs|Specification of MIME types and respective codecs parameter]]&lt;br /&gt;
* [[SpeexRTP]]: RTP payload format for voice&lt;br /&gt;
* [[VorbisRTP]]: RTP payload format for general audio&lt;br /&gt;
* [[TheoraRTP]]: RTP payload format for video&lt;br /&gt;
* [[XSPF]]: XML Sharable Playlist Format&lt;br /&gt;
&lt;br /&gt;
=== Codecs ===&lt;br /&gt;
====Compressed Audio/Video====&lt;br /&gt;
* [[OpusFAQ|Opus]]: Lossy, low-latency, general-purpose audio codec&lt;br /&gt;
* [[Vorbis]]: Lossy audio codec with a [[Tremor|fixed point decoder]]&lt;br /&gt;
* [[FLAC]]: Free Lossless Audio Codec&lt;br /&gt;
* [[Theora]]: Lossy video codec&lt;br /&gt;
* [[Speex]]: Speech codec (obsoleted by [[OpusFAQ|Opus]])&lt;br /&gt;
====Uncompressed Audio/Video====&lt;br /&gt;
* [[OggPCM]]: Audio codec&lt;br /&gt;
====Timed Text/Metadata====&lt;br /&gt;
* [[CMML]]: Continuous Media Markup Language, used for [http://www.annodex.net/ Annodex] and subtitles (xine, vlc, gstreamer, and DirectShow support)&lt;br /&gt;
* [[OggKate|Kate]]: new format for lyrics and subtitles&lt;br /&gt;
&lt;br /&gt;
=== Software ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Software for distributing media&#039;&#039;&#039;&lt;br /&gt;
** [[Icecast Server|Icecast]]: Streaming server&lt;br /&gt;
** [[IceS]]: Source client for Icecast servers&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Libraries&#039;&#039;&#039;&lt;br /&gt;
** [[OggPlay]]: library for synchronised Xiph media playback&lt;br /&gt;
**[[XiphQT]]: Quicktime component to play the main Xiph formats&lt;br /&gt;
** [[VorbisCommentEdit]]: Macintosh Framework making it easy to incorporate the editing of [[VorbisComment|Vorbis Comments]]&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Other software&#039;&#039;&#039;&lt;br /&gt;
** [[OggComponent/VorbisComponent]]: Wrappers to integrate Vorbis into Mac OS X (does not yet support encoding)&lt;br /&gt;
** [http://xiph.org/paranoia/ cdparanoia]: CDDA extractor/ripper&lt;br /&gt;
&lt;br /&gt;
=== Community ===&lt;br /&gt;
&lt;br /&gt;
*[[How to help]]&lt;br /&gt;
*[[Spread Open Media]]: project to promote Xiph formats.&lt;br /&gt;
**[[MailOgging]]: provides templates for anyone willing to contact a company requesting them to add support for Xiph formats.&lt;br /&gt;
*[[People]]: Who&#039;s who in Xiph.&lt;br /&gt;
&lt;br /&gt;
=== Work in Progress ===&lt;br /&gt;
* [[Work In Progress]]: codecs and software still in the research and development stages.&lt;br /&gt;
* [[Todo]]: To-do list for various Xiph projects.&lt;br /&gt;
&lt;br /&gt;
== Project management ==&lt;br /&gt;
&lt;br /&gt;
* [[AdminProcesses]]: who&#039;s in charge of what project&lt;br /&gt;
* [[MonthlyMeeting]]: page with information on Xiph&#039;s MonthlyMeeting&lt;br /&gt;
* [[MailingLists]]: list of Xiph&#039;s mailing lists&lt;br /&gt;
* [[Bounties]]: list of bounties that you can take to improve Xiph&#039;s projects&lt;br /&gt;
&lt;br /&gt;
== Resources for Video and Audio programmers ==&lt;br /&gt;
&lt;br /&gt;
* [[Ambisonics]]: page with technical information on Ambisonics&lt;br /&gt;
* [[Videos|Educational Videos]] about audio/video technology.&lt;br /&gt;
* [[Resources and papers on Audio, Music and Speech|Courses and papers on Audio, Music and Speech]]: page with links to MIT and other universities&#039; content&lt;br /&gt;
* [[Oggless]]: for ideas on how to use the different Xiph codecs outside Ogg&lt;br /&gt;
&lt;br /&gt;
== Wiki internal ==&lt;br /&gt;
&lt;br /&gt;
* [[XiphInfra:List of services]]: List of services the Xiph.Org Foundation uses.&lt;br /&gt;
* [[Translations]]: Do you feel like helping us with some translation work?&lt;br /&gt;
* [[XiphWiki:Sandbox]]: Test page for testing your Wiki-editing skills.&lt;br /&gt;
* [[XiphWiki:Copyrights]]: License used for all content posted on the XiphWiki.&lt;br /&gt;
* [[Logos]]: Logos of the various Xiph projects.&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Icecast_Server/Installing_latest_version_(official_Xiph_repositories)&amp;diff=16652</id>
		<title>Icecast Server/Installing latest version (official Xiph repositories)</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Icecast_Server/Installing_latest_version_(official_Xiph_repositories)&amp;diff=16652"/>
		<updated>2017-11-23T11:53:25Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* Step 2: Import the Multimedia signing key */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Xiph.org provides the latest version of Icecast packaged for [https://build.opensuse.org/package/repositories/multimedia:xiph/icecast various distributions]. The packages are built centrally from [https://build.opensuse.org/package/show/multimedia:xiph/icecast one set of sources] on the [https://build.opensuse.org/ openSUSE OpenBuildService instance] in the [https://build.opensuse.org/project/show/multimedia:xiph Multimedia/Xiph.org project].&lt;br /&gt;
&lt;br /&gt;
Packages are usually available on release day. Packaging follows closely the original distro packaging to stay a seamless drop in replacement. The packages are meant for users who need the latest version of Icecast or HTTPS support, while their distribution doesn&#039;t provide it.&lt;br /&gt;
&lt;br /&gt;
== Debian and Ubuntu (in all its flavors) ==&lt;br /&gt;
It takes 4 simple commands to install the latest Icecast version on a deb based distro.&lt;br /&gt;
&lt;br /&gt;
==== Step 1: Add the repository ====&lt;br /&gt;
This expects that you have &#039;&#039;&#039;sudo&#039;&#039;&#039; installed. If not, open a root shell and run the &#039;&#039;&#039;echo&#039;&#039;&#039; command directly.&lt;br /&gt;
&lt;br /&gt;
Copy and paste the command for your distribution release and make sure that it&#039;s executed as &#039;&#039;&#039;one&#039;&#039;&#039; line!&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Distribution Release&lt;br /&gt;
!Command&lt;br /&gt;
!Repository&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|Debian 8.0 (jessie)&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;sudo sh -c &amp;quot;echo deb http://download.opensuse.org/repositories/multimedia:/xiph/Debian_8.0/ ./ &amp;gt;&amp;gt;/etc/apt/sources.list.d/icecast.list&amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/Debian_8.0/ repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Debian 7.0 (wheezy)&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;sudo sh -c &amp;quot;echo deb http://download.opensuse.org/repositories/multimedia:/xiph/Debian_7.0/ ./ &amp;gt;&amp;gt;/etc/apt/sources.list.d/icecast.list&amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/Debian_7.0/ repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Debian 6.0 (squeeze)&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;sudo sh -c &amp;quot;echo deb http://download.opensuse.org/repositories/multimedia:/xiph/Debian_6.0/ ./ &amp;gt;&amp;gt;/etc/apt/sources.list.d/icecast.list&amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/Debian_6.0/ repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 14.04 (trusty)&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;sudo sh -c &amp;quot;echo deb http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_14.04/ ./ &amp;gt;&amp;gt;/etc/apt/sources.list.d/icecast.list&amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_14.04/ repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 15.04 (vivid)&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;sudo sh -c &amp;quot;echo deb http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_15.04/ ./ &amp;gt;&amp;gt;/etc/apt/sources.list.d/icecast.list&amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_15.04/ repository]&lt;br /&gt;
|&#039;&#039;not&#039;&#039; LTS&amp;lt;ref name=&amp;quot;ubuntu-lts&amp;quot;&amp;gt;Ubuntu releases that are not Long-Term-Support have a [https://wiki.ubuntu.com/Releases short life cycle]. Xiph.org will stop offering updated packages for those some time after Canonical/the Ubuntu Project end their support.&amp;lt;/ref&amp;gt;!&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 15.10 (wily)&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;sudo sh -c &amp;quot;echo deb http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_15.10/ ./ &amp;gt;&amp;gt;/etc/apt/sources.list.d/icecast.list&amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_15.10/ repository]&lt;br /&gt;
|&#039;&#039;not&#039;&#039; LTS&amp;lt;ref name=&amp;quot;ubuntu-lts&amp;quot;/&amp;gt;!&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 16.04 (xenial)&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;sudo sh -c &amp;quot;echo deb http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_16.04/ ./ &amp;gt;&amp;gt;/etc/apt/sources.list.d/icecast.list&amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_16.04/ repository]&lt;br /&gt;
|LTS&amp;lt;ref name=&amp;quot;ubuntu-lts&amp;quot;/&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 17.04 (zesty)&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;sudo sh -c &amp;quot;echo deb http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_17.04/ ./ &amp;gt;&amp;gt;/etc/apt/sources.list.d/icecast.list&amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_17.04/ repository]&lt;br /&gt;
|&#039;&#039;not&#039;&#039; LTS&amp;lt;ref name=&amp;quot;ubuntu-lts&amp;quot;&amp;gt;Ubuntu releases that are not Long-Term-Support have a [https://wiki.ubuntu.com/Releases short life cycle]. Xiph.org will stop offering updated packages for those some time after Canonical/the Ubuntu Project end their support.&amp;lt;/ref&amp;gt;!&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 17.10 (artful)&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;sudo sh -c &amp;quot;echo deb http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_17.10/ ./ &amp;gt;&amp;gt;/etc/apt/sources.list.d/icecast.list&amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_17.10/ repository]&lt;br /&gt;
|&#039;&#039;not&#039;&#039; LTS&amp;lt;ref name=&amp;quot;ubuntu-lts&amp;quot;/&amp;gt;!&lt;br /&gt;
|-&lt;br /&gt;
|source package, any deb distro&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;sudo sh -c &amp;quot;echo deb-src http://download.opensuse.org/repositories/multimedia:/xiph/Debian_8.0/ ./ &amp;gt;&amp;gt;/etc/apt/sources.list.d/icecast.list&amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/Debian_8.0/ repository]&lt;br /&gt;
| actually available for &#039;&#039;all&#039;&#039; repository URLs&lt;br /&gt;
|-&lt;br /&gt;
|Linux Mint:&lt;br /&gt;
|Use the information listed above for the [https://en.wikipedia.org/wiki/List_of_Linux_Mint_releases#Release_history corresponding Ubuntu release].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Import the &#039;&#039;Multimedia&#039;&#039; signing key ====&lt;br /&gt;
You need to add the [http://icecast.org/multimedia-obs.key openSUSE OBS &#039;&#039;&#039;Multimedia&#039;&#039;&#039; signing key] as a Trusted Key to your system.&lt;br /&gt;
&lt;br /&gt;
There are many ways to verify this key, e.g. by a simple web search.&lt;br /&gt;
&lt;br /&gt;
After downloading the key, you can run this command to verify your copy:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;gpg multimedia-obs.key&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It should yield:&lt;br /&gt;
&lt;br /&gt;
 pub   rsa2048 2017-11-21 [SC] [expires: 2020-01-30]&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;      0E313DB7936B4E76E720065B77EC2301F23C6AA3&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 uid   multimedia OBS Project &amp;lt;multimedia@build.opensuse.org&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you can add the key to your system&#039;s Trusted Keys using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;sudo apt-key add multimedia-obs.key&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The simplest way (but not very secure, since you&#039;re not checking the key) is to add the key with one command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;wget -qO - http://icecast.org/multimedia-obs.key | sudo apt-key add -&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Update your repository index ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;sudo apt-get update&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==== Step 4: Install Icecast ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;sudo apt-get install icecast2&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== RedHat and its derivatives ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Distribution Release&lt;br /&gt;
!Command&lt;br /&gt;
!Repository&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|EPEL5 (RHEL 5/CentOS 5)&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/CentOS_5 repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|EPEL6 (RHEL 6/CentOS 6)&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/CentOS_6 repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|EPEL7 (RHEL 7/CentOS 7)&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/CentOS_7 repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Fedora 22&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/Fedora_22 repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Fedora 23&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/Fedora_23 repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== openSUSE ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Distribution Release&lt;br /&gt;
!Command&lt;br /&gt;
!Repository&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|SUSE Linux Enterprise 11.3&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/SLE_11_SP3 repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|SUSE Linux Enterprise 11.4&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/SLE_11_SP4 repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|SUSE Linux Enterprise 12&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/SLE_12 repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|openSUSE 13.1&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/openSUSE_13.1 repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|openSUSE 13.2&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/openSUSE_13.2 repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|openSUSE Leap 42.1&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/openSUSE_Leap_42.1 repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|openSUSE Tumbleweed&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/openSUSE_Tumbleweed repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Footnotes ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
[[Category: Icecast]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Icecast_Server/Installing_latest_version_(official_Xiph_repositories)&amp;diff=16651</id>
		<title>Icecast Server/Installing latest version (official Xiph repositories)</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Icecast_Server/Installing_latest_version_(official_Xiph_repositories)&amp;diff=16651"/>
		<updated>2017-11-23T11:31:42Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* Debian and Ubuntu (in all its flavors) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Xiph.org provides the latest version of Icecast packaged for [https://build.opensuse.org/package/repositories/multimedia:xiph/icecast various distributions]. The packages are built centrally from [https://build.opensuse.org/package/show/multimedia:xiph/icecast one set of sources] on the [https://build.opensuse.org/ openSUSE OpenBuildService instance] in the [https://build.opensuse.org/project/show/multimedia:xiph Multimedia/Xiph.org project].&lt;br /&gt;
&lt;br /&gt;
Packages are usually available on release day. Packaging follows closely the original distro packaging to stay a seamless drop in replacement. The packages are meant for users who need the latest version of Icecast or HTTPS support, while their distribution doesn&#039;t provide it.&lt;br /&gt;
&lt;br /&gt;
== Debian and Ubuntu (in all its flavors) ==&lt;br /&gt;
It takes 4 simple commands to install the latest Icecast version on a deb based distro.&lt;br /&gt;
&lt;br /&gt;
==== Step 1: Add the repository ====&lt;br /&gt;
This expects that you have &#039;&#039;&#039;sudo&#039;&#039;&#039; installed. If not, open a root shell and run the &#039;&#039;&#039;echo&#039;&#039;&#039; command directly.&lt;br /&gt;
&lt;br /&gt;
Copy and paste the command for your distribution release and make sure that it&#039;s executed as &#039;&#039;&#039;one&#039;&#039;&#039; line!&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Distribution Release&lt;br /&gt;
!Command&lt;br /&gt;
!Repository&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|Debian 8.0 (jessie)&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;sudo sh -c &amp;quot;echo deb http://download.opensuse.org/repositories/multimedia:/xiph/Debian_8.0/ ./ &amp;gt;&amp;gt;/etc/apt/sources.list.d/icecast.list&amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/Debian_8.0/ repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Debian 7.0 (wheezy)&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;sudo sh -c &amp;quot;echo deb http://download.opensuse.org/repositories/multimedia:/xiph/Debian_7.0/ ./ &amp;gt;&amp;gt;/etc/apt/sources.list.d/icecast.list&amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/Debian_7.0/ repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Debian 6.0 (squeeze)&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;sudo sh -c &amp;quot;echo deb http://download.opensuse.org/repositories/multimedia:/xiph/Debian_6.0/ ./ &amp;gt;&amp;gt;/etc/apt/sources.list.d/icecast.list&amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/Debian_6.0/ repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 14.04 (trusty)&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;sudo sh -c &amp;quot;echo deb http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_14.04/ ./ &amp;gt;&amp;gt;/etc/apt/sources.list.d/icecast.list&amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_14.04/ repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 15.04 (vivid)&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;sudo sh -c &amp;quot;echo deb http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_15.04/ ./ &amp;gt;&amp;gt;/etc/apt/sources.list.d/icecast.list&amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_15.04/ repository]&lt;br /&gt;
|&#039;&#039;not&#039;&#039; LTS&amp;lt;ref name=&amp;quot;ubuntu-lts&amp;quot;&amp;gt;Ubuntu releases that are not Long-Term-Support have a [https://wiki.ubuntu.com/Releases short life cycle]. Xiph.org will stop offering updated packages for those some time after Canonical/the Ubuntu Project end their support.&amp;lt;/ref&amp;gt;!&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 15.10 (wily)&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;sudo sh -c &amp;quot;echo deb http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_15.10/ ./ &amp;gt;&amp;gt;/etc/apt/sources.list.d/icecast.list&amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_15.10/ repository]&lt;br /&gt;
|&#039;&#039;not&#039;&#039; LTS&amp;lt;ref name=&amp;quot;ubuntu-lts&amp;quot;/&amp;gt;!&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 16.04 (xenial)&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;sudo sh -c &amp;quot;echo deb http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_16.04/ ./ &amp;gt;&amp;gt;/etc/apt/sources.list.d/icecast.list&amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_16.04/ repository]&lt;br /&gt;
|LTS&amp;lt;ref name=&amp;quot;ubuntu-lts&amp;quot;/&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 17.04 (zesty)&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;sudo sh -c &amp;quot;echo deb http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_17.04/ ./ &amp;gt;&amp;gt;/etc/apt/sources.list.d/icecast.list&amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_17.04/ repository]&lt;br /&gt;
|&#039;&#039;not&#039;&#039; LTS&amp;lt;ref name=&amp;quot;ubuntu-lts&amp;quot;&amp;gt;Ubuntu releases that are not Long-Term-Support have a [https://wiki.ubuntu.com/Releases short life cycle]. Xiph.org will stop offering updated packages for those some time after Canonical/the Ubuntu Project end their support.&amp;lt;/ref&amp;gt;!&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 17.10 (artful)&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;sudo sh -c &amp;quot;echo deb http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_17.10/ ./ &amp;gt;&amp;gt;/etc/apt/sources.list.d/icecast.list&amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_17.10/ repository]&lt;br /&gt;
|&#039;&#039;not&#039;&#039; LTS&amp;lt;ref name=&amp;quot;ubuntu-lts&amp;quot;/&amp;gt;!&lt;br /&gt;
|-&lt;br /&gt;
|source package, any deb distro&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;sudo sh -c &amp;quot;echo deb-src http://download.opensuse.org/repositories/multimedia:/xiph/Debian_8.0/ ./ &amp;gt;&amp;gt;/etc/apt/sources.list.d/icecast.list&amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/Debian_8.0/ repository]&lt;br /&gt;
| actually available for &#039;&#039;all&#039;&#039; repository URLs&lt;br /&gt;
|-&lt;br /&gt;
|Linux Mint:&lt;br /&gt;
|Use the information listed above for the [https://en.wikipedia.org/wiki/List_of_Linux_Mint_releases#Release_history corresponding Ubuntu release].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Import the &#039;&#039;Multimedia&#039;&#039; signing key ====&lt;br /&gt;
You need to add the [http://icecast.org/multimedia-obs.key openSUSE OBS &#039;&#039;&#039;Multimedia&#039;&#039;&#039; signing key] as a trusted key to your system.&lt;br /&gt;
&lt;br /&gt;
There are many ways to verify this key, e.g. by a simple web search.&lt;br /&gt;
&lt;br /&gt;
After downloading the key, you can run this command to verify your copy:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;gpg multimedia-obs.key&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It should yield:&lt;br /&gt;
&lt;br /&gt;
 pub   rsa2048 2017-11-21 [SC] [expires: 2020-01-30]&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;      0E313DB7936B4E76E720065B77EC2301F23C6AA3&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 uid   multimedia OBS Project &amp;lt;multimedia@build.opensuse.org&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you can add the key to your system&#039;s Trusted Keys using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;sudo apt-key add multimedia-obs.key&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The simplest way (but not very secure, since you&#039;re not checking the key) is to add the key with one command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;wget -qO - http://icecast.org/multimedia-obs.key | sudo apt-key add -&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Update your repository index ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;sudo apt-get update&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==== Step 4: Install Icecast ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;sudo apt-get install icecast2&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== RedHat and its derivatives ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Distribution Release&lt;br /&gt;
!Command&lt;br /&gt;
!Repository&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|EPEL5 (RHEL 5/CentOS 5)&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/CentOS_5 repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|EPEL6 (RHEL 6/CentOS 6)&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/CentOS_6 repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|EPEL7 (RHEL 7/CentOS 7)&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/CentOS_7 repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Fedora 22&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/Fedora_22 repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Fedora 23&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/Fedora_23 repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== openSUSE ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Distribution Release&lt;br /&gt;
!Command&lt;br /&gt;
!Repository&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|SUSE Linux Enterprise 11.3&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/SLE_11_SP3 repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|SUSE Linux Enterprise 11.4&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/SLE_11_SP4 repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|SUSE Linux Enterprise 12&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/SLE_12 repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|openSUSE 13.1&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/openSUSE_13.1 repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|openSUSE 13.2&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/openSUSE_13.2 repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|openSUSE Leap 42.1&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/openSUSE_Leap_42.1 repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|openSUSE Tumbleweed&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/openSUSE_Tumbleweed repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Footnotes ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
[[Category: Icecast]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Icecast_Server/Installing_latest_version_(official_Xiph_repositories)&amp;diff=16649</id>
		<title>Icecast Server/Installing latest version (official Xiph repositories)</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Icecast_Server/Installing_latest_version_(official_Xiph_repositories)&amp;diff=16649"/>
		<updated>2017-11-22T17:35:57Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* Import the Multimedia signing key */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Xiph.org provides the latest version of Icecast packaged for [https://build.opensuse.org/package/repositories/multimedia:xiph/icecast various distributions]. The packages are built centrally from [https://build.opensuse.org/package/show/multimedia:xiph/icecast one set of sources] on the [https://build.opensuse.org/ openSUSE OpenBuildService instance] in the [https://build.opensuse.org/project/show/multimedia:xiph Multimedia/Xiph.org project].&lt;br /&gt;
&lt;br /&gt;
Packages are usually available on release day. Packaging follows closely the original distro packaging to stay a seamless drop in replacement. The packages are meant for users who need the latest version of Icecast or HTTPS support, while their distribution doesn&#039;t provide it.&lt;br /&gt;
&lt;br /&gt;
== Debian and Ubuntu (in all its flavors) ==&lt;br /&gt;
It takes 4 simple commands to install the latest Icecast version on a deb based distro.&lt;br /&gt;
&lt;br /&gt;
==== Add the repository ====&lt;br /&gt;
This expects that you have &#039;&#039;sudo&#039;&#039; installed, if not, open a root shell and run the &#039;&#039;echo&#039;&#039; command directly.&lt;br /&gt;
&lt;br /&gt;
Copy paste the command for your distribution release and make sure that it&#039;s executed as &#039;&#039;&#039;one&#039;&#039;&#039; line!&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Distribution Release&lt;br /&gt;
!Command&lt;br /&gt;
!Repository&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|Debian 8.0 (jessie)&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;sudo sh -c &amp;quot;echo deb http://download.opensuse.org/repositories/multimedia:/xiph/Debian_8.0/ ./ &amp;gt;&amp;gt;/etc/apt/sources.list.d/icecast.list&amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/Debian_8.0/ repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Debian 7.0 (wheezy)&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;sudo sh -c &amp;quot;echo deb http://download.opensuse.org/repositories/multimedia:/xiph/Debian_7.0/ ./ &amp;gt;&amp;gt;/etc/apt/sources.list.d/icecast.list&amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/Debian_7.0/ repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Debian 6.0 (squeeze)&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;sudo sh -c &amp;quot;echo deb http://download.opensuse.org/repositories/multimedia:/xiph/Debian_6.0/ ./ &amp;gt;&amp;gt;/etc/apt/sources.list.d/icecast.list&amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/Debian_6.0/ repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 14.04 (trusty)&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;sudo sh -c &amp;quot;echo deb http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_14.04/ ./ &amp;gt;&amp;gt;/etc/apt/sources.list.d/icecast.list&amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_14.04/ repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 15.04 (vivid)&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;sudo sh -c &amp;quot;echo deb http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_15.04/ ./ &amp;gt;&amp;gt;/etc/apt/sources.list.d/icecast.list&amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_15.04/ repository]&lt;br /&gt;
|&#039;&#039;not&#039;&#039; LTS&amp;lt;ref name=&amp;quot;ubuntu-lts&amp;quot;&amp;gt;Ubuntu releases that are not Long-Term-Support have a [https://wiki.ubuntu.com/Releases short life cycle]. Xiph.org will stop offering updated packages for those some time after Canonical/the Ubuntu Project end their support.&amp;lt;/ref&amp;gt;!&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 15.10 (wily)&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;sudo sh -c &amp;quot;echo deb http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_15.10/ ./ &amp;gt;&amp;gt;/etc/apt/sources.list.d/icecast.list&amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_15.10/ repository]&lt;br /&gt;
|&#039;&#039;not&#039;&#039; LTS&amp;lt;ref name=&amp;quot;ubuntu-lts&amp;quot;/&amp;gt;!&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 16.04 (xenial)&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;sudo sh -c &amp;quot;echo deb http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_16.04/ ./ &amp;gt;&amp;gt;/etc/apt/sources.list.d/icecast.list&amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_16.04/ repository]&lt;br /&gt;
|LTS&amp;lt;ref name=&amp;quot;ubuntu-lts&amp;quot;/&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 17.04 (zesty)&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;sudo sh -c &amp;quot;echo deb http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_17.04/ ./ &amp;gt;&amp;gt;/etc/apt/sources.list.d/icecast.list&amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_17.04/ repository]&lt;br /&gt;
|&#039;&#039;not&#039;&#039; LTS&amp;lt;ref name=&amp;quot;ubuntu-lts&amp;quot;&amp;gt;Ubuntu releases that are not Long-Term-Support have a [https://wiki.ubuntu.com/Releases short life cycle]. Xiph.org will stop offering updated packages for those some time after Canonical/the Ubuntu Project end their support.&amp;lt;/ref&amp;gt;!&lt;br /&gt;
|-&lt;br /&gt;
|Ubuntu 17.10 (artful)&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;sudo sh -c &amp;quot;echo deb http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_17.10/ ./ &amp;gt;&amp;gt;/etc/apt/sources.list.d/icecast.list&amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_17.10/ repository]&lt;br /&gt;
|&#039;&#039;not&#039;&#039; LTS&amp;lt;ref name=&amp;quot;ubuntu-lts&amp;quot;/&amp;gt;!&lt;br /&gt;
|-&lt;br /&gt;
|source package, any deb distro&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;sudo sh -c &amp;quot;echo deb-src http://download.opensuse.org/repositories/multimedia:/xiph/Debian_8.0/ ./ &amp;gt;&amp;gt;/etc/apt/sources.list.d/icecast.list&amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/Debian_8.0/ repository]&lt;br /&gt;
| actually available for &#039;&#039;all&#039;&#039; repository URLs&lt;br /&gt;
|-&lt;br /&gt;
|Linux Mint:&lt;br /&gt;
|Use the information listed above for the [https://en.wikipedia.org/wiki/List_of_Linux_Mint_releases#Release_history corresponding Ubuntu release].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Import the &#039;&#039;Multimedia&#039;&#039; signing key ====&lt;br /&gt;
You need to add the [http://icecast.org/multimedia-obs.key openSUSE OBS &#039;&#039;&#039;Multimedia&#039;&#039;&#039; signing key] as a trusted key to your system.&lt;br /&gt;
&lt;br /&gt;
There are many ways to verify this key, e.g. by a simple web search.&lt;br /&gt;
&lt;br /&gt;
After downloading the key, you can run this command to verify your copy:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;gpg multimedia-obs.key&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It should yield:&lt;br /&gt;
&lt;br /&gt;
 pub   rsa2048 2017-11-21 [SC] [expires: 2020-01-30]&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;      0E313DB7936B4E76E720065B77EC2301F23C6AA3&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 uid   multimedia OBS Project &amp;lt;multimedia@build.opensuse.org&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you can the key to your system&#039;s Trusted Keys, using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-key add multimedia-obs.key&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The most simple way (but not very secure, since you&#039;re not checking the key) is to add the key with one command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;wget -qO - http://icecast.org/multimedia-obs.key | sudo apt-key add -&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Update repository index ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;sudo apt-get update&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
==== Install Icecast ====&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;sudo apt-get install icecast2&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== RedHat and its derivatives ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Distribution Release&lt;br /&gt;
!Command&lt;br /&gt;
!Repository&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|EPEL5 (RHEL 5/CentOS 5)&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/CentOS_5 repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|EPEL6 (RHEL 6/CentOS 6)&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/CentOS_6 repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|EPEL7 (RHEL 7/CentOS 7)&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/CentOS_7 repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Fedora 22&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/Fedora_22 repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Fedora 23&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/Fedora_23 repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== openSUSE ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Distribution Release&lt;br /&gt;
!Command&lt;br /&gt;
!Repository&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|SUSE Linux Enterprise 11.3&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/SLE_11_SP3 repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|SUSE Linux Enterprise 11.4&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/SLE_11_SP4 repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|SUSE Linux Enterprise 12&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/SLE_12 repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|openSUSE 13.1&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/openSUSE_13.1 repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|openSUSE 13.2&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/openSUSE_13.2 repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|openSUSE Leap 42.1&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/openSUSE_Leap_42.1 repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|openSUSE Tumbleweed&lt;br /&gt;
|&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|[http://download.opensuse.org/repositories/multimedia:/xiph/openSUSE_Tumbleweed repository]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Footnotes ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
[[Category: Icecast]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=OggKate&amp;diff=16647</id>
		<title>OggKate</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=OggKate&amp;diff=16647"/>
		<updated>2017-11-21T09:32:05Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* Frequently Asked Questions */ linkify Pango and Cairo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Disclaimer ==&lt;br /&gt;
This is not a Xiph codec, though it may be embedded in Ogg alonside other Xiph&lt;br /&gt;
codecs, such as Vorbis and Theora. As such, please do not assume that Xiph has&lt;br /&gt;
anything to do with this, much less responsibility.&lt;br /&gt;
&lt;br /&gt;
==  What is Kate? ==&lt;br /&gt;
&lt;br /&gt;
Kate is an overlay codec, originally designed for karaoke and text, that can be&lt;br /&gt;
multiplexed in Ogg.&lt;br /&gt;
&lt;br /&gt;
Text and images can be carried and animated by a Kate stream.&lt;br /&gt;
Most of the time, they will (optionally) be multiplexed with audio/video to carry subtitles,&lt;br /&gt;
song lyrics (with or without karaoke data), etc.&lt;br /&gt;
&lt;br /&gt;
Series of curves (splines, segments, etc) may be attached to various properties&lt;br /&gt;
(text position, font size, etc) to create animated overlays. This allows scrolling&lt;br /&gt;
or fading text to be defined. This can even be used to draw arbitrary shapes, so&lt;br /&gt;
hand drawing can also be represented by a Kate stream.&lt;br /&gt;
&lt;br /&gt;
Example uses of Kate streams are movie subtitles for Theora videos, either text based,&lt;br /&gt;
as may be created by [http://www.v2v.cc/~j/ffmpeg2theora ffmpeg2theora], or image&lt;br /&gt;
based, such as created by [http://thoggen.net Thoggen] (patching needed), and lyrics,&lt;br /&gt;
as created by oggenc, from vorbis-tools.&lt;br /&gt;
&lt;br /&gt;
== Why a new codec? ==&lt;br /&gt;
&lt;br /&gt;
As I was adding support for Theora, Speex and FLAC to some software of mine, I found myself&lt;br /&gt;
wanting to have song lyrics accompanying Vorbis audio. Since Vorbis comments are limited to&lt;br /&gt;
the headers, one can&#039;t add them in the stream as they are sung, so another multiplexed stream&lt;br /&gt;
would be needed to carry them.&lt;br /&gt;
&lt;br /&gt;
The three possible bases usable for such a codec I found were Writ, CMML, and OGM/SRT.&lt;br /&gt;
&lt;br /&gt;
*[[OggWrit|Writ]] is an unmaintained start at an implementation of a very basic design, though I did find an encoder/decoder in py-ogg2 later on - I&#039;d been quicker to write Kate from scratch anyway.&lt;br /&gt;
*[[CMML]] is more geared towards encapsulating metadata about an accompanying stream, rather than being a data stream itself, and seemed complex for a simple use, though I have now revised my view on this - besides, it seems designed for Annodex (which I haven&#039;t had a look at), though it does seems relatively generic for use outwith Annodex - though it is being &amp;quot;repurposed&amp;quot; as timed text now, bringing it closer to what I&#039;m doing&lt;br /&gt;
*OGM/SRT, which I only found when I added Kate support to MPlayer, is shoehorning various data formats into an Ogg stream, and just dumps the SRT subtitle format as is, AFAICS (though I haven&#039;t looked at this one in detail, since I&#039;d already had a working Kate implementation by that time)&lt;br /&gt;
&lt;br /&gt;
I then decided to roll my own, not least because it&#039;s a fun thing to do.&lt;br /&gt;
&lt;br /&gt;
I found other formats, such as USF (designed for inclusion in Matroska) and various subtitle formats,&lt;br /&gt;
but none were designed for embedding inside an Ogg container.&lt;br /&gt;
&lt;br /&gt;
== Overview of the Kate bitstream format ==&lt;br /&gt;
&lt;br /&gt;
I&#039;ve taken much inspiration from Vorbis and Theora here.&lt;br /&gt;
Headers and packets (as well as the API design) follow the design of these two codecs.&lt;br /&gt;
&lt;br /&gt;
A rough overview (see [[#Format specification|Format specification]] for more details) is:&lt;br /&gt;
&lt;br /&gt;
Headers packets:&lt;br /&gt;
*ID header [BOS]: magic, version, granule fraction, encoding, language, etc&lt;br /&gt;
*Comment header: Vorbis comments, as per Vorbis/Theora streams&lt;br /&gt;
*Style definitions header: a list of predefined styles to be referred to by data packets&lt;br /&gt;
*Region definitions header: a list of predefined regions to be referred to by data packets&lt;br /&gt;
*Curves definitions header: a list of predefined curves to be referred to by data packets&lt;br /&gt;
*Motion definitions header: a list of predefined motions to be referred to by data packets&lt;br /&gt;
*Palette definitions header: a list of predefined palettes to be referred to by data packets&lt;br /&gt;
*Bitmap definitions header: a list of predefined bitmaps to be referred to by data packets&lt;br /&gt;
*Font mapping definitions header: a list of predefined font mappings to be referred to by data packets&lt;br /&gt;
&lt;br /&gt;
Other header packets are ignored, and left for future expansion.&lt;br /&gt;
&lt;br /&gt;
Data packets:&lt;br /&gt;
*text data: text/image and optional motions, accompanied by optional overrides for style, region, language, etc&lt;br /&gt;
*keepalive: can be emitted at any time to help a demuxer know where we&#039;re at, but those packets are optional&lt;br /&gt;
*repeats: a verbatim repeat of a text packet&#039;s payload, in order to bound any backward seeking needed when starting to play a stream partway through. These are also optional.&lt;br /&gt;
*end data [EOS]: marks the end of the stream, it doesn&#039;t have any useful payload&lt;br /&gt;
&lt;br /&gt;
Other data packets are ignored, and left for future expansion.&lt;br /&gt;
&lt;br /&gt;
The intent of the &amp;quot;keepalive&amp;quot; packet is to be sent at regular&lt;br /&gt;
intervals when no other packet has been emitted for a while. This would be to help seeking code&lt;br /&gt;
find a kate page more easily.&lt;br /&gt;
&lt;br /&gt;
Things of note:&lt;br /&gt;
*Kate is a discontinuous codec, as defined in [http://www.xiph.org/ogg/doc/ogg-multiplex.html ogg-multiplex.html] in the Ogg documentation, which means it&#039;s timed by start granule, not end granule (as Theora and Vorbis).&lt;br /&gt;
* All data packets are on their own page, for two reasons:&lt;br /&gt;
**Ogg keeps track of granules at the page level, not the packet level&lt;br /&gt;
**if no text event happens for a while after a particular text event, we don&#039;t want to delay it so a larger page can be issued&lt;br /&gt;
&lt;br /&gt;
See also [[#Seeking and memory|Problems to solve: Seeking and memory]].&lt;br /&gt;
&lt;br /&gt;
*The granule encoding is not a direct time/granule correspondance, see the granule encoding section.&lt;br /&gt;
*The EOS packet should have a granule pos higher or equal to the end time of all events.&lt;br /&gt;
*User code doesn&#039;t have to know the number of headers to expect, this is moved inside the library code (as opposed to Vorbis and Theora).&lt;br /&gt;
*The format contains hooks so that additional information may be added in future revisions while keeping backward compatibility (though old decoders will correctly parse, but ignore the new information).&lt;br /&gt;
&lt;br /&gt;
== Format specification ==&lt;br /&gt;
&lt;br /&gt;
The Kate bitstream format consists of a number of sequential packets.&lt;br /&gt;
Packets can be either header packets or data packets. All header packets&lt;br /&gt;
must appear before any data packet.&lt;br /&gt;
&lt;br /&gt;
Header packets must appear in order. Decoding of a data packet is not&lt;br /&gt;
possible until all header packets have been decoded.&lt;br /&gt;
&lt;br /&gt;
Each Kate packet starts with a one byte type. A type with the MSB set&lt;br /&gt;
(eg, between 0x80 and 0xff) indicates a header packet, while a type with&lt;br /&gt;
the MSB cleared (eg, between 0x00 and 0x7f) indicates a data packet.&lt;br /&gt;
All header packets then have the Kate magic, from byte offset 1 to byte&lt;br /&gt;
offset 7 (&amp;quot;kate\0\0\0&amp;quot;). Note that this applies only to header packets:&lt;br /&gt;
data packets do not contain the Kate signature.&lt;br /&gt;
&lt;br /&gt;
Since the ID header must appear first, a Kate stream can be recognized&lt;br /&gt;
by comparing the first eight bytes of the first packet with the signature&lt;br /&gt;
string &amp;quot;\200kate\0\0\0&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
When embedded in Ogg,the first packet in a Kate stream (always packet type 0x80,&lt;br /&gt;
the id header packet) must be placed on a separate page. The corresponding Ogg&lt;br /&gt;
packet must be marked as beginning of stream (BOS).All subsequent header packets&lt;br /&gt;
must be on one or more pages. Subsequently, each data packet must be on a separate&lt;br /&gt;
page.&lt;br /&gt;
&lt;br /&gt;
The last data packet must be the end of stream packet (packet type 0x7f).&lt;br /&gt;
&lt;br /&gt;
When embedded in Ogg, the corresponding Ogg packet must be marked as end of stream (EOS).&lt;br /&gt;
&lt;br /&gt;
As per the Ogg specification, granule positions must be non decreasing&lt;br /&gt;
within the stream. Header packets have granule position 0.&lt;br /&gt;
&lt;br /&gt;
Currently existing packet types are:&lt;br /&gt;
:headers:&lt;br /&gt;
::0x80  ID header (BOS)&lt;br /&gt;
::0x81  Vorbis comment header&lt;br /&gt;
::0x82  regions list header&lt;br /&gt;
::0x83  styles list header&lt;br /&gt;
::0x84  curves list header&lt;br /&gt;
::0x85  motions list header&lt;br /&gt;
::0x86  palettes list header&lt;br /&gt;
::0x87  bitmaps list header&lt;br /&gt;
::0x88  font ranges and mappings header&lt;br /&gt;
:data:&lt;br /&gt;
::0x00 text data (including optional motions and overrides)&lt;br /&gt;
::0x01 keepalive&lt;br /&gt;
::0x02 repeat&lt;br /&gt;
::0x7f end packet (EOS)&lt;br /&gt;
&lt;br /&gt;
This format described here is for bitstream version 0.x.&lt;br /&gt;
As or 19 december 2008, the latest bitstream version is 0.4.&lt;br /&gt;
&lt;br /&gt;
For more detailed information, refer to the format documentation&lt;br /&gt;
in libkate (see URL below in the [[#Downloading|Downlading]] section).&lt;br /&gt;
&lt;br /&gt;
Following is the definition of the ID header (packet type 0x80).&lt;br /&gt;
This works out to a 64 byte ID header. This is the header that should be&lt;br /&gt;
used to detect a Kate stream within an Ogg stream.&lt;br /&gt;
&lt;br /&gt;
  0               1               2               3              |&lt;br /&gt;
  0                   1                   2                   3&lt;br /&gt;
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1| Byte&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | packtype      | Identifier char[7]: &#039;kate\0\0\0&#039;              | 0-3&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | kate magic continued                                          | 4-7&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | reserved - 0  | version major | version minor | num headers   | 8-11&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | text encoding | directionality| reserved - 0  | granule shift | 12-15&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | cw sh |  canvas width         | ch sh | canvas height         | 16-19&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | reserved - 0                                                  | 20-23&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | granule rate numerator                                        | 24-27&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | granule rate denominator                                      | 28-31&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | language (NUL terminated)                                     | 32-35&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | language (continued)                                          | 36-39&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | language (continued)                                          | 40-43&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | language (continued)                                          | 44-47&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | category (NUL terminated)                                     | 48-51&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | category (continued)                                          | 52-55&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | category (continued)                                          | 56-59&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | category (continued)                                          | 60-63&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
The fields cw sh, canvas width, cw sh, and canvas height were introduced&lt;br /&gt;
in bistream 0.3. Earlier bitstreams will have 0 in these fields.&lt;br /&gt;
&lt;br /&gt;
language and category are NUL terminating ASCII strings.&lt;br /&gt;
Language follows RFC 3066, though obviously will not accommodate language tags&lt;br /&gt;
with lots of subtags.&lt;br /&gt;
&lt;br /&gt;
Category is currently loosely defined, and I haven&#039;t found yet a nice way to&lt;br /&gt;
present it in a generic way, but is meant for automatic classifying of&lt;br /&gt;
various multiplexed Kate streams (eg, to recognize that some streams are&lt;br /&gt;
subtitles (in a set of languages), and some others are commentary (in a&lt;br /&gt;
possibly different set of languages, etc).&lt;br /&gt;
&lt;br /&gt;
== API overview ==&lt;br /&gt;
&lt;br /&gt;
libkate offers an API very similar to that of libvorbis and libtheora, as well as&lt;br /&gt;
an extra higher level decoding API.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an overview of the three main modules:&lt;br /&gt;
&lt;br /&gt;
=== Decoding ===&lt;br /&gt;
&lt;br /&gt;
Decoding is done in a way similar to libvorbis. First, initialize a kate_info and a&lt;br /&gt;
kate_comment structure. Then, read headers by calling kate_decode_headerin. Once&lt;br /&gt;
all headers have been read, a kate_state is initialized for decoding using kate_decode_init,&lt;br /&gt;
and kate_decode_packetin is called repeatedly with data packets. Events (eg, text) can be&lt;br /&gt;
retrieved via kate_decode_eventout.&lt;br /&gt;
&lt;br /&gt;
=== Encoding ===&lt;br /&gt;
&lt;br /&gt;
Encoding is also done in a way similar to libvorbis. First initialize a kate_info&lt;br /&gt;
and a kate_comment structure, and fill them out as needed. kate_encode_headers will&lt;br /&gt;
create ogg packets from those. Then, kate_encode_text is called repeatedly for all&lt;br /&gt;
the text events to add. When done, calling kate_encode_finish will create an end of&lt;br /&gt;
stream packet.&lt;br /&gt;
&lt;br /&gt;
=== High level decoding API ===&lt;br /&gt;
&lt;br /&gt;
There are only 3 calls here:&lt;br /&gt;
&lt;br /&gt;
 kate_high_decode_init&lt;br /&gt;
 kate_high_decode_packetin&lt;br /&gt;
 kate_high_decode_clear&lt;br /&gt;
&lt;br /&gt;
Here, all Ogg packets are sent to kate_high_decode_packetin, which does the right&lt;br /&gt;
thing (header/data classification, decoding, and event retrieval). Note that you&lt;br /&gt;
do not get access to the comments directly using this, but you do get access to the&lt;br /&gt;
kate_info via events.&lt;br /&gt;
&lt;br /&gt;
The libkate distribution includes commented examples for each of those.&lt;br /&gt;
&lt;br /&gt;
Additionally, libkate includes a layer (liboggkate) to make it easier to use when&lt;br /&gt;
embedded in Ogg. While the normal API uses kate_packet structures, liboggkate uses&lt;br /&gt;
ogg_packet structures.&lt;br /&gt;
&lt;br /&gt;
The High level decoding API does not have an Ogg specific layer, but functions exist&lt;br /&gt;
to wrap a kate_packet around a memory buffer (such as the one ogg_packet uses, for instance).&lt;br /&gt;
&lt;br /&gt;
== Support ==&lt;br /&gt;
&lt;br /&gt;
Among the software with Kate support:&lt;br /&gt;
*VLC&lt;br /&gt;
*ffmpeg2theora&lt;br /&gt;
*liboggz&lt;br /&gt;
*liboggplay&lt;br /&gt;
*Cortado (wikimedia version)&lt;br /&gt;
*vorbis-tools&lt;br /&gt;
&lt;br /&gt;
I have patches for the following with Kate support:&lt;br /&gt;
*MPlayer&lt;br /&gt;
*xine&lt;br /&gt;
*GStreamer&lt;br /&gt;
*Thoggen&lt;br /&gt;
*Audacious&lt;br /&gt;
*and more...&lt;br /&gt;
&lt;br /&gt;
These may be found in the libkate source distribution (see [[#Downloading|Downloading]]&lt;br /&gt;
for links).&lt;br /&gt;
&lt;br /&gt;
In addition, libtiger is a rendering library for Kate streams using Pango and Cairo,&lt;br /&gt;
though it is not quite yet API stable (though no major changes are expected).&lt;br /&gt;
&lt;br /&gt;
== Granule encoding ==&lt;br /&gt;
&lt;br /&gt;
=== Ogg ===&lt;br /&gt;
&lt;br /&gt;
Ogg leaves the encoding of granules up to a particular codec, only&lt;br /&gt;
mandating that granules be non decreasing with time.&lt;br /&gt;
&lt;br /&gt;
The Kate bitstream format uses a linear mapping between time and&lt;br /&gt;
granule, described here.&lt;br /&gt;
&lt;br /&gt;
A Kate granule position is composed of two different parts:&lt;br /&gt;
 - a base granule, in the high bits&lt;br /&gt;
 - a granule offset, in the low bits&lt;br /&gt;
&lt;br /&gt;
 +----------------+----------------+&lt;br /&gt;
 | base           | offset         |&lt;br /&gt;
 +----------------+----------------+&lt;br /&gt;
&lt;br /&gt;
The number of bits these parts occupy is variable, and each stream&lt;br /&gt;
may choose how many bits to dedicate to each. The kate_info structure&lt;br /&gt;
for a stream holds that information in the granule_shift field,&lt;br /&gt;
so each part may be reconstructed from a granulepos.&lt;br /&gt;
&lt;br /&gt;
The timestamp T of a given Kate packet is split into a base B and&lt;br /&gt;
offset O, and these are stored in the granulepos of that packet.&lt;br /&gt;
The split is done such that the B is the time of the earliest event&lt;br /&gt;
still active at the time, and the O is the time elapsed between B&lt;br /&gt;
and T. Thus, T = B + O. This mimics the way Theora stores its own&lt;br /&gt;
timestamps in granulepos, where the base acts as a keyframe, and&lt;br /&gt;
an offset acts as the position of an intra frame from the previous&lt;br /&gt;
keyframe. Since Kate allows time overlapping events, however, the&lt;br /&gt;
choice of the base to use is slightly more complex, as it may not&lt;br /&gt;
be the starting time of the previous event, if the stream contains&lt;br /&gt;
time overlapping events.&lt;br /&gt;
&lt;br /&gt;
The kate_info structure for a stream holds a rational fraction&lt;br /&gt;
representing the time span of granule units for both the base and&lt;br /&gt;
the offset parts.&lt;br /&gt;
&lt;br /&gt;
The granule rate is defined by the two fields:&lt;br /&gt;
&lt;br /&gt;
 kate_info::gps_numerator&lt;br /&gt;
 kate_info::gps_denominator&lt;br /&gt;
&lt;br /&gt;
The number of bits reserved for the offset is defined by the field:&lt;br /&gt;
&lt;br /&gt;
 kate_info::granule_shift&lt;br /&gt;
&lt;br /&gt;
=== Generic timing ===&lt;br /&gt;
&lt;br /&gt;
Kate data packets (data packet type 0) includes timing information (start time,&lt;br /&gt;
end time, and time of the earliest event still active). All these are stored as&lt;br /&gt;
64 bit at the rate defined by the granule rate, so they do not suffer from the&lt;br /&gt;
granule_shift space limitation.&lt;br /&gt;
&lt;br /&gt;
This also allows for Kate streams to be stored in other containers.&lt;br /&gt;
&lt;br /&gt;
== Motion ==&lt;br /&gt;
&lt;br /&gt;
The Kate bitstream format includes motion definition, originally for karaoke purposes, but&lt;br /&gt;
which can be used for more general purpose, such as line based drawing, or animation of&lt;br /&gt;
the text (position, color, etc)&lt;br /&gt;
&lt;br /&gt;
Motions are defined by the means of a series of curves (static points, segments, splines (catmull-rom, bezier, and b-splines)).&lt;br /&gt;
A 2D point can be obtained from a motion for any timestamp during the lifetime of a text.&lt;br /&gt;
This can be used for moving a marker in 2D above the text for karaoke, or to use the x&lt;br /&gt;
coordinate to color text when the motion position passes each letter or word, etc.&lt;br /&gt;
Motions have an attached semantics so the client code knows how to use a particular motion.&lt;br /&gt;
Predefined semantics include text color, text position, etc).&lt;br /&gt;
&lt;br /&gt;
Since a motion can be composed of an arbitrary number of curves, each of which may have&lt;br /&gt;
an arbitrary number of control points, complex motions can be achieved. If the motion is&lt;br /&gt;
the main object of an event, it is even possible to have an empty text, and use the motion&lt;br /&gt;
as a virtual pencil to draw arbitrary shapes. Even on-the-fly handwriting subtitles could&lt;br /&gt;
be done this way, though this would require a lot of control points, and would not be able&lt;br /&gt;
to be used with text-to-speech.&lt;br /&gt;
&lt;br /&gt;
As a proof of concept, I also have a &amp;quot;draw chat&amp;quot; program where two people can draw, and&lt;br /&gt;
the shapes are turned to b-splines and sent as a kate motion to be displayed on the other&lt;br /&gt;
person&#039;s window.&lt;br /&gt;
&lt;br /&gt;
It is also possible for motions to be discontinuous - simply insert a curve of &#039;none&#039; type.&lt;br /&gt;
While the timestamp lies within such a curve, no 2D point will be generated. This can be&lt;br /&gt;
used to temporarily hide a marker, for instance.&lt;br /&gt;
&lt;br /&gt;
It is worth mentionning that pauses in the motion can be trivially included by inserting&lt;br /&gt;
at the right time and for the right duration a simple linear interpolation curve with only&lt;br /&gt;
two equal points, equal to the position the motion is supposed to pause at.&lt;br /&gt;
&lt;br /&gt;
Kate defines a set of predefined mappings so that each decoder user interprets a motion in&lt;br /&gt;
the same way. A mapping is coded on 8 bits in the bitstream, and the first 128 are reserved&lt;br /&gt;
for Kate, leaving 128 for application specific mappings, to avoid constraining creative uses&lt;br /&gt;
of that feature. Predefined mappings include frame (eg, 0-1 points are mapped to the size of&lt;br /&gt;
the current video frame), or region, to scale 0-1 to the current region. This allows curves&lt;br /&gt;
to be defined without knowing in advance the pixel size of the area it should cover.&lt;br /&gt;
&lt;br /&gt;
For uses which require more than two coordinates (eg, text color, where 4 (RGBA) values are&lt;br /&gt;
needed, Kate predefines the semantics text_color_rg and text_color_ba, so a 4D point can be&lt;br /&gt;
obtained using two different motions.&lt;br /&gt;
&lt;br /&gt;
There are higher level constructs, such as morphing between two styles, or predefined&lt;br /&gt;
karaoke effects. More are planned to be added in the future.&lt;br /&gt;
&lt;br /&gt;
See also [[#Trackers|Trackers]].&lt;br /&gt;
&lt;br /&gt;
== Trackers ==&lt;br /&gt;
&lt;br /&gt;
Since attaching motions to text position, etc, makes it hard for the client to keep track of&lt;br /&gt;
everything, doing interpolation, etc, the library supplies a tracker object, which handles the&lt;br /&gt;
interpolation of the relevant properties.&lt;br /&gt;
Once initialized with a text and a set of motions, the client code can give the tracker a new&lt;br /&gt;
timestamp, and get back the current text position, text color, etc.&lt;br /&gt;
&lt;br /&gt;
Using a tracker is not necessary, if one wants to use the motions directly, or just ignore them,&lt;br /&gt;
but it makes life easier, especially when considering the the order in which motions are applied&lt;br /&gt;
does matter (to be defined formally, but the current source code is informative at this point).&lt;br /&gt;
&lt;br /&gt;
== The Kate file format ==&lt;br /&gt;
&lt;br /&gt;
Though this is not a feature of the bitstream format, I have created a text file format to&lt;br /&gt;
describe a series of events to be turned into a Kate bitstream.&lt;br /&gt;
At its minimum, the following is a valid input to the encoder:&lt;br /&gt;
&lt;br /&gt;
: kate {&lt;br /&gt;
::  event { 00:00:05 --&amp;gt; 00:00:10    &amp;quot;This is a text&amp;quot; }&lt;br /&gt;
: }&lt;br /&gt;
&lt;br /&gt;
This will create a simple stream with &amp;quot;This is a text&amp;quot; emitted at an offset of 5 seconds into&lt;br /&gt;
the track, lasting 5 seconds to an end time at 10 seconds.&lt;br /&gt;
&lt;br /&gt;
Motions, regions, styles can be declared in a definitions block to be reused by events, or can&lt;br /&gt;
be defined inline. Defining those in the definitions block places them in a header so they can&lt;br /&gt;
be reused later, saving space. However, they can also be defined in each event, so they will be&lt;br /&gt;
sent with the event. This allows them to be generated on the fly (eg, if the bitstream is being&lt;br /&gt;
streamed from a realtime input).&lt;br /&gt;
&lt;br /&gt;
For convenience, the Kate file format also allows C style macros, though without parameters.&lt;br /&gt;
&lt;br /&gt;
Please note that the Kate file format is fully separate from the Kate bitstream format. The&lt;br /&gt;
difference between the two is similar to the difference between a C source file and the resulting&lt;br /&gt;
object file, when compiled.&lt;br /&gt;
&lt;br /&gt;
Note that the format is not based on XML for a very parochial reason: I tend to dislike very&lt;br /&gt;
much editing XML by hand, as it&#039;s really hard to read. XML is really meant for machines to parse&lt;br /&gt;
generically text data in a shared syntax but with possibly unknown semantics, and I need those&lt;br /&gt;
text representations to be editable easily.&lt;br /&gt;
&lt;br /&gt;
This also implies that there could be an XML representation of a Kate stream, which would be&lt;br /&gt;
useful if one were to make an editor that worked on a higher level than the current all-text&lt;br /&gt;
representation, and it is something that might very well happen in the future, in parallel with&lt;br /&gt;
the current format.&lt;br /&gt;
&lt;br /&gt;
== Karaoke ==&lt;br /&gt;
&lt;br /&gt;
Karaoke effects rely on motions, and there will be predefined higher level ways of specifying&lt;br /&gt;
timings and effects, two of which are already done.&lt;br /&gt;
&lt;br /&gt;
As an example, this is a valid Karaoke script:&lt;br /&gt;
&lt;br /&gt;
:kate {&lt;br /&gt;
::  simple_timed_glyph_style_morph {&lt;br /&gt;
:::   from style &amp;quot;start_style&amp;quot; to style &amp;quot;end_style&amp;quot;&lt;br /&gt;
:::   &amp;quot;Let &amp;quot;    at 1.0&lt;br /&gt;
:::   &amp;quot;us &amp;quot;     at 1.2&lt;br /&gt;
:::   &amp;quot;sing &amp;quot;   at 1.4&lt;br /&gt;
:::   &amp;quot;to&amp;quot;      at 2.0&lt;br /&gt;
:::   &amp;quot;ge&amp;quot;      at 2.5&lt;br /&gt;
:::   &amp;quot;ther&amp;quot;    at 3.0&lt;br /&gt;
::  }&lt;br /&gt;
:}&lt;br /&gt;
&lt;br /&gt;
The syllables will change from a style to another as time passes. The definition of the start_style&lt;br /&gt;
and end_style styles is omitted for brevity.&lt;br /&gt;
&lt;br /&gt;
== Problems to solve ==&lt;br /&gt;
&lt;br /&gt;
There are a few things to solve before the Kate bitstream format can be considered good&lt;br /&gt;
enough to be frozen:&lt;br /&gt;
&lt;br /&gt;
Note: the following is mostly solved, and the bitstream is now stable, and has been&lt;br /&gt;
backward and forward compatible since the first released version. This will be updated&lt;br /&gt;
when I get some time.&lt;br /&gt;
&lt;br /&gt;
=== Seeking and memory ===&lt;br /&gt;
&lt;br /&gt;
When seeking to a particular time in a movie with subtitles, we may end up at a place when a subtitle has been started, but is not removed yet. Pure streaming doesn&#039;t have this problem as it remembers the subtitle being issued (as opposed to, say, Vorbis, for which all data valid now is decoded from the last packet). With Kate, a text string valid now may have been issued long ago.&lt;br /&gt;
&lt;br /&gt;
I see three possible ways to solve this:&lt;br /&gt;
*each data packet includes the granule of the earliest still active packet (if none, this will be the granule of this very packet)&lt;br /&gt;
**this means seeks are two phased: first seek, find the next Kate packet, and seek again if the granule of the earlier still active packet is less than the original seeked granule. This implies support code on players to do the double seek.&lt;br /&gt;
&lt;br /&gt;
*use &amp;quot;reference frames&amp;quot;, a bit like Theora does, where the granule position is split in several fields: the higher bits represent a position for the reference frame, and the lowest bits a delta time to the current position. When seeking to a granule position, the lower bits are cleared off, yielding the granule position of the previous reference frame, so the seek ends up at the reference frame. The reference frame is a sync point where any active strings are issued again. This is a variant of the method described in the Writ wiki page, but the granule splitting avoids any &amp;quot;downtime&amp;quot;.&lt;br /&gt;
**this requires reissuing packets, and it doesn&#039;t feel right (and wastes space).&lt;br /&gt;
**it also requires &amp;quot;dummy&amp;quot; decoding of Kate data from the reference frame to the actual seek point to fully refresh the state &amp;quot;memory&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
*A variant of the two-granules-in-one system used by libcmml, where the &amp;quot;back link&amp;quot; points to the earliest still active string, rather than the previous one (this allows a two phase seek, rather than a multiphase seek, hopping back from event to event, with no real way to know if there is or not a previous event which is still active - I suppose CMML has no need to know this, if their &amp;quot;clips&amp;quot; do not overlap - mine can do).&lt;br /&gt;
**Such a system considerably shortens the usable granule space, though it can do a one phase seek, if I understand the system correctly, which I am not certain.&lt;br /&gt;
*** Well, it seems it can&#039;t do a one phase seek anyway.&lt;br /&gt;
&lt;br /&gt;
*Additionally, it could be possible to emit simple &amp;quot;keepalive&amp;quot; packets at regular intervals to help a seek algorithm to sync up to the stream without needing too much data reading - this helps for discontinuous streams where there could be no pages for a while if no data is needed at that time.&lt;br /&gt;
&lt;br /&gt;
=== Text encoding ===&lt;br /&gt;
&lt;br /&gt;
A header field declares the text encoding used in the stream. At the moment, only UTF-8 is&lt;br /&gt;
supported, for simplicity. There are no plans to support other encodings, such as UTF-16,&lt;br /&gt;
at the moment.&lt;br /&gt;
&lt;br /&gt;
Note that strings included in the header (language, category) are not affected by that&lt;br /&gt;
language encoding (rather obviously for language itself). These are ASCII.&lt;br /&gt;
&lt;br /&gt;
The actual text in events may include simple HTML-like markup (at the moment, allowed markup&lt;br /&gt;
is the same as the one Pango uses, but more markup types may be defined in the future).&lt;br /&gt;
It is also possible to ask libkate to remove this markup if the client prefers to receive&lt;br /&gt;
plain text without the markup.&lt;br /&gt;
&lt;br /&gt;
=== Language encoding ===&lt;br /&gt;
&lt;br /&gt;
A header field defines the language (if any) used in the stream (this can be overridden in a&lt;br /&gt;
data packet, but this is not relevant to this point). At the moment, my test code uses&lt;br /&gt;
ISO 639-1 two letter codes, but I originally thought to use RFC 3066 tags. However, matching&lt;br /&gt;
a language to a user selection may be simpler for user code if the language encoding is kept&lt;br /&gt;
simple. At the moment, I tend to favor allowing both two letter tags (eg, &amp;quot;en&amp;quot;) and secondary&lt;br /&gt;
tags (like &amp;quot;en_EN&amp;quot;), as RFC 3066 tags can be quite complex, but I welcome comments on this.&lt;br /&gt;
&lt;br /&gt;
If a stream contains more than one language, there usually is a predominant language, which&lt;br /&gt;
can be set as the default language for the stream. Each event can then have a language&lt;br /&gt;
override. If there is no predominant language, and it is not possible to split the stream&lt;br /&gt;
into multiple substreams, each with its own language, then it is possible to use the &amp;quot;mul&amp;quot;&lt;br /&gt;
language tag, as a last resort.&lt;br /&gt;
&lt;br /&gt;
=== Bitstream format for floating point values ===&lt;br /&gt;
&lt;br /&gt;
Floating point values are be turned to a 16.16 fixed point format, then stored in a bitpacked&lt;br /&gt;
format, storing the number of zero bits at the head and tail of the floating point values once&lt;br /&gt;
per stream, and the remainder bits for all values in the stream. This seems to yield good results&lt;br /&gt;
(typically a 50% reduction over 32 bits raw writes, and 70% over the snprintf based storage), and&lt;br /&gt;
has the big advantage of being portable (eg, independant of any IEEE format).&lt;br /&gt;
However, this means reduced precision due to the quantization to 16.16. I may add support for&lt;br /&gt;
variable precision (eg, 8.24 fixed point formats) to alleviate this. This would however mean less&lt;br /&gt;
space savings, though these are likely to be insignificant when Kate streams are interleaved with&lt;br /&gt;
a video.&lt;br /&gt;
&lt;br /&gt;
*Though this is not a Kate issue per se, the motion feature is very difficult to use without a curve editor. While tools may be coded to create a Kate bitstream for various existing subtitle formats, it is not certain it will be easy to find a good authoring tool for a series of curves. That said, it&#039;s not exactly difficult to do if you know a widget set.&lt;br /&gt;
&lt;br /&gt;
=== Higher dimensional curves/motions ===&lt;br /&gt;
&lt;br /&gt;
It is quite annoying to have to create two motions to control a color change, due to curves&lt;br /&gt;
being restricted to two dimensions. I may add support for arbitrary dimensions. It would also&lt;br /&gt;
help for 1D motions, like changing the time flow, where one coordinate is simply ignored at&lt;br /&gt;
the moment.&lt;br /&gt;
Alternatively, changes could be made to the Kate file format to hide the two dimensionality and&lt;br /&gt;
allow simpler specification of non-2 dimensional motions, but still map them to 2D in the kate&lt;br /&gt;
bitstream format.&lt;br /&gt;
&lt;br /&gt;
=== Category definition ===&lt;br /&gt;
&lt;br /&gt;
The category field in the BOS packet is a 16 byte text field (15 really, as it is zero terminated&lt;br /&gt;
in the bitstream itself). Its goal is to provide the reader with a short description of what kind&lt;br /&gt;
of information the stream contains, eg subtitles, lyrics, etc. This would be displayed to the user,&lt;br /&gt;
possibly to allow to choose to turn some streams on and off.&lt;br /&gt;
&lt;br /&gt;
Since this category is meant primarily for a machine to parse, they will be kept to ASCII. When&lt;br /&gt;
a player recognizes a category, it is free to replace its name with one in the user&#039;s language if&lt;br /&gt;
it prefers. Even in English, the &amp;quot;lyrics&amp;quot; category could be displayed by a player as &amp;quot;Lyrics&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Since this is a free text field rather than an enumeration, it would be good to have a list of&lt;br /&gt;
common predefined category names that Kate streams can use.&lt;br /&gt;
&lt;br /&gt;
This is a list of proposed predefined categories, feedback/additions welcome:&lt;br /&gt;
&lt;br /&gt;
* subtitles - the usual movie subtitles, as text&lt;br /&gt;
* spu-subtitles - movie subtitles in DVD style paletted images&lt;br /&gt;
* lyrics - song lyrics&lt;br /&gt;
&lt;br /&gt;
Please remember the 15 character limit if proposing other categories.&lt;br /&gt;
&lt;br /&gt;
 Note that the list of categories is subject to change, and will likely&lt;br /&gt;
 be replaced by new, more &amp;quot;identifier like&amp;quot; ones. The three ones above,&lt;br /&gt;
 however, would be kept for backward compatibility as they&#039;re already used.&lt;br /&gt;
&lt;br /&gt;
== Text to speech ==&lt;br /&gt;
&lt;br /&gt;
One of the goals of the Kate bitstream format is that text data can be easily parsed&lt;br /&gt;
by the user of the decoder, so any additional information, such as style, placement,&lt;br /&gt;
karaoke data, etc, should be able to be stripped to leave only the bare text. This is&lt;br /&gt;
in view of allowing text-to-speech software to use Kate bitstreams as a bandwith-cheap&lt;br /&gt;
way of conveying speech data, and could also allow things like e-books which can be&lt;br /&gt;
either read or listened to from the same bitstream (I have seen no reference to this&lt;br /&gt;
being used anywhere, but I see no reason why the granule progression should be temporal,&lt;br /&gt;
and not user controlled, such as by using a &amp;quot;next&amp;quot; button which would bump a granule&lt;br /&gt;
postion by a preset amount, simulating turning a page (this would be close to necessary&lt;br /&gt;
for text-to-speech, as the wall time duration of the spoken speech is not known in&lt;br /&gt;
advance to the Kate encoder, and can&#039;t be mapped to a time based granule progression)).&lt;br /&gt;
All text strings triggered consecutively between the two granule positions would then&lt;br /&gt;
be read in order.&lt;br /&gt;
&lt;br /&gt;
== Possible additions ==&lt;br /&gt;
&lt;br /&gt;
=== Embedded binary data ===&lt;br /&gt;
&lt;br /&gt;
Images and font mappings can be included within a Kate stream.&lt;br /&gt;
&lt;br /&gt;
==== Images ====&lt;br /&gt;
&lt;br /&gt;
Though this could be misused to interfere with ability to render as text-to-speech, Kate&lt;br /&gt;
can use images as well as text. The same caveat as for fonts applies with regard to data&lt;br /&gt;
duplication.&lt;br /&gt;
&lt;br /&gt;
Complex images might however be best left to a multiplexed OggSpots or OggMNG stream, unless the&lt;br /&gt;
images mesh with the text (eg, graphical exclamation points, custom fonts, (see next&lt;br /&gt;
paragraph), etc).&lt;br /&gt;
&lt;br /&gt;
There is support for simple paletted bitmap images, with a variable length palette of up&lt;br /&gt;
to 256 colors (in fact, sized in powers of 2 up to 256) and matching pixel data in as&lt;br /&gt;
many bits per pixel as can address the palette. Palettes and images are stored separately,&lt;br /&gt;
so can be used with one another with no fixed assignment.&lt;br /&gt;
&lt;br /&gt;
Palettes and bitmaps are put in two separate header for later use by reference, but can&lt;br /&gt;
also be placed in data packets, as with motions, etc, if they are not going to be reused.&lt;br /&gt;
&lt;br /&gt;
PNG bitmaps can also be embedded in a Kate stream. These do not have associated palettes&lt;br /&gt;
(but the PNGs themselves may or may not be paletted). There is no support for decoding PNG&lt;br /&gt;
images in libkate itself, so a program will have to use libpng (or similar code) to decode&lt;br /&gt;
the PNG image. For instance, the libtiger rendering library uses Cairo to decode and render&lt;br /&gt;
PNG images in Kate streams.&lt;br /&gt;
&lt;br /&gt;
This can be used to have custom fonts, so that raw text is still available if the stream&lt;br /&gt;
creator wants a custom look.&lt;br /&gt;
&lt;br /&gt;
I expect that the need for more than 256 colors in a bitmap, or non palette bitmap data,&lt;br /&gt;
would be best handled by another codec, eg OggMNG or OggSpots. The goal of images in a&lt;br /&gt;
Kate stream is to mesh the images with the text, not to  have large images by themselves.&lt;br /&gt;
&lt;br /&gt;
On the other hand, interesting Karaoke effects could be achieved by having MNG images&lt;br /&gt;
instead of simple paletted bitmaps in a Kate streams. Comments would be most welcome on&lt;br /&gt;
whether this is going too far, however.&lt;br /&gt;
&lt;br /&gt;
I am also investigating SVG images. These allow for very small footprint images for simple&lt;br /&gt;
vector drawings, and could be very useful for things like background gradients below text.&lt;br /&gt;
&lt;br /&gt;
A possible solution to the duplication issue is to have another stream in the container&lt;br /&gt;
stream, which would hold the shared data (eg, fonts), which the user program could load,&lt;br /&gt;
and which could then be used by any Kate (and other) stream. Typically, this type of stream&lt;br /&gt;
would be a degenerate stream with only header packets (so it is fully processed before any&lt;br /&gt;
other stream presents data packets that might make use of that shared data), and all payload&lt;br /&gt;
such as fonts being contained within the headers. Thinking about it, it has parallels with&lt;br /&gt;
the way Vorbis stores its codebooks within a header packet, or even the way Kate stores the&lt;br /&gt;
list of styles within a header packet.&lt;br /&gt;
&lt;br /&gt;
==== Fonts ====&lt;br /&gt;
&lt;br /&gt;
Custom fonts are merely a set of ranges mapping unicode code points to bitmaps. As this implies,&lt;br /&gt;
fonts are bitmap fonts, not vector fonts, so scaling, if supported by the rendering client,&lt;br /&gt;
may not look as good as with a vector font.&lt;br /&gt;
&lt;br /&gt;
A style may also refer to a font name to use (eg, &amp;quot;Tahoma&amp;quot;). These fonts may or may not be&lt;br /&gt;
available on the playing system, however, since the font data is not included in the stream,&lt;br /&gt;
just referenced by name. For this reason, it is best to keep to widely known fonts.&lt;br /&gt;
&lt;br /&gt;
== Reference encoder/decoder ==&lt;br /&gt;
&lt;br /&gt;
A encoder (kateenc) and a decoder (katedec) are included in the tools directory.&lt;br /&gt;
The encoder supports input from several different formats:&lt;br /&gt;
* a custom text based file format (see [[#The Kate file format|The Kate file format]]), which is by no means meant to be part of the Kate bitstream specification itself&lt;br /&gt;
* SubRip (.srt), the most common subtitle format I found&lt;br /&gt;
* LRC lyrics format.&lt;br /&gt;
&lt;br /&gt;
As an example for the widely used SRT subtitles format, the following command line&lt;br /&gt;
create a Kate subtitles stream from an SRT file:&lt;br /&gt;
&lt;br /&gt;
kateenc -l en -c subtitles -t srt -o subtites.ogg subtitles.srt&lt;br /&gt;
&lt;br /&gt;
The reverse is possible, to recover an SRT file from a Kate stream, with katedec.&lt;br /&gt;
&lt;br /&gt;
Note that the subtitles.ogg file should then be multiplexed into the A/V stream,&lt;br /&gt;
using either ogg-tools or oggz-tools.&lt;br /&gt;
&lt;br /&gt;
The Kate bitstreams encoded and decoded by those tools are (supposed to be) correct for this&lt;br /&gt;
specification, provided their input is correct.&lt;br /&gt;
&lt;br /&gt;
== Next steps ==&lt;br /&gt;
&lt;br /&gt;
=== Continuations ===&lt;br /&gt;
&lt;br /&gt;
Continuations are a way to add to existing events, and are mostly meant for motions. When streaming&lt;br /&gt;
in real time, what motions may be applied to events may not be known in advance (for instance, for a&lt;br /&gt;
draw chat program where two programs exchange Kate streams, the drawing motions are only known as&lt;br /&gt;
they are drawn. Continuations will allow an event to be extended in time, and motions to be appended&lt;br /&gt;
to it. This is only useful for streaming, as when stored in a file, everything is already known in&lt;br /&gt;
advance.&lt;br /&gt;
&lt;br /&gt;
=== A rendering library ===&lt;br /&gt;
&lt;br /&gt;
This will allow easier integration in other packages (movie players, etc).&lt;br /&gt;
I have started working on an implementation using Cairo and Pango, though I&#039;m still at the early stages.&lt;br /&gt;
I might add support for embedding vector fonts in a Kate stream if I was going that way. Still need to think about this.&lt;br /&gt;
Another point of note is that when this library is available, it would make it easier to add&lt;br /&gt;
capabilities such as rotation, scaling, etc, to the bitstream, since this would not cause too&lt;br /&gt;
much work for playing programs using the rendering library. It is expected that these additions&lt;br /&gt;
would stay backward compatible (eg, an old player would ignore this information but still correctly&lt;br /&gt;
decode the information they can work with from a newly encoded stream).&lt;br /&gt;
&lt;br /&gt;
=== An XML representation ===&lt;br /&gt;
&lt;br /&gt;
While I purposefully did not write Kate description files in XML due to me finding editing XML such&lt;br /&gt;
a chore, it would be nice to be able to losslessly convert between the more user friendly representation&lt;br /&gt;
and an XML document, so one can do what one does with XML documents, like transformations.&lt;br /&gt;
&lt;br /&gt;
And after all, some people might prefer editing the XML version.&lt;br /&gt;
&lt;br /&gt;
=== Packaging ===&lt;br /&gt;
&lt;br /&gt;
It would be really nice to have packages for libkate/libtiger for many distros.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re a packager for a distro which doesn&#039;t have yet packages for libkate&lt;br /&gt;
or libtiger, please consider helping :)&lt;br /&gt;
&lt;br /&gt;
In particular, packages for Debian would be grand.&lt;br /&gt;
&lt;br /&gt;
== Matroska mapping ==&lt;br /&gt;
&lt;br /&gt;
The codec ID is &amp;quot;S_KATE&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
As for Theora and Vorbis, Kate headers are stored in the private data as xiph-laced packets:&lt;br /&gt;
&lt;br /&gt;
 Byte 0: number of packets present, minus 1 (there must be at least one packet) - let this number be NP&lt;br /&gt;
 Bytes 1..n: lengths of the first NP packets, coded in xiph style lacing&lt;br /&gt;
 Bytes n+1..end: the data packets themselves concatenated one after the other&lt;br /&gt;
&lt;br /&gt;
Note that the length of the last packet isn&#039;t encoded, it is deduced from the sizes of the other&lt;br /&gt;
packets and the total size of the private data.&lt;br /&gt;
&lt;br /&gt;
This mapping is similar to the Vorbis and Theora mappings, with the caveat that one should not&lt;br /&gt;
expect a set number of headers.&lt;br /&gt;
&lt;br /&gt;
== Downloading ==&lt;br /&gt;
&lt;br /&gt;
libkate encodes and decodes Kate streams, and is API and ABI stable.&lt;br /&gt;
&lt;br /&gt;
The libkate source distribution is available at [http://libkate.googlecode.com/ http://libkate.googlecode.com/].&lt;br /&gt;
&lt;br /&gt;
A public git repository is available at [http://git.xiph.org/?p=users/oggk/kate.git;a=summary http://git.xiph.org/?p=users/oggk/kate.git;a=summary].&lt;br /&gt;
&lt;br /&gt;
libtiger renders Kate streams using Pango and Cairo, and is alpha, with API changes still possible.&lt;br /&gt;
&lt;br /&gt;
The libtiger source distribution is available at [http://libtiger.googlecode.com/ http://libtiger.googlecode.com/].&lt;br /&gt;
&lt;br /&gt;
A public git repository is available at [http://git.xiph.org/?p=users/oggk/tiger.git;a=summary http://git.xiph.org/?p=users/oggk/tiger.git;a=summary].&lt;br /&gt;
&lt;br /&gt;
== HOWTOs ==&lt;br /&gt;
&lt;br /&gt;
These paragraphs describe a few ways to use Kate streams:&lt;br /&gt;
&lt;br /&gt;
=== Text movie subtitles ===&lt;br /&gt;
&lt;br /&gt;
Kate streams can carry Unicode text (that is, text that can represent&lt;br /&gt;
pretty much any existing language/script). If several Kate streams are&lt;br /&gt;
multiplexed along with a video, subtitles in various languages can be&lt;br /&gt;
made for that movie.&lt;br /&gt;
&lt;br /&gt;
An easy way to create such subtitles is to use ffmpeg2theora, which&lt;br /&gt;
can create Kate streams from SubRip (.srt) format files, a simple but&lt;br /&gt;
common text subtitles format. ffmpeg2theora 0.21 or later is needed.&lt;br /&gt;
&lt;br /&gt;
At its simplest:&lt;br /&gt;
&lt;br /&gt;
    ffmpeg2theora -o video-with-subtitles.ogg --subtitles subtitles.srt&lt;br /&gt;
      video-without-subtitles.avi&lt;br /&gt;
&lt;br /&gt;
Several languages may be created and tagged with their language code&lt;br /&gt;
for easy selection in a media player:&lt;br /&gt;
&lt;br /&gt;
    ffmpeg2theora -o video-with-subtitles.ogg video-without-subtitles.avi&lt;br /&gt;
      --subtitles japanese-subtitles.srt --subtitles-language ja&lt;br /&gt;
      --subtitles welsh-subtitles.srt --subtitles-language cy&lt;br /&gt;
      --subtitles english-subtitles.srt --subtitles-language en_GB&lt;br /&gt;
&lt;br /&gt;
Alternatively, kateenc (which comes with the libkate distribution) can&lt;br /&gt;
create Kate streams from SubRip files as well. These can then be merged&lt;br /&gt;
with a video with oggz-tools:&lt;br /&gt;
&lt;br /&gt;
    kateenc -t srt -c SUB -l it -o subtitles.ogg italian-subtitles.srt&lt;br /&gt;
    oggz merge -o movie-with-subtitles.ogg movie-without-subtitles.ogg subtitles.ogg&lt;br /&gt;
&lt;br /&gt;
This second method can also be used to add subtitles to a video which&lt;br /&gt;
is already encoded to Theora, as it will not transcode the video again.&lt;br /&gt;
&lt;br /&gt;
=== DVD subtitles ===&lt;br /&gt;
&lt;br /&gt;
DVD subtitles are not text, but images. Thoggen, a DVD ripper program,&lt;br /&gt;
can convert these subtitles to Kate streams (at the time of writing,&lt;br /&gt;
Thoggen and GStreamer have not applied the necessary patches for this&lt;br /&gt;
to be possible out of the box, so patching them will be required).&lt;br /&gt;
&lt;br /&gt;
When configuring how to rip DVD tracks, any subtitles will be detected&lt;br /&gt;
by Thoggen, and selecting them in the GUI will cause them to be saved as&lt;br /&gt;
Kate tracks along with the movie.&lt;br /&gt;
&lt;br /&gt;
=== Song lyrics ===&lt;br /&gt;
&lt;br /&gt;
Kate streams carrying song lyrics can be embedded in an Ogg file. The&lt;br /&gt;
oggenc Vorbis encoding tool from the Xiph.Org Vorbis tools allows lyrics&lt;br /&gt;
to be loaded from a LRC or SRT text file and converted to a Kate stream&lt;br /&gt;
multiplexed with the resulting Vorbis audio. At the time of writing,&lt;br /&gt;
the patch to oggenc was not applied yet, so it will have to be patched&lt;br /&gt;
manually with the patch found in the diffs directory.&lt;br /&gt;
&lt;br /&gt;
    oggenc -o song-with-lyrics.ogg --lyrics lyrics.lrc --lyrics-language en_US song.wav&lt;br /&gt;
&lt;br /&gt;
So called &#039;enhanced LRC&#039; files (containing extra karaoke timing information)&lt;br /&gt;
are supported, and a simple karaoke color change scheme will be saved&lt;br /&gt;
out for these files. For more complex karaoke effects (such as more&lt;br /&gt;
complex style changes, or sprite animation), kateenc should be used with&lt;br /&gt;
a Kate description file to create a separate Kate stream, which can then&lt;br /&gt;
be merged with a Vorbis only song with oggz-tools:&lt;br /&gt;
&lt;br /&gt;
    oggenc -o song.ogg song.wav&lt;br /&gt;
    kateenc -t kate -c LRC -l en_US -o lyrics.ogg lyrics-with-karaoke.kate&lt;br /&gt;
    oggz merge -o song-with-karaoke.ogg lyrics-with-karaoke.ogg song.ogg&lt;br /&gt;
&lt;br /&gt;
This latter method may also be used if you already have an encoded Vorbis song&lt;br /&gt;
with no lyrics, and just want to add the lyrics without reencoding.&lt;br /&gt;
&lt;br /&gt;
=== Metadata ===&lt;br /&gt;
&lt;br /&gt;
Metadata can be attached to events, or to styles, bitmaps, regions, etc.&lt;br /&gt;
Metadata are free form tag/value pairs, and can be used to enrich their&lt;br /&gt;
attached data with extra information. However, how this information is&lt;br /&gt;
interpreted is up to the application layer.&lt;br /&gt;
&lt;br /&gt;
It is worth noting that an event may not have attached text, so it is&lt;br /&gt;
possible to create an empty timed event with attached metadata.&lt;br /&gt;
&lt;br /&gt;
For instance, let&#039;s say we have a documentary, with footage from various&lt;br /&gt;
places, as well as short interviews, and we want two things:&lt;br /&gt;
- tag footage with metadata about the location and date that footage was shot&lt;br /&gt;
- subtitle the interviews and tag those subtitles with information about the speaker&lt;br /&gt;
&lt;br /&gt;
You can then create an empty Kate event for each footage part, synchronized&lt;br /&gt;
with the footage, and attach a new metadata item called GEO_LOCATION, filled&lt;br /&gt;
with latitude and longitude of the place the footage was shot at.&lt;br /&gt;
Similarly, for each subtitle event, a metadata item called SPEAKER can be&lt;br /&gt;
attached.&lt;br /&gt;
&lt;br /&gt;
An empty event to tag a long 4:20 footage shot in Tokyo on 2011/08/12, and&lt;br /&gt;
inserted at 18:30 in the documentary could look like:&lt;br /&gt;
&lt;br /&gt;
  event {&lt;br /&gt;
    00:18:30,000 --&amp;gt; 00:22:50,000&lt;br /&gt;
    meta &amp;quot;GEO_LOCATION&amp;quot; = &amp;quot;35.42; 139.42&amp;quot;&lt;br /&gt;
    meta &amp;quot;DATE&amp;quot; = &amp;quot;2011-08-12&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a example for a line spoken by Dr Joe Bloggs at 18:30 into the documentary:&lt;br /&gt;
&lt;br /&gt;
  event {&lt;br /&gt;
    00:18:30,000 --&amp;gt; 00:18:32,000&lt;br /&gt;
    &amp;quot;Notice how the subtitles for my words have metadata attached to them&amp;quot;&lt;br /&gt;
    meta &amp;quot;SPEAKER&amp;quot; = &amp;quot;Dr Joe Bloggs&amp;quot;&lt;br /&gt;
    meta &amp;quot;URL&amp;quot; = &amp;quot;http://www.example.com/biography?name=Joe+Bloggs&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Notice how another metadata item, URL, is also present. The application&lt;br /&gt;
will have to be aware of those metadata in order to do something with it&lt;br /&gt;
though. Since those are free form, it is up to you to think of what&lt;br /&gt;
metadata you want, and make use of it.&lt;br /&gt;
&lt;br /&gt;
Note that metadata may be attached to other objects, such as regions.&lt;br /&gt;
This way, you can for example create a region tagged with a name, and&lt;br /&gt;
track a person&#039;s movements with that region. Or you can tag a bitmap&lt;br /&gt;
with a copyright and a URL to a larger version of the image.&lt;br /&gt;
&lt;br /&gt;
=== Changing a Kate stream embedded in an Ogg stream ===&lt;br /&gt;
&lt;br /&gt;
If you need to change a Kate stream already embedded in an Ogg stream (eg, you have a movie with subtitles, and you want to fix a spelling mistake, or want to bring one of the subtitles forward in time, etc), you can do this easily with KateDJ, a tool that will extract Kate streams, decode them to a temporary location, and rebuild the original stream after you&#039;ve made whatever changes you want.&lt;br /&gt;
&lt;br /&gt;
KateDJ (included with the libkate distribution) is a GUI program using wxPython, a Python module for the wxWidgets GUI library, and the oggz tools (both needing installing separately if they are not already).&lt;br /&gt;
&lt;br /&gt;
The procedure consists of:&lt;br /&gt;
&lt;br /&gt;
* Run KateDJ&lt;br /&gt;
* Click &#039;Load Ogg stream&#039; and select the file to load&lt;br /&gt;
* Click &#039;Demux file&#039; to decode Kate streams in a temporary location&lt;br /&gt;
* Edit the Kate streams (a message box tells you where they are placed)&lt;br /&gt;
* When done, click &#039;Remux file from parts&#039;&lt;br /&gt;
* If any errors are reported, continue editing until the remux step succeeds&lt;br /&gt;
&lt;br /&gt;
== Frequently Asked Questions ==&lt;br /&gt;
&lt;br /&gt;
=== Does libkate work on other plaforms than Linux ? ===&lt;br /&gt;
&lt;br /&gt;
Yes, libkate is not Linux specific in any way. It optionally relies on libogg&lt;br /&gt;
and libpng, two libraries widely ported to various platforms.&lt;br /&gt;
It has been reported to work on Windows and MacOS X as well as UNIX platforms.&lt;br /&gt;
&lt;br /&gt;
However, libtiger, a rendering library for Kate streams, relies on [http://www.pango.org/ Pango] and [https://www.cairographics.org/ Cairo],&lt;br /&gt;
which are not easy to build on Windows, though they can be.&lt;br /&gt;
The Tiger renderer is however completely separate from libkate, and is not needed&lt;br /&gt;
for full encoding and decoding of Kate streams.&lt;br /&gt;
&lt;br /&gt;
=== Where can I find some example files ? ===&lt;br /&gt;
&lt;br /&gt;
The libkate distribution can generate various examples, but already built files&lt;br /&gt;
can be found there:&lt;br /&gt;
[http://people.xiph.org/~oggk/elephants_dream/elephantsdream-with-subtitles.ogg]&lt;br /&gt;
[http://stallman.org/fry/Stephen_Fry-Happy_Birthday_GNU-nq_600px_425kbit.ogv]&lt;br /&gt;
&lt;br /&gt;
These files use raw text only.&lt;br /&gt;
&lt;br /&gt;
[[Category:Ogg Mappings]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=OggKate&amp;diff=16646</id>
		<title>OggKate</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=OggKate&amp;diff=16646"/>
		<updated>2017-11-21T09:15:06Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: trim trrailing spaces and surplus blank lines&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Disclaimer ==&lt;br /&gt;
This is not a Xiph codec, though it may be embedded in Ogg alonside other Xiph&lt;br /&gt;
codecs, such as Vorbis and Theora. As such, please do not assume that Xiph has&lt;br /&gt;
anything to do with this, much less responsibility.&lt;br /&gt;
&lt;br /&gt;
==  What is Kate? ==&lt;br /&gt;
&lt;br /&gt;
Kate is an overlay codec, originally designed for karaoke and text, that can be&lt;br /&gt;
multiplexed in Ogg.&lt;br /&gt;
&lt;br /&gt;
Text and images can be carried and animated by a Kate stream.&lt;br /&gt;
Most of the time, they will (optionally) be multiplexed with audio/video to carry subtitles,&lt;br /&gt;
song lyrics (with or without karaoke data), etc.&lt;br /&gt;
&lt;br /&gt;
Series of curves (splines, segments, etc) may be attached to various properties&lt;br /&gt;
(text position, font size, etc) to create animated overlays. This allows scrolling&lt;br /&gt;
or fading text to be defined. This can even be used to draw arbitrary shapes, so&lt;br /&gt;
hand drawing can also be represented by a Kate stream.&lt;br /&gt;
&lt;br /&gt;
Example uses of Kate streams are movie subtitles for Theora videos, either text based,&lt;br /&gt;
as may be created by [http://www.v2v.cc/~j/ffmpeg2theora ffmpeg2theora], or image&lt;br /&gt;
based, such as created by [http://thoggen.net Thoggen] (patching needed), and lyrics,&lt;br /&gt;
as created by oggenc, from vorbis-tools.&lt;br /&gt;
&lt;br /&gt;
== Why a new codec? ==&lt;br /&gt;
&lt;br /&gt;
As I was adding support for Theora, Speex and FLAC to some software of mine, I found myself&lt;br /&gt;
wanting to have song lyrics accompanying Vorbis audio. Since Vorbis comments are limited to&lt;br /&gt;
the headers, one can&#039;t add them in the stream as they are sung, so another multiplexed stream&lt;br /&gt;
would be needed to carry them.&lt;br /&gt;
&lt;br /&gt;
The three possible bases usable for such a codec I found were Writ, CMML, and OGM/SRT.&lt;br /&gt;
&lt;br /&gt;
*[[OggWrit|Writ]] is an unmaintained start at an implementation of a very basic design, though I did find an encoder/decoder in py-ogg2 later on - I&#039;d been quicker to write Kate from scratch anyway.&lt;br /&gt;
*[[CMML]] is more geared towards encapsulating metadata about an accompanying stream, rather than being a data stream itself, and seemed complex for a simple use, though I have now revised my view on this - besides, it seems designed for Annodex (which I haven&#039;t had a look at), though it does seems relatively generic for use outwith Annodex - though it is being &amp;quot;repurposed&amp;quot; as timed text now, bringing it closer to what I&#039;m doing&lt;br /&gt;
*OGM/SRT, which I only found when I added Kate support to MPlayer, is shoehorning various data formats into an Ogg stream, and just dumps the SRT subtitle format as is, AFAICS (though I haven&#039;t looked at this one in detail, since I&#039;d already had a working Kate implementation by that time)&lt;br /&gt;
&lt;br /&gt;
I then decided to roll my own, not least because it&#039;s a fun thing to do.&lt;br /&gt;
&lt;br /&gt;
I found other formats, such as USF (designed for inclusion in Matroska) and various subtitle formats,&lt;br /&gt;
but none were designed for embedding inside an Ogg container.&lt;br /&gt;
&lt;br /&gt;
== Overview of the Kate bitstream format ==&lt;br /&gt;
&lt;br /&gt;
I&#039;ve taken much inspiration from Vorbis and Theora here.&lt;br /&gt;
Headers and packets (as well as the API design) follow the design of these two codecs.&lt;br /&gt;
&lt;br /&gt;
A rough overview (see [[#Format specification|Format specification]] for more details) is:&lt;br /&gt;
&lt;br /&gt;
Headers packets:&lt;br /&gt;
*ID header [BOS]: magic, version, granule fraction, encoding, language, etc&lt;br /&gt;
*Comment header: Vorbis comments, as per Vorbis/Theora streams&lt;br /&gt;
*Style definitions header: a list of predefined styles to be referred to by data packets&lt;br /&gt;
*Region definitions header: a list of predefined regions to be referred to by data packets&lt;br /&gt;
*Curves definitions header: a list of predefined curves to be referred to by data packets&lt;br /&gt;
*Motion definitions header: a list of predefined motions to be referred to by data packets&lt;br /&gt;
*Palette definitions header: a list of predefined palettes to be referred to by data packets&lt;br /&gt;
*Bitmap definitions header: a list of predefined bitmaps to be referred to by data packets&lt;br /&gt;
*Font mapping definitions header: a list of predefined font mappings to be referred to by data packets&lt;br /&gt;
&lt;br /&gt;
Other header packets are ignored, and left for future expansion.&lt;br /&gt;
&lt;br /&gt;
Data packets:&lt;br /&gt;
*text data: text/image and optional motions, accompanied by optional overrides for style, region, language, etc&lt;br /&gt;
*keepalive: can be emitted at any time to help a demuxer know where we&#039;re at, but those packets are optional&lt;br /&gt;
*repeats: a verbatim repeat of a text packet&#039;s payload, in order to bound any backward seeking needed when starting to play a stream partway through. These are also optional.&lt;br /&gt;
*end data [EOS]: marks the end of the stream, it doesn&#039;t have any useful payload&lt;br /&gt;
&lt;br /&gt;
Other data packets are ignored, and left for future expansion.&lt;br /&gt;
&lt;br /&gt;
The intent of the &amp;quot;keepalive&amp;quot; packet is to be sent at regular&lt;br /&gt;
intervals when no other packet has been emitted for a while. This would be to help seeking code&lt;br /&gt;
find a kate page more easily.&lt;br /&gt;
&lt;br /&gt;
Things of note:&lt;br /&gt;
*Kate is a discontinuous codec, as defined in [http://www.xiph.org/ogg/doc/ogg-multiplex.html ogg-multiplex.html] in the Ogg documentation, which means it&#039;s timed by start granule, not end granule (as Theora and Vorbis).&lt;br /&gt;
* All data packets are on their own page, for two reasons:&lt;br /&gt;
**Ogg keeps track of granules at the page level, not the packet level&lt;br /&gt;
**if no text event happens for a while after a particular text event, we don&#039;t want to delay it so a larger page can be issued&lt;br /&gt;
&lt;br /&gt;
See also [[#Seeking and memory|Problems to solve: Seeking and memory]].&lt;br /&gt;
&lt;br /&gt;
*The granule encoding is not a direct time/granule correspondance, see the granule encoding section.&lt;br /&gt;
*The EOS packet should have a granule pos higher or equal to the end time of all events.&lt;br /&gt;
*User code doesn&#039;t have to know the number of headers to expect, this is moved inside the library code (as opposed to Vorbis and Theora).&lt;br /&gt;
*The format contains hooks so that additional information may be added in future revisions while keeping backward compatibility (though old decoders will correctly parse, but ignore the new information).&lt;br /&gt;
&lt;br /&gt;
== Format specification ==&lt;br /&gt;
&lt;br /&gt;
The Kate bitstream format consists of a number of sequential packets.&lt;br /&gt;
Packets can be either header packets or data packets. All header packets&lt;br /&gt;
must appear before any data packet.&lt;br /&gt;
&lt;br /&gt;
Header packets must appear in order. Decoding of a data packet is not&lt;br /&gt;
possible until all header packets have been decoded.&lt;br /&gt;
&lt;br /&gt;
Each Kate packet starts with a one byte type. A type with the MSB set&lt;br /&gt;
(eg, between 0x80 and 0xff) indicates a header packet, while a type with&lt;br /&gt;
the MSB cleared (eg, between 0x00 and 0x7f) indicates a data packet.&lt;br /&gt;
All header packets then have the Kate magic, from byte offset 1 to byte&lt;br /&gt;
offset 7 (&amp;quot;kate\0\0\0&amp;quot;). Note that this applies only to header packets:&lt;br /&gt;
data packets do not contain the Kate signature.&lt;br /&gt;
&lt;br /&gt;
Since the ID header must appear first, a Kate stream can be recognized&lt;br /&gt;
by comparing the first eight bytes of the first packet with the signature&lt;br /&gt;
string &amp;quot;\200kate\0\0\0&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
When embedded in Ogg,the first packet in a Kate stream (always packet type 0x80,&lt;br /&gt;
the id header packet) must be placed on a separate page. The corresponding Ogg&lt;br /&gt;
packet must be marked as beginning of stream (BOS).All subsequent header packets&lt;br /&gt;
must be on one or more pages. Subsequently, each data packet must be on a separate&lt;br /&gt;
page.&lt;br /&gt;
&lt;br /&gt;
The last data packet must be the end of stream packet (packet type 0x7f).&lt;br /&gt;
&lt;br /&gt;
When embedded in Ogg, the corresponding Ogg packet must be marked as end of stream (EOS).&lt;br /&gt;
&lt;br /&gt;
As per the Ogg specification, granule positions must be non decreasing&lt;br /&gt;
within the stream. Header packets have granule position 0.&lt;br /&gt;
&lt;br /&gt;
Currently existing packet types are:&lt;br /&gt;
:headers:&lt;br /&gt;
::0x80  ID header (BOS)&lt;br /&gt;
::0x81  Vorbis comment header&lt;br /&gt;
::0x82  regions list header&lt;br /&gt;
::0x83  styles list header&lt;br /&gt;
::0x84  curves list header&lt;br /&gt;
::0x85  motions list header&lt;br /&gt;
::0x86  palettes list header&lt;br /&gt;
::0x87  bitmaps list header&lt;br /&gt;
::0x88  font ranges and mappings header&lt;br /&gt;
:data:&lt;br /&gt;
::0x00 text data (including optional motions and overrides)&lt;br /&gt;
::0x01 keepalive&lt;br /&gt;
::0x02 repeat&lt;br /&gt;
::0x7f end packet (EOS)&lt;br /&gt;
&lt;br /&gt;
This format described here is for bitstream version 0.x.&lt;br /&gt;
As or 19 december 2008, the latest bitstream version is 0.4.&lt;br /&gt;
&lt;br /&gt;
For more detailed information, refer to the format documentation&lt;br /&gt;
in libkate (see URL below in the [[#Downloading|Downlading]] section).&lt;br /&gt;
&lt;br /&gt;
Following is the definition of the ID header (packet type 0x80).&lt;br /&gt;
This works out to a 64 byte ID header. This is the header that should be&lt;br /&gt;
used to detect a Kate stream within an Ogg stream.&lt;br /&gt;
&lt;br /&gt;
  0               1               2               3              |&lt;br /&gt;
  0                   1                   2                   3&lt;br /&gt;
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1| Byte&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | packtype      | Identifier char[7]: &#039;kate\0\0\0&#039;              | 0-3&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | kate magic continued                                          | 4-7&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | reserved - 0  | version major | version minor | num headers   | 8-11&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | text encoding | directionality| reserved - 0  | granule shift | 12-15&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | cw sh |  canvas width         | ch sh | canvas height         | 16-19&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | reserved - 0                                                  | 20-23&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | granule rate numerator                                        | 24-27&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | granule rate denominator                                      | 28-31&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | language (NUL terminated)                                     | 32-35&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | language (continued)                                          | 36-39&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | language (continued)                                          | 40-43&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | language (continued)                                          | 44-47&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | category (NUL terminated)                                     | 48-51&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | category (continued)                                          | 52-55&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | category (continued)                                          | 56-59&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | category (continued)                                          | 60-63&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
The fields cw sh, canvas width, cw sh, and canvas height were introduced&lt;br /&gt;
in bistream 0.3. Earlier bitstreams will have 0 in these fields.&lt;br /&gt;
&lt;br /&gt;
language and category are NUL terminating ASCII strings.&lt;br /&gt;
Language follows RFC 3066, though obviously will not accommodate language tags&lt;br /&gt;
with lots of subtags.&lt;br /&gt;
&lt;br /&gt;
Category is currently loosely defined, and I haven&#039;t found yet a nice way to&lt;br /&gt;
present it in a generic way, but is meant for automatic classifying of&lt;br /&gt;
various multiplexed Kate streams (eg, to recognize that some streams are&lt;br /&gt;
subtitles (in a set of languages), and some others are commentary (in a&lt;br /&gt;
possibly different set of languages, etc).&lt;br /&gt;
&lt;br /&gt;
== API overview ==&lt;br /&gt;
&lt;br /&gt;
libkate offers an API very similar to that of libvorbis and libtheora, as well as&lt;br /&gt;
an extra higher level decoding API.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an overview of the three main modules:&lt;br /&gt;
&lt;br /&gt;
=== Decoding ===&lt;br /&gt;
&lt;br /&gt;
Decoding is done in a way similar to libvorbis. First, initialize a kate_info and a&lt;br /&gt;
kate_comment structure. Then, read headers by calling kate_decode_headerin. Once&lt;br /&gt;
all headers have been read, a kate_state is initialized for decoding using kate_decode_init,&lt;br /&gt;
and kate_decode_packetin is called repeatedly with data packets. Events (eg, text) can be&lt;br /&gt;
retrieved via kate_decode_eventout.&lt;br /&gt;
&lt;br /&gt;
=== Encoding ===&lt;br /&gt;
&lt;br /&gt;
Encoding is also done in a way similar to libvorbis. First initialize a kate_info&lt;br /&gt;
and a kate_comment structure, and fill them out as needed. kate_encode_headers will&lt;br /&gt;
create ogg packets from those. Then, kate_encode_text is called repeatedly for all&lt;br /&gt;
the text events to add. When done, calling kate_encode_finish will create an end of&lt;br /&gt;
stream packet.&lt;br /&gt;
&lt;br /&gt;
=== High level decoding API ===&lt;br /&gt;
&lt;br /&gt;
There are only 3 calls here:&lt;br /&gt;
&lt;br /&gt;
 kate_high_decode_init&lt;br /&gt;
 kate_high_decode_packetin&lt;br /&gt;
 kate_high_decode_clear&lt;br /&gt;
&lt;br /&gt;
Here, all Ogg packets are sent to kate_high_decode_packetin, which does the right&lt;br /&gt;
thing (header/data classification, decoding, and event retrieval). Note that you&lt;br /&gt;
do not get access to the comments directly using this, but you do get access to the&lt;br /&gt;
kate_info via events.&lt;br /&gt;
&lt;br /&gt;
The libkate distribution includes commented examples for each of those.&lt;br /&gt;
&lt;br /&gt;
Additionally, libkate includes a layer (liboggkate) to make it easier to use when&lt;br /&gt;
embedded in Ogg. While the normal API uses kate_packet structures, liboggkate uses&lt;br /&gt;
ogg_packet structures.&lt;br /&gt;
&lt;br /&gt;
The High level decoding API does not have an Ogg specific layer, but functions exist&lt;br /&gt;
to wrap a kate_packet around a memory buffer (such as the one ogg_packet uses, for instance).&lt;br /&gt;
&lt;br /&gt;
== Support ==&lt;br /&gt;
&lt;br /&gt;
Among the software with Kate support:&lt;br /&gt;
*VLC&lt;br /&gt;
*ffmpeg2theora&lt;br /&gt;
*liboggz&lt;br /&gt;
*liboggplay&lt;br /&gt;
*Cortado (wikimedia version)&lt;br /&gt;
*vorbis-tools&lt;br /&gt;
&lt;br /&gt;
I have patches for the following with Kate support:&lt;br /&gt;
*MPlayer&lt;br /&gt;
*xine&lt;br /&gt;
*GStreamer&lt;br /&gt;
*Thoggen&lt;br /&gt;
*Audacious&lt;br /&gt;
*and more...&lt;br /&gt;
&lt;br /&gt;
These may be found in the libkate source distribution (see [[#Downloading|Downloading]]&lt;br /&gt;
for links).&lt;br /&gt;
&lt;br /&gt;
In addition, libtiger is a rendering library for Kate streams using Pango and Cairo,&lt;br /&gt;
though it is not quite yet API stable (though no major changes are expected).&lt;br /&gt;
&lt;br /&gt;
== Granule encoding ==&lt;br /&gt;
&lt;br /&gt;
=== Ogg ===&lt;br /&gt;
&lt;br /&gt;
Ogg leaves the encoding of granules up to a particular codec, only&lt;br /&gt;
mandating that granules be non decreasing with time.&lt;br /&gt;
&lt;br /&gt;
The Kate bitstream format uses a linear mapping between time and&lt;br /&gt;
granule, described here.&lt;br /&gt;
&lt;br /&gt;
A Kate granule position is composed of two different parts:&lt;br /&gt;
 - a base granule, in the high bits&lt;br /&gt;
 - a granule offset, in the low bits&lt;br /&gt;
&lt;br /&gt;
 +----------------+----------------+&lt;br /&gt;
 | base           | offset         |&lt;br /&gt;
 +----------------+----------------+&lt;br /&gt;
&lt;br /&gt;
The number of bits these parts occupy is variable, and each stream&lt;br /&gt;
may choose how many bits to dedicate to each. The kate_info structure&lt;br /&gt;
for a stream holds that information in the granule_shift field,&lt;br /&gt;
so each part may be reconstructed from a granulepos.&lt;br /&gt;
&lt;br /&gt;
The timestamp T of a given Kate packet is split into a base B and&lt;br /&gt;
offset O, and these are stored in the granulepos of that packet.&lt;br /&gt;
The split is done such that the B is the time of the earliest event&lt;br /&gt;
still active at the time, and the O is the time elapsed between B&lt;br /&gt;
and T. Thus, T = B + O. This mimics the way Theora stores its own&lt;br /&gt;
timestamps in granulepos, where the base acts as a keyframe, and&lt;br /&gt;
an offset acts as the position of an intra frame from the previous&lt;br /&gt;
keyframe. Since Kate allows time overlapping events, however, the&lt;br /&gt;
choice of the base to use is slightly more complex, as it may not&lt;br /&gt;
be the starting time of the previous event, if the stream contains&lt;br /&gt;
time overlapping events.&lt;br /&gt;
&lt;br /&gt;
The kate_info structure for a stream holds a rational fraction&lt;br /&gt;
representing the time span of granule units for both the base and&lt;br /&gt;
the offset parts.&lt;br /&gt;
&lt;br /&gt;
The granule rate is defined by the two fields:&lt;br /&gt;
&lt;br /&gt;
 kate_info::gps_numerator&lt;br /&gt;
 kate_info::gps_denominator&lt;br /&gt;
&lt;br /&gt;
The number of bits reserved for the offset is defined by the field:&lt;br /&gt;
&lt;br /&gt;
 kate_info::granule_shift&lt;br /&gt;
&lt;br /&gt;
=== Generic timing ===&lt;br /&gt;
&lt;br /&gt;
Kate data packets (data packet type 0) includes timing information (start time,&lt;br /&gt;
end time, and time of the earliest event still active). All these are stored as&lt;br /&gt;
64 bit at the rate defined by the granule rate, so they do not suffer from the&lt;br /&gt;
granule_shift space limitation.&lt;br /&gt;
&lt;br /&gt;
This also allows for Kate streams to be stored in other containers.&lt;br /&gt;
&lt;br /&gt;
== Motion ==&lt;br /&gt;
&lt;br /&gt;
The Kate bitstream format includes motion definition, originally for karaoke purposes, but&lt;br /&gt;
which can be used for more general purpose, such as line based drawing, or animation of&lt;br /&gt;
the text (position, color, etc)&lt;br /&gt;
&lt;br /&gt;
Motions are defined by the means of a series of curves (static points, segments, splines (catmull-rom, bezier, and b-splines)).&lt;br /&gt;
A 2D point can be obtained from a motion for any timestamp during the lifetime of a text.&lt;br /&gt;
This can be used for moving a marker in 2D above the text for karaoke, or to use the x&lt;br /&gt;
coordinate to color text when the motion position passes each letter or word, etc.&lt;br /&gt;
Motions have an attached semantics so the client code knows how to use a particular motion.&lt;br /&gt;
Predefined semantics include text color, text position, etc).&lt;br /&gt;
&lt;br /&gt;
Since a motion can be composed of an arbitrary number of curves, each of which may have&lt;br /&gt;
an arbitrary number of control points, complex motions can be achieved. If the motion is&lt;br /&gt;
the main object of an event, it is even possible to have an empty text, and use the motion&lt;br /&gt;
as a virtual pencil to draw arbitrary shapes. Even on-the-fly handwriting subtitles could&lt;br /&gt;
be done this way, though this would require a lot of control points, and would not be able&lt;br /&gt;
to be used with text-to-speech.&lt;br /&gt;
&lt;br /&gt;
As a proof of concept, I also have a &amp;quot;draw chat&amp;quot; program where two people can draw, and&lt;br /&gt;
the shapes are turned to b-splines and sent as a kate motion to be displayed on the other&lt;br /&gt;
person&#039;s window.&lt;br /&gt;
&lt;br /&gt;
It is also possible for motions to be discontinuous - simply insert a curve of &#039;none&#039; type.&lt;br /&gt;
While the timestamp lies within such a curve, no 2D point will be generated. This can be&lt;br /&gt;
used to temporarily hide a marker, for instance.&lt;br /&gt;
&lt;br /&gt;
It is worth mentionning that pauses in the motion can be trivially included by inserting&lt;br /&gt;
at the right time and for the right duration a simple linear interpolation curve with only&lt;br /&gt;
two equal points, equal to the position the motion is supposed to pause at.&lt;br /&gt;
&lt;br /&gt;
Kate defines a set of predefined mappings so that each decoder user interprets a motion in&lt;br /&gt;
the same way. A mapping is coded on 8 bits in the bitstream, and the first 128 are reserved&lt;br /&gt;
for Kate, leaving 128 for application specific mappings, to avoid constraining creative uses&lt;br /&gt;
of that feature. Predefined mappings include frame (eg, 0-1 points are mapped to the size of&lt;br /&gt;
the current video frame), or region, to scale 0-1 to the current region. This allows curves&lt;br /&gt;
to be defined without knowing in advance the pixel size of the area it should cover.&lt;br /&gt;
&lt;br /&gt;
For uses which require more than two coordinates (eg, text color, where 4 (RGBA) values are&lt;br /&gt;
needed, Kate predefines the semantics text_color_rg and text_color_ba, so a 4D point can be&lt;br /&gt;
obtained using two different motions.&lt;br /&gt;
&lt;br /&gt;
There are higher level constructs, such as morphing between two styles, or predefined&lt;br /&gt;
karaoke effects. More are planned to be added in the future.&lt;br /&gt;
&lt;br /&gt;
See also [[#Trackers|Trackers]].&lt;br /&gt;
&lt;br /&gt;
== Trackers ==&lt;br /&gt;
&lt;br /&gt;
Since attaching motions to text position, etc, makes it hard for the client to keep track of&lt;br /&gt;
everything, doing interpolation, etc, the library supplies a tracker object, which handles the&lt;br /&gt;
interpolation of the relevant properties.&lt;br /&gt;
Once initialized with a text and a set of motions, the client code can give the tracker a new&lt;br /&gt;
timestamp, and get back the current text position, text color, etc.&lt;br /&gt;
&lt;br /&gt;
Using a tracker is not necessary, if one wants to use the motions directly, or just ignore them,&lt;br /&gt;
but it makes life easier, especially when considering the the order in which motions are applied&lt;br /&gt;
does matter (to be defined formally, but the current source code is informative at this point).&lt;br /&gt;
&lt;br /&gt;
== The Kate file format ==&lt;br /&gt;
&lt;br /&gt;
Though this is not a feature of the bitstream format, I have created a text file format to&lt;br /&gt;
describe a series of events to be turned into a Kate bitstream.&lt;br /&gt;
At its minimum, the following is a valid input to the encoder:&lt;br /&gt;
&lt;br /&gt;
: kate {&lt;br /&gt;
::  event { 00:00:05 --&amp;gt; 00:00:10    &amp;quot;This is a text&amp;quot; }&lt;br /&gt;
: }&lt;br /&gt;
&lt;br /&gt;
This will create a simple stream with &amp;quot;This is a text&amp;quot; emitted at an offset of 5 seconds into&lt;br /&gt;
the track, lasting 5 seconds to an end time at 10 seconds.&lt;br /&gt;
&lt;br /&gt;
Motions, regions, styles can be declared in a definitions block to be reused by events, or can&lt;br /&gt;
be defined inline. Defining those in the definitions block places them in a header so they can&lt;br /&gt;
be reused later, saving space. However, they can also be defined in each event, so they will be&lt;br /&gt;
sent with the event. This allows them to be generated on the fly (eg, if the bitstream is being&lt;br /&gt;
streamed from a realtime input).&lt;br /&gt;
&lt;br /&gt;
For convenience, the Kate file format also allows C style macros, though without parameters.&lt;br /&gt;
&lt;br /&gt;
Please note that the Kate file format is fully separate from the Kate bitstream format. The&lt;br /&gt;
difference between the two is similar to the difference between a C source file and the resulting&lt;br /&gt;
object file, when compiled.&lt;br /&gt;
&lt;br /&gt;
Note that the format is not based on XML for a very parochial reason: I tend to dislike very&lt;br /&gt;
much editing XML by hand, as it&#039;s really hard to read. XML is really meant for machines to parse&lt;br /&gt;
generically text data in a shared syntax but with possibly unknown semantics, and I need those&lt;br /&gt;
text representations to be editable easily.&lt;br /&gt;
&lt;br /&gt;
This also implies that there could be an XML representation of a Kate stream, which would be&lt;br /&gt;
useful if one were to make an editor that worked on a higher level than the current all-text&lt;br /&gt;
representation, and it is something that might very well happen in the future, in parallel with&lt;br /&gt;
the current format.&lt;br /&gt;
&lt;br /&gt;
== Karaoke ==&lt;br /&gt;
&lt;br /&gt;
Karaoke effects rely on motions, and there will be predefined higher level ways of specifying&lt;br /&gt;
timings and effects, two of which are already done.&lt;br /&gt;
&lt;br /&gt;
As an example, this is a valid Karaoke script:&lt;br /&gt;
&lt;br /&gt;
:kate {&lt;br /&gt;
::  simple_timed_glyph_style_morph {&lt;br /&gt;
:::   from style &amp;quot;start_style&amp;quot; to style &amp;quot;end_style&amp;quot;&lt;br /&gt;
:::   &amp;quot;Let &amp;quot;    at 1.0&lt;br /&gt;
:::   &amp;quot;us &amp;quot;     at 1.2&lt;br /&gt;
:::   &amp;quot;sing &amp;quot;   at 1.4&lt;br /&gt;
:::   &amp;quot;to&amp;quot;      at 2.0&lt;br /&gt;
:::   &amp;quot;ge&amp;quot;      at 2.5&lt;br /&gt;
:::   &amp;quot;ther&amp;quot;    at 3.0&lt;br /&gt;
::  }&lt;br /&gt;
:}&lt;br /&gt;
&lt;br /&gt;
The syllables will change from a style to another as time passes. The definition of the start_style&lt;br /&gt;
and end_style styles is omitted for brevity.&lt;br /&gt;
&lt;br /&gt;
== Problems to solve ==&lt;br /&gt;
&lt;br /&gt;
There are a few things to solve before the Kate bitstream format can be considered good&lt;br /&gt;
enough to be frozen:&lt;br /&gt;
&lt;br /&gt;
Note: the following is mostly solved, and the bitstream is now stable, and has been&lt;br /&gt;
backward and forward compatible since the first released version. This will be updated&lt;br /&gt;
when I get some time.&lt;br /&gt;
&lt;br /&gt;
=== Seeking and memory ===&lt;br /&gt;
&lt;br /&gt;
When seeking to a particular time in a movie with subtitles, we may end up at a place when a subtitle has been started, but is not removed yet. Pure streaming doesn&#039;t have this problem as it remembers the subtitle being issued (as opposed to, say, Vorbis, for which all data valid now is decoded from the last packet). With Kate, a text string valid now may have been issued long ago.&lt;br /&gt;
&lt;br /&gt;
I see three possible ways to solve this:&lt;br /&gt;
*each data packet includes the granule of the earliest still active packet (if none, this will be the granule of this very packet)&lt;br /&gt;
**this means seeks are two phased: first seek, find the next Kate packet, and seek again if the granule of the earlier still active packet is less than the original seeked granule. This implies support code on players to do the double seek.&lt;br /&gt;
&lt;br /&gt;
*use &amp;quot;reference frames&amp;quot;, a bit like Theora does, where the granule position is split in several fields: the higher bits represent a position for the reference frame, and the lowest bits a delta time to the current position. When seeking to a granule position, the lower bits are cleared off, yielding the granule position of the previous reference frame, so the seek ends up at the reference frame. The reference frame is a sync point where any active strings are issued again. This is a variant of the method described in the Writ wiki page, but the granule splitting avoids any &amp;quot;downtime&amp;quot;.&lt;br /&gt;
**this requires reissuing packets, and it doesn&#039;t feel right (and wastes space).&lt;br /&gt;
**it also requires &amp;quot;dummy&amp;quot; decoding of Kate data from the reference frame to the actual seek point to fully refresh the state &amp;quot;memory&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
*A variant of the two-granules-in-one system used by libcmml, where the &amp;quot;back link&amp;quot; points to the earliest still active string, rather than the previous one (this allows a two phase seek, rather than a multiphase seek, hopping back from event to event, with no real way to know if there is or not a previous event which is still active - I suppose CMML has no need to know this, if their &amp;quot;clips&amp;quot; do not overlap - mine can do).&lt;br /&gt;
**Such a system considerably shortens the usable granule space, though it can do a one phase seek, if I understand the system correctly, which I am not certain.&lt;br /&gt;
*** Well, it seems it can&#039;t do a one phase seek anyway.&lt;br /&gt;
&lt;br /&gt;
*Additionally, it could be possible to emit simple &amp;quot;keepalive&amp;quot; packets at regular intervals to help a seek algorithm to sync up to the stream without needing too much data reading - this helps for discontinuous streams where there could be no pages for a while if no data is needed at that time.&lt;br /&gt;
&lt;br /&gt;
=== Text encoding ===&lt;br /&gt;
&lt;br /&gt;
A header field declares the text encoding used in the stream. At the moment, only UTF-8 is&lt;br /&gt;
supported, for simplicity. There are no plans to support other encodings, such as UTF-16,&lt;br /&gt;
at the moment.&lt;br /&gt;
&lt;br /&gt;
Note that strings included in the header (language, category) are not affected by that&lt;br /&gt;
language encoding (rather obviously for language itself). These are ASCII.&lt;br /&gt;
&lt;br /&gt;
The actual text in events may include simple HTML-like markup (at the moment, allowed markup&lt;br /&gt;
is the same as the one Pango uses, but more markup types may be defined in the future).&lt;br /&gt;
It is also possible to ask libkate to remove this markup if the client prefers to receive&lt;br /&gt;
plain text without the markup.&lt;br /&gt;
&lt;br /&gt;
=== Language encoding ===&lt;br /&gt;
&lt;br /&gt;
A header field defines the language (if any) used in the stream (this can be overridden in a&lt;br /&gt;
data packet, but this is not relevant to this point). At the moment, my test code uses&lt;br /&gt;
ISO 639-1 two letter codes, but I originally thought to use RFC 3066 tags. However, matching&lt;br /&gt;
a language to a user selection may be simpler for user code if the language encoding is kept&lt;br /&gt;
simple. At the moment, I tend to favor allowing both two letter tags (eg, &amp;quot;en&amp;quot;) and secondary&lt;br /&gt;
tags (like &amp;quot;en_EN&amp;quot;), as RFC 3066 tags can be quite complex, but I welcome comments on this.&lt;br /&gt;
&lt;br /&gt;
If a stream contains more than one language, there usually is a predominant language, which&lt;br /&gt;
can be set as the default language for the stream. Each event can then have a language&lt;br /&gt;
override. If there is no predominant language, and it is not possible to split the stream&lt;br /&gt;
into multiple substreams, each with its own language, then it is possible to use the &amp;quot;mul&amp;quot;&lt;br /&gt;
language tag, as a last resort.&lt;br /&gt;
&lt;br /&gt;
=== Bitstream format for floating point values ===&lt;br /&gt;
&lt;br /&gt;
Floating point values are be turned to a 16.16 fixed point format, then stored in a bitpacked&lt;br /&gt;
format, storing the number of zero bits at the head and tail of the floating point values once&lt;br /&gt;
per stream, and the remainder bits for all values in the stream. This seems to yield good results&lt;br /&gt;
(typically a 50% reduction over 32 bits raw writes, and 70% over the snprintf based storage), and&lt;br /&gt;
has the big advantage of being portable (eg, independant of any IEEE format).&lt;br /&gt;
However, this means reduced precision due to the quantization to 16.16. I may add support for&lt;br /&gt;
variable precision (eg, 8.24 fixed point formats) to alleviate this. This would however mean less&lt;br /&gt;
space savings, though these are likely to be insignificant when Kate streams are interleaved with&lt;br /&gt;
a video.&lt;br /&gt;
&lt;br /&gt;
*Though this is not a Kate issue per se, the motion feature is very difficult to use without a curve editor. While tools may be coded to create a Kate bitstream for various existing subtitle formats, it is not certain it will be easy to find a good authoring tool for a series of curves. That said, it&#039;s not exactly difficult to do if you know a widget set.&lt;br /&gt;
&lt;br /&gt;
=== Higher dimensional curves/motions ===&lt;br /&gt;
&lt;br /&gt;
It is quite annoying to have to create two motions to control a color change, due to curves&lt;br /&gt;
being restricted to two dimensions. I may add support for arbitrary dimensions. It would also&lt;br /&gt;
help for 1D motions, like changing the time flow, where one coordinate is simply ignored at&lt;br /&gt;
the moment.&lt;br /&gt;
Alternatively, changes could be made to the Kate file format to hide the two dimensionality and&lt;br /&gt;
allow simpler specification of non-2 dimensional motions, but still map them to 2D in the kate&lt;br /&gt;
bitstream format.&lt;br /&gt;
&lt;br /&gt;
=== Category definition ===&lt;br /&gt;
&lt;br /&gt;
The category field in the BOS packet is a 16 byte text field (15 really, as it is zero terminated&lt;br /&gt;
in the bitstream itself). Its goal is to provide the reader with a short description of what kind&lt;br /&gt;
of information the stream contains, eg subtitles, lyrics, etc. This would be displayed to the user,&lt;br /&gt;
possibly to allow to choose to turn some streams on and off.&lt;br /&gt;
&lt;br /&gt;
Since this category is meant primarily for a machine to parse, they will be kept to ASCII. When&lt;br /&gt;
a player recognizes a category, it is free to replace its name with one in the user&#039;s language if&lt;br /&gt;
it prefers. Even in English, the &amp;quot;lyrics&amp;quot; category could be displayed by a player as &amp;quot;Lyrics&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Since this is a free text field rather than an enumeration, it would be good to have a list of&lt;br /&gt;
common predefined category names that Kate streams can use.&lt;br /&gt;
&lt;br /&gt;
This is a list of proposed predefined categories, feedback/additions welcome:&lt;br /&gt;
&lt;br /&gt;
* subtitles - the usual movie subtitles, as text&lt;br /&gt;
* spu-subtitles - movie subtitles in DVD style paletted images&lt;br /&gt;
* lyrics - song lyrics&lt;br /&gt;
&lt;br /&gt;
Please remember the 15 character limit if proposing other categories.&lt;br /&gt;
&lt;br /&gt;
 Note that the list of categories is subject to change, and will likely&lt;br /&gt;
 be replaced by new, more &amp;quot;identifier like&amp;quot; ones. The three ones above,&lt;br /&gt;
 however, would be kept for backward compatibility as they&#039;re already used.&lt;br /&gt;
&lt;br /&gt;
== Text to speech ==&lt;br /&gt;
&lt;br /&gt;
One of the goals of the Kate bitstream format is that text data can be easily parsed&lt;br /&gt;
by the user of the decoder, so any additional information, such as style, placement,&lt;br /&gt;
karaoke data, etc, should be able to be stripped to leave only the bare text. This is&lt;br /&gt;
in view of allowing text-to-speech software to use Kate bitstreams as a bandwith-cheap&lt;br /&gt;
way of conveying speech data, and could also allow things like e-books which can be&lt;br /&gt;
either read or listened to from the same bitstream (I have seen no reference to this&lt;br /&gt;
being used anywhere, but I see no reason why the granule progression should be temporal,&lt;br /&gt;
and not user controlled, such as by using a &amp;quot;next&amp;quot; button which would bump a granule&lt;br /&gt;
postion by a preset amount, simulating turning a page (this would be close to necessary&lt;br /&gt;
for text-to-speech, as the wall time duration of the spoken speech is not known in&lt;br /&gt;
advance to the Kate encoder, and can&#039;t be mapped to a time based granule progression)).&lt;br /&gt;
All text strings triggered consecutively between the two granule positions would then&lt;br /&gt;
be read in order.&lt;br /&gt;
&lt;br /&gt;
== Possible additions ==&lt;br /&gt;
&lt;br /&gt;
=== Embedded binary data ===&lt;br /&gt;
&lt;br /&gt;
Images and font mappings can be included within a Kate stream.&lt;br /&gt;
&lt;br /&gt;
==== Images ====&lt;br /&gt;
&lt;br /&gt;
Though this could be misused to interfere with ability to render as text-to-speech, Kate&lt;br /&gt;
can use images as well as text. The same caveat as for fonts applies with regard to data&lt;br /&gt;
duplication.&lt;br /&gt;
&lt;br /&gt;
Complex images might however be best left to a multiplexed OggSpots or OggMNG stream, unless the&lt;br /&gt;
images mesh with the text (eg, graphical exclamation points, custom fonts, (see next&lt;br /&gt;
paragraph), etc).&lt;br /&gt;
&lt;br /&gt;
There is support for simple paletted bitmap images, with a variable length palette of up&lt;br /&gt;
to 256 colors (in fact, sized in powers of 2 up to 256) and matching pixel data in as&lt;br /&gt;
many bits per pixel as can address the palette. Palettes and images are stored separately,&lt;br /&gt;
so can be used with one another with no fixed assignment.&lt;br /&gt;
&lt;br /&gt;
Palettes and bitmaps are put in two separate header for later use by reference, but can&lt;br /&gt;
also be placed in data packets, as with motions, etc, if they are not going to be reused.&lt;br /&gt;
&lt;br /&gt;
PNG bitmaps can also be embedded in a Kate stream. These do not have associated palettes&lt;br /&gt;
(but the PNGs themselves may or may not be paletted). There is no support for decoding PNG&lt;br /&gt;
images in libkate itself, so a program will have to use libpng (or similar code) to decode&lt;br /&gt;
the PNG image. For instance, the libtiger rendering library uses Cairo to decode and render&lt;br /&gt;
PNG images in Kate streams.&lt;br /&gt;
&lt;br /&gt;
This can be used to have custom fonts, so that raw text is still available if the stream&lt;br /&gt;
creator wants a custom look.&lt;br /&gt;
&lt;br /&gt;
I expect that the need for more than 256 colors in a bitmap, or non palette bitmap data,&lt;br /&gt;
would be best handled by another codec, eg OggMNG or OggSpots. The goal of images in a&lt;br /&gt;
Kate stream is to mesh the images with the text, not to  have large images by themselves.&lt;br /&gt;
&lt;br /&gt;
On the other hand, interesting Karaoke effects could be achieved by having MNG images&lt;br /&gt;
instead of simple paletted bitmaps in a Kate streams. Comments would be most welcome on&lt;br /&gt;
whether this is going too far, however.&lt;br /&gt;
&lt;br /&gt;
I am also investigating SVG images. These allow for very small footprint images for simple&lt;br /&gt;
vector drawings, and could be very useful for things like background gradients below text.&lt;br /&gt;
&lt;br /&gt;
A possible solution to the duplication issue is to have another stream in the container&lt;br /&gt;
stream, which would hold the shared data (eg, fonts), which the user program could load,&lt;br /&gt;
and which could then be used by any Kate (and other) stream. Typically, this type of stream&lt;br /&gt;
would be a degenerate stream with only header packets (so it is fully processed before any&lt;br /&gt;
other stream presents data packets that might make use of that shared data), and all payload&lt;br /&gt;
such as fonts being contained within the headers. Thinking about it, it has parallels with&lt;br /&gt;
the way Vorbis stores its codebooks within a header packet, or even the way Kate stores the&lt;br /&gt;
list of styles within a header packet.&lt;br /&gt;
&lt;br /&gt;
==== Fonts ====&lt;br /&gt;
&lt;br /&gt;
Custom fonts are merely a set of ranges mapping unicode code points to bitmaps. As this implies,&lt;br /&gt;
fonts are bitmap fonts, not vector fonts, so scaling, if supported by the rendering client,&lt;br /&gt;
may not look as good as with a vector font.&lt;br /&gt;
&lt;br /&gt;
A style may also refer to a font name to use (eg, &amp;quot;Tahoma&amp;quot;). These fonts may or may not be&lt;br /&gt;
available on the playing system, however, since the font data is not included in the stream,&lt;br /&gt;
just referenced by name. For this reason, it is best to keep to widely known fonts.&lt;br /&gt;
&lt;br /&gt;
== Reference encoder/decoder ==&lt;br /&gt;
&lt;br /&gt;
A encoder (kateenc) and a decoder (katedec) are included in the tools directory.&lt;br /&gt;
The encoder supports input from several different formats:&lt;br /&gt;
* a custom text based file format (see [[#The Kate file format|The Kate file format]]), which is by no means meant to be part of the Kate bitstream specification itself&lt;br /&gt;
* SubRip (.srt), the most common subtitle format I found&lt;br /&gt;
* LRC lyrics format.&lt;br /&gt;
&lt;br /&gt;
As an example for the widely used SRT subtitles format, the following command line&lt;br /&gt;
create a Kate subtitles stream from an SRT file:&lt;br /&gt;
&lt;br /&gt;
kateenc -l en -c subtitles -t srt -o subtites.ogg subtitles.srt&lt;br /&gt;
&lt;br /&gt;
The reverse is possible, to recover an SRT file from a Kate stream, with katedec.&lt;br /&gt;
&lt;br /&gt;
Note that the subtitles.ogg file should then be multiplexed into the A/V stream,&lt;br /&gt;
using either ogg-tools or oggz-tools.&lt;br /&gt;
&lt;br /&gt;
The Kate bitstreams encoded and decoded by those tools are (supposed to be) correct for this&lt;br /&gt;
specification, provided their input is correct.&lt;br /&gt;
&lt;br /&gt;
== Next steps ==&lt;br /&gt;
&lt;br /&gt;
=== Continuations ===&lt;br /&gt;
&lt;br /&gt;
Continuations are a way to add to existing events, and are mostly meant for motions. When streaming&lt;br /&gt;
in real time, what motions may be applied to events may not be known in advance (for instance, for a&lt;br /&gt;
draw chat program where two programs exchange Kate streams, the drawing motions are only known as&lt;br /&gt;
they are drawn. Continuations will allow an event to be extended in time, and motions to be appended&lt;br /&gt;
to it. This is only useful for streaming, as when stored in a file, everything is already known in&lt;br /&gt;
advance.&lt;br /&gt;
&lt;br /&gt;
=== A rendering library ===&lt;br /&gt;
&lt;br /&gt;
This will allow easier integration in other packages (movie players, etc).&lt;br /&gt;
I have started working on an implementation using Cairo and Pango, though I&#039;m still at the early stages.&lt;br /&gt;
I might add support for embedding vector fonts in a Kate stream if I was going that way. Still need to think about this.&lt;br /&gt;
Another point of note is that when this library is available, it would make it easier to add&lt;br /&gt;
capabilities such as rotation, scaling, etc, to the bitstream, since this would not cause too&lt;br /&gt;
much work for playing programs using the rendering library. It is expected that these additions&lt;br /&gt;
would stay backward compatible (eg, an old player would ignore this information but still correctly&lt;br /&gt;
decode the information they can work with from a newly encoded stream).&lt;br /&gt;
&lt;br /&gt;
=== An XML representation ===&lt;br /&gt;
&lt;br /&gt;
While I purposefully did not write Kate description files in XML due to me finding editing XML such&lt;br /&gt;
a chore, it would be nice to be able to losslessly convert between the more user friendly representation&lt;br /&gt;
and an XML document, so one can do what one does with XML documents, like transformations.&lt;br /&gt;
&lt;br /&gt;
And after all, some people might prefer editing the XML version.&lt;br /&gt;
&lt;br /&gt;
=== Packaging ===&lt;br /&gt;
&lt;br /&gt;
It would be really nice to have packages for libkate/libtiger for many distros.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re a packager for a distro which doesn&#039;t have yet packages for libkate&lt;br /&gt;
or libtiger, please consider helping :)&lt;br /&gt;
&lt;br /&gt;
In particular, packages for Debian would be grand.&lt;br /&gt;
&lt;br /&gt;
== Matroska mapping ==&lt;br /&gt;
&lt;br /&gt;
The codec ID is &amp;quot;S_KATE&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
As for Theora and Vorbis, Kate headers are stored in the private data as xiph-laced packets:&lt;br /&gt;
&lt;br /&gt;
 Byte 0: number of packets present, minus 1 (there must be at least one packet) - let this number be NP&lt;br /&gt;
 Bytes 1..n: lengths of the first NP packets, coded in xiph style lacing&lt;br /&gt;
 Bytes n+1..end: the data packets themselves concatenated one after the other&lt;br /&gt;
&lt;br /&gt;
Note that the length of the last packet isn&#039;t encoded, it is deduced from the sizes of the other&lt;br /&gt;
packets and the total size of the private data.&lt;br /&gt;
&lt;br /&gt;
This mapping is similar to the Vorbis and Theora mappings, with the caveat that one should not&lt;br /&gt;
expect a set number of headers.&lt;br /&gt;
&lt;br /&gt;
== Downloading ==&lt;br /&gt;
&lt;br /&gt;
libkate encodes and decodes Kate streams, and is API and ABI stable.&lt;br /&gt;
&lt;br /&gt;
The libkate source distribution is available at [http://libkate.googlecode.com/ http://libkate.googlecode.com/].&lt;br /&gt;
&lt;br /&gt;
A public git repository is available at [http://git.xiph.org/?p=users/oggk/kate.git;a=summary http://git.xiph.org/?p=users/oggk/kate.git;a=summary].&lt;br /&gt;
&lt;br /&gt;
libtiger renders Kate streams using Pango and Cairo, and is alpha, with API changes still possible.&lt;br /&gt;
&lt;br /&gt;
The libtiger source distribution is available at [http://libtiger.googlecode.com/ http://libtiger.googlecode.com/].&lt;br /&gt;
&lt;br /&gt;
A public git repository is available at [http://git.xiph.org/?p=users/oggk/tiger.git;a=summary http://git.xiph.org/?p=users/oggk/tiger.git;a=summary].&lt;br /&gt;
&lt;br /&gt;
== HOWTOs ==&lt;br /&gt;
&lt;br /&gt;
These paragraphs describe a few ways to use Kate streams:&lt;br /&gt;
&lt;br /&gt;
=== Text movie subtitles ===&lt;br /&gt;
&lt;br /&gt;
Kate streams can carry Unicode text (that is, text that can represent&lt;br /&gt;
pretty much any existing language/script). If several Kate streams are&lt;br /&gt;
multiplexed along with a video, subtitles in various languages can be&lt;br /&gt;
made for that movie.&lt;br /&gt;
&lt;br /&gt;
An easy way to create such subtitles is to use ffmpeg2theora, which&lt;br /&gt;
can create Kate streams from SubRip (.srt) format files, a simple but&lt;br /&gt;
common text subtitles format. ffmpeg2theora 0.21 or later is needed.&lt;br /&gt;
&lt;br /&gt;
At its simplest:&lt;br /&gt;
&lt;br /&gt;
    ffmpeg2theora -o video-with-subtitles.ogg --subtitles subtitles.srt&lt;br /&gt;
      video-without-subtitles.avi&lt;br /&gt;
&lt;br /&gt;
Several languages may be created and tagged with their language code&lt;br /&gt;
for easy selection in a media player:&lt;br /&gt;
&lt;br /&gt;
    ffmpeg2theora -o video-with-subtitles.ogg video-without-subtitles.avi&lt;br /&gt;
      --subtitles japanese-subtitles.srt --subtitles-language ja&lt;br /&gt;
      --subtitles welsh-subtitles.srt --subtitles-language cy&lt;br /&gt;
      --subtitles english-subtitles.srt --subtitles-language en_GB&lt;br /&gt;
&lt;br /&gt;
Alternatively, kateenc (which comes with the libkate distribution) can&lt;br /&gt;
create Kate streams from SubRip files as well. These can then be merged&lt;br /&gt;
with a video with oggz-tools:&lt;br /&gt;
&lt;br /&gt;
    kateenc -t srt -c SUB -l it -o subtitles.ogg italian-subtitles.srt&lt;br /&gt;
    oggz merge -o movie-with-subtitles.ogg movie-without-subtitles.ogg subtitles.ogg&lt;br /&gt;
&lt;br /&gt;
This second method can also be used to add subtitles to a video which&lt;br /&gt;
is already encoded to Theora, as it will not transcode the video again.&lt;br /&gt;
&lt;br /&gt;
=== DVD subtitles ===&lt;br /&gt;
&lt;br /&gt;
DVD subtitles are not text, but images. Thoggen, a DVD ripper program,&lt;br /&gt;
can convert these subtitles to Kate streams (at the time of writing,&lt;br /&gt;
Thoggen and GStreamer have not applied the necessary patches for this&lt;br /&gt;
to be possible out of the box, so patching them will be required).&lt;br /&gt;
&lt;br /&gt;
When configuring how to rip DVD tracks, any subtitles will be detected&lt;br /&gt;
by Thoggen, and selecting them in the GUI will cause them to be saved as&lt;br /&gt;
Kate tracks along with the movie.&lt;br /&gt;
&lt;br /&gt;
=== Song lyrics ===&lt;br /&gt;
&lt;br /&gt;
Kate streams carrying song lyrics can be embedded in an Ogg file. The&lt;br /&gt;
oggenc Vorbis encoding tool from the Xiph.Org Vorbis tools allows lyrics&lt;br /&gt;
to be loaded from a LRC or SRT text file and converted to a Kate stream&lt;br /&gt;
multiplexed with the resulting Vorbis audio. At the time of writing,&lt;br /&gt;
the patch to oggenc was not applied yet, so it will have to be patched&lt;br /&gt;
manually with the patch found in the diffs directory.&lt;br /&gt;
&lt;br /&gt;
    oggenc -o song-with-lyrics.ogg --lyrics lyrics.lrc --lyrics-language en_US song.wav&lt;br /&gt;
&lt;br /&gt;
So called &#039;enhanced LRC&#039; files (containing extra karaoke timing information)&lt;br /&gt;
are supported, and a simple karaoke color change scheme will be saved&lt;br /&gt;
out for these files. For more complex karaoke effects (such as more&lt;br /&gt;
complex style changes, or sprite animation), kateenc should be used with&lt;br /&gt;
a Kate description file to create a separate Kate stream, which can then&lt;br /&gt;
be merged with a Vorbis only song with oggz-tools:&lt;br /&gt;
&lt;br /&gt;
    oggenc -o song.ogg song.wav&lt;br /&gt;
    kateenc -t kate -c LRC -l en_US -o lyrics.ogg lyrics-with-karaoke.kate&lt;br /&gt;
    oggz merge -o song-with-karaoke.ogg lyrics-with-karaoke.ogg song.ogg&lt;br /&gt;
&lt;br /&gt;
This latter method may also be used if you already have an encoded Vorbis song&lt;br /&gt;
with no lyrics, and just want to add the lyrics without reencoding.&lt;br /&gt;
&lt;br /&gt;
=== Metadata ===&lt;br /&gt;
&lt;br /&gt;
Metadata can be attached to events, or to styles, bitmaps, regions, etc.&lt;br /&gt;
Metadata are free form tag/value pairs, and can be used to enrich their&lt;br /&gt;
attached data with extra information. However, how this information is&lt;br /&gt;
interpreted is up to the application layer.&lt;br /&gt;
&lt;br /&gt;
It is worth noting that an event may not have attached text, so it is&lt;br /&gt;
possible to create an empty timed event with attached metadata.&lt;br /&gt;
&lt;br /&gt;
For instance, let&#039;s say we have a documentary, with footage from various&lt;br /&gt;
places, as well as short interviews, and we want two things:&lt;br /&gt;
- tag footage with metadata about the location and date that footage was shot&lt;br /&gt;
- subtitle the interviews and tag those subtitles with information about the speaker&lt;br /&gt;
&lt;br /&gt;
You can then create an empty Kate event for each footage part, synchronized&lt;br /&gt;
with the footage, and attach a new metadata item called GEO_LOCATION, filled&lt;br /&gt;
with latitude and longitude of the place the footage was shot at.&lt;br /&gt;
Similarly, for each subtitle event, a metadata item called SPEAKER can be&lt;br /&gt;
attached.&lt;br /&gt;
&lt;br /&gt;
An empty event to tag a long 4:20 footage shot in Tokyo on 2011/08/12, and&lt;br /&gt;
inserted at 18:30 in the documentary could look like:&lt;br /&gt;
&lt;br /&gt;
  event {&lt;br /&gt;
    00:18:30,000 --&amp;gt; 00:22:50,000&lt;br /&gt;
    meta &amp;quot;GEO_LOCATION&amp;quot; = &amp;quot;35.42; 139.42&amp;quot;&lt;br /&gt;
    meta &amp;quot;DATE&amp;quot; = &amp;quot;2011-08-12&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a example for a line spoken by Dr Joe Bloggs at 18:30 into the documentary:&lt;br /&gt;
&lt;br /&gt;
  event {&lt;br /&gt;
    00:18:30,000 --&amp;gt; 00:18:32,000&lt;br /&gt;
    &amp;quot;Notice how the subtitles for my words have metadata attached to them&amp;quot;&lt;br /&gt;
    meta &amp;quot;SPEAKER&amp;quot; = &amp;quot;Dr Joe Bloggs&amp;quot;&lt;br /&gt;
    meta &amp;quot;URL&amp;quot; = &amp;quot;http://www.example.com/biography?name=Joe+Bloggs&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Notice how another metadata item, URL, is also present. The application&lt;br /&gt;
will have to be aware of those metadata in order to do something with it&lt;br /&gt;
though. Since those are free form, it is up to you to think of what&lt;br /&gt;
metadata you want, and make use of it.&lt;br /&gt;
&lt;br /&gt;
Note that metadata may be attached to other objects, such as regions.&lt;br /&gt;
This way, you can for example create a region tagged with a name, and&lt;br /&gt;
track a person&#039;s movements with that region. Or you can tag a bitmap&lt;br /&gt;
with a copyright and a URL to a larger version of the image.&lt;br /&gt;
&lt;br /&gt;
=== Changing a Kate stream embedded in an Ogg stream ===&lt;br /&gt;
&lt;br /&gt;
If you need to change a Kate stream already embedded in an Ogg stream (eg, you have a movie with subtitles, and you want to fix a spelling mistake, or want to bring one of the subtitles forward in time, etc), you can do this easily with KateDJ, a tool that will extract Kate streams, decode them to a temporary location, and rebuild the original stream after you&#039;ve made whatever changes you want.&lt;br /&gt;
&lt;br /&gt;
KateDJ (included with the libkate distribution) is a GUI program using wxPython, a Python module for the wxWidgets GUI library, and the oggz tools (both needing installing separately if they are not already).&lt;br /&gt;
&lt;br /&gt;
The procedure consists of:&lt;br /&gt;
&lt;br /&gt;
* Run KateDJ&lt;br /&gt;
* Click &#039;Load Ogg stream&#039; and select the file to load&lt;br /&gt;
* Click &#039;Demux file&#039; to decode Kate streams in a temporary location&lt;br /&gt;
* Edit the Kate streams (a message box tells you where they are placed)&lt;br /&gt;
* When done, click &#039;Remux file from parts&#039;&lt;br /&gt;
* If any errors are reported, continue editing until the remux step succeeds&lt;br /&gt;
&lt;br /&gt;
== Frequently Asked Questions ==&lt;br /&gt;
&lt;br /&gt;
=== Does libkate work on other plaforms than Linux ? ===&lt;br /&gt;
&lt;br /&gt;
Yes, libkate is not Linux specific in any way. It optionally relies on libogg&lt;br /&gt;
and libpng, two libraries widely ported to various platforms.&lt;br /&gt;
It has been reported to work on Windows and MacOS X as well as UNIX platforms.&lt;br /&gt;
&lt;br /&gt;
However, libtiger, a rendering library for Kate streams, relies on Pango and Cairo,&lt;br /&gt;
which are not easy to build on Windows, though they can be.&lt;br /&gt;
The Tiger renderer is however completely separate from libkate, and is not needed&lt;br /&gt;
for full encoding and decoding of Kate streams.&lt;br /&gt;
&lt;br /&gt;
=== Where can I find some example files ? ===&lt;br /&gt;
&lt;br /&gt;
The libkate distribution can generate various examples, but already built files&lt;br /&gt;
can be found there:&lt;br /&gt;
[http://people.xiph.org/~oggk/elephants_dream/elephantsdream-with-subtitles.ogg]&lt;br /&gt;
[http://stallman.org/fry/Stephen_Fry-Happy_Birthday_GNU-nq_600px_425kbit.ogv]&lt;br /&gt;
&lt;br /&gt;
These files use raw text only.&lt;br /&gt;
&lt;br /&gt;
[[Category:Ogg Mappings]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=OggKate&amp;diff=16645</id>
		<title>OggKate</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=OggKate&amp;diff=16645"/>
		<updated>2017-11-21T09:11:25Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* Karaoke */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Disclaimer ==&lt;br /&gt;
This is not a Xiph codec, though it may be embedded in Ogg alonside other Xiph&lt;br /&gt;
codecs, such as Vorbis and Theora. As such, please do not assume that Xiph has&lt;br /&gt;
anything to do with this, much less responsibility.&lt;br /&gt;
&lt;br /&gt;
==  What is Kate? ==&lt;br /&gt;
&lt;br /&gt;
Kate is an overlay codec, originally designed for karaoke and text, that can be&lt;br /&gt;
multiplexed in Ogg.&lt;br /&gt;
&lt;br /&gt;
Text and images can be carried and animated by a Kate stream.&lt;br /&gt;
Most of the time, they will (optionally) be multiplexed with audio/video to carry subtitles,&lt;br /&gt;
song lyrics (with or without karaoke data), etc.&lt;br /&gt;
&lt;br /&gt;
Series of curves (splines, segments, etc) may be attached to various properties&lt;br /&gt;
(text position, font size, etc) to create animated overlays. This allows scrolling&lt;br /&gt;
or fading text to be defined. This can even be used to draw arbitrary shapes, so&lt;br /&gt;
hand drawing can also be represented by a Kate stream.&lt;br /&gt;
&lt;br /&gt;
Example uses of Kate streams are movie subtitles for Theora videos, either text based,&lt;br /&gt;
as may be created by [http://www.v2v.cc/~j/ffmpeg2theora ffmpeg2theora], or image&lt;br /&gt;
based, such as created by [http://thoggen.net Thoggen] (patching needed), and lyrics,&lt;br /&gt;
as created by oggenc, from vorbis-tools.&lt;br /&gt;
&lt;br /&gt;
== Why a new codec? ==&lt;br /&gt;
&lt;br /&gt;
As I was adding support for Theora, Speex and FLAC to some software of mine, I found myself&lt;br /&gt;
wanting to have song lyrics accompanying Vorbis audio. Since Vorbis comments are limited to&lt;br /&gt;
the headers, one can&#039;t add them in the stream as they are sung, so another multiplexed stream&lt;br /&gt;
would be needed to carry them.&lt;br /&gt;
&lt;br /&gt;
The three possible bases usable for such a codec I found were Writ, CMML, and OGM/SRT.&lt;br /&gt;
&lt;br /&gt;
*[[OggWrit|Writ]] is an unmaintained start at an implementation of a very basic design, though I did find an encoder/decoder in py-ogg2 later on - I&#039;d been quicker to write Kate from scratch anyway.&lt;br /&gt;
*[[CMML]] is more geared towards encapsulating metadata about an accompanying stream, rather than being a data stream itself, and seemed complex for a simple use, though I have now revised my view on this - besides, it seems designed for Annodex (which I haven&#039;t had a look at), though it does seems relatively generic for use outwith Annodex - though it is being &amp;quot;repurposed&amp;quot; as timed text now, bringing it closer to what I&#039;m doing&lt;br /&gt;
*OGM/SRT, which I only found when I added Kate support to MPlayer, is shoehorning various data formats into an Ogg stream, and just dumps the SRT subtitle format as is, AFAICS (though I haven&#039;t looked at this one in detail, since I&#039;d already had a working Kate implementation by that time)&lt;br /&gt;
&lt;br /&gt;
I then decided to roll my own, not least because it&#039;s a fun thing to do.&lt;br /&gt;
&lt;br /&gt;
I found other formats, such as USF (designed for inclusion in Matroska) and various subtitle formats,&lt;br /&gt;
but none were designed for embedding inside an Ogg container.&lt;br /&gt;
&lt;br /&gt;
== Overview of the Kate bitstream format ==&lt;br /&gt;
&lt;br /&gt;
I&#039;ve taken much inspiration from Vorbis and Theora here.&lt;br /&gt;
Headers and packets (as well as the API design) follow the design of these two codecs.&lt;br /&gt;
&lt;br /&gt;
A rough overview (see [[#Format specification|Format specification]] for more details) is:&lt;br /&gt;
&lt;br /&gt;
Headers packets:&lt;br /&gt;
*ID header [BOS]: magic, version, granule fraction, encoding, language, etc&lt;br /&gt;
*Comment header: Vorbis comments, as per Vorbis/Theora streams&lt;br /&gt;
*Style definitions header: a list of predefined styles to be referred to by data packets&lt;br /&gt;
*Region definitions header: a list of predefined regions to be referred to by data packets&lt;br /&gt;
*Curves definitions header: a list of predefined curves to be referred to by data packets&lt;br /&gt;
*Motion definitions header: a list of predefined motions to be referred to by data packets&lt;br /&gt;
*Palette definitions header: a list of predefined palettes to be referred to by data packets&lt;br /&gt;
*Bitmap definitions header: a list of predefined bitmaps to be referred to by data packets&lt;br /&gt;
*Font mapping definitions header: a list of predefined font mappings to be referred to by data packets&lt;br /&gt;
&lt;br /&gt;
Other header packets are ignored, and left for future expansion.&lt;br /&gt;
&lt;br /&gt;
Data packets:&lt;br /&gt;
*text data: text/image and optional motions, accompanied by optional overrides for style, region, language, etc&lt;br /&gt;
*keepalive: can be emitted at any time to help a demuxer know where we&#039;re at, but those packets are optional&lt;br /&gt;
*repeats: a verbatim repeat of a text packet&#039;s payload, in order to bound any backward seeking needed when starting to play a stream partway through. These are also optional.&lt;br /&gt;
*end data [EOS]: marks the end of the stream, it doesn&#039;t have any useful payload&lt;br /&gt;
&lt;br /&gt;
Other data packets are ignored, and left for future expansion.&lt;br /&gt;
&lt;br /&gt;
The intent of the &amp;quot;keepalive&amp;quot; packet is to be sent at regular&lt;br /&gt;
intervals when no other packet has been emitted for a while. This would be to help seeking code&lt;br /&gt;
find a kate page more easily.&lt;br /&gt;
&lt;br /&gt;
Things of note:&lt;br /&gt;
*Kate is a discontinuous codec, as defined in [http://www.xiph.org/ogg/doc/ogg-multiplex.html ogg-multiplex.html] in the Ogg documentation, which means it&#039;s timed by start granule, not end granule (as Theora and Vorbis).&lt;br /&gt;
* All data packets are on their own page, for two reasons:&lt;br /&gt;
**Ogg keeps track of granules at the page level, not the packet level&lt;br /&gt;
**if no text event happens for a while after a particular text event, we don&#039;t want to delay it so a larger page can be issued&lt;br /&gt;
&lt;br /&gt;
See also [[#Seeking and memory|Problems to solve: Seeking and memory]].&lt;br /&gt;
&lt;br /&gt;
*The granule encoding is not a direct time/granule correspondance, see the granule encoding section.&lt;br /&gt;
*The EOS packet should have a granule pos higher or equal to the end time of all events.&lt;br /&gt;
*User code doesn&#039;t have to know the number of headers to expect, this is moved inside the library code (as opposed to Vorbis and Theora).&lt;br /&gt;
*The format contains hooks so that additional information may be added in future revisions while keeping backward compatibility (though old decoders will correctly parse, but ignore the new information).&lt;br /&gt;
&lt;br /&gt;
== Format specification ==&lt;br /&gt;
&lt;br /&gt;
The Kate bitstream format consists of a number of sequential packets.&lt;br /&gt;
Packets can be either header packets or data packets. All header packets&lt;br /&gt;
must appear before any data packet.&lt;br /&gt;
&lt;br /&gt;
Header packets must appear in order. Decoding of a data packet is not&lt;br /&gt;
possible until all header packets have been decoded.&lt;br /&gt;
&lt;br /&gt;
Each Kate packet starts with a one byte type. A type with the MSB set&lt;br /&gt;
(eg, between 0x80 and 0xff) indicates a header packet, while a type with&lt;br /&gt;
the MSB cleared (eg, between 0x00 and 0x7f) indicates a data packet.&lt;br /&gt;
All header packets then have the Kate magic, from byte offset 1 to byte&lt;br /&gt;
offset 7 (&amp;quot;kate\0\0\0&amp;quot;). Note that this applies only to header packets:&lt;br /&gt;
data packets do not contain the Kate signature.&lt;br /&gt;
&lt;br /&gt;
Since the ID header must appear first, a Kate stream can be recognized&lt;br /&gt;
by comparing the first eight bytes of the first packet with the signature&lt;br /&gt;
string &amp;quot;\200kate\0\0\0&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When embedded in Ogg,the first packet in a Kate stream (always packet type 0x80,&lt;br /&gt;
the id header packet) must be placed on a separate page. The corresponding Ogg&lt;br /&gt;
packet must be marked as beginning of stream (BOS).All subsequent header packets&lt;br /&gt;
must be on one or more pages. Subsequently, each data packet must be on a separate&lt;br /&gt;
page.&lt;br /&gt;
&lt;br /&gt;
The last data packet must be the end of stream packet (packet type 0x7f).&lt;br /&gt;
&lt;br /&gt;
When embedded in Ogg, the corresponding Ogg packet must be marked as end of stream (EOS).&lt;br /&gt;
&lt;br /&gt;
As per the Ogg specification, granule positions must be non decreasing&lt;br /&gt;
within the stream. Header packets have granule position 0.&lt;br /&gt;
&lt;br /&gt;
Currently existing packet types are:&lt;br /&gt;
:headers:&lt;br /&gt;
::0x80  ID header (BOS)&lt;br /&gt;
::0x81  Vorbis comment header&lt;br /&gt;
::0x82  regions list header&lt;br /&gt;
::0x83  styles list header&lt;br /&gt;
::0x84  curves list header&lt;br /&gt;
::0x85  motions list header&lt;br /&gt;
::0x86  palettes list header&lt;br /&gt;
::0x87  bitmaps list header&lt;br /&gt;
::0x88  font ranges and mappings header&lt;br /&gt;
:data:&lt;br /&gt;
::0x00 text data (including optional motions and overrides)&lt;br /&gt;
::0x01 keepalive&lt;br /&gt;
::0x02 repeat&lt;br /&gt;
::0x7f end packet (EOS)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This format described here is for bitstream version 0.x.&lt;br /&gt;
As or 19 december 2008, the latest bitstream version is 0.4.&lt;br /&gt;
&lt;br /&gt;
For more detailed information, refer to the format documentation&lt;br /&gt;
in libkate (see URL below in the [[#Downloading|Downlading]] section).&lt;br /&gt;
&lt;br /&gt;
Following is the definition of the ID header (packet type 0x80).&lt;br /&gt;
This works out to a 64 byte ID header. This is the header that should be&lt;br /&gt;
used to detect a Kate stream within an Ogg stream.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  0               1               2               3              |&lt;br /&gt;
  0                   1                   2                   3&lt;br /&gt;
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1| Byte&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | packtype      | Identifier char[7]: &#039;kate\0\0\0&#039;              | 0-3&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | kate magic continued                                          | 4-7&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | reserved - 0  | version major | version minor | num headers   | 8-11&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | text encoding | directionality| reserved - 0  | granule shift | 12-15&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | cw sh |  canvas width         | ch sh | canvas height         | 16-19&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | reserved - 0                                                  | 20-23&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | granule rate numerator                                        | 24-27&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | granule rate denominator                                      | 28-31&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | language (NUL terminated)                                     | 32-35&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | language (continued)                                          | 36-39&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | language (continued)                                          | 40-43&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | language (continued)                                          | 44-47&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | category (NUL terminated)                                     | 48-51&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | category (continued)                                          | 52-55&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | category (continued)                                          | 56-59&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
 | category (continued)                                          | 60-63&lt;br /&gt;
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The fields cw sh, canvas width, cw sh, and canvas height were introduced&lt;br /&gt;
in bistream 0.3. Earlier bitstreams will have 0 in these fields.&lt;br /&gt;
&lt;br /&gt;
language and category are NUL terminating ASCII strings.&lt;br /&gt;
Language follows RFC 3066, though obviously will not accommodate language tags&lt;br /&gt;
with lots of subtags.&lt;br /&gt;
&lt;br /&gt;
Category is currently loosely defined, and I haven&#039;t found yet a nice way to&lt;br /&gt;
present it in a generic way, but is meant for automatic classifying of&lt;br /&gt;
various multiplexed Kate streams (eg, to recognize that some streams are&lt;br /&gt;
subtitles (in a set of languages), and some others are commentary (in a&lt;br /&gt;
possibly different set of languages, etc).&lt;br /&gt;
&lt;br /&gt;
== API overview ==&lt;br /&gt;
&lt;br /&gt;
libkate offers an API very similar to that of libvorbis and libtheora, as well as&lt;br /&gt;
an extra higher level decoding API.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an overview of the three main modules:&lt;br /&gt;
&lt;br /&gt;
=== Decoding ===&lt;br /&gt;
&lt;br /&gt;
Decoding is done in a way similar to libvorbis. First, initialize a kate_info and a&lt;br /&gt;
kate_comment structure. Then, read headers by calling kate_decode_headerin. Once&lt;br /&gt;
all headers have been read, a kate_state is initialized for decoding using kate_decode_init,&lt;br /&gt;
and kate_decode_packetin is called repeatedly with data packets. Events (eg, text) can be&lt;br /&gt;
retrieved via kate_decode_eventout.&lt;br /&gt;
&lt;br /&gt;
=== Encoding ===&lt;br /&gt;
&lt;br /&gt;
Encoding is also done in a way similar to libvorbis. First initialize a kate_info&lt;br /&gt;
and a kate_comment structure, and fill them out as needed. kate_encode_headers will&lt;br /&gt;
create ogg packets from those. Then, kate_encode_text is called repeatedly for all&lt;br /&gt;
the text events to add. When done, calling kate_encode_finish will create an end of&lt;br /&gt;
stream packet.&lt;br /&gt;
&lt;br /&gt;
=== High level decoding API ===&lt;br /&gt;
&lt;br /&gt;
There are only 3 calls here:&lt;br /&gt;
&lt;br /&gt;
 kate_high_decode_init&lt;br /&gt;
 kate_high_decode_packetin&lt;br /&gt;
 kate_high_decode_clear&lt;br /&gt;
&lt;br /&gt;
Here, all Ogg packets are sent to kate_high_decode_packetin, which does the right&lt;br /&gt;
thing (header/data classification, decoding, and event retrieval). Note that you&lt;br /&gt;
do not get access to the comments directly using this, but you do get access to the&lt;br /&gt;
kate_info via events.&lt;br /&gt;
&lt;br /&gt;
The libkate distribution includes commented examples for each of those.&lt;br /&gt;
&lt;br /&gt;
Additionally, libkate includes a layer (liboggkate) to make it easier to use when&lt;br /&gt;
embedded in Ogg. While the normal API uses kate_packet structures, liboggkate uses&lt;br /&gt;
ogg_packet structures.&lt;br /&gt;
&lt;br /&gt;
The High level decoding API does not have an Ogg specific layer, but functions exist&lt;br /&gt;
to wrap a kate_packet around a memory buffer (such as the one ogg_packet uses, for instance).&lt;br /&gt;
&lt;br /&gt;
== Support ==&lt;br /&gt;
&lt;br /&gt;
Among the software with Kate support:&lt;br /&gt;
*VLC&lt;br /&gt;
*ffmpeg2theora&lt;br /&gt;
*liboggz&lt;br /&gt;
*liboggplay&lt;br /&gt;
*Cortado (wikimedia version)&lt;br /&gt;
*vorbis-tools&lt;br /&gt;
&lt;br /&gt;
I have patches for the following with Kate support:&lt;br /&gt;
*MPlayer&lt;br /&gt;
*xine&lt;br /&gt;
*GStreamer&lt;br /&gt;
*Thoggen&lt;br /&gt;
*Audacious&lt;br /&gt;
*and more...&lt;br /&gt;
&lt;br /&gt;
These may be found in the libkate source distribution (see [[#Downloading|Downloading]]&lt;br /&gt;
for links).&lt;br /&gt;
&lt;br /&gt;
In addition, libtiger is a rendering library for Kate streams using Pango and Cairo,&lt;br /&gt;
though it is not quite yet API stable (though no major changes are expected).&lt;br /&gt;
&lt;br /&gt;
== Granule encoding ==&lt;br /&gt;
&lt;br /&gt;
=== Ogg ===&lt;br /&gt;
&lt;br /&gt;
Ogg leaves the encoding of granules up to a particular codec, only&lt;br /&gt;
mandating that granules be non decreasing with time.&lt;br /&gt;
 &lt;br /&gt;
The Kate bitstream format uses a linear mapping between time and&lt;br /&gt;
granule, described here.&lt;br /&gt;
 &lt;br /&gt;
A Kate granule position is composed of two different parts:&lt;br /&gt;
 - a base granule, in the high bits&lt;br /&gt;
 - a granule offset, in the low bits&lt;br /&gt;
&lt;br /&gt;
 +----------------+----------------+&lt;br /&gt;
 | base           | offset         |&lt;br /&gt;
 +----------------+----------------+&lt;br /&gt;
 &lt;br /&gt;
The number of bits these parts occupy is variable, and each stream&lt;br /&gt;
may choose how many bits to dedicate to each. The kate_info structure&lt;br /&gt;
for a stream holds that information in the granule_shift field,&lt;br /&gt;
so each part may be reconstructed from a granulepos.&lt;br /&gt;
&lt;br /&gt;
The timestamp T of a given Kate packet is split into a base B and&lt;br /&gt;
offset O, and these are stored in the granulepos of that packet.&lt;br /&gt;
The split is done such that the B is the time of the earliest event&lt;br /&gt;
still active at the time, and the O is the time elapsed between B&lt;br /&gt;
and T. Thus, T = B + O. This mimics the way Theora stores its own&lt;br /&gt;
timestamps in granulepos, where the base acts as a keyframe, and&lt;br /&gt;
an offset acts as the position of an intra frame from the previous&lt;br /&gt;
keyframe. Since Kate allows time overlapping events, however, the&lt;br /&gt;
choice of the base to use is slightly more complex, as it may not&lt;br /&gt;
be the starting time of the previous event, if the stream contains&lt;br /&gt;
time overlapping events.&lt;br /&gt;
 &lt;br /&gt;
The kate_info structure for a stream holds a rational fraction&lt;br /&gt;
representing the time span of granule units for both the base and&lt;br /&gt;
the offset parts.&lt;br /&gt;
 &lt;br /&gt;
The granule rate is defined by the two fields:&lt;br /&gt;
&lt;br /&gt;
 kate_info::gps_numerator&lt;br /&gt;
 kate_info::gps_denominator&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The number of bits reserved for the offset is defined by the field:&lt;br /&gt;
&lt;br /&gt;
 kate_info::granule_shift&lt;br /&gt;
&lt;br /&gt;
=== Generic timing ===&lt;br /&gt;
&lt;br /&gt;
Kate data packets (data packet type 0) includes timing information (start time,&lt;br /&gt;
end time, and time of the earliest event still active). All these are stored as&lt;br /&gt;
64 bit at the rate defined by the granule rate, so they do not suffer from the&lt;br /&gt;
granule_shift space limitation.&lt;br /&gt;
&lt;br /&gt;
This also allows for Kate streams to be stored in other containers.&lt;br /&gt;
&lt;br /&gt;
== Motion ==&lt;br /&gt;
&lt;br /&gt;
The Kate bitstream format includes motion definition, originally for karaoke purposes, but&lt;br /&gt;
which can be used for more general purpose, such as line based drawing, or animation of&lt;br /&gt;
the text (position, color, etc)&lt;br /&gt;
&lt;br /&gt;
Motions are defined by the means of a series of curves (static points, segments, splines (catmull-rom, bezier, and b-splines)).&lt;br /&gt;
A 2D point can be obtained from a motion for any timestamp during the lifetime of a text.&lt;br /&gt;
This can be used for moving a marker in 2D above the text for karaoke, or to use the x&lt;br /&gt;
coordinate to color text when the motion position passes each letter or word, etc.&lt;br /&gt;
Motions have an attached semantics so the client code knows how to use a particular motion.&lt;br /&gt;
Predefined semantics include text color, text position, etc).&lt;br /&gt;
&lt;br /&gt;
Since a motion can be composed of an arbitrary number of curves, each of which may have&lt;br /&gt;
an arbitrary number of control points, complex motions can be achieved. If the motion is&lt;br /&gt;
the main object of an event, it is even possible to have an empty text, and use the motion&lt;br /&gt;
as a virtual pencil to draw arbitrary shapes. Even on-the-fly handwriting subtitles could&lt;br /&gt;
be done this way, though this would require a lot of control points, and would not be able&lt;br /&gt;
to be used with text-to-speech.&lt;br /&gt;
&lt;br /&gt;
As a proof of concept, I also have a &amp;quot;draw chat&amp;quot; program where two people can draw, and&lt;br /&gt;
the shapes are turned to b-splines and sent as a kate motion to be displayed on the other&lt;br /&gt;
person&#039;s window.&lt;br /&gt;
&lt;br /&gt;
It is also possible for motions to be discontinuous - simply insert a curve of &#039;none&#039; type.&lt;br /&gt;
While the timestamp lies within such a curve, no 2D point will be generated. This can be&lt;br /&gt;
used to temporarily hide a marker, for instance.&lt;br /&gt;
&lt;br /&gt;
It is worth mentionning that pauses in the motion can be trivially included by inserting&lt;br /&gt;
at the right time and for the right duration a simple linear interpolation curve with only&lt;br /&gt;
two equal points, equal to the position the motion is supposed to pause at.&lt;br /&gt;
&lt;br /&gt;
Kate defines a set of predefined mappings so that each decoder user interprets a motion in&lt;br /&gt;
the same way. A mapping is coded on 8 bits in the bitstream, and the first 128 are reserved&lt;br /&gt;
for Kate, leaving 128 for application specific mappings, to avoid constraining creative uses&lt;br /&gt;
of that feature. Predefined mappings include frame (eg, 0-1 points are mapped to the size of&lt;br /&gt;
the current video frame), or region, to scale 0-1 to the current region. This allows curves&lt;br /&gt;
to be defined without knowing in advance the pixel size of the area it should cover.&lt;br /&gt;
&lt;br /&gt;
For uses which require more than two coordinates (eg, text color, where 4 (RGBA) values are&lt;br /&gt;
needed, Kate predefines the semantics text_color_rg and text_color_ba, so a 4D point can be&lt;br /&gt;
obtained using two different motions.&lt;br /&gt;
&lt;br /&gt;
There are higher level constructs, such as morphing between two styles, or predefined&lt;br /&gt;
karaoke effects. More are planned to be added in the future.&lt;br /&gt;
&lt;br /&gt;
See also [[#Trackers|Trackers]].&lt;br /&gt;
&lt;br /&gt;
== Trackers ==&lt;br /&gt;
&lt;br /&gt;
Since attaching motions to text position, etc, makes it hard for the client to keep track of&lt;br /&gt;
everything, doing interpolation, etc, the library supplies a tracker object, which handles the&lt;br /&gt;
interpolation of the relevant properties.&lt;br /&gt;
Once initialized with a text and a set of motions, the client code can give the tracker a new&lt;br /&gt;
timestamp, and get back the current text position, text color, etc.&lt;br /&gt;
&lt;br /&gt;
Using a tracker is not necessary, if one wants to use the motions directly, or just ignore them,&lt;br /&gt;
but it makes life easier, especially when considering the the order in which motions are applied&lt;br /&gt;
does matter (to be defined formally, but the current source code is informative at this point).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Kate file format ==&lt;br /&gt;
&lt;br /&gt;
Though this is not a feature of the bitstream format, I have created a text file format to&lt;br /&gt;
describe a series of events to be turned into a Kate bitstream.&lt;br /&gt;
At its minimum, the following is a valid input to the encoder:&lt;br /&gt;
&lt;br /&gt;
: kate {&lt;br /&gt;
::  event { 00:00:05 --&amp;gt; 00:00:10    &amp;quot;This is a text&amp;quot; }&lt;br /&gt;
: }&lt;br /&gt;
&lt;br /&gt;
This will create a simple stream with &amp;quot;This is a text&amp;quot; emitted at an offset of 5 seconds into&lt;br /&gt;
the track, lasting 5 seconds to an end time at 10 seconds.&lt;br /&gt;
&lt;br /&gt;
Motions, regions, styles can be declared in a definitions block to be reused by events, or can&lt;br /&gt;
be defined inline. Defining those in the definitions block places them in a header so they can&lt;br /&gt;
be reused later, saving space. However, they can also be defined in each event, so they will be&lt;br /&gt;
sent with the event. This allows them to be generated on the fly (eg, if the bitstream is being&lt;br /&gt;
streamed from a realtime input).&lt;br /&gt;
&lt;br /&gt;
For convenience, the Kate file format also allows C style macros, though without parameters.&lt;br /&gt;
&lt;br /&gt;
Please note that the Kate file format is fully separate from the Kate bitstream format. The&lt;br /&gt;
difference between the two is similar to the difference between a C source file and the resulting&lt;br /&gt;
object file, when compiled.&lt;br /&gt;
&lt;br /&gt;
Note that the format is not based on XML for a very parochial reason: I tend to dislike very&lt;br /&gt;
much editing XML by hand, as it&#039;s really hard to read. XML is really meant for machines to parse&lt;br /&gt;
generically text data in a shared syntax but with possibly unknown semantics, and I need those&lt;br /&gt;
text representations to be editable easily.&lt;br /&gt;
&lt;br /&gt;
This also implies that there could be an XML representation of a Kate stream, which would be&lt;br /&gt;
useful if one were to make an editor that worked on a higher level than the current all-text&lt;br /&gt;
representation, and it is something that might very well happen in the future, in parallel with&lt;br /&gt;
the current format.&lt;br /&gt;
&lt;br /&gt;
== Karaoke ==&lt;br /&gt;
&lt;br /&gt;
Karaoke effects rely on motions, and there will be predefined higher level ways of specifying&lt;br /&gt;
timings and effects, two of which are already done.&lt;br /&gt;
&lt;br /&gt;
As an example, this is a valid Karaoke script:&lt;br /&gt;
&lt;br /&gt;
:kate {&lt;br /&gt;
::  simple_timed_glyph_style_morph {&lt;br /&gt;
:::   from style &amp;quot;start_style&amp;quot; to style &amp;quot;end_style&amp;quot;&lt;br /&gt;
:::   &amp;quot;Let &amp;quot;    at 1.0&lt;br /&gt;
:::   &amp;quot;us &amp;quot;     at 1.2&lt;br /&gt;
:::   &amp;quot;sing &amp;quot;   at 1.4&lt;br /&gt;
:::   &amp;quot;to&amp;quot;      at 2.0&lt;br /&gt;
:::   &amp;quot;ge&amp;quot;      at 2.5&lt;br /&gt;
:::   &amp;quot;ther&amp;quot;    at 3.0&lt;br /&gt;
::  }&lt;br /&gt;
:}&lt;br /&gt;
&lt;br /&gt;
The syllables will change from a style to another as time passes. The definition of the start_style&lt;br /&gt;
and end_style styles is omitted for brevity.&lt;br /&gt;
&lt;br /&gt;
== Problems to solve ==&lt;br /&gt;
&lt;br /&gt;
There are a few things to solve before the Kate bitstream format can be considered good&lt;br /&gt;
enough to be frozen:&lt;br /&gt;
&lt;br /&gt;
Note: the following is mostly solved, and the bitstream is now stable, and has been&lt;br /&gt;
backward and forward compatible since the first released version. This will be updated&lt;br /&gt;
when I get some time.&lt;br /&gt;
&lt;br /&gt;
=== Seeking and memory ===&lt;br /&gt;
&lt;br /&gt;
When seeking to a particular time in a movie with subtitles, we may end up at a place when a subtitle has been started, but is not removed yet. Pure streaming doesn&#039;t have this problem as it remembers the subtitle being issued (as opposed to, say, Vorbis, for which all data valid now is decoded from the last packet). With Kate, a text string valid now may have been issued long ago.&lt;br /&gt;
&lt;br /&gt;
I see three possible ways to solve this:&lt;br /&gt;
*each data packet includes the granule of the earliest still active packet (if none, this will be the granule of this very packet)&lt;br /&gt;
**this means seeks are two phased: first seek, find the next Kate packet, and seek again if the granule of the earlier still active packet is less than the original seeked granule. This implies support code on players to do the double seek.&lt;br /&gt;
&lt;br /&gt;
*use &amp;quot;reference frames&amp;quot;, a bit like Theora does, where the granule position is split in several fields: the higher bits represent a position for the reference frame, and the lowest bits a delta time to the current position. When seeking to a granule position, the lower bits are cleared off, yielding the granule position of the previous reference frame, so the seek ends up at the reference frame. The reference frame is a sync point where any active strings are issued again. This is a variant of the method described in the Writ wiki page, but the granule splitting avoids any &amp;quot;downtime&amp;quot;.&lt;br /&gt;
**this requires reissuing packets, and it doesn&#039;t feel right (and wastes space).&lt;br /&gt;
**it also requires &amp;quot;dummy&amp;quot; decoding of Kate data from the reference frame to the actual seek point to fully refresh the state &amp;quot;memory&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
*A variant of the two-granules-in-one system used by libcmml, where the &amp;quot;back link&amp;quot; points to the earliest still active string, rather than the previous one (this allows a two phase seek, rather than a multiphase seek, hopping back from event to event, with no real way to know if there is or not a previous event which is still active - I suppose CMML has no need to know this, if their &amp;quot;clips&amp;quot; do not overlap - mine can do).&lt;br /&gt;
**Such a system considerably shortens the usable granule space, though it can do a one phase seek, if I understand the system correctly, which I am not certain.&lt;br /&gt;
*** Well, it seems it can&#039;t do a one phase seek anyway.&lt;br /&gt;
&lt;br /&gt;
*Additionally, it could be possible to emit simple &amp;quot;keepalive&amp;quot; packets at regular intervals to help a seek algorithm to sync up to the stream without needing too much data reading - this helps for discontinuous streams where there could be no pages for a while if no data is needed at that time.&lt;br /&gt;
&lt;br /&gt;
=== Text encoding ===&lt;br /&gt;
&lt;br /&gt;
A header field declares the text encoding used in the stream. At the moment, only UTF-8 is&lt;br /&gt;
supported, for simplicity. There are no plans to support other encodings, such as UTF-16,&lt;br /&gt;
at the moment.&lt;br /&gt;
&lt;br /&gt;
Note that strings included in the header (language, category) are not affected by that&lt;br /&gt;
language encoding (rather obviously for language itself). These are ASCII.&lt;br /&gt;
&lt;br /&gt;
The actual text in events may include simple HTML-like markup (at the moment, allowed markup&lt;br /&gt;
is the same as the one Pango uses, but more markup types may be defined in the future).&lt;br /&gt;
It is also possible to ask libkate to remove this markup if the client prefers to receive&lt;br /&gt;
plain text without the markup.&lt;br /&gt;
&lt;br /&gt;
=== Language encoding ===&lt;br /&gt;
&lt;br /&gt;
A header field defines the language (if any) used in the stream (this can be overridden in a&lt;br /&gt;
data packet, but this is not relevant to this point). At the moment, my test code uses&lt;br /&gt;
ISO 639-1 two letter codes, but I originally thought to use RFC 3066 tags. However, matching&lt;br /&gt;
a language to a user selection may be simpler for user code if the language encoding is kept&lt;br /&gt;
simple. At the moment, I tend to favor allowing both two letter tags (eg, &amp;quot;en&amp;quot;) and secondary&lt;br /&gt;
tags (like &amp;quot;en_EN&amp;quot;), as RFC 3066 tags can be quite complex, but I welcome comments on this.&lt;br /&gt;
&lt;br /&gt;
If a stream contains more than one language, there usually is a predominant language, which&lt;br /&gt;
can be set as the default language for the stream. Each event can then have a language&lt;br /&gt;
override. If there is no predominant language, and it is not possible to split the stream&lt;br /&gt;
into multiple substreams, each with its own language, then it is possible to use the &amp;quot;mul&amp;quot;&lt;br /&gt;
language tag, as a last resort.&lt;br /&gt;
&lt;br /&gt;
=== Bitstream format for floating point values ===&lt;br /&gt;
&lt;br /&gt;
Floating point values are be turned to a 16.16 fixed point format, then stored in a bitpacked&lt;br /&gt;
format, storing the number of zero bits at the head and tail of the floating point values once&lt;br /&gt;
per stream, and the remainder bits for all values in the stream. This seems to yield good results&lt;br /&gt;
(typically a 50% reduction over 32 bits raw writes, and 70% over the snprintf based storage), and&lt;br /&gt;
has the big advantage of being portable (eg, independant of any IEEE format).&lt;br /&gt;
However, this means reduced precision due to the quantization to 16.16. I may add support for&lt;br /&gt;
variable precision (eg, 8.24 fixed point formats) to alleviate this. This would however mean less&lt;br /&gt;
space savings, though these are likely to be insignificant when Kate streams are interleaved with&lt;br /&gt;
a video.&lt;br /&gt;
&lt;br /&gt;
*Though this is not a Kate issue per se, the motion feature is very difficult to use without a curve editor. While tools may be coded to create a Kate bitstream for various existing subtitle formats, it is not certain it will be easy to find a good authoring tool for a series of curves. That said, it&#039;s not exactly difficult to do if you know a widget set.&lt;br /&gt;
&lt;br /&gt;
=== Higher dimensional curves/motions ===&lt;br /&gt;
&lt;br /&gt;
It is quite annoying to have to create two motions to control a color change, due to curves&lt;br /&gt;
being restricted to two dimensions. I may add support for arbitrary dimensions. It would also&lt;br /&gt;
help for 1D motions, like changing the time flow, where one coordinate is simply ignored at&lt;br /&gt;
the moment.&lt;br /&gt;
Alternatively, changes could be made to the Kate file format to hide the two dimensionality and&lt;br /&gt;
allow simpler specification of non-2 dimensional motions, but still map them to 2D in the kate&lt;br /&gt;
bitstream format.&lt;br /&gt;
&lt;br /&gt;
=== Category definition ===&lt;br /&gt;
&lt;br /&gt;
The category field in the BOS packet is a 16 byte text field (15 really, as it is zero terminated&lt;br /&gt;
in the bitstream itself). Its goal is to provide the reader with a short description of what kind&lt;br /&gt;
of information the stream contains, eg subtitles, lyrics, etc. This would be displayed to the user,&lt;br /&gt;
possibly to allow to choose to turn some streams on and off.&lt;br /&gt;
&lt;br /&gt;
Since this category is meant primarily for a machine to parse, they will be kept to ASCII. When&lt;br /&gt;
a player recognizes a category, it is free to replace its name with one in the user&#039;s language if&lt;br /&gt;
it prefers. Even in English, the &amp;quot;lyrics&amp;quot; category could be displayed by a player as &amp;quot;Lyrics&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Since this is a free text field rather than an enumeration, it would be good to have a list of&lt;br /&gt;
common predefined category names that Kate streams can use.&lt;br /&gt;
&lt;br /&gt;
This is a list of proposed predefined categories, feedback/additions welcome:&lt;br /&gt;
&lt;br /&gt;
* subtitles - the usual movie subtitles, as text&lt;br /&gt;
* spu-subtitles - movie subtitles in DVD style paletted images&lt;br /&gt;
* lyrics - song lyrics&lt;br /&gt;
&lt;br /&gt;
Please remember the 15 character limit if proposing other categories.&lt;br /&gt;
&lt;br /&gt;
 Note that the list of categories is subject to change, and will likely&lt;br /&gt;
 be replaced by new, more &amp;quot;identifier like&amp;quot; ones. The three ones above,&lt;br /&gt;
 however, would be kept for backward compatibility as they&#039;re already used.&lt;br /&gt;
&lt;br /&gt;
== Text to speech ==&lt;br /&gt;
&lt;br /&gt;
One of the goals of the Kate bitstream format is that text data can be easily parsed&lt;br /&gt;
by the user of the decoder, so any additional information, such as style, placement,&lt;br /&gt;
karaoke data, etc, should be able to be stripped to leave only the bare text. This is&lt;br /&gt;
in view of allowing text-to-speech software to use Kate bitstreams as a bandwith-cheap&lt;br /&gt;
way of conveying speech data, and could also allow things like e-books which can be&lt;br /&gt;
either read or listened to from the same bitstream (I have seen no reference to this&lt;br /&gt;
being used anywhere, but I see no reason why the granule progression should be temporal,&lt;br /&gt;
and not user controlled, such as by using a &amp;quot;next&amp;quot; button which would bump a granule&lt;br /&gt;
postion by a preset amount, simulating turning a page (this would be close to necessary&lt;br /&gt;
for text-to-speech, as the wall time duration of the spoken speech is not known in&lt;br /&gt;
advance to the Kate encoder, and can&#039;t be mapped to a time based granule progression)).&lt;br /&gt;
All text strings triggered consecutively between the two granule positions would then&lt;br /&gt;
be read in order.&lt;br /&gt;
&lt;br /&gt;
== Possible additions ==&lt;br /&gt;
 &lt;br /&gt;
=== Embedded binary data ===&lt;br /&gt;
&lt;br /&gt;
Images and font mappings can be included within a Kate stream.&lt;br /&gt;
&lt;br /&gt;
==== Images ====&lt;br /&gt;
&lt;br /&gt;
Though this could be misused to interfere with ability to render as text-to-speech, Kate&lt;br /&gt;
can use images as well as text. The same caveat as for fonts applies with regard to data&lt;br /&gt;
duplication.&lt;br /&gt;
&lt;br /&gt;
Complex images might however be best left to a multiplexed OggSpots or OggMNG stream, unless the&lt;br /&gt;
images mesh with the text (eg, graphical exclamation points, custom fonts, (see next&lt;br /&gt;
paragraph), etc).&lt;br /&gt;
&lt;br /&gt;
There is support for simple paletted bitmap images, with a variable length palette of up&lt;br /&gt;
to 256 colors (in fact, sized in powers of 2 up to 256) and matching pixel data in as&lt;br /&gt;
many bits per pixel as can address the palette. Palettes and images are stored separately,&lt;br /&gt;
so can be used with one another with no fixed assignment.&lt;br /&gt;
&lt;br /&gt;
Palettes and bitmaps are put in two separate header for later use by reference, but can&lt;br /&gt;
also be placed in data packets, as with motions, etc, if they are not going to be reused.&lt;br /&gt;
&lt;br /&gt;
PNG bitmaps can also be embedded in a Kate stream. These do not have associated palettes&lt;br /&gt;
(but the PNGs themselves may or may not be paletted). There is no support for decoding PNG&lt;br /&gt;
images in libkate itself, so a program will have to use libpng (or similar code) to decode&lt;br /&gt;
the PNG image. For instance, the libtiger rendering library uses Cairo to decode and render&lt;br /&gt;
PNG images in Kate streams.&lt;br /&gt;
&lt;br /&gt;
This can be used to have custom fonts, so that raw text is still available if the stream&lt;br /&gt;
creator wants a custom look.&lt;br /&gt;
&lt;br /&gt;
I expect that the need for more than 256 colors in a bitmap, or non palette bitmap data,&lt;br /&gt;
would be best handled by another codec, eg OggMNG or OggSpots. The goal of images in a&lt;br /&gt;
Kate stream is to mesh the images with the text, not to  have large images by themselves.&lt;br /&gt;
&lt;br /&gt;
On the other hand, interesting Karaoke effects could be achieved by having MNG images&lt;br /&gt;
instead of simple paletted bitmaps in a Kate streams. Comments would be most welcome on&lt;br /&gt;
whether this is going too far, however.&lt;br /&gt;
&lt;br /&gt;
I am also investigating SVG images. These allow for very small footprint images for simple&lt;br /&gt;
vector drawings, and could be very useful for things like background gradients below text.&lt;br /&gt;
&lt;br /&gt;
A possible solution to the duplication issue is to have another stream in the container&lt;br /&gt;
stream, which would hold the shared data (eg, fonts), which the user program could load,&lt;br /&gt;
and which could then be used by any Kate (and other) stream. Typically, this type of stream&lt;br /&gt;
would be a degenerate stream with only header packets (so it is fully processed before any&lt;br /&gt;
other stream presents data packets that might make use of that shared data), and all payload&lt;br /&gt;
such as fonts being contained within the headers. Thinking about it, it has parallels with&lt;br /&gt;
the way Vorbis stores its codebooks within a header packet, or even the way Kate stores the&lt;br /&gt;
list of styles within a header packet.&lt;br /&gt;
&lt;br /&gt;
==== Fonts ====&lt;br /&gt;
&lt;br /&gt;
Custom fonts are merely a set of ranges mapping unicode code points to bitmaps. As this implies,&lt;br /&gt;
fonts are bitmap fonts, not vector fonts, so scaling, if supported by the rendering client,&lt;br /&gt;
may not look as good as with a vector font.&lt;br /&gt;
&lt;br /&gt;
A style may also refer to a font name to use (eg, &amp;quot;Tahoma&amp;quot;). These fonts may or may not be&lt;br /&gt;
available on the playing system, however, since the font data is not included in the stream,&lt;br /&gt;
just referenced by name. For this reason, it is best to keep to widely known fonts.&lt;br /&gt;
&lt;br /&gt;
== Reference encoder/decoder ==&lt;br /&gt;
&lt;br /&gt;
A encoder (kateenc) and a decoder (katedec) are included in the tools directory.&lt;br /&gt;
The encoder supports input from several different formats:&lt;br /&gt;
* a custom text based file format (see [[#The Kate file format|The Kate file format]]), which is by no means meant to be part of the Kate bitstream specification itself&lt;br /&gt;
* SubRip (.srt), the most common subtitle format I found&lt;br /&gt;
* LRC lyrics format.&lt;br /&gt;
&lt;br /&gt;
As an example for the widely used SRT subtitles format, the following command line&lt;br /&gt;
create a Kate subtitles stream from an SRT file:&lt;br /&gt;
&lt;br /&gt;
kateenc -l en -c subtitles -t srt -o subtites.ogg subtitles.srt&lt;br /&gt;
&lt;br /&gt;
The reverse is possible, to recover an SRT file from a Kate stream, with katedec.&lt;br /&gt;
&lt;br /&gt;
Note that the subtitles.ogg file should then be multiplexed into the A/V stream,&lt;br /&gt;
using either ogg-tools or oggz-tools.&lt;br /&gt;
&lt;br /&gt;
The Kate bitstreams encoded and decoded by those tools are (supposed to be) correct for this&lt;br /&gt;
specification, provided their input is correct.&lt;br /&gt;
&lt;br /&gt;
== Next steps ==&lt;br /&gt;
&lt;br /&gt;
=== Continuations ===&lt;br /&gt;
&lt;br /&gt;
Continuations are a way to add to existing events, and are mostly meant for motions. When streaming&lt;br /&gt;
in real time, what motions may be applied to events may not be known in advance (for instance, for a&lt;br /&gt;
draw chat program where two programs exchange Kate streams, the drawing motions are only known as&lt;br /&gt;
they are drawn. Continuations will allow an event to be extended in time, and motions to be appended&lt;br /&gt;
to it. This is only useful for streaming, as when stored in a file, everything is already known in&lt;br /&gt;
advance.&lt;br /&gt;
&lt;br /&gt;
=== A rendering library ===&lt;br /&gt;
&lt;br /&gt;
This will allow easier integration in other packages (movie players, etc).&lt;br /&gt;
I have started working on an implementation using Cairo and Pango, though I&#039;m still at the early stages.&lt;br /&gt;
I might add support for embedding vector fonts in a Kate stream if I was going that way. Still need to think about this.&lt;br /&gt;
Another point of note is that when this library is available, it would make it easier to add&lt;br /&gt;
capabilities such as rotation, scaling, etc, to the bitstream, since this would not cause too&lt;br /&gt;
much work for playing programs using the rendering library. It is expected that these additions&lt;br /&gt;
would stay backward compatible (eg, an old player would ignore this information but still correctly&lt;br /&gt;
decode the information they can work with from a newly encoded stream).&lt;br /&gt;
&lt;br /&gt;
=== An XML representation ===&lt;br /&gt;
&lt;br /&gt;
While I purposefully did not write Kate description files in XML due to me finding editing XML such&lt;br /&gt;
a chore, it would be nice to be able to losslessly convert between the more user friendly representation&lt;br /&gt;
and an XML document, so one can do what one does with XML documents, like transformations.&lt;br /&gt;
&lt;br /&gt;
And after all, some people might prefer editing the XML version.&lt;br /&gt;
&lt;br /&gt;
=== Packaging ===&lt;br /&gt;
&lt;br /&gt;
It would be really nice to have packages for libkate/libtiger for many distros.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re a packager for a distro which doesn&#039;t have yet packages for libkate&lt;br /&gt;
or libtiger, please consider helping :)&lt;br /&gt;
&lt;br /&gt;
In particular, packages for Debian would be grand.&lt;br /&gt;
&lt;br /&gt;
== Matroska mapping ==&lt;br /&gt;
&lt;br /&gt;
The codec ID is &amp;quot;S_KATE&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
As for Theora and Vorbis, Kate headers are stored in the private data as xiph-laced packets:&lt;br /&gt;
&lt;br /&gt;
 Byte 0: number of packets present, minus 1 (there must be at least one packet) - let this number be NP&lt;br /&gt;
 Bytes 1..n: lengths of the first NP packets, coded in xiph style lacing&lt;br /&gt;
 Bytes n+1..end: the data packets themselves concatenated one after the other&lt;br /&gt;
&lt;br /&gt;
Note that the length of the last packet isn&#039;t encoded, it is deduced from the sizes of the other&lt;br /&gt;
packets and the total size of the private data.&lt;br /&gt;
&lt;br /&gt;
This mapping is similar to the Vorbis and Theora mappings, with the caveat that one should not&lt;br /&gt;
expect a set number of headers.&lt;br /&gt;
&lt;br /&gt;
== Downloading ==&lt;br /&gt;
&lt;br /&gt;
libkate encodes and decodes Kate streams, and is API and ABI stable.&lt;br /&gt;
&lt;br /&gt;
The libkate source distribution is available at [http://libkate.googlecode.com/ http://libkate.googlecode.com/].&lt;br /&gt;
&lt;br /&gt;
A public git repository is available at [http://git.xiph.org/?p=users/oggk/kate.git;a=summary http://git.xiph.org/?p=users/oggk/kate.git;a=summary].&lt;br /&gt;
&lt;br /&gt;
libtiger renders Kate streams using Pango and Cairo, and is alpha, with API changes still possible.&lt;br /&gt;
&lt;br /&gt;
The libtiger source distribution is available at [http://libtiger.googlecode.com/ http://libtiger.googlecode.com/].&lt;br /&gt;
&lt;br /&gt;
A public git repository is available at [http://git.xiph.org/?p=users/oggk/tiger.git;a=summary http://git.xiph.org/?p=users/oggk/tiger.git;a=summary].&lt;br /&gt;
&lt;br /&gt;
== HOWTOs ==&lt;br /&gt;
&lt;br /&gt;
These paragraphs describe a few ways to use Kate streams:&lt;br /&gt;
&lt;br /&gt;
=== Text movie subtitles ===&lt;br /&gt;
&lt;br /&gt;
Kate streams can carry Unicode text (that is, text that can represent&lt;br /&gt;
pretty much any existing language/script). If several Kate streams are&lt;br /&gt;
multiplexed along with a video, subtitles in various languages can be&lt;br /&gt;
made for that movie.&lt;br /&gt;
&lt;br /&gt;
An easy way to create such subtitles is to use ffmpeg2theora, which&lt;br /&gt;
can create Kate streams from SubRip (.srt) format files, a simple but&lt;br /&gt;
common text subtitles format. ffmpeg2theora 0.21 or later is needed.&lt;br /&gt;
&lt;br /&gt;
At its simplest:&lt;br /&gt;
&lt;br /&gt;
    ffmpeg2theora -o video-with-subtitles.ogg --subtitles subtitles.srt&lt;br /&gt;
      video-without-subtitles.avi&lt;br /&gt;
&lt;br /&gt;
Several languages may be created and tagged with their language code&lt;br /&gt;
for easy selection in a media player:&lt;br /&gt;
&lt;br /&gt;
    ffmpeg2theora -o video-with-subtitles.ogg video-without-subtitles.avi&lt;br /&gt;
      --subtitles japanese-subtitles.srt --subtitles-language ja&lt;br /&gt;
      --subtitles welsh-subtitles.srt --subtitles-language cy&lt;br /&gt;
      --subtitles english-subtitles.srt --subtitles-language en_GB&lt;br /&gt;
&lt;br /&gt;
Alternatively, kateenc (which comes with the libkate distribution) can&lt;br /&gt;
create Kate streams from SubRip files as well. These can then be merged&lt;br /&gt;
with a video with oggz-tools:&lt;br /&gt;
&lt;br /&gt;
    kateenc -t srt -c SUB -l it -o subtitles.ogg italian-subtitles.srt&lt;br /&gt;
    oggz merge -o movie-with-subtitles.ogg movie-without-subtitles.ogg subtitles.ogg&lt;br /&gt;
&lt;br /&gt;
This second method can also be used to add subtitles to a video which&lt;br /&gt;
is already encoded to Theora, as it will not transcode the video again.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DVD subtitles ===&lt;br /&gt;
&lt;br /&gt;
DVD subtitles are not text, but images. Thoggen, a DVD ripper program,&lt;br /&gt;
can convert these subtitles to Kate streams (at the time of writing,&lt;br /&gt;
Thoggen and GStreamer have not applied the necessary patches for this&lt;br /&gt;
to be possible out of the box, so patching them will be required).&lt;br /&gt;
&lt;br /&gt;
When configuring how to rip DVD tracks, any subtitles will be detected&lt;br /&gt;
by Thoggen, and selecting them in the GUI will cause them to be saved as&lt;br /&gt;
Kate tracks along with the movie.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Song lyrics ===&lt;br /&gt;
&lt;br /&gt;
Kate streams carrying song lyrics can be embedded in an Ogg file. The&lt;br /&gt;
oggenc Vorbis encoding tool from the Xiph.Org Vorbis tools allows lyrics&lt;br /&gt;
to be loaded from a LRC or SRT text file and converted to a Kate stream&lt;br /&gt;
multiplexed with the resulting Vorbis audio. At the time of writing,&lt;br /&gt;
the patch to oggenc was not applied yet, so it will have to be patched&lt;br /&gt;
manually with the patch found in the diffs directory.&lt;br /&gt;
&lt;br /&gt;
    oggenc -o song-with-lyrics.ogg --lyrics lyrics.lrc --lyrics-language en_US song.wav&lt;br /&gt;
&lt;br /&gt;
So called &#039;enhanced LRC&#039; files (containing extra karaoke timing information)&lt;br /&gt;
are supported, and a simple karaoke color change scheme will be saved&lt;br /&gt;
out for these files. For more complex karaoke effects (such as more &lt;br /&gt;
complex style changes, or sprite animation), kateenc should be used with&lt;br /&gt;
a Kate description file to create a separate Kate stream, which can then&lt;br /&gt;
be merged with a Vorbis only song with oggz-tools:&lt;br /&gt;
&lt;br /&gt;
    oggenc -o song.ogg song.wav&lt;br /&gt;
    kateenc -t kate -c LRC -l en_US -o lyrics.ogg lyrics-with-karaoke.kate&lt;br /&gt;
    oggz merge -o song-with-karaoke.ogg lyrics-with-karaoke.ogg song.ogg&lt;br /&gt;
&lt;br /&gt;
This latter method may also be used if you already have an encoded Vorbis song&lt;br /&gt;
with no lyrics, and just want to add the lyrics without reencoding.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Metadata ===&lt;br /&gt;
&lt;br /&gt;
Metadata can be attached to events, or to styles, bitmaps, regions, etc.&lt;br /&gt;
Metadata are free form tag/value pairs, and can be used to enrich their&lt;br /&gt;
attached data with extra information. However, how this information is&lt;br /&gt;
interpreted is up to the application layer.&lt;br /&gt;
&lt;br /&gt;
It is worth noting that an event may not have attached text, so it is&lt;br /&gt;
possible to create an empty timed event with attached metadata.&lt;br /&gt;
&lt;br /&gt;
For instance, let&#039;s say we have a documentary, with footage from various&lt;br /&gt;
places, as well as short interviews, and we want two things:&lt;br /&gt;
- tag footage with metadata about the location and date that footage was shot&lt;br /&gt;
- subtitle the interviews and tag those subtitles with information about the speaker&lt;br /&gt;
&lt;br /&gt;
You can then create an empty Kate event for each footage part, synchronized&lt;br /&gt;
with the footage, and attach a new metadata item called GEO_LOCATION, filled&lt;br /&gt;
with latitude and longitude of the place the footage was shot at.&lt;br /&gt;
Similarly, for each subtitle event, a metadata item called SPEAKER can be&lt;br /&gt;
attached.&lt;br /&gt;
&lt;br /&gt;
An empty event to tag a long 4:20 footage shot in Tokyo on 2011/08/12, and&lt;br /&gt;
inserted at 18:30 in the documentary could look like:&lt;br /&gt;
&lt;br /&gt;
  event {&lt;br /&gt;
    00:18:30,000 --&amp;gt; 00:22:50,000&lt;br /&gt;
    meta &amp;quot;GEO_LOCATION&amp;quot; = &amp;quot;35.42; 139.42&amp;quot;&lt;br /&gt;
    meta &amp;quot;DATE&amp;quot; = &amp;quot;2011-08-12&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a example for a line spoken by Dr Joe Bloggs at 18:30 into the documentary:&lt;br /&gt;
&lt;br /&gt;
  event {&lt;br /&gt;
    00:18:30,000 --&amp;gt; 00:18:32,000&lt;br /&gt;
    &amp;quot;Notice how the subtitles for my words have metadata attached to them&amp;quot;&lt;br /&gt;
    meta &amp;quot;SPEAKER&amp;quot; = &amp;quot;Dr Joe Bloggs&amp;quot;&lt;br /&gt;
    meta &amp;quot;URL&amp;quot; = &amp;quot;http://www.example.com/biography?name=Joe+Bloggs&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Notice how another metadata item, URL, is also present. The application&lt;br /&gt;
will have to be aware of those metadata in order to do something with it&lt;br /&gt;
though. Since those are free form, it is up to you to think of what&lt;br /&gt;
metadata you want, and make use of it.&lt;br /&gt;
&lt;br /&gt;
Note that metadata may be attached to other objects, such as regions.&lt;br /&gt;
This way, you can for example create a region tagged with a name, and&lt;br /&gt;
track a person&#039;s movements with that region. Or you can tag a bitmap&lt;br /&gt;
with a copyright and a URL to a larger version of the image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Changing a Kate stream embedded in an Ogg stream ===&lt;br /&gt;
&lt;br /&gt;
If you need to change a Kate stream already embedded in an Ogg stream (eg, you have a movie with subtitles, and you want to fix a spelling mistake, or want to bring one of the subtitles forward in time, etc), you can do this easily with KateDJ, a tool that will extract Kate streams, decode them to a temporary location, and rebuild the original stream after you&#039;ve made whatever changes you want.&lt;br /&gt;
&lt;br /&gt;
KateDJ (included with the libkate distribution) is a GUI program using wxPython, a Python module for the wxWidgets GUI library, and the oggz tools (both needing installing separately if they are not already).&lt;br /&gt;
&lt;br /&gt;
The procedure consists of:&lt;br /&gt;
&lt;br /&gt;
* Run KateDJ&lt;br /&gt;
* Click &#039;Load Ogg stream&#039; and select the file to load&lt;br /&gt;
* Click &#039;Demux file&#039; to decode Kate streams in a temporary location&lt;br /&gt;
* Edit the Kate streams (a message box tells you where they are placed)&lt;br /&gt;
* When done, click &#039;Remux file from parts&#039;&lt;br /&gt;
* If any errors are reported, continue editing until the remux step succeeds&lt;br /&gt;
&lt;br /&gt;
== Frequently Asked Questions ==&lt;br /&gt;
&lt;br /&gt;
=== Does libkate work on other plaforms than Linux ? ===&lt;br /&gt;
&lt;br /&gt;
Yes, libkate is not Linux specific in any way. It optionally relies on libogg&lt;br /&gt;
and libpng, two libraries widely ported to various platforms.&lt;br /&gt;
It has been reported to work on Windows and MacOS X as well as UNIX platforms.&lt;br /&gt;
&lt;br /&gt;
However, libtiger, a rendering library for Kate streams, relies on Pango and Cairo,&lt;br /&gt;
which are not easy to build on Windows, though they can be.&lt;br /&gt;
The Tiger renderer is however completely separate from libkate, and is not needed&lt;br /&gt;
for full encoding and decoding of Kate streams.&lt;br /&gt;
&lt;br /&gt;
=== Where can I find some example files ? ===&lt;br /&gt;
&lt;br /&gt;
The libkate distribution can generate various examples, but already built files&lt;br /&gt;
can be found there:&lt;br /&gt;
[http://people.xiph.org/~oggk/elephants_dream/elephantsdream-with-subtitles.ogg]&lt;br /&gt;
[http://stallman.org/fry/Stephen_Fry-Happy_Birthday_GNU-nq_600px_425kbit.ogv]&lt;br /&gt;
&lt;br /&gt;
These files use raw text only.&lt;br /&gt;
&lt;br /&gt;
[[Category:Ogg Mappings]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GranulePosAndSeeking&amp;diff=16644</id>
		<title>GranulePosAndSeeking</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GranulePosAndSeeking&amp;diff=16644"/>
		<updated>2017-11-20T17:14:50Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* But how do I &amp;quot;seek to the desired time&amp;quot;? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Granulepos encoding and How seeking really works ==&lt;br /&gt;
&lt;br /&gt;
This describes how to seek on a multiplexed Ogg stream containing logical bitstreams with granuleshift, such as [[Theora]], [[Kate]], [[CMML]] or [[OggText]].&lt;br /&gt;
The purpose is to locate the earliest page that is required for rendering a given time offset.&lt;br /&gt;
Due to the fact that two time-seeking operations are required, this procedure is commonly referred to as a &amp;quot;&#039;&#039;&#039;double seek&#039;&#039;&#039;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Definitions ===&lt;br /&gt;
&lt;br /&gt;
Overload &#039;&#039;&#039;time&#039;&#039;&#039; to mean &#039;&#039;&#039;the time represented by a GranulePos value&#039;&#039;&#039;. Hence the &amp;quot;time&amp;quot; of a page is the &amp;quot;time represented by the page GranulePos&amp;quot; header field.&lt;br /&gt;
&lt;br /&gt;
Define &#039;&#039;&#039;seek&#039;&#039;&#039; to mean: for each &#039;&#039;&#039;logical&#039;&#039;&#039; bitstream, locate the &#039;&#039;&#039;bytewise-latest page&#039;&#039;&#039; in the bitstream with a &#039;&#039;&#039;time &amp;lt; the&lt;br /&gt;
target time&#039;&#039;&#039;, then choose the &#039;&#039;&#039;bytewise-earliest&#039;&#039;&#039; among these pages. If two or more pages have the same time (aka. GranulePos value), seeking must locate the bytewise-earlier page.&lt;br /&gt;
&lt;br /&gt;
==== Granules and Granuleshift ====&lt;br /&gt;
&lt;br /&gt;
We use the term &#039;&#039;&#039;granule&#039;&#039;&#039; to refer to time measured in the units of the codec. For audio codecs this is &#039;&#039;usually&#039;&#039; samples, and for video codecs it is &#039;&#039;usually&#039;&#039; frames or fields.&lt;br /&gt;
&lt;br /&gt;
In some formats, pages have a dependency on the data of an earlier page; for example in [[Theora]], interframes have a dependency on an earlier keyframe -- the keyframe data is required to decode the interframe. We encode both the time of the page and the time of the page it depends on into the granulepos. In order to do this we treat the granulepos as a bitfield as follows: &lt;br /&gt;
&lt;br /&gt;
 +---------------------+-------------+&lt;br /&gt;
 | prev_granule        | offset      |&lt;br /&gt;
 +---------------------+-------------+&lt;br /&gt;
&lt;br /&gt;
Then if a page has time in units of codec granules &amp;lt;tt&amp;gt;curr_granule&amp;lt;/tt&amp;gt;, and the page it depends on has time&lt;br /&gt;
&amp;lt;tt&amp;gt;prev_granule&amp;lt;/tt&amp;gt;, we define &amp;lt;tt&amp;gt;offset&amp;lt;/tt&amp;gt; as the difference between these:&lt;br /&gt;
&lt;br /&gt;
 offset = curr_granule - prev_granule&lt;br /&gt;
&lt;br /&gt;
We refer to the number of bits used to encode the offset as the &amp;quot;granuleshift&amp;quot;. This is fixed for all pages in&lt;br /&gt;
that track (logical bitstream). So we encode the later page&#039;s granulepos as: &lt;br /&gt;
&lt;br /&gt;
 granulepos = (prev_granule &amp;lt;&amp;lt; granuleshift) | offset&lt;br /&gt;
&lt;br /&gt;
When decoding, we can extract the current_granule from a granulepos by simply adding these fields:&lt;br /&gt;
&lt;br /&gt;
 curr_granule = prev_granule + offset&lt;br /&gt;
&lt;br /&gt;
Which expands to this expression of the page granulepos:&lt;br /&gt;
&lt;br /&gt;
 curr_granule = (granulepos &amp;gt;&amp;gt; granuleshift) + (granulepos &amp;amp; ((1 &amp;lt;&amp;lt; granuleshift) - 1)))&lt;br /&gt;
&lt;br /&gt;
Keyframes, and other data with no dependency on earlier packets, are encoded with:&lt;br /&gt;
&lt;br /&gt;
 prev_granule = curr_granule, offset = 0&lt;br /&gt;
&lt;br /&gt;
=== Seeking within Single-Track files ===&lt;br /&gt;
&lt;br /&gt;
To locate the earliest page in a track (a logical bitstream) required for rendering a given time offset:&lt;br /&gt;
&lt;br /&gt;
# seek to the desired time&lt;br /&gt;
# read the prev_granule out of the granulepos&lt;br /&gt;
# seek to the time represented by the prev_granule&lt;br /&gt;
&lt;br /&gt;
=== Seeking within Multitrack files ===&lt;br /&gt;
&lt;br /&gt;
To locate the earliest page in a multitrack file (a physical bitstream) required for rendering &#039;&#039;&#039;all&#039;&#039;&#039; tracks from a given time offset:&lt;br /&gt;
&lt;br /&gt;
# seek to the desired time&lt;br /&gt;
# scan forward until a page has been seen from all of the tracks that use granuleshift; while doing so, record the prev_granule of the bytewise-earliest page encountered from each track&lt;br /&gt;
# seek to the minimum of the prev_granules of those pages&lt;br /&gt;
&lt;br /&gt;
It is useful to put a bound on the forward scan; the distance scanned&lt;br /&gt;
only depends on the way the stream is constructed, so it can be large&lt;br /&gt;
if pages in a particular logical bistream is sparse.&lt;br /&gt;
&lt;br /&gt;
=== But how do I &amp;quot;seek to the desired time&amp;quot;?===&lt;br /&gt;
The above assumes that you already know how to seek to a particular GranulePos within the stream efficiently. &lt;br /&gt;
&lt;br /&gt;
This isn&#039;t as simple as it sounds, because the Ogg format does not include an index. The lack of an index is a feature rather than a deficiency and it is one of the primary reasons to use Ogg over some other formats.&lt;br /&gt;
&lt;br /&gt;
Because Ogg doesn&#039;t have in index, infinite streams and partial streams are automatically supported by correctly written applications. There is no risk of truncation or minor corruption making a stream unseekable. No memory is required to store an index, no bandwidth is wasted to transmit it, and seeking granularity is not limited to the precision of the index.&lt;br /&gt;
&lt;br /&gt;
On the other hand, non-indexed formats require a bit more intelligence from the application using them, so many applications have gotten it wrong (although some intelligence is also needed in a well written application for indexed formats, so that it can seek with a corrupted index or below the index granularity).&lt;br /&gt;
&lt;br /&gt;
If you are thinking about seeking within an Ogg file by building your own complete index: &#039;&#039;&#039;STOP! This is not a good procedure.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Building an index may seem simple, but it requires a costly read of the entire stream (which may be gigabytes in size, or even infinite).  There is a better way.&lt;br /&gt;
&lt;br /&gt;
The correct way to seek to a particular granule value in Ogg is by using a [http://en.wikipedia.org/wiki/Bisection_method bisection search]:&lt;br /&gt;
&lt;br /&gt;
# Seek to the middle of the stream&lt;br /&gt;
# obtain sync&lt;br /&gt;
# compare your target granule position with the current position.&lt;br /&gt;
# If the target is less than the current position, repeat these steps on the left side.&lt;br /&gt;
# If it&#039;s greater, repeat it on the right side.&lt;br /&gt;
&lt;br /&gt;
By applying this recursive algorithm, you are guaranteed to find your target location much faster than building an index for the whole stream.&lt;br /&gt;
&lt;br /&gt;
To correctly support chaining, you should first use this kind of search to locate the stream endpoints. Then, the above approach can be applied within the streams, to seek to any location within a chained file.&lt;br /&gt;
&lt;br /&gt;
Doing this correctly is somewhat more complicated than it seems, due to the existence of &#039;&#039;&#039;continued pages&#039;&#039;&#039; and the risk of a small valid page being contained within a packet. Both of these challenges can be addressed, but the solution is left as an exercise for the reader. (Hint: The maximum Ogg page size is &amp;lt; 64 KBytes)&lt;br /&gt;
&lt;br /&gt;
This Bisection Search is very good compared to the alternatives (a linear scan of the whole file), often taking just a couple of reads to locate the correct location in a file gigabytes in size, but the truly obsessive can out-perform the bisection on average, by using the local bitrate to pick a better target than the half way point used in a bisection search ([http://en.wikipedia.org/wiki/Secant_method Secant method]).&lt;br /&gt;
&lt;br /&gt;
Be careful about the worst case becoming linear (see [http://en.wikipedia.org/wiki/Brent%27s_method Brent&#039;s method]). The improvement possible from better-than-bisection approaches is probably only relevant for seeking across a high latency network. In typical low-latency applications, the added complexity may not be worth the cost.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
From an Email by Monty, [http://web.archive.org/web/20031201054855/http://www.xiph.org/archives/theora-dev/200209/0040.html 13th Sept 2002]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note that this document is obsolete, and incorrect with respect to seeking in multiplexed streams.&#039;&#039;&#039; It does accurately describe the rationale behind the two-part granulepos scheme (option 3 below) now use in Theora, Dirac, CMML and other codecs in Ogg.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Folks have noticed that the documentation is semi-silent about how to properly encode the granule position and interleave synchronization of keyframe-based video. The primary reasons for this:&lt;br /&gt;
&lt;br /&gt;
* we at Xiph hadn&#039;t had to do it yet&lt;br /&gt;
&lt;br /&gt;
* there are several easy possibilities, and the longer we had to think about it before mandating One True Spec, the better that spec would likely be.&lt;br /&gt;
&lt;br /&gt;
The lack of a painfully explicit spec has led to the theory that it&#039;s not possible; that&#039;s not true, there are a few ways to do it. Several require no extension to Ogg stream v 0. A last way requires an extra field (a point against it), but does not actually break any stream that currently exists.&lt;br /&gt;
&lt;br /&gt;
The time has come to lay down the spec as we&#039;re currently building the real abstraction layers in a concrete Ogg framework now where the Ogg engine, the codecs, and the overarching Ogg control layers are neatly put into boxes connected in formalized ways. Below I go into detail about each scheme in a &#039;thinking aloud&#039; sort of way. This is not because I haven&#039;t already given the matter sufficient thought, it is because I wish to give the reader sufficient background information to understand why one way is better than the others. This is not a call for input so much as an educational effort (and a public sanity check of my thinking; please do pipe up if it appears I missed a salient point).&lt;br /&gt;
&lt;br /&gt;
==== Starting Assumptions: ====&lt;br /&gt;
&lt;br /&gt;
1) Ogg is not a non-linear format. It is not a replacement for the scripting system of a DVD player. It is a media transport format&lt;br /&gt;
designed to do nothing more than deliver content, in a stream, and have all the pieces arrive on time and in sync. It is not designed to *prevent* more complex use of content, it merely does not implement anything beyond a linear representation of the data contained within. If you want to build a real non-linear format, build it *from* Ogg, not *into* Ogg. This has been the intent from day 1.&lt;br /&gt;
&lt;br /&gt;
2) The Ogg layer does not know specifics of the codec data it&#039;s multiplexing into a stream. It knows nothing beyond &#039;Oooo, packets!&#039;, that the packets belong to different buckets, that the packets go in order, and that packets have position markers. Ogg does not even have a concept of &#039;time&#039;; it only knows about the sequentially increasing, unitless position markers. It is up to higher layers which have access to the codec APIs to assign and convert units of framing or time.&lt;br /&gt;
&lt;br /&gt;
3) Given pre-cached decode headers, a player may seek into a stream at any point and begin decode. It may be the case that audio may start after video by a fraction of a second, or video might be blank until the stream hits the next keyframe, but this simplest case must just work, and there will be sufficient information to maintain perfect cross-media sync.&lt;br /&gt;
&lt;br /&gt;
4) (This departs from current reality, but it will be the reality very soon; vorbisfile currently blurs the careful abstraction I&#039;m about to describe) Seeking at an arbitrary level of precision is a distributed abstraction in the larger Ogg picture. At the lowest-level Ogg stream abstraction, seeking is one operation: &amp;quot;find me the page from logical stream &#039;n&#039; with granule position &#039;x&#039;&amp;quot;. All more complex seeking operations are a function of a higher-level layer (with knowledge of the media types and codec in use) making intelligent use of this lowest Ogg abstraction. The Ogg stream abstraction need deal with nothing more complex than &#039;find this page&#039;.&lt;br /&gt;
&lt;br /&gt;
The various granulepos strategies for keyframes concern this last point.&lt;br /&gt;
&lt;br /&gt;
The basic issue with video from which complexity arises is that frames often depend on previous and possibly future frames. This happens in a larger, general category of codecs whose streams may not begin decode from just any packet as well as packets that may not represent an entire frame, or even a fixed-time sampling algorithm. It is a mistake to design a seeking system tied to an exact set of very specific cases. While one could implement an explicit keyframe mechanism at the Ogg level, this mechanism would not cover any of the other interesting seeking cases while, as I&#039;ll show below, the mechanism would not actually be necessary.&lt;br /&gt;
&lt;br /&gt;
There will be a few complaints that Ogg is being unnecessarily subtle and shifts a great deal of complexity into software which a few extra page header fields could eliminate. Consider the following:&lt;br /&gt;
&lt;br /&gt;
1) Ogg was designed to impose a roughly .5-1% over the raw packet data over a wide range of packet usage patterns. &#039;A few extra fields&#039; begins inflating that figure for specific special cases that only apply to a few stream types. Right now there is no header field that is not general to every stream. There is no fat in the page headers.&lt;br /&gt;
&lt;br /&gt;
2) The Ogg-level seeking algorithm is exceptionally simple and can be described in a single sentence: &amp;quot;Find the earliest page with a granulepos less than but closest to &#039;x&#039;&amp;quot;. This shifts the onus of assembling more complex seeking operation requiring knowledge of a specific media type into a higher layer that has knowledge of that media type. The higher layer becomes responsible for determining for what &#039;x&#039; Ogg should search. The division of labor is clear and&lt;br /&gt;
sensible.&lt;br /&gt;
&lt;br /&gt;
3) Complex, precise seeking operations are still contained entirely within the framework, just at a higher layer than Ogg-stream. At no time is an application developer required to deal with seeking mechanisms within an Ogg stream or to manually maintain stream&lt;br /&gt;
synchronization.&lt;br /&gt;
&lt;br /&gt;
==== High level handwaving- How seeking really works ====&lt;br /&gt;
&lt;br /&gt;
The granulepos is intended to mean, roughly, &#039;If I stop decode at the end of this page, I will get data from my decoder up to position &#039;granulepos&#039;. The granulepos simultaneously provides seeking information and a &#039;length-of-stream&#039; indicator. Depending on the codec, it can also usually be used to indicate a timebase, but that isn&#039;t our problem right now.&lt;br /&gt;
&lt;br /&gt;
By inference, the granulepos is also used to construct a value &#039;y&#039; such that &#039;if I begin decode *from* point &#039;y&#039;, I will get data&lt;br /&gt;
beginning at position &#039;granulepos&#039;. Although in some codecs, y == granulepos, that is not necessarily the case when decode can&#039;t begin at any arbitrary packet. The granulepos encoding method candidates I will now describe affect exactly the &#039;granulepos&#039; to &#039;y&#039; conversion process. Note also that none of these affect Ogg, only the higher decision-making layers... Different circumstanced necessitated by different codecs can lead to different valid choices, all of which work as far as Ogg is concerned. However, for our I-/P-/B-frame video case, there is a pretty clear winner.&lt;br /&gt;
&lt;br /&gt;
===== Strategy 1: Straight Granulepos, Keyframes Are Not Our Problem. =====&lt;br /&gt;
  &lt;br /&gt;
In this scheme, the granulepos is a simple frame counter. The seeking decision-maker in the codec&#039;s framework plugin is responsible for determining if a frame is a keyframe or not, and if it can&#039;t begin decode from a given frame, it must request another earlier frame until it finds a keyframe. If the codec so desires, it can store &#039;what is my keyframe?&#039; information in the stream packets.&lt;br /&gt;
&lt;br /&gt;
This case means that each seek to a *specific* frame in a video stream will generally result in two Ogg seeks; a first seek to the the requested frame, then a second seek backwards to find that frame&#039;s keyframe.&lt;br /&gt;
&lt;br /&gt;
A larger concern is the semantic accuracy of the granulepos; it&#039;s intended to reflect position accurately when decoding forward. In this scheme, it&#039;s fine for a P-frame to update the counter (as it can be decoded going strictly forward), but B frames will also advance the counter; they can&#039;t be decoded without subsequent P or I frames. Thus, the semantic value of granulepos no longer strictly represents &#039;we can decode up to &#039;granulepos&#039; at the end of this frame&#039;.&lt;br /&gt;
&lt;br /&gt;
===== Strategy 2: Granulepos Represents Keyframes Only =====&lt;br /&gt;
&lt;br /&gt;
In this scheme, only keyframes update the granulepos (monotonically or non-monotonically). It simplifies the seeking process to a keyframe as an Ogg-level seek to page &#039;x&#039; will always yield a page with a keyframe. In addition, granulepos will also always mean &#039;we can decode up to *at least* this point in the stream. If the stream is truncated at P or B frames past granulepos, the extra frames can be discarded. (A special case would need to be defined to terminate a stream that doesn&#039;t end on an I frame).&lt;br /&gt;
&lt;br /&gt;
The difficulty with this scheme is that it presents slightly more for the software level decoder to track; a proper frame number could not be determined internally without tracking from an I frame. Also, the granulepos an Ogg page would not necessarily map to the last packet on the page, or even any packet on that page; multiple sequential pages could have the same granulepos. It is conceptually slightly messy, although the &#039;messiness&#039; does not make it at all impractical.&lt;br /&gt;
&lt;br /&gt;
===== Strategy 3: Granulepos Encodes Some State =====&lt;br /&gt;
&lt;br /&gt;
In some ways, this strategy is the most semantically &#039;over clever&#039;, but also the easiest to implement and the one that gives the most correct, up to date sync information. Pending comments, it is the I/P/B video strategy I currently favor.&lt;br /&gt;
&lt;br /&gt;
The granulepos is 64 bits, a size that is absolutely necessary if, for example, it represents the PCM sample count in an audio codec. When being used to encode video frame number, however, it is comparatively absurdly large*.&lt;br /&gt;
&lt;br /&gt;
* note that although granulepos is not permitted to wrap around, we can simply begin a new logical stream segment with a new serial number should a 30fps video stream ever hit the ten-billion year mark.&lt;br /&gt;
&lt;br /&gt;
Thus we clearly have room to skim a few bits off the bottom of granulepos to represent I, P or B frame. These bits are not used as flags, but rather, frame representation becomes a counting problem; We do this such that the count is still always strictly increasing.&lt;br /&gt;
&lt;br /&gt;
For example, we know that I frames will never be more than 256 frames apart and P frames no more than 31 B frames apart, the granulepos of an I frame can be defined to always be granulepos | 0xff == 0. If we can have up to seven intervening P frames, they could be numbered in granulepos-of-iframe + 0x20, 0x40, 0x60... 0xe0. B frames between the I and P frames would use the remaining five bits and be numbers as sub-I and sub-P frames 1 through 31. Thus, starting from zero, the frames/packets in the pattern IPBBPBBI would be numbered 0x000, 0x020, 0x021, 0x022, 0x040, 0x041, 0x042, 0x100.&lt;br /&gt;
&lt;br /&gt;
If we wish to preserve the ability to represent a timebase, the granulepos number for I frames need not be increased monotonically and shifted; it can be used to represent the frame number. The above example becomes 0x000, 0x020, 0x021, 0x022, 0x040, 0x041, 0x042, 0x700. To get real frame number (from an I frame), we just shift granulepos &amp;gt;&amp;gt; 8. This scheme can be taken further or modified to get frame number from any video frame.&lt;br /&gt;
&lt;br /&gt;
In this way, we can always seek, first time, to a desired key frame page (by seeking to Ogg page &#039;x&#039; where x | 0xff == 0). In addition, each frame still has a unique frame number and also a clear &#039;group&#039; number, potentially useful information to the decoder. Lastly, granulepos is still semantically correct, although it is now, in a sense, representing a whole.fractional frame number for buffering purposes.&lt;br /&gt;
&lt;br /&gt;
===== Scheme Four: Extra &#039;Seekpos&#039; Field / Straw Man =====&lt;br /&gt;
&lt;br /&gt;
Another possibility requires extension of the current Ogg page format. Although older players would reject any such extended pages as invalid, we do have versioning and typing fields, so there&#039;s not actually any compatibility problems with current Ogg pages... in the future.&lt;br /&gt;
&lt;br /&gt;
The idea in this scheme is to keep the current granulepos as a frame number field (ala scheme 1), but also add a new field &#039;seekpos&#039; that is used, rather than granulepos, in seeking. The seekpos would represent the number of the last keyframe that passed by.&lt;br /&gt;
&lt;br /&gt;
advantages:&lt;br /&gt;
&lt;br /&gt;
1) The net effect of this strategy is to modify scheme 1 to only require one bisection seek rather than two. Some amount of code simplification (over scheme 1) at the decision-making level.&lt;br /&gt;
&lt;br /&gt;
disadvantages:&lt;br /&gt;
&lt;br /&gt;
1) The Ogg format will need to be revved. No current (ala 1.0) Ogg code will understand the new pages.&lt;br /&gt;
&lt;br /&gt;
2) The header becomes larger, from a minimum size of 27 bytes to a minimum size of 35.&lt;br /&gt;
&lt;br /&gt;
3) This strategy only enhances keyframes; it is of no use in other odd seeking cases.&lt;br /&gt;
&lt;br /&gt;
4) Gives no more information than scheme 3, but is still more complicated, both in code and API (Ogg would have to understand keyframes).&lt;br /&gt;
&lt;br /&gt;
Thus, there&#039;s no substantial reason to prefer extending the format over a scheme that&#039;s possible within the existing framework. Note that schemes 1-3 can all be implemented within the Ogg stream today.&lt;br /&gt;
&lt;br /&gt;
Monty&lt;br /&gt;
&lt;br /&gt;
[[Category:Ogg]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=GranulePosAndSeeking&amp;diff=16643</id>
		<title>GranulePosAndSeeking</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=GranulePosAndSeeking&amp;diff=16643"/>
		<updated>2017-11-20T17:03:42Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* Granulepos encoding and How seeking really works */ fix grammar and formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Granulepos encoding and How seeking really works ==&lt;br /&gt;
&lt;br /&gt;
This describes how to seek on a multiplexed Ogg stream containing logical bitstreams with granuleshift, such as [[Theora]], [[Kate]], [[CMML]] or [[OggText]].&lt;br /&gt;
The purpose is to locate the earliest page that is required for rendering a given time offset.&lt;br /&gt;
Due to the fact that two time-seeking operations are required, this procedure is commonly referred to as a &amp;quot;&#039;&#039;&#039;double seek&#039;&#039;&#039;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Definitions ===&lt;br /&gt;
&lt;br /&gt;
Overload &#039;&#039;&#039;time&#039;&#039;&#039; to mean &#039;&#039;&#039;the time represented by a GranulePos value&#039;&#039;&#039;. Hence the &amp;quot;time&amp;quot; of a page is the &amp;quot;time represented by the page GranulePos&amp;quot; header field.&lt;br /&gt;
&lt;br /&gt;
Define &#039;&#039;&#039;seek&#039;&#039;&#039; to mean: for each &#039;&#039;&#039;logical&#039;&#039;&#039; bitstream, locate the &#039;&#039;&#039;bytewise-latest page&#039;&#039;&#039; in the bitstream with a &#039;&#039;&#039;time &amp;lt; the&lt;br /&gt;
target time&#039;&#039;&#039;, then choose the &#039;&#039;&#039;bytewise-earliest&#039;&#039;&#039; among these pages. If two or more pages have the same time (aka. GranulePos value), seeking must locate the bytewise-earlier page.&lt;br /&gt;
&lt;br /&gt;
==== Granules and Granuleshift ====&lt;br /&gt;
&lt;br /&gt;
We use the term &#039;&#039;&#039;granule&#039;&#039;&#039; to refer to time measured in the units of the codec. For audio codecs this is &#039;&#039;usually&#039;&#039; samples, and for video codecs it is &#039;&#039;usually&#039;&#039; frames or fields.&lt;br /&gt;
&lt;br /&gt;
In some formats, pages have a dependency on the data of an earlier page; for example in [[Theora]], interframes have a dependency on an earlier keyframe -- the keyframe data is required to decode the interframe. We encode both the time of the page and the time of the page it depends on into the granulepos. In order to do this we treat the granulepos as a bitfield as follows: &lt;br /&gt;
&lt;br /&gt;
 +---------------------+-------------+&lt;br /&gt;
 | prev_granule        | offset      |&lt;br /&gt;
 +---------------------+-------------+&lt;br /&gt;
&lt;br /&gt;
Then if a page has time in units of codec granules &amp;lt;tt&amp;gt;curr_granule&amp;lt;/tt&amp;gt;, and the page it depends on has time&lt;br /&gt;
&amp;lt;tt&amp;gt;prev_granule&amp;lt;/tt&amp;gt;, we define &amp;lt;tt&amp;gt;offset&amp;lt;/tt&amp;gt; as the difference between these:&lt;br /&gt;
&lt;br /&gt;
 offset = curr_granule - prev_granule&lt;br /&gt;
&lt;br /&gt;
We refer to the number of bits used to encode the offset as the &amp;quot;granuleshift&amp;quot;. This is fixed for all pages in&lt;br /&gt;
that track (logical bitstream). So we encode the later page&#039;s granulepos as: &lt;br /&gt;
&lt;br /&gt;
 granulepos = (prev_granule &amp;lt;&amp;lt; granuleshift) | offset&lt;br /&gt;
&lt;br /&gt;
When decoding, we can extract the current_granule from a granulepos by simply adding these fields:&lt;br /&gt;
&lt;br /&gt;
 curr_granule = prev_granule + offset&lt;br /&gt;
&lt;br /&gt;
Which expands to this expression of the page granulepos:&lt;br /&gt;
&lt;br /&gt;
 curr_granule = (granulepos &amp;gt;&amp;gt; granuleshift) + (granulepos &amp;amp; ((1 &amp;lt;&amp;lt; granuleshift) - 1)))&lt;br /&gt;
&lt;br /&gt;
Keyframes, and other data with no dependency on earlier packets, are encoded with:&lt;br /&gt;
&lt;br /&gt;
 prev_granule = curr_granule, offset = 0&lt;br /&gt;
&lt;br /&gt;
=== Seeking within Single-Track files ===&lt;br /&gt;
&lt;br /&gt;
To locate the earliest page in a track (a logical bitstream) required for rendering a given time offset:&lt;br /&gt;
&lt;br /&gt;
# seek to the desired time&lt;br /&gt;
# read the prev_granule out of the granulepos&lt;br /&gt;
# seek to the time represented by the prev_granule&lt;br /&gt;
&lt;br /&gt;
=== Seeking within Multitrack files ===&lt;br /&gt;
&lt;br /&gt;
To locate the earliest page in a multitrack file (a physical bitstream) required for rendering &#039;&#039;&#039;all&#039;&#039;&#039; tracks from a given time offset:&lt;br /&gt;
&lt;br /&gt;
# seek to the desired time&lt;br /&gt;
# scan forward until a page has been seen from all of the tracks that use granuleshift; while doing so, record the prev_granule of the bytewise-earliest page encountered from each track&lt;br /&gt;
# seek to the minimum of the prev_granules of those pages&lt;br /&gt;
&lt;br /&gt;
It is useful to put a bound on the forward scan; the distance scanned&lt;br /&gt;
only depends on the way the stream is constructed, so it can be large&lt;br /&gt;
if pages in a particular logical bistream is sparse.&lt;br /&gt;
&lt;br /&gt;
=== But how do I &amp;quot;seek to the desired time&amp;quot;?===&lt;br /&gt;
The above assumes that you already know how to seek to a particular GranulePos within the stream efficiently. &lt;br /&gt;
&lt;br /&gt;
This isn&#039;t as simple as it sounds, because the Ogg format does not include an index. The lack of an index is a feature rather than a deficiency and it is one of the primary reasons to use Ogg over some other formats.&lt;br /&gt;
&lt;br /&gt;
Because Ogg doesn&#039;t have in index, infinite streams and partial streams are automatically supported by correctly written applications. There is no risk of truncation or minor corruption making a stream unseekable. No memory is required to store an index, no bandwidth is wasted to transmit it, and seeking granularity is not limited to the precision of the index.&lt;br /&gt;
&lt;br /&gt;
On the other hand, non-indexed formats require a bit more intelligence from the application using them, so many applications have gotten it wrong (although some intelligence is also needed in a well written application for indexed formats, so that it can seek with a corrupted index or below the index granularity).&lt;br /&gt;
&lt;br /&gt;
If you are thinking about seeking within an Ogg file by building your own complete index: &#039;&#039;&#039;STOP! This is not a good procedure.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Building an index may seem simple, but it requires a costly read of the entire stream (which may be gigabytes in size, or even infinite).  There is a better way.&lt;br /&gt;
&lt;br /&gt;
The correct way to seek to a particular granule value in Ogg is by using a [http://en.wikipedia.org/wiki/Bisection_method bisection search]:&lt;br /&gt;
&lt;br /&gt;
# Seek to the middle of the stream&lt;br /&gt;
# obtain sync&lt;br /&gt;
# compare your target granule position with the current position.&lt;br /&gt;
# If the target is less than the current position, repeat these steps on the left side.&lt;br /&gt;
# If it&#039;s greater, repeat it on the right side.&lt;br /&gt;
&lt;br /&gt;
By applying this recursive algorithm, you are guaranteed to find your target location much faster than building an index for the whole stream.&lt;br /&gt;
&lt;br /&gt;
To correctly support chaining, you should first use this kind of search to locate the stream endpoints. Then, the above approach can be applied within the streams, to seek to any location within a chained file.&lt;br /&gt;
&lt;br /&gt;
Doing this correctly is somewhat more complicated than it seems, due to the existence of &#039;&#039;&#039;continued pages&#039;&#039;&#039; and the risk of a small valid page being contained within a packet. Both of these challenges can be addressed, but the solution is left as an exercise for the reader. (Hint: The maximum Ogg page size is &amp;lt; 64 KBytes)&lt;br /&gt;
&lt;br /&gt;
This Bisection Search is very good compared to the alternatives (a linear scan of the whole file), often taking just a couple of reads to locate the correct location in a file gigabytes in size, but the truly obsessive can out-perform the bisection on average, by using the local bitrate to pick a better target than the half way point used in a bisection search ([http://en.wikipedia.org/wiki/Secant_method secant method].&lt;br /&gt;
&lt;br /&gt;
Be careful about the worst case becoming linear; see [http://en.wikipedia.org/wiki/Brent%27s_method Brent&#039;s method]). The improvement possible from better-than-bisection approaches is probably only relevant for seeking across a high latency network.  In typical applications the added complexity may not be worth the cost.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
From an Email by Monty, [http://web.archive.org/web/20031201054855/http://www.xiph.org/archives/theora-dev/200209/0040.html 13th Sept 2002]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note that this document is obsolete, and incorrect with respect to seeking in multiplexed streams.&#039;&#039;&#039; It does accurately describe the rationale behind the two-part granulepos scheme (option 3 below) now use in Theora, Dirac, CMML and other codecs in Ogg.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Folks have noticed that the documentation is semi-silent about how to properly encode the granule position and interleave synchronization of keyframe-based video. The primary reasons for this:&lt;br /&gt;
&lt;br /&gt;
* we at Xiph hadn&#039;t had to do it yet&lt;br /&gt;
&lt;br /&gt;
* there are several easy possibilities, and the longer we had to think about it before mandating One True Spec, the better that spec would likely be.&lt;br /&gt;
&lt;br /&gt;
The lack of a painfully explicit spec has led to the theory that it&#039;s not possible; that&#039;s not true, there are a few ways to do it. Several require no extension to Ogg stream v 0. A last way requires an extra field (a point against it), but does not actually break any stream that currently exists.&lt;br /&gt;
&lt;br /&gt;
The time has come to lay down the spec as we&#039;re currently building the real abstraction layers in a concrete Ogg framework now where the Ogg engine, the codecs, and the overarching Ogg control layers are neatly put into boxes connected in formalized ways. Below I go into detail about each scheme in a &#039;thinking aloud&#039; sort of way. This is not because I haven&#039;t already given the matter sufficient thought, it is because I wish to give the reader sufficient background information to understand why one way is better than the others. This is not a call for input so much as an educational effort (and a public sanity check of my thinking; please do pipe up if it appears I missed a salient point).&lt;br /&gt;
&lt;br /&gt;
==== Starting Assumptions: ====&lt;br /&gt;
&lt;br /&gt;
1) Ogg is not a non-linear format. It is not a replacement for the scripting system of a DVD player. It is a media transport format&lt;br /&gt;
designed to do nothing more than deliver content, in a stream, and have all the pieces arrive on time and in sync. It is not designed to *prevent* more complex use of content, it merely does not implement anything beyond a linear representation of the data contained within. If you want to build a real non-linear format, build it *from* Ogg, not *into* Ogg. This has been the intent from day 1.&lt;br /&gt;
&lt;br /&gt;
2) The Ogg layer does not know specifics of the codec data it&#039;s multiplexing into a stream. It knows nothing beyond &#039;Oooo, packets!&#039;, that the packets belong to different buckets, that the packets go in order, and that packets have position markers. Ogg does not even have a concept of &#039;time&#039;; it only knows about the sequentially increasing, unitless position markers. It is up to higher layers which have access to the codec APIs to assign and convert units of framing or time.&lt;br /&gt;
&lt;br /&gt;
3) Given pre-cached decode headers, a player may seek into a stream at any point and begin decode. It may be the case that audio may start after video by a fraction of a second, or video might be blank until the stream hits the next keyframe, but this simplest case must just work, and there will be sufficient information to maintain perfect cross-media sync.&lt;br /&gt;
&lt;br /&gt;
4) (This departs from current reality, but it will be the reality very soon; vorbisfile currently blurs the careful abstraction I&#039;m about to describe) Seeking at an arbitrary level of precision is a distributed abstraction in the larger Ogg picture. At the lowest-level Ogg stream abstraction, seeking is one operation: &amp;quot;find me the page from logical stream &#039;n&#039; with granule position &#039;x&#039;&amp;quot;. All more complex seeking operations are a function of a higher-level layer (with knowledge of the media types and codec in use) making intelligent use of this lowest Ogg abstraction. The Ogg stream abstraction need deal with nothing more complex than &#039;find this page&#039;.&lt;br /&gt;
&lt;br /&gt;
The various granulepos strategies for keyframes concern this last point.&lt;br /&gt;
&lt;br /&gt;
The basic issue with video from which complexity arises is that frames often depend on previous and possibly future frames. This happens in a larger, general category of codecs whose streams may not begin decode from just any packet as well as packets that may not represent an entire frame, or even a fixed-time sampling algorithm. It is a mistake to design a seeking system tied to an exact set of very specific cases. While one could implement an explicit keyframe mechanism at the Ogg level, this mechanism would not cover any of the other interesting seeking cases while, as I&#039;ll show below, the mechanism would not actually be necessary.&lt;br /&gt;
&lt;br /&gt;
There will be a few complaints that Ogg is being unnecessarily subtle and shifts a great deal of complexity into software which a few extra page header fields could eliminate. Consider the following:&lt;br /&gt;
&lt;br /&gt;
1) Ogg was designed to impose a roughly .5-1% over the raw packet data over a wide range of packet usage patterns. &#039;A few extra fields&#039; begins inflating that figure for specific special cases that only apply to a few stream types. Right now there is no header field that is not general to every stream. There is no fat in the page headers.&lt;br /&gt;
&lt;br /&gt;
2) The Ogg-level seeking algorithm is exceptionally simple and can be described in a single sentence: &amp;quot;Find the earliest page with a granulepos less than but closest to &#039;x&#039;&amp;quot;. This shifts the onus of assembling more complex seeking operation requiring knowledge of a specific media type into a higher layer that has knowledge of that media type. The higher layer becomes responsible for determining for what &#039;x&#039; Ogg should search. The division of labor is clear and&lt;br /&gt;
sensible.&lt;br /&gt;
&lt;br /&gt;
3) Complex, precise seeking operations are still contained entirely within the framework, just at a higher layer than Ogg-stream. At no time is an application developer required to deal with seeking mechanisms within an Ogg stream or to manually maintain stream&lt;br /&gt;
synchronization.&lt;br /&gt;
&lt;br /&gt;
==== High level handwaving- How seeking really works ====&lt;br /&gt;
&lt;br /&gt;
The granulepos is intended to mean, roughly, &#039;If I stop decode at the end of this page, I will get data from my decoder up to position &#039;granulepos&#039;. The granulepos simultaneously provides seeking information and a &#039;length-of-stream&#039; indicator. Depending on the codec, it can also usually be used to indicate a timebase, but that isn&#039;t our problem right now.&lt;br /&gt;
&lt;br /&gt;
By inference, the granulepos is also used to construct a value &#039;y&#039; such that &#039;if I begin decode *from* point &#039;y&#039;, I will get data&lt;br /&gt;
beginning at position &#039;granulepos&#039;. Although in some codecs, y == granulepos, that is not necessarily the case when decode can&#039;t begin at any arbitrary packet. The granulepos encoding method candidates I will now describe affect exactly the &#039;granulepos&#039; to &#039;y&#039; conversion process. Note also that none of these affect Ogg, only the higher decision-making layers... Different circumstanced necessitated by different codecs can lead to different valid choices, all of which work as far as Ogg is concerned. However, for our I-/P-/B-frame video case, there is a pretty clear winner.&lt;br /&gt;
&lt;br /&gt;
===== Strategy 1: Straight Granulepos, Keyframes Are Not Our Problem. =====&lt;br /&gt;
  &lt;br /&gt;
In this scheme, the granulepos is a simple frame counter. The seeking decision-maker in the codec&#039;s framework plugin is responsible for determining if a frame is a keyframe or not, and if it can&#039;t begin decode from a given frame, it must request another earlier frame until it finds a keyframe. If the codec so desires, it can store &#039;what is my keyframe?&#039; information in the stream packets.&lt;br /&gt;
&lt;br /&gt;
This case means that each seek to a *specific* frame in a video stream will generally result in two Ogg seeks; a first seek to the the requested frame, then a second seek backwards to find that frame&#039;s keyframe.&lt;br /&gt;
&lt;br /&gt;
A larger concern is the semantic accuracy of the granulepos; it&#039;s intended to reflect position accurately when decoding forward. In this scheme, it&#039;s fine for a P-frame to update the counter (as it can be decoded going strictly forward), but B frames will also advance the counter; they can&#039;t be decoded without subsequent P or I frames. Thus, the semantic value of granulepos no longer strictly represents &#039;we can decode up to &#039;granulepos&#039; at the end of this frame&#039;.&lt;br /&gt;
&lt;br /&gt;
===== Strategy 2: Granulepos Represents Keyframes Only =====&lt;br /&gt;
&lt;br /&gt;
In this scheme, only keyframes update the granulepos (monotonically or non-monotonically). It simplifies the seeking process to a keyframe as an Ogg-level seek to page &#039;x&#039; will always yield a page with a keyframe. In addition, granulepos will also always mean &#039;we can decode up to *at least* this point in the stream. If the stream is truncated at P or B frames past granulepos, the extra frames can be discarded. (A special case would need to be defined to terminate a stream that doesn&#039;t end on an I frame).&lt;br /&gt;
&lt;br /&gt;
The difficulty with this scheme is that it presents slightly more for the software level decoder to track; a proper frame number could not be determined internally without tracking from an I frame. Also, the granulepos an Ogg page would not necessarily map to the last packet on the page, or even any packet on that page; multiple sequential pages could have the same granulepos. It is conceptually slightly messy, although the &#039;messiness&#039; does not make it at all impractical.&lt;br /&gt;
&lt;br /&gt;
===== Strategy 3: Granulepos Encodes Some State =====&lt;br /&gt;
&lt;br /&gt;
In some ways, this strategy is the most semantically &#039;over clever&#039;, but also the easiest to implement and the one that gives the most correct, up to date sync information. Pending comments, it is the I/P/B video strategy I currently favor.&lt;br /&gt;
&lt;br /&gt;
The granulepos is 64 bits, a size that is absolutely necessary if, for example, it represents the PCM sample count in an audio codec. When being used to encode video frame number, however, it is comparatively absurdly large*.&lt;br /&gt;
&lt;br /&gt;
* note that although granulepos is not permitted to wrap around, we can simply begin a new logical stream segment with a new serial number should a 30fps video stream ever hit the ten-billion year mark.&lt;br /&gt;
&lt;br /&gt;
Thus we clearly have room to skim a few bits off the bottom of granulepos to represent I, P or B frame. These bits are not used as flags, but rather, frame representation becomes a counting problem; We do this such that the count is still always strictly increasing.&lt;br /&gt;
&lt;br /&gt;
For example, we know that I frames will never be more than 256 frames apart and P frames no more than 31 B frames apart, the granulepos of an I frame can be defined to always be granulepos | 0xff == 0. If we can have up to seven intervening P frames, they could be numbered in granulepos-of-iframe + 0x20, 0x40, 0x60... 0xe0. B frames between the I and P frames would use the remaining five bits and be numbers as sub-I and sub-P frames 1 through 31. Thus, starting from zero, the frames/packets in the pattern IPBBPBBI would be numbered 0x000, 0x020, 0x021, 0x022, 0x040, 0x041, 0x042, 0x100.&lt;br /&gt;
&lt;br /&gt;
If we wish to preserve the ability to represent a timebase, the granulepos number for I frames need not be increased monotonically and shifted; it can be used to represent the frame number. The above example becomes 0x000, 0x020, 0x021, 0x022, 0x040, 0x041, 0x042, 0x700. To get real frame number (from an I frame), we just shift granulepos &amp;gt;&amp;gt; 8. This scheme can be taken further or modified to get frame number from any video frame.&lt;br /&gt;
&lt;br /&gt;
In this way, we can always seek, first time, to a desired key frame page (by seeking to Ogg page &#039;x&#039; where x | 0xff == 0). In addition, each frame still has a unique frame number and also a clear &#039;group&#039; number, potentially useful information to the decoder. Lastly, granulepos is still semantically correct, although it is now, in a sense, representing a whole.fractional frame number for buffering purposes.&lt;br /&gt;
&lt;br /&gt;
===== Scheme Four: Extra &#039;Seekpos&#039; Field / Straw Man =====&lt;br /&gt;
&lt;br /&gt;
Another possibility requires extension of the current Ogg page format. Although older players would reject any such extended pages as invalid, we do have versioning and typing fields, so there&#039;s not actually any compatibility problems with current Ogg pages... in the future.&lt;br /&gt;
&lt;br /&gt;
The idea in this scheme is to keep the current granulepos as a frame number field (ala scheme 1), but also add a new field &#039;seekpos&#039; that is used, rather than granulepos, in seeking. The seekpos would represent the number of the last keyframe that passed by.&lt;br /&gt;
&lt;br /&gt;
advantages:&lt;br /&gt;
&lt;br /&gt;
1) The net effect of this strategy is to modify scheme 1 to only require one bisection seek rather than two. Some amount of code simplification (over scheme 1) at the decision-making level.&lt;br /&gt;
&lt;br /&gt;
disadvantages:&lt;br /&gt;
&lt;br /&gt;
1) The Ogg format will need to be revved. No current (ala 1.0) Ogg code will understand the new pages.&lt;br /&gt;
&lt;br /&gt;
2) The header becomes larger, from a minimum size of 27 bytes to a minimum size of 35.&lt;br /&gt;
&lt;br /&gt;
3) This strategy only enhances keyframes; it is of no use in other odd seeking cases.&lt;br /&gt;
&lt;br /&gt;
4) Gives no more information than scheme 3, but is still more complicated, both in code and API (Ogg would have to understand keyframes).&lt;br /&gt;
&lt;br /&gt;
Thus, there&#039;s no substantial reason to prefer extending the format over a scheme that&#039;s possible within the existing framework. Note that schemes 1-3 can all be implemented within the Ogg stream today.&lt;br /&gt;
&lt;br /&gt;
Monty&lt;br /&gt;
&lt;br /&gt;
[[Category:Ogg]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Ogg&amp;diff=16642</id>
		<title>Ogg</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Ogg&amp;diff=16642"/>
		<updated>2017-11-20T14:41:11Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* Detecting Ogg files and extracting information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Ogg&#039;&#039;&#039; transport bitstream is designed to provide framing, error protection and seeking structure for higher-level codec streams that consist of raw, unencapsulated data packets, such as the [[Opus]], [[Vorbis]] and [[FLAC]] audio codecs or the [[Theora]] and [[Dirac]] video codecs.&lt;br /&gt;
&lt;br /&gt;
== Name ==&lt;br /&gt;
&lt;br /&gt;
Ogg derives from &amp;quot;ogging&amp;quot;, jargon from the [https://wikipedia.org/wiki/Netrek computer game Netrek].  Ogg is not an acronym and should not be mentioned as &amp;quot;OGG&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Design constraints for Ogg bitstreams ==&lt;br /&gt;
&lt;br /&gt;
* True streaming; we must not need to seek to build a 100% complete bitstream.&lt;br /&gt;
* Use no more than approximately 1-2% of bitstream bandwidth for packet boundary marking, high-level framing, sync and seeking.&lt;br /&gt;
* Specification of absolute position within the original sample stream.&lt;br /&gt;
* Simple mechanism to ease limited editing, such as a simplified concatenation mechanism.&lt;br /&gt;
* Detection of corruption, recapture after error and direct, random access to data at arbitrary positions in the bitstream.&lt;br /&gt;
&lt;br /&gt;
== Specification / standard==&lt;br /&gt;
&lt;br /&gt;
The Ogg transport bitstream and file format is defined in RFC 3533 approved 2003-May. As RFC documents are invariable once approved, there will never be newer versions of RFC 3533, but an [[RFC_3533_Errata]] exists instead.&lt;br /&gt;
&lt;br /&gt;
Existing flaws are discussed at [[OggIssues]], ideas for the future at [[TransOgg]].&lt;br /&gt;
&lt;br /&gt;
== Detecting Ogg files and extracting information ==&lt;br /&gt;
&lt;br /&gt;
Ogg files begin with a signature &amp;quot;OggS&amp;quot;. This signature also repeats many times inside the file, at the beginning of every page.&lt;br /&gt;
&lt;br /&gt;
There are several tools to get information about Ogg files:&lt;br /&gt;
* Ogginfo - part of Vorbis-Tools, supports Vorbis codec only (historical Ogg-vs-Vorbis issue), other codecs cause it to report garbage&lt;br /&gt;
* Opusinfo - part of Opus-Tools, supports only Opus codec well, only minimal Vorbis support&lt;br /&gt;
* Oggz ???&lt;br /&gt;
* [http://sourceforge.net/projects/mediainfo/ MediaInfo] - provides information about media (and some other) files, supports many types, also Ogg with various codecs, generic audio and video information only, no Ogg-specific details.&lt;br /&gt;
&lt;br /&gt;
== Projects using Ogg ==&lt;br /&gt;
&lt;br /&gt;
=== Codecs ===&lt;br /&gt;
&lt;br /&gt;
* [[CMML]]&lt;br /&gt;
* [[FLAC]] ([http://xiph.org/flac/ogg_mapping.html Ogg mapping])&lt;br /&gt;
* [[OggKate|Kate]]&lt;br /&gt;
* [http://opus-codec.org/ Opus] ([[OggOpus|Ogg mapping]])&lt;br /&gt;
* [[OggPCM|PCM]]&lt;br /&gt;
* [[Ogg Skeleton|Skeleton]]&lt;br /&gt;
* [[Speex]] ([[OggSpeex|Ogg mapping]])&lt;br /&gt;
* [[Theora]] ([[OggTheora|Ogg mapping]])&lt;br /&gt;
* [[Vorbis]] ([[OggVorbis|Ogg mapping]])&lt;br /&gt;
* [[OggWrit|Writ]]&lt;br /&gt;
&lt;br /&gt;
=== Servers ===&lt;br /&gt;
&lt;br /&gt;
* [[Icecast]]&lt;br /&gt;
* [http://www.metavid.org/ Metavid]&lt;br /&gt;
&lt;br /&gt;
== Developer info ==&lt;br /&gt;
&lt;br /&gt;
* [[GranulePosAndSeeking]] - a discussion of the interpretation of granulepos, and the algorithm for seeking on Ogg files&lt;br /&gt;
* [[FishFaq]] - also discusses Granule Position&lt;br /&gt;
&lt;br /&gt;
=== Ogg page format ===&lt;br /&gt;
&lt;br /&gt;
The LSb (least significant bit) comes first in the Bytes.  Fields&lt;br /&gt;
with more than one byte length are encoded LSB (least significant&lt;br /&gt;
byte) first.&lt;br /&gt;
&lt;br /&gt;
   0                   1                   2                   3&lt;br /&gt;
   0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1| Byte&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  | capture_pattern: Magic number for page start &amp;quot;OggS&amp;quot;           | 0-3&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  | version       | header_type   | granule_position              | 4-7&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  |                                                               | 8-11&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  |                               | bitstream_serial_number       | 12-15&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  |                               | page_sequence_number          | 16-19&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  |                               | CRC_checksum                  | 20-23&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  |                               | page_segments | segment_table | 24-27&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  | ...                                                           | 28-&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
== Implementations ==&lt;br /&gt;
&lt;br /&gt;
The Ogg encapsulation format can be handled with the following libraries:&lt;br /&gt;
&lt;br /&gt;
* libogg: [http://svn.xiph.org/trunk/ogg/ libogg svn] (C, cross-platform) Low-level Ogg parsing and writing.&lt;br /&gt;
* liboggz: [http://git.xiph.org/?p=liboggz.git liboggz git] (C, cross-platform) liboggz wraps libogg and provides features such as seeking.&lt;br /&gt;
* the Ogg Directshow filters: see [http://www.illiminable.com/ogg/ illiminable] (C++, Win32)&lt;br /&gt;
* [http://www.kfish.org/software/hogg HOgg] (pure Haskell)&lt;br /&gt;
* [http://www.jcraft.com/jorbis/ JOrbis] (pure Java) contains com.jcraft.jogg&lt;br /&gt;
* [http://www.sacredchao.net/quodlibet/wiki/Development/Mutagen Mutagen] (pure Python)&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Flash]]&lt;br /&gt;
* [[Oggless]]&lt;br /&gt;
* [[MIME Types and File Extensions]]&lt;br /&gt;
* [[RFC_3533_Errata]] - errors and flaws in the specification&lt;br /&gt;
* [[Nut_Container]]&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.xiph.org/ogg/doc/ Ogg documentation]&lt;br /&gt;
* [http://www.ietf.org/rfc/rfc3533.txt Ogg RFC]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ogg Ogg at Wikipedia]&lt;br /&gt;
* [http://wiki.multimedia.cx/index.php?title=Ogg Ogg at Multimedia Wiki]&lt;br /&gt;
&lt;br /&gt;
[[Category:Ogg]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Ogg&amp;diff=16641</id>
		<title>Ogg</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Ogg&amp;diff=16641"/>
		<updated>2017-11-20T14:36:49Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* Specification / standard */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Ogg&#039;&#039;&#039; transport bitstream is designed to provide framing, error protection and seeking structure for higher-level codec streams that consist of raw, unencapsulated data packets, such as the [[Opus]], [[Vorbis]] and [[FLAC]] audio codecs or the [[Theora]] and [[Dirac]] video codecs.&lt;br /&gt;
&lt;br /&gt;
== Name ==&lt;br /&gt;
&lt;br /&gt;
Ogg derives from &amp;quot;ogging&amp;quot;, jargon from the [https://wikipedia.org/wiki/Netrek computer game Netrek].  Ogg is not an acronym and should not be mentioned as &amp;quot;OGG&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Design constraints for Ogg bitstreams ==&lt;br /&gt;
&lt;br /&gt;
* True streaming; we must not need to seek to build a 100% complete bitstream.&lt;br /&gt;
* Use no more than approximately 1-2% of bitstream bandwidth for packet boundary marking, high-level framing, sync and seeking.&lt;br /&gt;
* Specification of absolute position within the original sample stream.&lt;br /&gt;
* Simple mechanism to ease limited editing, such as a simplified concatenation mechanism.&lt;br /&gt;
* Detection of corruption, recapture after error and direct, random access to data at arbitrary positions in the bitstream.&lt;br /&gt;
&lt;br /&gt;
== Specification / standard==&lt;br /&gt;
&lt;br /&gt;
The Ogg transport bitstream and file format is defined in RFC 3533 approved 2003-May. As RFC documents are invariable once approved, there will never be newer versions of RFC 3533, but an [[RFC_3533_Errata]] exists instead.&lt;br /&gt;
&lt;br /&gt;
Existing flaws are discussed at [[OggIssues]], ideas for the future at [[TransOgg]].&lt;br /&gt;
&lt;br /&gt;
== Detecting Ogg files and extracting information ==&lt;br /&gt;
&lt;br /&gt;
Ogg files begin with a signature &amp;quot;OggS&amp;quot;. This signature also repeats many times inside the file, at the beginning of every page. There are several tools to get information about Ogg files:&lt;br /&gt;
* Ogginfo - part of Vorbis-Tools, supports Vorbis codec only (historical Ogg-vs-Vorbis issue), other codecs cause it to report garbage&lt;br /&gt;
* Opusinfo - part of Opus-Tools, supports only Opus codec well, only minimal Vorbis support&lt;br /&gt;
* Oggz ???&lt;br /&gt;
* MediaInfo [http://sourceforge.net/projects/mediainfo/ sf.net/projects/mediainfo] - provides information about media (and some other) files, supports many types, also Ogg with various codecs, generic audio and video information only, no Ogg-specific details&lt;br /&gt;
&lt;br /&gt;
== Projects using Ogg ==&lt;br /&gt;
&lt;br /&gt;
=== Codecs ===&lt;br /&gt;
&lt;br /&gt;
* [[CMML]]&lt;br /&gt;
* [[FLAC]] ([http://xiph.org/flac/ogg_mapping.html Ogg mapping])&lt;br /&gt;
* [[OggKate|Kate]]&lt;br /&gt;
* [http://opus-codec.org/ Opus] ([[OggOpus|Ogg mapping]])&lt;br /&gt;
* [[OggPCM|PCM]]&lt;br /&gt;
* [[Ogg Skeleton|Skeleton]]&lt;br /&gt;
* [[Speex]] ([[OggSpeex|Ogg mapping]])&lt;br /&gt;
* [[Theora]] ([[OggTheora|Ogg mapping]])&lt;br /&gt;
* [[Vorbis]] ([[OggVorbis|Ogg mapping]])&lt;br /&gt;
* [[OggWrit|Writ]]&lt;br /&gt;
&lt;br /&gt;
=== Servers ===&lt;br /&gt;
&lt;br /&gt;
* [[Icecast]]&lt;br /&gt;
* [http://www.metavid.org/ Metavid]&lt;br /&gt;
&lt;br /&gt;
== Developer info ==&lt;br /&gt;
&lt;br /&gt;
* [[GranulePosAndSeeking]] - a discussion of the interpretation of granulepos, and the algorithm for seeking on Ogg files&lt;br /&gt;
* [[FishFaq]] - also discusses Granule Position&lt;br /&gt;
&lt;br /&gt;
=== Ogg page format ===&lt;br /&gt;
&lt;br /&gt;
The LSb (least significant bit) comes first in the Bytes.  Fields&lt;br /&gt;
with more than one byte length are encoded LSB (least significant&lt;br /&gt;
byte) first.&lt;br /&gt;
&lt;br /&gt;
   0                   1                   2                   3&lt;br /&gt;
   0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1| Byte&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  | capture_pattern: Magic number for page start &amp;quot;OggS&amp;quot;           | 0-3&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  | version       | header_type   | granule_position              | 4-7&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  |                                                               | 8-11&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  |                               | bitstream_serial_number       | 12-15&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  |                               | page_sequence_number          | 16-19&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  |                               | CRC_checksum                  | 20-23&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  |                               | page_segments | segment_table | 24-27&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  | ...                                                           | 28-&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
== Implementations ==&lt;br /&gt;
&lt;br /&gt;
The Ogg encapsulation format can be handled with the following libraries:&lt;br /&gt;
&lt;br /&gt;
* libogg: [http://svn.xiph.org/trunk/ogg/ libogg svn] (C, cross-platform) Low-level Ogg parsing and writing.&lt;br /&gt;
* liboggz: [http://git.xiph.org/?p=liboggz.git liboggz git] (C, cross-platform) liboggz wraps libogg and provides features such as seeking.&lt;br /&gt;
* the Ogg Directshow filters: see [http://www.illiminable.com/ogg/ illiminable] (C++, Win32)&lt;br /&gt;
* [http://www.kfish.org/software/hogg HOgg] (pure Haskell)&lt;br /&gt;
* [http://www.jcraft.com/jorbis/ JOrbis] (pure Java) contains com.jcraft.jogg&lt;br /&gt;
* [http://www.sacredchao.net/quodlibet/wiki/Development/Mutagen Mutagen] (pure Python)&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Flash]]&lt;br /&gt;
* [[Oggless]]&lt;br /&gt;
* [[MIME Types and File Extensions]]&lt;br /&gt;
* [[RFC_3533_Errata]] - errors and flaws in the specification&lt;br /&gt;
* [[Nut_Container]]&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.xiph.org/ogg/doc/ Ogg documentation]&lt;br /&gt;
* [http://www.ietf.org/rfc/rfc3533.txt Ogg RFC]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ogg Ogg at Wikipedia]&lt;br /&gt;
* [http://wiki.multimedia.cx/index.php?title=Ogg Ogg at Multimedia Wiki]&lt;br /&gt;
&lt;br /&gt;
[[Category:Ogg]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Ogg&amp;diff=16640</id>
		<title>Ogg</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Ogg&amp;diff=16640"/>
		<updated>2017-11-19T21:07:51Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* Codecs */ remove duplicate Opus listing&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Ogg&#039;&#039;&#039; transport bitstream is designed to provide framing, error protection and seeking structure for higher-level codec streams that consist of raw, unencapsulated data packets, such as the [[Opus]], [[Vorbis]] and [[FLAC]] audio codecs or the [[Theora]] and [[Dirac]] video codecs.&lt;br /&gt;
&lt;br /&gt;
== Name ==&lt;br /&gt;
&lt;br /&gt;
Ogg derives from &amp;quot;ogging&amp;quot;, jargon from the [https://wikipedia.org/wiki/Netrek computer game Netrek].  Ogg is not an acronym and should not be mentioned as &amp;quot;OGG&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Design constraints for Ogg bitstreams ==&lt;br /&gt;
&lt;br /&gt;
* True streaming; we must not need to seek to build a 100% complete bitstream.&lt;br /&gt;
* Use no more than approximately 1-2% of bitstream bandwidth for packet boundary marking, high-level framing, sync and seeking.&lt;br /&gt;
* Specification of absolute position within the original sample stream.&lt;br /&gt;
* Simple mechanism to ease limited editing, such as a simplified concatenation mechanism.&lt;br /&gt;
* Detection of corruption, recapture after error and direct, random access to data at arbitrary positions in the bitstream.&lt;br /&gt;
&lt;br /&gt;
== Specification / standard==&lt;br /&gt;
&lt;br /&gt;
The Ogg transport bitstream and file format is defined in RFC 3533 approved 2003-May. As RFC documents are invariable once approved, there will never be newer versions of RFC 3533, but an [[RFC_3533_Errata]] exists instead. Existing flaws are discussed at [[OggIssues]], ideas for the future at [[TransOgg]].&lt;br /&gt;
&lt;br /&gt;
== Detecting Ogg files and extracting information ==&lt;br /&gt;
&lt;br /&gt;
Ogg files begin with a signature &amp;quot;OggS&amp;quot;. This signature also repeats many times inside the file, at the beginning of every page. There are several tools to get information about Ogg files:&lt;br /&gt;
* Ogginfo - part of Vorbis-Tools, supports Vorbis codec only (historical Ogg-vs-Vorbis issue), other codecs cause it to report garbage&lt;br /&gt;
* Opusinfo - part of Opus-Tools, supports only Opus codec well, only minimal Vorbis support&lt;br /&gt;
* Oggz ???&lt;br /&gt;
* MediaInfo [http://sourceforge.net/projects/mediainfo/ sf.net/projects/mediainfo] - provides information about media (and some other) files, supports many types, also Ogg with various codecs, generic audio and video information only, no Ogg-specific details&lt;br /&gt;
&lt;br /&gt;
== Projects using Ogg ==&lt;br /&gt;
&lt;br /&gt;
=== Codecs ===&lt;br /&gt;
&lt;br /&gt;
* [[CMML]]&lt;br /&gt;
* [[FLAC]] ([http://xiph.org/flac/ogg_mapping.html Ogg mapping])&lt;br /&gt;
* [[OggKate|Kate]]&lt;br /&gt;
* [http://opus-codec.org/ Opus] ([[OggOpus|Ogg mapping]])&lt;br /&gt;
* [[OggPCM|PCM]]&lt;br /&gt;
* [[Ogg Skeleton|Skeleton]]&lt;br /&gt;
* [[Speex]] ([[OggSpeex|Ogg mapping]])&lt;br /&gt;
* [[Theora]] ([[OggTheora|Ogg mapping]])&lt;br /&gt;
* [[Vorbis]] ([[OggVorbis|Ogg mapping]])&lt;br /&gt;
* [[OggWrit|Writ]]&lt;br /&gt;
&lt;br /&gt;
=== Servers ===&lt;br /&gt;
&lt;br /&gt;
* [[Icecast]]&lt;br /&gt;
* [http://www.metavid.org/ Metavid]&lt;br /&gt;
&lt;br /&gt;
== Developer info ==&lt;br /&gt;
&lt;br /&gt;
* [[GranulePosAndSeeking]] - a discussion of the interpretation of granulepos, and the algorithm for seeking on Ogg files&lt;br /&gt;
* [[FishFaq]] - also discusses Granule Position&lt;br /&gt;
&lt;br /&gt;
=== Ogg page format ===&lt;br /&gt;
&lt;br /&gt;
The LSb (least significant bit) comes first in the Bytes.  Fields&lt;br /&gt;
with more than one byte length are encoded LSB (least significant&lt;br /&gt;
byte) first.&lt;br /&gt;
&lt;br /&gt;
   0                   1                   2                   3&lt;br /&gt;
   0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1| Byte&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  | capture_pattern: Magic number for page start &amp;quot;OggS&amp;quot;           | 0-3&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  | version       | header_type   | granule_position              | 4-7&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  |                                                               | 8-11&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  |                               | bitstream_serial_number       | 12-15&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  |                               | page_sequence_number          | 16-19&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  |                               | CRC_checksum                  | 20-23&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  |                               | page_segments | segment_table | 24-27&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  | ...                                                           | 28-&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
== Implementations ==&lt;br /&gt;
&lt;br /&gt;
The Ogg encapsulation format can be handled with the following libraries:&lt;br /&gt;
&lt;br /&gt;
* libogg: [http://svn.xiph.org/trunk/ogg/ libogg svn] (C, cross-platform) Low-level Ogg parsing and writing.&lt;br /&gt;
* liboggz: [http://git.xiph.org/?p=liboggz.git liboggz git] (C, cross-platform) liboggz wraps libogg and provides features such as seeking.&lt;br /&gt;
* the Ogg Directshow filters: see [http://www.illiminable.com/ogg/ illiminable] (C++, Win32)&lt;br /&gt;
* [http://www.kfish.org/software/hogg HOgg] (pure Haskell)&lt;br /&gt;
* [http://www.jcraft.com/jorbis/ JOrbis] (pure Java) contains com.jcraft.jogg&lt;br /&gt;
* [http://www.sacredchao.net/quodlibet/wiki/Development/Mutagen Mutagen] (pure Python)&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Flash]]&lt;br /&gt;
* [[Oggless]]&lt;br /&gt;
* [[MIME Types and File Extensions]]&lt;br /&gt;
* [[RFC_3533_Errata]] - errors and flaws in the specification&lt;br /&gt;
* [[Nut_Container]]&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.xiph.org/ogg/doc/ Ogg documentation]&lt;br /&gt;
* [http://www.ietf.org/rfc/rfc3533.txt Ogg RFC]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ogg Ogg at Wikipedia]&lt;br /&gt;
* [http://wiki.multimedia.cx/index.php?title=Ogg Ogg at Multimedia Wiki]&lt;br /&gt;
&lt;br /&gt;
[[Category:Ogg]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Ogg&amp;diff=16639</id>
		<title>Ogg</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Ogg&amp;diff=16639"/>
		<updated>2017-11-19T21:05:09Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* Name */ linkify Netrek&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Ogg&#039;&#039;&#039; transport bitstream is designed to provide framing, error protection and seeking structure for higher-level codec streams that consist of raw, unencapsulated data packets, such as the [[Opus]], [[Vorbis]] and [[FLAC]] audio codecs or the [[Theora]] and [[Dirac]] video codecs.&lt;br /&gt;
&lt;br /&gt;
== Name ==&lt;br /&gt;
&lt;br /&gt;
Ogg derives from &amp;quot;ogging&amp;quot;, jargon from the [https://wikipedia.org/wiki/Netrek computer game Netrek].  Ogg is not an acronym and should not be mentioned as &amp;quot;OGG&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Design constraints for Ogg bitstreams ==&lt;br /&gt;
&lt;br /&gt;
* True streaming; we must not need to seek to build a 100% complete bitstream.&lt;br /&gt;
* Use no more than approximately 1-2% of bitstream bandwidth for packet boundary marking, high-level framing, sync and seeking.&lt;br /&gt;
* Specification of absolute position within the original sample stream.&lt;br /&gt;
* Simple mechanism to ease limited editing, such as a simplified concatenation mechanism.&lt;br /&gt;
* Detection of corruption, recapture after error and direct, random access to data at arbitrary positions in the bitstream.&lt;br /&gt;
&lt;br /&gt;
== Specification / standard==&lt;br /&gt;
&lt;br /&gt;
The Ogg transport bitstream and file format is defined in RFC 3533 approved 2003-May. As RFC documents are invariable once approved, there will never be newer versions of RFC 3533, but an [[RFC_3533_Errata]] exists instead. Existing flaws are discussed at [[OggIssues]], ideas for the future at [[TransOgg]].&lt;br /&gt;
&lt;br /&gt;
== Detecting Ogg files and extracting information ==&lt;br /&gt;
&lt;br /&gt;
Ogg files begin with a signature &amp;quot;OggS&amp;quot;. This signature also repeats many times inside the file, at the beginning of every page. There are several tools to get information about Ogg files:&lt;br /&gt;
* Ogginfo - part of Vorbis-Tools, supports Vorbis codec only (historical Ogg-vs-Vorbis issue), other codecs cause it to report garbage&lt;br /&gt;
* Opusinfo - part of Opus-Tools, supports only Opus codec well, only minimal Vorbis support&lt;br /&gt;
* Oggz ???&lt;br /&gt;
* MediaInfo [http://sourceforge.net/projects/mediainfo/ sf.net/projects/mediainfo] - provides information about media (and some other) files, supports many types, also Ogg with various codecs, generic audio and video information only, no Ogg-specific details&lt;br /&gt;
&lt;br /&gt;
== Projects using Ogg ==&lt;br /&gt;
&lt;br /&gt;
=== Codecs ===&lt;br /&gt;
&lt;br /&gt;
* [[Opus]]&lt;br /&gt;
* [[CMML]]&lt;br /&gt;
* [[FLAC]] ([http://xiph.org/flac/ogg_mapping.html Ogg mapping])&lt;br /&gt;
* [[OggKate|Kate]]&lt;br /&gt;
* [http://opus-codec.org/ Opus] ([[OggOpus|Ogg mapping]])&lt;br /&gt;
* [[OggPCM|PCM]]&lt;br /&gt;
* [[Ogg Skeleton|Skeleton]]&lt;br /&gt;
* [[Speex]] ([[OggSpeex|Ogg mapping]])&lt;br /&gt;
* [[Theora]] ([[OggTheora|Ogg mapping]])&lt;br /&gt;
* [[Vorbis]] ([[OggVorbis|Ogg mapping]])&lt;br /&gt;
* [[OggWrit|Writ]]&lt;br /&gt;
&lt;br /&gt;
=== Servers ===&lt;br /&gt;
&lt;br /&gt;
* [[Icecast]]&lt;br /&gt;
* [http://www.metavid.org/ Metavid]&lt;br /&gt;
&lt;br /&gt;
== Developer info ==&lt;br /&gt;
&lt;br /&gt;
* [[GranulePosAndSeeking]] - a discussion of the interpretation of granulepos, and the algorithm for seeking on Ogg files&lt;br /&gt;
* [[FishFaq]] - also discusses Granule Position&lt;br /&gt;
&lt;br /&gt;
=== Ogg page format ===&lt;br /&gt;
&lt;br /&gt;
The LSb (least significant bit) comes first in the Bytes.  Fields&lt;br /&gt;
with more than one byte length are encoded LSB (least significant&lt;br /&gt;
byte) first.&lt;br /&gt;
&lt;br /&gt;
   0                   1                   2                   3&lt;br /&gt;
   0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1| Byte&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  | capture_pattern: Magic number for page start &amp;quot;OggS&amp;quot;           | 0-3&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  | version       | header_type   | granule_position              | 4-7&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  |                                                               | 8-11&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  |                               | bitstream_serial_number       | 12-15&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  |                               | page_sequence_number          | 16-19&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  |                               | CRC_checksum                  | 20-23&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  |                               | page_segments | segment_table | 24-27&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  | ...                                                           | 28-&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
== Implementations ==&lt;br /&gt;
&lt;br /&gt;
The Ogg encapsulation format can be handled with the following libraries:&lt;br /&gt;
&lt;br /&gt;
* libogg: [http://svn.xiph.org/trunk/ogg/ libogg svn] (C, cross-platform) Low-level Ogg parsing and writing.&lt;br /&gt;
* liboggz: [http://git.xiph.org/?p=liboggz.git liboggz git] (C, cross-platform) liboggz wraps libogg and provides features such as seeking.&lt;br /&gt;
* the Ogg Directshow filters: see [http://www.illiminable.com/ogg/ illiminable] (C++, Win32)&lt;br /&gt;
* [http://www.kfish.org/software/hogg HOgg] (pure Haskell)&lt;br /&gt;
* [http://www.jcraft.com/jorbis/ JOrbis] (pure Java) contains com.jcraft.jogg&lt;br /&gt;
* [http://www.sacredchao.net/quodlibet/wiki/Development/Mutagen Mutagen] (pure Python)&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Flash]]&lt;br /&gt;
* [[Oggless]]&lt;br /&gt;
* [[MIME Types and File Extensions]]&lt;br /&gt;
* [[RFC_3533_Errata]] - errors and flaws in the specification&lt;br /&gt;
* [[Nut_Container]]&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.xiph.org/ogg/doc/ Ogg documentation]&lt;br /&gt;
* [http://www.ietf.org/rfc/rfc3533.txt Ogg RFC]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ogg Ogg at Wikipedia]&lt;br /&gt;
* [http://wiki.multimedia.cx/index.php?title=Ogg Ogg at Multimedia Wiki]&lt;br /&gt;
&lt;br /&gt;
[[Category:Ogg]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Daala&amp;diff=16638</id>
		<title>Daala</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Daala&amp;diff=16638"/>
		<updated>2017-11-17T22:29:43Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* Presentations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Daala is the codename for a new video compression technology.&lt;br /&gt;
&lt;br /&gt;
The effort is a collaboration between the [https://www.mozilla.org/en-US/research/ Mozilla Foundation], the [https://www.xiph.org/ Xiph.Org Foundation] and any other contributors that wish to help.&lt;br /&gt;
&lt;br /&gt;
The goal of the project is to provide a video format that&#039;s free to implement, use and distribute, and a reference implementation with technical performance superior to [https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding H.265]. &lt;br /&gt;
&lt;br /&gt;
Please see the links below or the [https://www.xiph.org/daala/ main page] for more information.&lt;br /&gt;
&lt;br /&gt;
== Wiki Pages ==&lt;br /&gt;
* [[Daala Quickstart|Daala Quickstart (Linux/MacOS)]]&lt;br /&gt;
* [[Daala Quickstart Windows|Daala Quickstart (Windows)]]&lt;br /&gt;
* [[Daala MinGW64 Environment]]&lt;br /&gt;
&lt;br /&gt;
* [[Daala Weekly Meetings|Daala Weekly Meetings]]&lt;br /&gt;
&lt;br /&gt;
* [[AreWeCompressedYet]]&lt;br /&gt;
* [[RD Curve Data Format]]&lt;br /&gt;
&lt;br /&gt;
* [[DaalaTodo|Daala To-do List]]&lt;br /&gt;
* [[DaalaRoadmap|Daala Roadmap]]&lt;br /&gt;
&lt;br /&gt;
* [[Intra|Intra-prediction within Daala]]&lt;br /&gt;
&lt;br /&gt;
* [[Videos|Digital Primers]] - educational videos about audio/video technology&lt;br /&gt;
&lt;br /&gt;
== Communication ==&lt;br /&gt;
You are &#039;&#039;&#039;encouraged&#039;&#039;&#039; to join the&lt;br /&gt;
* [irc://irc.freenode.net/daala &#039;&#039;&#039;#daala&#039;&#039;&#039; IRC channel at freenode.net] - if you don&#039;t have an IRC client, you can use Freenode&#039;s &#039;&#039;&#039;[https://webchat.freenode.net/?channels=%23daala webchat]&#039;&#039;&#039; instead.&lt;br /&gt;
* [http://lists.xiph.org/mailman/listinfo/daala Daala Email List]&lt;br /&gt;
&lt;br /&gt;
=== Weekly Meetings ===&lt;br /&gt;
You are also welcome to attend the public [[Daala Weekly Meetings|weekly progress meetings]] by installing and using [http://wiki.mumble.info Mumble].&amp;lt;br /&amp;gt;&lt;br /&gt;
The address is &#039;&#039;&#039;mf4.xiph.org&#039;&#039;&#039; and the port is &#039;&#039;&#039;64738&#039;&#039;&#039; (you can run &#039;&#039;&#039;mumble://mf4.xiph.org:64738&#039;&#039;&#039; within your browser as a shortcut).&amp;lt;br /&amp;gt;&lt;br /&gt;
The meetings occur on &#039;&#039;&#039;Tuesdays&#039;&#039;&#039; at &#039;&#039;&#039;[http://www.timeanddate.com/worldclock/fixedtime.html?msg=Daala+Weekly+Meeting&amp;amp;iso=20150428T09&amp;amp;p1=1241 9AM Pacific Time]&#039;&#039;&#039; (5PM UTC/GMT).&lt;br /&gt;
The meeting agenda used to be available at &#039;&#039;&#039;[https://daala.etherpad.mozilla.org/weekly-meeting this Etherpad]&#039;&#039;&#039;, the October 13, 2015 meeting is available on [https://docs.google.com/document/d/1JP_Ko3wPuyDWhooZcp_m9kndyfZ75xN5YOi5yIMCW0s/edit?pli=1 Google Docs] and, following the migration to Etherpad Lite, the meeting agenda and minutes are now available at [https://public.etherpad-mozilla.org/p/daala-weekly-meeting this Etherpad].&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
* [http://forum.doom9.org/showthread.php?t=168004 Doom9 Forum discussion] - generic forum thread regarding Daala&lt;br /&gt;
* &amp;lt;del&amp;gt;[https://daala.etherpad.mozilla.org/ep/padlist/all-pads Daala Etherpads] - you can [https://daala.etherpad.mozilla.org/ep/account/request-account request a free account] to view these. You should receive access within a few days.&amp;lt;/del&amp;gt; Mozilla are transitioning to Etherpad Lite.&lt;br /&gt;
* [http://benjamin.smedbergs.us/weekly-updates.fcgi/project/daala Daala Project Status Board] - what Daala bits the Mozilla people are working on&lt;br /&gt;
&lt;br /&gt;
== Coding ==&lt;br /&gt;
You can get a copy of the latest Daala Source Code from [https://git.xiph.org/?p=daala.git;a=summary &#039;&#039;&#039;git.xiph.org&#039;&#039;&#039;] or [https://github.com/xiph/daala &#039;&#039;&#039;GitHub&#039;&#039;&#039;]. Please stick to the &#039;&#039;&#039;[https://git.xiph.org/?p=daala.git;a=blob_plain;f=doc/coding_style.html Coding Style Guide]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
* [https://review.xiph.org/all?limit=100 Xiph Code Reviews] - there is a proposal on the review process &#039;&#039;&#039;[[DaalaReview|here]]&#039;&#039;&#039;&lt;br /&gt;
* [https://github.com/xiph/daala/issues Daala&#039;s issues] - Issue/bug tracker on Github&lt;br /&gt;
* [https://mf4.xiph.org/jenkins/view/daala/ Continuous Integration Tests] - these run every time a new commit is made to the Daala git master, to make sure the new code hasn&#039;t broken existing functionality.&lt;br /&gt;
* [[OggDaala]] - definitions for embedding Daala video within an [[Ogg]] container.&lt;br /&gt;
&lt;br /&gt;
== Demos ==&lt;br /&gt;
* [https://people.xiph.org/~xiphmont/demo/daala/player-demo.shtml Daala Video Player] - an example implementation of a Daala decoder and player, ported to Javascript using [https://github.com/kripken/emscripten Emscripten].&lt;br /&gt;
&lt;br /&gt;
=== Codec Techniques ===&lt;br /&gt;
* [https://people.xiph.org/~xiphmont/demo/ Demo Articles] - explanations on certain techniques used in Daala (and other Xiph.Org projects)&lt;br /&gt;
* [http://exp.martres.me/edi/ Edge-Directed Interpolation] ([https://github.com/smarter/edi source code])&lt;br /&gt;
* [https://people.xiph.org/~ds/edi/info.html More Edge-Directed Interpolation]&lt;br /&gt;
* [https://people.xiph.org/~unlord/demo/intra.html Intra-prediction]&lt;br /&gt;
* [https://people.xiph.org/~unlord/zigzags.html Macroblock Coefficient Zigzag Graph] - HTML page generated using [https://github.com/xiph/daala/blob/master/tools/draw_zigzags.c tools/draw_zigzags.c] from the Daala source code.&lt;br /&gt;
* [https://jmvalin.ca/video/haar_example/ Still Image Screenshots] - comparison between Daala&#039;s Lapped Transform and Haar methods, and JPEG/x264/x265.&lt;br /&gt;
&lt;br /&gt;
== Documents ==&lt;br /&gt;
* [https://people.xiph.org/~unlord/spie_cfl.pdf Chroma from Luma (CfL)]&lt;br /&gt;
* [http://jmvalin.ca/papers/spie_pvq.pdf Perceptual Vector Quantisation (PVQ)] - see also [https://people.xiph.org/~yushin/ietf/draft-cho-netvc-applypvq.html Applying PVQ Outside Daala]&lt;br /&gt;
* [https://people.xiph.org/~tterribe/daala/vbsobmc.pdf Overlapped Block Motion Compensation (OBMC)]&lt;br /&gt;
* [https://mf4.xiph.org/jenkins/job/daala-autotools/ws/doc/html/index.html C API Documentation]&lt;br /&gt;
* [https://people.xiph.org/~yushin/tmp__/yushin_phd_thesis.pdf Image Coding Thesis] by Yushin Cho&lt;br /&gt;
* [http://arxiv.org/pdf/1411.4290v1.pdf Maximising Coding Efficiency Through Block Rotation] and why it [http://lists.xiph.org/pipermail/daala/2015-January/000054.html won&#039;t work well within Daala]&lt;br /&gt;
* [http://jmvalin.ca/video/theoretical_results.pdf JMSpeex&#039; Journal of Dubious Theoretical Results] - &amp;quot;take with an entire shaker-full of salt&amp;quot;&lt;br /&gt;
* [https://people.xiph.org/~unlord/pcs_daala.pdf Using Daala Intra Frames for Still Picture Coding]&lt;br /&gt;
* [http://arxiv.org/abs/1602.05975 The Daala Directional Deringing Filter]&lt;br /&gt;
* [https://people.xiph.org/~unlord/icip2016.pdf Daala: A Perceptually-Driven Still Image Codec](draft) - submitted at [http://2016.ieeeicip.org/ ICIP 2016].&lt;br /&gt;
* [http://people.xiph.org/~tterribe/daala/neon_tutorial.pdf SIMD Assembly Tutorial: ARM NEON]&lt;br /&gt;
* [https://jmvalin.ca/video/mmsp2016_poster.pdf Daala Technologies Poster]&lt;br /&gt;
&lt;br /&gt;
=== IETF Drafts ===&lt;br /&gt;
* [https://tools.ietf.org/html/draft-egge-videocodec-tdlt Time-Domain Lapped Transforms (TDLT)] - documents the Lapped Transform pre- and post-filters used for block-edge decorrelation&lt;br /&gt;
* [https://tools.ietf.org/html/draft-valin-videocodec-pvq Perceptual Vector Quantisation (PVQ)] - &lt;br /&gt;
* [https://tools.ietf.org/html/draft-terriberry-codingtools Coding Tools] - documents Entropy Coding, Integer Transforms and other techniques&lt;br /&gt;
* [https://tools.ietf.org/html/draft-moffitt-netvc-requirements Internet Video Codec (NetVC) Requirements] - explains what requirements and use cases Daala is trying to cater for&lt;br /&gt;
* [https://tools.ietf.org/html/draft-daede-netvc-testing Internet Video Codec (NetVC) Testing and Quality Measurement]&lt;br /&gt;
* [https://tools.ietf.org/html/draft-terriberry-ipr-license Example IPR Licence Terms]&lt;br /&gt;
&lt;br /&gt;
Additional drafts can be found at the [https://datatracker.ietf.org/wg/netvc/documents/ IETF DataTracker].&lt;br /&gt;
&lt;br /&gt;
== Presentations ==&lt;br /&gt;
For a more in-depth look at the IETF&#039;s NetVC Meetings, use the [https://datatracker.ietf.org/wg/netvc/meetings/ IETF DataTracker].&lt;br /&gt;
&lt;br /&gt;
* 2017-11-15 - IETF 100 - [https://www.youtube.com/watch?v=_wRLR8ypCg0&amp;amp;t=4682s Video] - [https://docs.google.com/presentation/d/12BsMrcGo27bgf7OMpOmlIZUEBblMmBXESCeG3_FZ5cI/edit#slide=id.p Slides]&lt;br /&gt;
* 2017-05-25 - IETF 98 - [https://datatracker.ietf.org/meeting/98/materials/slides-98-hackathon-netvc/ NetVC Hackathon Slides], [https://jmvalin.ca/video/cdef_slides.pdf CDEF Slides]&lt;br /&gt;
* 2017-02-05 - FOSDEM 2017 - [https://video.fosdem.org/2017/K.3.401/om_av1.vp8.webm Video] - [https://fosdem.org/2017/schedule/event/om_av1/attachments/slides/1795/export/events/attachments/om_av1/slides/1795/av1_update.pdf Slides]&lt;br /&gt;
* 2017-01-17 - Linux Conf AU - [https://www.youtube.com/watch?v=lzPaldsmJbk Video] - [https://people.xiph.org/~tterribe/pubs/lca2017/aom.pdf Slides]&lt;br /&gt;
-------&lt;br /&gt;
* 2016-11-15 - IETF 97 - [https://datatracker.ietf.org/meeting/97/agenda/netvc/ Agenda] - [http://recs.conf.meetecho.com/Playout/watch.jsp?recording=IETF97_NETVC&amp;amp;chapter=chapter_1 Video and Chat] - [https://datatracker.ietf.org/meeting/97/session/netvc/ Slides]&lt;br /&gt;
* 2016-09-04 - VideoLAN Dev Days 2016 - [https://www.youtube.co.uk/watch?v=AOssZFJ0EdI Video] - [http://people.xiph.org/~tterribe/daala/vdd2016.pdf Slides]&lt;br /&gt;
* 2016-08-31 - SPIE Royalty-free Video - [http://spie.org/OPO/conferencedetails/digital-image-processing#session-7 Schedule and Abstracts] - [https://www.youtube.co.uk/watch?v=wi1BefrfTos&amp;amp;t=41m40s Video] - [http://people.xiph.org/~tterribe/daala/daala-spie-adip2016-slides.pdf Slides]&lt;br /&gt;
* 2016-07-18 - IETF 96 - [https://datatracker.ietf.org/meeting/96/agenda/netvc/ Agenda] - [http://recs.conf.meetecho.com/Playout/watch.jsp?recording=IETF96_NETVC&amp;amp;chapter=chapter_1 Video and Chat] - [https://datatracker.ietf.org/meeting/96/session/netvc/ Slides]&lt;br /&gt;
* 2016-06-27 - Daala&#039;s Entropy Coder - [http://people.xiph.org/~tterribe/daala/daala_ec.pdf Slides]&lt;br /&gt;
* 2016-04-07 - IETF 95 - [https://datatracker.ietf.org/meeting/95/agenda/netvc/ Agenda] - [http://recs.conf.meetecho.com/Playout/watch.jsp?recording=IETF95_NETVC&amp;amp;chapter=chapter_1 Video and Chat] - [https://www.ietf.org/proceedings/95/slides/slides-95-netvc-2.pdf Slides] - [https://datatracker.ietf.org/meeting/95/session/netvc/ Other Materials]&lt;br /&gt;
* 2016-04-01 - DCC 2016 - [https://people.xiph.org/~unlord/Daala-DCC2016.pdf Slides] - [https://people.xiph.org/~unlord/1853a466.pdf Paper]&lt;br /&gt;
* 2016-01-30 - FOSDEM 2016 - [https://fosdem.org/2016/schedule/event/daala/ Summary] - [https://video.fosdem.org/2016/h2214/implementing-a-native-daala-decoder-in-ffmpeg.mp4 Video (MP4, 57MB)] - [https://people.xiph.org/~unlord/Xmi.pdf Slides]&lt;br /&gt;
-------&lt;br /&gt;
* 2015-11-02 - IETF 94 - [https://datatracker.ietf.org/meeting/94/agenda/netvc/ Agenda] - [http://www.meetecho.com/ietf94/netvc Video and Chat] - [https://datatracker.ietf.org/meeting/94/session/netvc/ Other Materials]&lt;br /&gt;
* 2015-10-24 - LinuxDay 24 (Turin) - [https://people.xiph.org/~tterribe/daala/linuxday24.pdf Slides]&lt;br /&gt;
* 2015-10-21 - MPEG 113 - Future Video Coding Workshop - [https://people.xiph.org/~tterribe/daala/mpeg113.pdf Slides]&lt;br /&gt;
* 2015-09-19 - VideoLAN Dev Days - [https://www.youtube.com/playlist?list=PLQLpBN3oI7E44HIdTOovThc1MNHLchgHE YouTube Playlist] - [https://people.xiph.org/~tterribe/daala/vdd2015.pdf Daala Slides]&lt;br /&gt;
* 2015-07-22 - IETF 93 - [http://recordings.conf.meetecho.com/Playout/watch.jsp?recording=IETF93_NETVC_II&amp;amp;chapter=chapter_1 NetVC Session 2/2] - [https://datatracker.ietf.org/meeting/93/agenda/netvc/ Agenda] - [http://www.meetecho.com/ietf93/netvc_II Video and Chat] - [https://www.ietf.org/proceedings/93/slides/slides-93-netvc-4.pdf Slides] - [https://www.ietf.org/jabber/logs/netvc/2015-07-22.html Jabber Log] - [https://datatracker.ietf.org/meeting/93/session/netvc/ Other Materials]&lt;br /&gt;
* 2015-07-20 - IETF 93 - [http://recordings.conf.meetecho.com/Playout/watch.jsp?recording=IETF93_NETVC&amp;amp;chapter=chapter_1 NetVC Session 1/2] - [https://datatracker.ietf.org/meeting/93/agenda/netvc/ Agenda] - [http://www.meetecho.com/ietf93/netvc Video and Chat] - [https://www.ietf.org/proceedings/93/slides/slides-93-netvc-3.pdf Slides] - [https://www.ietf.org/jabber/logs/netvc/2015-07-20.html Jabber Log]&lt;br /&gt;
* 2015-03-24 - IETF 92 - [http://recordings.conf.meetecho.com/Playout/watch.jsp?recording=IETF92_NETVC&amp;amp;chapter=chapter_0 NetVC Session] - Audio as [https://people.xiph.org/~tdaede/audio/ietf92-venetian-20150324-0900-am1.opus Opus] (29MB) or [https://www.ietf.org/audio/ietf92/ietf92-venetian-20150324-0900-am1.mp3 MP3] (119MB, action starts at 14:50) - [https://www.ietf.org/proceedings/92/slides/slides-92-netvc-0.pdf Slides] - [https://www.ietf.org/mail-archive/web/video-codec/current/msg00235.html Notes] - [https://www.ietf.org/jabber/logs/netvc/2015-03-24.html Jabber Log]&lt;br /&gt;
* 2015-02-11 - SPIE talks:&lt;br /&gt;
&amp;lt;!-- Originals of these 3 videos can be found at http://people.xiph.org/~unlord/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Someday, should do a better encode... --&amp;gt;&lt;br /&gt;
** [http://people.xiph.org/~tdaede/video/SPIE_Nathan.webm Chroma from Luma (CfL)] - [https://people.xiph.org/~unlord/SPIE-2015-CfL.pdf Slides] - [https://people.xiph.org/~unlord/spie_cfl.pdf Paper]&lt;br /&gt;
** [http://people.xiph.org/~tdaede/video/SPIE_PVQ.webm Perceptual Vector Quantisation (PVQ)] - [http://people.xiph.org/~tterribe/daala/spie_pvq_slides.pdf Slides] - [http://jmvalin.ca/papers/spie_pvq.pdf Paper]&lt;br /&gt;
** [http://people.xiph.org/~tdaede/video/SPIE_Tim.webm Adaptive Motion Compensation Without Blocking Artifacts] - [http://people.xiph.org/~tterribe/daala/spie_obmc_slides.pdf Slides] - [https://people.xiph.org/~tterribe/daala/vbsobmc.pdf Paper]&lt;br /&gt;
* 2015-01-31 - [http://ftp.osuosl.org/pub/fosdem/2015/devroom-open_media/daala.mp4 Daala Project Update at FOSDEM 2015] - [https://fosdem.org/2015/schedule/event/daala/ summary] - [https://fosdem.org/2015/schedule/event/daala/attachments/slides/569/export/events/attachments/daala/slides/569/Daala_FOSDEM_2015.pdf Slides]&lt;br /&gt;
* 2015-01-14 - [https://www.youtube.co.uk/watch?v=Dmho4gcRvQ4 Linux Conf 2015] - [http://lca2015.linux.org.au/schedule/30187/view_talk presentation summary] - [https://people.xiph.org/~tterribe/pubs/lca2015/daala.pdf Slides]&lt;br /&gt;
-------&lt;br /&gt;
* 2014-09-16 - [https://air.mozilla.org/daala-are-we-compressed-yet/ Daala: Are We Compressed Yet?]&lt;br /&gt;
* 2014-06-25 - [https://air.mozilla.org/sparsity-induced-prediction-for-images-and-video/ Sparsity Induced Prediction for Images and Video]&lt;br /&gt;
* 2014-06-06 - VP9 Summit (no video available) - [https://people.xiph.org/~xiphmont/demo/daala/daala-vp9summit-20140606.pdf Slides]&lt;br /&gt;
-------&lt;br /&gt;
* 2013-10-23 - [https://people.xiph.org/~xiphmont/video/Free_Codecs_Update_Opus_and_Daala.ogv Opus and Daala: State of the Art Royalty-free Codecs] - [https://people.xiph.org/~greg/gstreamer-daala-opus.pdf Slides]&lt;br /&gt;
* 2013-09-30 - [https://people.xiph.org/~tterribe/daala/coding_party2/?C=M;O=A Daala Coding Party 2] - [https://people.xiph.org/~unlord/Daala-Intra.pdf Slides]&lt;br /&gt;
* 2013-05-02 - [https://people.xiph.org/~xiphmont/tim-terriberry-presents-daala/ Tim Terriberry Presents Daala]&lt;br /&gt;
-------&lt;br /&gt;
* 2012-01-24 - [https://media.basilgohar.com/derf-talks/?C=M;O=A Introduction to Video Coding] - [https://people.xiph.org/~tterribe/pubs/lca2012/auckland/intro_to_video1.pdf Slides] (no video for slides 1-50)&lt;br /&gt;
&lt;br /&gt;
== Other Websites ==&lt;br /&gt;
* [https://www.youtube.com/playlist?list=PLEeMksZoEQ1xQEuLF50w0RwDwLgDGwSG- Daala Presentations on YouTube]&lt;br /&gt;
* [https://www.youtube.com/playlist?list=PLOU2XLYxmsIJGErt5rrCqaSGTMyyqNt2H Google&#039;s Compressor Head videos] - a beginner&#039;s introduction to the world of data compression&lt;br /&gt;
* [https://www.zazzle.com/daala_tee_shirt-235139149596175944 Daala T-shirts] - if you&#039;d like a free one, help out with the project and ask the Mozilla guys nicely for one :-)&lt;br /&gt;
* [https://www.xiph.org/donate/ Donate to Xiph.Org] &lt;br /&gt;
* [[Daala_on_Wheels|Historical Daala wiki page]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Daala]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Daala&amp;diff=16637</id>
		<title>Daala</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Daala&amp;diff=16637"/>
		<updated>2017-11-17T22:25:41Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* Presentations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Daala is the codename for a new video compression technology.&lt;br /&gt;
&lt;br /&gt;
The effort is a collaboration between the [https://www.mozilla.org/en-US/research/ Mozilla Foundation], the [https://www.xiph.org/ Xiph.Org Foundation] and any other contributors that wish to help.&lt;br /&gt;
&lt;br /&gt;
The goal of the project is to provide a video format that&#039;s free to implement, use and distribute, and a reference implementation with technical performance superior to [https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding H.265]. &lt;br /&gt;
&lt;br /&gt;
Please see the links below or the [https://www.xiph.org/daala/ main page] for more information.&lt;br /&gt;
&lt;br /&gt;
== Wiki Pages ==&lt;br /&gt;
* [[Daala Quickstart|Daala Quickstart (Linux/MacOS)]]&lt;br /&gt;
* [[Daala Quickstart Windows|Daala Quickstart (Windows)]]&lt;br /&gt;
* [[Daala MinGW64 Environment]]&lt;br /&gt;
&lt;br /&gt;
* [[Daala Weekly Meetings|Daala Weekly Meetings]]&lt;br /&gt;
&lt;br /&gt;
* [[AreWeCompressedYet]]&lt;br /&gt;
* [[RD Curve Data Format]]&lt;br /&gt;
&lt;br /&gt;
* [[DaalaTodo|Daala To-do List]]&lt;br /&gt;
* [[DaalaRoadmap|Daala Roadmap]]&lt;br /&gt;
&lt;br /&gt;
* [[Intra|Intra-prediction within Daala]]&lt;br /&gt;
&lt;br /&gt;
* [[Videos|Digital Primers]] - educational videos about audio/video technology&lt;br /&gt;
&lt;br /&gt;
== Communication ==&lt;br /&gt;
You are &#039;&#039;&#039;encouraged&#039;&#039;&#039; to join the&lt;br /&gt;
* [irc://irc.freenode.net/daala &#039;&#039;&#039;#daala&#039;&#039;&#039; IRC channel at freenode.net] - if you don&#039;t have an IRC client, you can use Freenode&#039;s &#039;&#039;&#039;[https://webchat.freenode.net/?channels=%23daala webchat]&#039;&#039;&#039; instead.&lt;br /&gt;
* [http://lists.xiph.org/mailman/listinfo/daala Daala Email List]&lt;br /&gt;
&lt;br /&gt;
=== Weekly Meetings ===&lt;br /&gt;
You are also welcome to attend the public [[Daala Weekly Meetings|weekly progress meetings]] by installing and using [http://wiki.mumble.info Mumble].&amp;lt;br /&amp;gt;&lt;br /&gt;
The address is &#039;&#039;&#039;mf4.xiph.org&#039;&#039;&#039; and the port is &#039;&#039;&#039;64738&#039;&#039;&#039; (you can run &#039;&#039;&#039;mumble://mf4.xiph.org:64738&#039;&#039;&#039; within your browser as a shortcut).&amp;lt;br /&amp;gt;&lt;br /&gt;
The meetings occur on &#039;&#039;&#039;Tuesdays&#039;&#039;&#039; at &#039;&#039;&#039;[http://www.timeanddate.com/worldclock/fixedtime.html?msg=Daala+Weekly+Meeting&amp;amp;iso=20150428T09&amp;amp;p1=1241 9AM Pacific Time]&#039;&#039;&#039; (5PM UTC/GMT).&lt;br /&gt;
The meeting agenda used to be available at &#039;&#039;&#039;[https://daala.etherpad.mozilla.org/weekly-meeting this Etherpad]&#039;&#039;&#039;, the October 13, 2015 meeting is available on [https://docs.google.com/document/d/1JP_Ko3wPuyDWhooZcp_m9kndyfZ75xN5YOi5yIMCW0s/edit?pli=1 Google Docs] and, following the migration to Etherpad Lite, the meeting agenda and minutes are now available at [https://public.etherpad-mozilla.org/p/daala-weekly-meeting this Etherpad].&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
* [http://forum.doom9.org/showthread.php?t=168004 Doom9 Forum discussion] - generic forum thread regarding Daala&lt;br /&gt;
* &amp;lt;del&amp;gt;[https://daala.etherpad.mozilla.org/ep/padlist/all-pads Daala Etherpads] - you can [https://daala.etherpad.mozilla.org/ep/account/request-account request a free account] to view these. You should receive access within a few days.&amp;lt;/del&amp;gt; Mozilla are transitioning to Etherpad Lite.&lt;br /&gt;
* [http://benjamin.smedbergs.us/weekly-updates.fcgi/project/daala Daala Project Status Board] - what Daala bits the Mozilla people are working on&lt;br /&gt;
&lt;br /&gt;
== Coding ==&lt;br /&gt;
You can get a copy of the latest Daala Source Code from [https://git.xiph.org/?p=daala.git;a=summary &#039;&#039;&#039;git.xiph.org&#039;&#039;&#039;] or [https://github.com/xiph/daala &#039;&#039;&#039;GitHub&#039;&#039;&#039;]. Please stick to the &#039;&#039;&#039;[https://git.xiph.org/?p=daala.git;a=blob_plain;f=doc/coding_style.html Coding Style Guide]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
* [https://review.xiph.org/all?limit=100 Xiph Code Reviews] - there is a proposal on the review process &#039;&#039;&#039;[[DaalaReview|here]]&#039;&#039;&#039;&lt;br /&gt;
* [https://github.com/xiph/daala/issues Daala&#039;s issues] - Issue/bug tracker on Github&lt;br /&gt;
* [https://mf4.xiph.org/jenkins/view/daala/ Continuous Integration Tests] - these run every time a new commit is made to the Daala git master, to make sure the new code hasn&#039;t broken existing functionality.&lt;br /&gt;
* [[OggDaala]] - definitions for embedding Daala video within an [[Ogg]] container.&lt;br /&gt;
&lt;br /&gt;
== Demos ==&lt;br /&gt;
* [https://people.xiph.org/~xiphmont/demo/daala/player-demo.shtml Daala Video Player] - an example implementation of a Daala decoder and player, ported to Javascript using [https://github.com/kripken/emscripten Emscripten].&lt;br /&gt;
&lt;br /&gt;
=== Codec Techniques ===&lt;br /&gt;
* [https://people.xiph.org/~xiphmont/demo/ Demo Articles] - explanations on certain techniques used in Daala (and other Xiph.Org projects)&lt;br /&gt;
* [http://exp.martres.me/edi/ Edge-Directed Interpolation] ([https://github.com/smarter/edi source code])&lt;br /&gt;
* [https://people.xiph.org/~ds/edi/info.html More Edge-Directed Interpolation]&lt;br /&gt;
* [https://people.xiph.org/~unlord/demo/intra.html Intra-prediction]&lt;br /&gt;
* [https://people.xiph.org/~unlord/zigzags.html Macroblock Coefficient Zigzag Graph] - HTML page generated using [https://github.com/xiph/daala/blob/master/tools/draw_zigzags.c tools/draw_zigzags.c] from the Daala source code.&lt;br /&gt;
* [https://jmvalin.ca/video/haar_example/ Still Image Screenshots] - comparison between Daala&#039;s Lapped Transform and Haar methods, and JPEG/x264/x265.&lt;br /&gt;
&lt;br /&gt;
== Documents ==&lt;br /&gt;
* [https://people.xiph.org/~unlord/spie_cfl.pdf Chroma from Luma (CfL)]&lt;br /&gt;
* [http://jmvalin.ca/papers/spie_pvq.pdf Perceptual Vector Quantisation (PVQ)] - see also [https://people.xiph.org/~yushin/ietf/draft-cho-netvc-applypvq.html Applying PVQ Outside Daala]&lt;br /&gt;
* [https://people.xiph.org/~tterribe/daala/vbsobmc.pdf Overlapped Block Motion Compensation (OBMC)]&lt;br /&gt;
* [https://mf4.xiph.org/jenkins/job/daala-autotools/ws/doc/html/index.html C API Documentation]&lt;br /&gt;
* [https://people.xiph.org/~yushin/tmp__/yushin_phd_thesis.pdf Image Coding Thesis] by Yushin Cho&lt;br /&gt;
* [http://arxiv.org/pdf/1411.4290v1.pdf Maximising Coding Efficiency Through Block Rotation] and why it [http://lists.xiph.org/pipermail/daala/2015-January/000054.html won&#039;t work well within Daala]&lt;br /&gt;
* [http://jmvalin.ca/video/theoretical_results.pdf JMSpeex&#039; Journal of Dubious Theoretical Results] - &amp;quot;take with an entire shaker-full of salt&amp;quot;&lt;br /&gt;
* [https://people.xiph.org/~unlord/pcs_daala.pdf Using Daala Intra Frames for Still Picture Coding]&lt;br /&gt;
* [http://arxiv.org/abs/1602.05975 The Daala Directional Deringing Filter]&lt;br /&gt;
* [https://people.xiph.org/~unlord/icip2016.pdf Daala: A Perceptually-Driven Still Image Codec](draft) - submitted at [http://2016.ieeeicip.org/ ICIP 2016].&lt;br /&gt;
* [http://people.xiph.org/~tterribe/daala/neon_tutorial.pdf SIMD Assembly Tutorial: ARM NEON]&lt;br /&gt;
* [https://jmvalin.ca/video/mmsp2016_poster.pdf Daala Technologies Poster]&lt;br /&gt;
&lt;br /&gt;
=== IETF Drafts ===&lt;br /&gt;
* [https://tools.ietf.org/html/draft-egge-videocodec-tdlt Time-Domain Lapped Transforms (TDLT)] - documents the Lapped Transform pre- and post-filters used for block-edge decorrelation&lt;br /&gt;
* [https://tools.ietf.org/html/draft-valin-videocodec-pvq Perceptual Vector Quantisation (PVQ)] - &lt;br /&gt;
* [https://tools.ietf.org/html/draft-terriberry-codingtools Coding Tools] - documents Entropy Coding, Integer Transforms and other techniques&lt;br /&gt;
* [https://tools.ietf.org/html/draft-moffitt-netvc-requirements Internet Video Codec (NetVC) Requirements] - explains what requirements and use cases Daala is trying to cater for&lt;br /&gt;
* [https://tools.ietf.org/html/draft-daede-netvc-testing Internet Video Codec (NetVC) Testing and Quality Measurement]&lt;br /&gt;
* [https://tools.ietf.org/html/draft-terriberry-ipr-license Example IPR Licence Terms]&lt;br /&gt;
&lt;br /&gt;
Additional drafts can be found at the [https://datatracker.ietf.org/wg/netvc/documents/ IETF DataTracker].&lt;br /&gt;
&lt;br /&gt;
== Presentations ==&lt;br /&gt;
For a more in-depth look at the IETF&#039;s NetVC Meetings, use the [https://datatracker.ietf.org/wg/netvc/meetings/ IETF DataTracker].&lt;br /&gt;
&lt;br /&gt;
* 2017-11-15 - IETF 100 - [https://www.youtube.com/watch?v=_wRLR8ypCg0&amp;amp;t=4682s Video] - Slides?&lt;br /&gt;
* 2017-05-25 - IETF 98 - [https://datatracker.ietf.org/meeting/98/materials/slides-98-hackathon-netvc/ NetVC Hackathon Slides], [https://jmvalin.ca/video/cdef_slides.pdf CDEF Slides]&lt;br /&gt;
* 2017-02-05 - FOSDEM 2017 - [https://video.fosdem.org/2017/K.3.401/om_av1.vp8.webm Video] - [https://fosdem.org/2017/schedule/event/om_av1/attachments/slides/1795/export/events/attachments/om_av1/slides/1795/av1_update.pdf Slides]&lt;br /&gt;
* 2017-01-17 - Linux Conf AU - [https://www.youtube.com/watch?v=lzPaldsmJbk Video] - [https://people.xiph.org/~tterribe/pubs/lca2017/aom.pdf Slides]&lt;br /&gt;
-------&lt;br /&gt;
* 2016-11-15 - IETF 97 - [https://datatracker.ietf.org/meeting/97/agenda/netvc/ Agenda] - [http://recs.conf.meetecho.com/Playout/watch.jsp?recording=IETF97_NETVC&amp;amp;chapter=chapter_1 Video and Chat] - [https://datatracker.ietf.org/meeting/97/session/netvc/ Slides]&lt;br /&gt;
* 2016-09-04 - VideoLAN Dev Days 2016 - [https://www.youtube.co.uk/watch?v=AOssZFJ0EdI Video] - [http://people.xiph.org/~tterribe/daala/vdd2016.pdf Slides]&lt;br /&gt;
* 2016-08-31 - SPIE Royalty-free Video - [http://spie.org/OPO/conferencedetails/digital-image-processing#session-7 Schedule and Abstracts] - [https://www.youtube.co.uk/watch?v=wi1BefrfTos&amp;amp;t=41m40s Video] - [http://people.xiph.org/~tterribe/daala/daala-spie-adip2016-slides.pdf Slides]&lt;br /&gt;
* 2016-07-18 - IETF 96 - [https://datatracker.ietf.org/meeting/96/agenda/netvc/ Agenda] - [http://recs.conf.meetecho.com/Playout/watch.jsp?recording=IETF96_NETVC&amp;amp;chapter=chapter_1 Video and Chat] - [https://datatracker.ietf.org/meeting/96/session/netvc/ Slides]&lt;br /&gt;
* 2016-06-27 - Daala&#039;s Entropy Coder - [http://people.xiph.org/~tterribe/daala/daala_ec.pdf Slides]&lt;br /&gt;
* 2016-04-07 - IETF 95 - [https://datatracker.ietf.org/meeting/95/agenda/netvc/ Agenda] - [http://recs.conf.meetecho.com/Playout/watch.jsp?recording=IETF95_NETVC&amp;amp;chapter=chapter_1 Video and Chat] - [https://www.ietf.org/proceedings/95/slides/slides-95-netvc-2.pdf Slides] - [https://datatracker.ietf.org/meeting/95/session/netvc/ Other Materials]&lt;br /&gt;
* 2016-04-01 - DCC 2016 - [https://people.xiph.org/~unlord/Daala-DCC2016.pdf Slides] - [https://people.xiph.org/~unlord/1853a466.pdf Paper]&lt;br /&gt;
* 2016-01-30 - FOSDEM 2016 - [https://fosdem.org/2016/schedule/event/daala/ Summary] - [https://video.fosdem.org/2016/h2214/implementing-a-native-daala-decoder-in-ffmpeg.mp4 Video (MP4, 57MB)] - [https://people.xiph.org/~unlord/Xmi.pdf Slides]&lt;br /&gt;
-------&lt;br /&gt;
* 2015-11-02 - IETF 94 - [https://datatracker.ietf.org/meeting/94/agenda/netvc/ Agenda] - [http://www.meetecho.com/ietf94/netvc Video and Chat] - [https://datatracker.ietf.org/meeting/94/session/netvc/ Other Materials]&lt;br /&gt;
* 2015-10-24 - LinuxDay 24 (Turin) - [https://people.xiph.org/~tterribe/daala/linuxday24.pdf Slides]&lt;br /&gt;
* 2015-10-21 - MPEG 113 - Future Video Coding Workshop - [https://people.xiph.org/~tterribe/daala/mpeg113.pdf Slides]&lt;br /&gt;
* 2015-09-19 - VideoLAN Dev Days - [https://www.youtube.com/playlist?list=PLQLpBN3oI7E44HIdTOovThc1MNHLchgHE YouTube Playlist] - [https://people.xiph.org/~tterribe/daala/vdd2015.pdf Daala Slides]&lt;br /&gt;
* 2015-07-22 - IETF 93 - [http://recordings.conf.meetecho.com/Playout/watch.jsp?recording=IETF93_NETVC_II&amp;amp;chapter=chapter_1 NetVC Session 2/2] - [https://datatracker.ietf.org/meeting/93/agenda/netvc/ Agenda] - [http://www.meetecho.com/ietf93/netvc_II Video and Chat] - [https://www.ietf.org/proceedings/93/slides/slides-93-netvc-4.pdf Slides] - [https://www.ietf.org/jabber/logs/netvc/2015-07-22.html Jabber Log] - [https://datatracker.ietf.org/meeting/93/session/netvc/ Other Materials]&lt;br /&gt;
* 2015-07-20 - IETF 93 - [http://recordings.conf.meetecho.com/Playout/watch.jsp?recording=IETF93_NETVC&amp;amp;chapter=chapter_1 NetVC Session 1/2] - [https://datatracker.ietf.org/meeting/93/agenda/netvc/ Agenda] - [http://www.meetecho.com/ietf93/netvc Video and Chat] - [https://www.ietf.org/proceedings/93/slides/slides-93-netvc-3.pdf Slides] - [https://www.ietf.org/jabber/logs/netvc/2015-07-20.html Jabber Log]&lt;br /&gt;
* 2015-03-24 - IETF 92 - [http://recordings.conf.meetecho.com/Playout/watch.jsp?recording=IETF92_NETVC&amp;amp;chapter=chapter_0 NetVC Session] - Audio as [https://people.xiph.org/~tdaede/audio/ietf92-venetian-20150324-0900-am1.opus Opus] (29MB) or [https://www.ietf.org/audio/ietf92/ietf92-venetian-20150324-0900-am1.mp3 MP3] (119MB, action starts at 14:50) - [https://www.ietf.org/proceedings/92/slides/slides-92-netvc-0.pdf Slides] - [https://www.ietf.org/mail-archive/web/video-codec/current/msg00235.html Notes] - [https://www.ietf.org/jabber/logs/netvc/2015-03-24.html Jabber Log]&lt;br /&gt;
* 2015-02-11 - SPIE talks:&lt;br /&gt;
&amp;lt;!-- Originals of these 3 videos can be found at http://people.xiph.org/~unlord/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Someday, should do a better encode... --&amp;gt;&lt;br /&gt;
** [http://people.xiph.org/~tdaede/video/SPIE_Nathan.webm Chroma from Luma (CfL)] - [https://people.xiph.org/~unlord/SPIE-2015-CfL.pdf Slides] - [https://people.xiph.org/~unlord/spie_cfl.pdf Paper]&lt;br /&gt;
** [http://people.xiph.org/~tdaede/video/SPIE_PVQ.webm Perceptual Vector Quantisation (PVQ)] - [http://people.xiph.org/~tterribe/daala/spie_pvq_slides.pdf Slides] - [http://jmvalin.ca/papers/spie_pvq.pdf Paper]&lt;br /&gt;
** [http://people.xiph.org/~tdaede/video/SPIE_Tim.webm Adaptive Motion Compensation Without Blocking Artifacts] - [http://people.xiph.org/~tterribe/daala/spie_obmc_slides.pdf Slides] - [https://people.xiph.org/~tterribe/daala/vbsobmc.pdf Paper]&lt;br /&gt;
* 2015-01-31 - [http://ftp.osuosl.org/pub/fosdem/2015/devroom-open_media/daala.mp4 Daala Project Update at FOSDEM 2015] - [https://fosdem.org/2015/schedule/event/daala/ summary] - [https://fosdem.org/2015/schedule/event/daala/attachments/slides/569/export/events/attachments/daala/slides/569/Daala_FOSDEM_2015.pdf Slides]&lt;br /&gt;
* 2015-01-14 - [https://www.youtube.co.uk/watch?v=Dmho4gcRvQ4 Linux Conf 2015] - [http://lca2015.linux.org.au/schedule/30187/view_talk presentation summary] - [https://people.xiph.org/~tterribe/pubs/lca2015/daala.pdf Slides]&lt;br /&gt;
-------&lt;br /&gt;
* 2014-09-16 - [https://air.mozilla.org/daala-are-we-compressed-yet/ Daala: Are We Compressed Yet?]&lt;br /&gt;
* 2014-06-25 - [https://air.mozilla.org/sparsity-induced-prediction-for-images-and-video/ Sparsity Induced Prediction for Images and Video]&lt;br /&gt;
* 2014-06-06 - VP9 Summit (no video available) - [https://people.xiph.org/~xiphmont/demo/daala/daala-vp9summit-20140606.pdf Slides]&lt;br /&gt;
-------&lt;br /&gt;
* 2013-10-23 - [https://people.xiph.org/~xiphmont/video/Free_Codecs_Update_Opus_and_Daala.ogv Opus and Daala: State of the Art Royalty-free Codecs] - [https://people.xiph.org/~greg/gstreamer-daala-opus.pdf Slides]&lt;br /&gt;
* 2013-09-30 - [https://people.xiph.org/~tterribe/daala/coding_party2/?C=M;O=A Daala Coding Party 2] - [https://people.xiph.org/~unlord/Daala-Intra.pdf Slides]&lt;br /&gt;
* 2013-05-02 - [https://people.xiph.org/~xiphmont/tim-terriberry-presents-daala/ Tim Terriberry Presents Daala]&lt;br /&gt;
-------&lt;br /&gt;
* 2012-01-24 - [https://media.basilgohar.com/derf-talks/?C=M;O=A Introduction to Video Coding] - [https://people.xiph.org/~tterribe/pubs/lca2012/auckland/intro_to_video1.pdf Slides] (no video for slides 1-50)&lt;br /&gt;
&lt;br /&gt;
== Other Websites ==&lt;br /&gt;
* [https://www.youtube.com/playlist?list=PLEeMksZoEQ1xQEuLF50w0RwDwLgDGwSG- Daala Presentations on YouTube]&lt;br /&gt;
* [https://www.youtube.com/playlist?list=PLOU2XLYxmsIJGErt5rrCqaSGTMyyqNt2H Google&#039;s Compressor Head videos] - a beginner&#039;s introduction to the world of data compression&lt;br /&gt;
* [https://www.zazzle.com/daala_tee_shirt-235139149596175944 Daala T-shirts] - if you&#039;d like a free one, help out with the project and ask the Mozilla guys nicely for one :-)&lt;br /&gt;
* [https://www.xiph.org/donate/ Donate to Xiph.Org] &lt;br /&gt;
* [[Daala_on_Wheels|Historical Daala wiki page]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Daala]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Daala&amp;diff=16636</id>
		<title>Daala</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Daala&amp;diff=16636"/>
		<updated>2017-11-17T22:18:31Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* Presentations */ add IETF 98 slides&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Daala is the codename for a new video compression technology.&lt;br /&gt;
&lt;br /&gt;
The effort is a collaboration between the [https://www.mozilla.org/en-US/research/ Mozilla Foundation], the [https://www.xiph.org/ Xiph.Org Foundation] and any other contributors that wish to help.&lt;br /&gt;
&lt;br /&gt;
The goal of the project is to provide a video format that&#039;s free to implement, use and distribute, and a reference implementation with technical performance superior to [https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding H.265]. &lt;br /&gt;
&lt;br /&gt;
Please see the links below or the [https://www.xiph.org/daala/ main page] for more information.&lt;br /&gt;
&lt;br /&gt;
== Wiki Pages ==&lt;br /&gt;
* [[Daala Quickstart|Daala Quickstart (Linux/MacOS)]]&lt;br /&gt;
* [[Daala Quickstart Windows|Daala Quickstart (Windows)]]&lt;br /&gt;
* [[Daala MinGW64 Environment]]&lt;br /&gt;
&lt;br /&gt;
* [[Daala Weekly Meetings|Daala Weekly Meetings]]&lt;br /&gt;
&lt;br /&gt;
* [[AreWeCompressedYet]]&lt;br /&gt;
* [[RD Curve Data Format]]&lt;br /&gt;
&lt;br /&gt;
* [[DaalaTodo|Daala To-do List]]&lt;br /&gt;
* [[DaalaRoadmap|Daala Roadmap]]&lt;br /&gt;
&lt;br /&gt;
* [[Intra|Intra-prediction within Daala]]&lt;br /&gt;
&lt;br /&gt;
* [[Videos|Digital Primers]] - educational videos about audio/video technology&lt;br /&gt;
&lt;br /&gt;
== Communication ==&lt;br /&gt;
You are &#039;&#039;&#039;encouraged&#039;&#039;&#039; to join the&lt;br /&gt;
* [irc://irc.freenode.net/daala &#039;&#039;&#039;#daala&#039;&#039;&#039; IRC channel at freenode.net] - if you don&#039;t have an IRC client, you can use Freenode&#039;s &#039;&#039;&#039;[https://webchat.freenode.net/?channels=%23daala webchat]&#039;&#039;&#039; instead.&lt;br /&gt;
* [http://lists.xiph.org/mailman/listinfo/daala Daala Email List]&lt;br /&gt;
&lt;br /&gt;
=== Weekly Meetings ===&lt;br /&gt;
You are also welcome to attend the public [[Daala Weekly Meetings|weekly progress meetings]] by installing and using [http://wiki.mumble.info Mumble].&amp;lt;br /&amp;gt;&lt;br /&gt;
The address is &#039;&#039;&#039;mf4.xiph.org&#039;&#039;&#039; and the port is &#039;&#039;&#039;64738&#039;&#039;&#039; (you can run &#039;&#039;&#039;mumble://mf4.xiph.org:64738&#039;&#039;&#039; within your browser as a shortcut).&amp;lt;br /&amp;gt;&lt;br /&gt;
The meetings occur on &#039;&#039;&#039;Tuesdays&#039;&#039;&#039; at &#039;&#039;&#039;[http://www.timeanddate.com/worldclock/fixedtime.html?msg=Daala+Weekly+Meeting&amp;amp;iso=20150428T09&amp;amp;p1=1241 9AM Pacific Time]&#039;&#039;&#039; (5PM UTC/GMT).&lt;br /&gt;
The meeting agenda used to be available at &#039;&#039;&#039;[https://daala.etherpad.mozilla.org/weekly-meeting this Etherpad]&#039;&#039;&#039;, the October 13, 2015 meeting is available on [https://docs.google.com/document/d/1JP_Ko3wPuyDWhooZcp_m9kndyfZ75xN5YOi5yIMCW0s/edit?pli=1 Google Docs] and, following the migration to Etherpad Lite, the meeting agenda and minutes are now available at [https://public.etherpad-mozilla.org/p/daala-weekly-meeting this Etherpad].&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
* [http://forum.doom9.org/showthread.php?t=168004 Doom9 Forum discussion] - generic forum thread regarding Daala&lt;br /&gt;
* &amp;lt;del&amp;gt;[https://daala.etherpad.mozilla.org/ep/padlist/all-pads Daala Etherpads] - you can [https://daala.etherpad.mozilla.org/ep/account/request-account request a free account] to view these. You should receive access within a few days.&amp;lt;/del&amp;gt; Mozilla are transitioning to Etherpad Lite.&lt;br /&gt;
* [http://benjamin.smedbergs.us/weekly-updates.fcgi/project/daala Daala Project Status Board] - what Daala bits the Mozilla people are working on&lt;br /&gt;
&lt;br /&gt;
== Coding ==&lt;br /&gt;
You can get a copy of the latest Daala Source Code from [https://git.xiph.org/?p=daala.git;a=summary &#039;&#039;&#039;git.xiph.org&#039;&#039;&#039;] or [https://github.com/xiph/daala &#039;&#039;&#039;GitHub&#039;&#039;&#039;]. Please stick to the &#039;&#039;&#039;[https://git.xiph.org/?p=daala.git;a=blob_plain;f=doc/coding_style.html Coding Style Guide]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
* [https://review.xiph.org/all?limit=100 Xiph Code Reviews] - there is a proposal on the review process &#039;&#039;&#039;[[DaalaReview|here]]&#039;&#039;&#039;&lt;br /&gt;
* [https://github.com/xiph/daala/issues Daala&#039;s issues] - Issue/bug tracker on Github&lt;br /&gt;
* [https://mf4.xiph.org/jenkins/view/daala/ Continuous Integration Tests] - these run every time a new commit is made to the Daala git master, to make sure the new code hasn&#039;t broken existing functionality.&lt;br /&gt;
* [[OggDaala]] - definitions for embedding Daala video within an [[Ogg]] container.&lt;br /&gt;
&lt;br /&gt;
== Demos ==&lt;br /&gt;
* [https://people.xiph.org/~xiphmont/demo/daala/player-demo.shtml Daala Video Player] - an example implementation of a Daala decoder and player, ported to Javascript using [https://github.com/kripken/emscripten Emscripten].&lt;br /&gt;
&lt;br /&gt;
=== Codec Techniques ===&lt;br /&gt;
* [https://people.xiph.org/~xiphmont/demo/ Demo Articles] - explanations on certain techniques used in Daala (and other Xiph.Org projects)&lt;br /&gt;
* [http://exp.martres.me/edi/ Edge-Directed Interpolation] ([https://github.com/smarter/edi source code])&lt;br /&gt;
* [https://people.xiph.org/~ds/edi/info.html More Edge-Directed Interpolation]&lt;br /&gt;
* [https://people.xiph.org/~unlord/demo/intra.html Intra-prediction]&lt;br /&gt;
* [https://people.xiph.org/~unlord/zigzags.html Macroblock Coefficient Zigzag Graph] - HTML page generated using [https://github.com/xiph/daala/blob/master/tools/draw_zigzags.c tools/draw_zigzags.c] from the Daala source code.&lt;br /&gt;
* [https://jmvalin.ca/video/haar_example/ Still Image Screenshots] - comparison between Daala&#039;s Lapped Transform and Haar methods, and JPEG/x264/x265.&lt;br /&gt;
&lt;br /&gt;
== Documents ==&lt;br /&gt;
* [https://people.xiph.org/~unlord/spie_cfl.pdf Chroma from Luma (CfL)]&lt;br /&gt;
* [http://jmvalin.ca/papers/spie_pvq.pdf Perceptual Vector Quantisation (PVQ)] - see also [https://people.xiph.org/~yushin/ietf/draft-cho-netvc-applypvq.html Applying PVQ Outside Daala]&lt;br /&gt;
* [https://people.xiph.org/~tterribe/daala/vbsobmc.pdf Overlapped Block Motion Compensation (OBMC)]&lt;br /&gt;
* [https://mf4.xiph.org/jenkins/job/daala-autotools/ws/doc/html/index.html C API Documentation]&lt;br /&gt;
* [https://people.xiph.org/~yushin/tmp__/yushin_phd_thesis.pdf Image Coding Thesis] by Yushin Cho&lt;br /&gt;
* [http://arxiv.org/pdf/1411.4290v1.pdf Maximising Coding Efficiency Through Block Rotation] and why it [http://lists.xiph.org/pipermail/daala/2015-January/000054.html won&#039;t work well within Daala]&lt;br /&gt;
* [http://jmvalin.ca/video/theoretical_results.pdf JMSpeex&#039; Journal of Dubious Theoretical Results] - &amp;quot;take with an entire shaker-full of salt&amp;quot;&lt;br /&gt;
* [https://people.xiph.org/~unlord/pcs_daala.pdf Using Daala Intra Frames for Still Picture Coding]&lt;br /&gt;
* [http://arxiv.org/abs/1602.05975 The Daala Directional Deringing Filter]&lt;br /&gt;
* [https://people.xiph.org/~unlord/icip2016.pdf Daala: A Perceptually-Driven Still Image Codec](draft) - submitted at [http://2016.ieeeicip.org/ ICIP 2016].&lt;br /&gt;
* [http://people.xiph.org/~tterribe/daala/neon_tutorial.pdf SIMD Assembly Tutorial: ARM NEON]&lt;br /&gt;
* [https://jmvalin.ca/video/mmsp2016_poster.pdf Daala Technologies Poster]&lt;br /&gt;
&lt;br /&gt;
=== IETF Drafts ===&lt;br /&gt;
* [https://tools.ietf.org/html/draft-egge-videocodec-tdlt Time-Domain Lapped Transforms (TDLT)] - documents the Lapped Transform pre- and post-filters used for block-edge decorrelation&lt;br /&gt;
* [https://tools.ietf.org/html/draft-valin-videocodec-pvq Perceptual Vector Quantisation (PVQ)] - &lt;br /&gt;
* [https://tools.ietf.org/html/draft-terriberry-codingtools Coding Tools] - documents Entropy Coding, Integer Transforms and other techniques&lt;br /&gt;
* [https://tools.ietf.org/html/draft-moffitt-netvc-requirements Internet Video Codec (NetVC) Requirements] - explains what requirements and use cases Daala is trying to cater for&lt;br /&gt;
* [https://tools.ietf.org/html/draft-daede-netvc-testing Internet Video Codec (NetVC) Testing and Quality Measurement]&lt;br /&gt;
* [https://tools.ietf.org/html/draft-terriberry-ipr-license Example IPR Licence Terms]&lt;br /&gt;
&lt;br /&gt;
Additional drafts can be found at the [https://datatracker.ietf.org/wg/netvc/documents/ IETF DataTracker].&lt;br /&gt;
&lt;br /&gt;
== Presentations ==&lt;br /&gt;
For a more in-depth look at the IETF&#039;s NetVC Meetings, use the [https://datatracker.ietf.org/wg/netvc/meetings/ IETF DataTracker].&lt;br /&gt;
&lt;br /&gt;
* 2017-11-15 - IETF 100 - [https://www.youtube.com/watch?v=_wRLR8ypCg0&amp;amp;t=4682s Video] - Slides?&lt;br /&gt;
* 2017-05-25 - IETF 98 - [https://datatracker.ietf.org/meeting/98/materials/slides-98-hackathon-netvc/ NetVC Hackathon Slides]&lt;br /&gt;
* 2017-02-05 - FOSDEM 2017 - [https://video.fosdem.org/2017/K.3.401/om_av1.vp8.webm Video] - [https://fosdem.org/2017/schedule/event/om_av1/attachments/slides/1795/export/events/attachments/om_av1/slides/1795/av1_update.pdf Slides]&lt;br /&gt;
* 2017-01-17 - Linux Conf AU - [https://www.youtube.com/watch?v=lzPaldsmJbk Video] - [https://people.xiph.org/~tterribe/pubs/lca2017/aom.pdf Slides]&lt;br /&gt;
-------&lt;br /&gt;
* 2016-11-15 - IETF 97 - [https://datatracker.ietf.org/meeting/97/agenda/netvc/ Agenda] - [http://recs.conf.meetecho.com/Playout/watch.jsp?recording=IETF97_NETVC&amp;amp;chapter=chapter_1 Video and Chat] - [https://datatracker.ietf.org/meeting/97/session/netvc/ Slides]&lt;br /&gt;
* 2016-09-04 - VideoLAN Dev Days 2016 - [https://www.youtube.co.uk/watch?v=AOssZFJ0EdI Video] - [http://people.xiph.org/~tterribe/daala/vdd2016.pdf Slides]&lt;br /&gt;
* 2016-08-31 - SPIE Royalty-free Video - [http://spie.org/OPO/conferencedetails/digital-image-processing#session-7 Schedule and Abstracts] - [https://www.youtube.co.uk/watch?v=wi1BefrfTos&amp;amp;t=41m40s Video] - [http://people.xiph.org/~tterribe/daala/daala-spie-adip2016-slides.pdf Slides]&lt;br /&gt;
* 2016-07-18 - IETF 96 - [https://datatracker.ietf.org/meeting/96/agenda/netvc/ Agenda] - [http://recs.conf.meetecho.com/Playout/watch.jsp?recording=IETF96_NETVC&amp;amp;chapter=chapter_1 Video and Chat] - [https://datatracker.ietf.org/meeting/96/session/netvc/ Slides]&lt;br /&gt;
* 2016-06-27 - Daala&#039;s Entropy Coder - [http://people.xiph.org/~tterribe/daala/daala_ec.pdf Slides]&lt;br /&gt;
* 2016-04-07 - IETF 95 - [https://datatracker.ietf.org/meeting/95/agenda/netvc/ Agenda] - [http://recs.conf.meetecho.com/Playout/watch.jsp?recording=IETF95_NETVC&amp;amp;chapter=chapter_1 Video and Chat] - [https://www.ietf.org/proceedings/95/slides/slides-95-netvc-2.pdf Slides] - [https://datatracker.ietf.org/meeting/95/session/netvc/ Other Materials]&lt;br /&gt;
* 2016-04-01 - DCC 2016 - [https://people.xiph.org/~unlord/Daala-DCC2016.pdf Slides] - [https://people.xiph.org/~unlord/1853a466.pdf Paper]&lt;br /&gt;
* 2016-01-30 - FOSDEM 2016 - [https://fosdem.org/2016/schedule/event/daala/ Summary] - [https://video.fosdem.org/2016/h2214/implementing-a-native-daala-decoder-in-ffmpeg.mp4 Video (MP4, 57MB)] - [https://people.xiph.org/~unlord/Xmi.pdf Slides]&lt;br /&gt;
-------&lt;br /&gt;
* 2015-11-02 - IETF 94 - [https://datatracker.ietf.org/meeting/94/agenda/netvc/ Agenda] - [http://www.meetecho.com/ietf94/netvc Video and Chat] - [https://datatracker.ietf.org/meeting/94/session/netvc/ Other Materials]&lt;br /&gt;
* 2015-10-24 - LinuxDay 24 (Turin) - [https://people.xiph.org/~tterribe/daala/linuxday24.pdf Slides]&lt;br /&gt;
* 2015-10-21 - MPEG 113 - Future Video Coding Workshop - [https://people.xiph.org/~tterribe/daala/mpeg113.pdf Slides]&lt;br /&gt;
* 2015-09-19 - VideoLAN Dev Days - [https://www.youtube.com/playlist?list=PLQLpBN3oI7E44HIdTOovThc1MNHLchgHE YouTube Playlist] - [https://people.xiph.org/~tterribe/daala/vdd2015.pdf Daala Slides]&lt;br /&gt;
* 2015-07-22 - IETF 93 - [http://recordings.conf.meetecho.com/Playout/watch.jsp?recording=IETF93_NETVC_II&amp;amp;chapter=chapter_1 NetVC Session 2/2] - [https://datatracker.ietf.org/meeting/93/agenda/netvc/ Agenda] - [http://www.meetecho.com/ietf93/netvc_II Video and Chat] - [https://www.ietf.org/proceedings/93/slides/slides-93-netvc-4.pdf Slides] - [https://www.ietf.org/jabber/logs/netvc/2015-07-22.html Jabber Log] - [https://datatracker.ietf.org/meeting/93/session/netvc/ Other Materials]&lt;br /&gt;
* 2015-07-20 - IETF 93 - [http://recordings.conf.meetecho.com/Playout/watch.jsp?recording=IETF93_NETVC&amp;amp;chapter=chapter_1 NetVC Session 1/2] - [https://datatracker.ietf.org/meeting/93/agenda/netvc/ Agenda] - [http://www.meetecho.com/ietf93/netvc Video and Chat] - [https://www.ietf.org/proceedings/93/slides/slides-93-netvc-3.pdf Slides] - [https://www.ietf.org/jabber/logs/netvc/2015-07-20.html Jabber Log]&lt;br /&gt;
* 2015-03-24 - IETF 92 - [http://recordings.conf.meetecho.com/Playout/watch.jsp?recording=IETF92_NETVC&amp;amp;chapter=chapter_0 NetVC Session] - Audio as [https://people.xiph.org/~tdaede/audio/ietf92-venetian-20150324-0900-am1.opus Opus] (29MB) or [https://www.ietf.org/audio/ietf92/ietf92-venetian-20150324-0900-am1.mp3 MP3] (119MB, action starts at 14:50) - [https://www.ietf.org/proceedings/92/slides/slides-92-netvc-0.pdf Slides] - [https://www.ietf.org/mail-archive/web/video-codec/current/msg00235.html Notes] - [https://www.ietf.org/jabber/logs/netvc/2015-03-24.html Jabber Log]&lt;br /&gt;
* 2015-02-11 - SPIE talks:&lt;br /&gt;
&amp;lt;!-- Originals of these 3 videos can be found at http://people.xiph.org/~unlord/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Someday, should do a better encode... --&amp;gt;&lt;br /&gt;
** [http://people.xiph.org/~tdaede/video/SPIE_Nathan.webm Chroma from Luma (CfL)] - [https://people.xiph.org/~unlord/SPIE-2015-CfL.pdf Slides] - [https://people.xiph.org/~unlord/spie_cfl.pdf Paper]&lt;br /&gt;
** [http://people.xiph.org/~tdaede/video/SPIE_PVQ.webm Perceptual Vector Quantisation (PVQ)] - [http://people.xiph.org/~tterribe/daala/spie_pvq_slides.pdf Slides] - [http://jmvalin.ca/papers/spie_pvq.pdf Paper]&lt;br /&gt;
** [http://people.xiph.org/~tdaede/video/SPIE_Tim.webm Adaptive Motion Compensation Without Blocking Artifacts] - [http://people.xiph.org/~tterribe/daala/spie_obmc_slides.pdf Slides] - [https://people.xiph.org/~tterribe/daala/vbsobmc.pdf Paper]&lt;br /&gt;
* 2015-01-31 - [http://ftp.osuosl.org/pub/fosdem/2015/devroom-open_media/daala.mp4 Daala Project Update at FOSDEM 2015] - [https://fosdem.org/2015/schedule/event/daala/ summary] - [https://fosdem.org/2015/schedule/event/daala/attachments/slides/569/export/events/attachments/daala/slides/569/Daala_FOSDEM_2015.pdf Slides]&lt;br /&gt;
* 2015-01-14 - [https://www.youtube.co.uk/watch?v=Dmho4gcRvQ4 Linux Conf 2015] - [http://lca2015.linux.org.au/schedule/30187/view_talk presentation summary] - [https://people.xiph.org/~tterribe/pubs/lca2015/daala.pdf Slides]&lt;br /&gt;
-------&lt;br /&gt;
* 2014-09-16 - [https://air.mozilla.org/daala-are-we-compressed-yet/ Daala: Are We Compressed Yet?]&lt;br /&gt;
* 2014-06-25 - [https://air.mozilla.org/sparsity-induced-prediction-for-images-and-video/ Sparsity Induced Prediction for Images and Video]&lt;br /&gt;
* 2014-06-06 - VP9 Summit (no video available) - [https://people.xiph.org/~xiphmont/demo/daala/daala-vp9summit-20140606.pdf Slides]&lt;br /&gt;
-------&lt;br /&gt;
* 2013-10-23 - [https://people.xiph.org/~xiphmont/video/Free_Codecs_Update_Opus_and_Daala.ogv Opus and Daala: State of the Art Royalty-free Codecs] - [https://people.xiph.org/~greg/gstreamer-daala-opus.pdf Slides]&lt;br /&gt;
* 2013-09-30 - [https://people.xiph.org/~tterribe/daala/coding_party2/?C=M;O=A Daala Coding Party 2] - [https://people.xiph.org/~unlord/Daala-Intra.pdf Slides]&lt;br /&gt;
* 2013-05-02 - [https://people.xiph.org/~xiphmont/tim-terriberry-presents-daala/ Tim Terriberry Presents Daala]&lt;br /&gt;
-------&lt;br /&gt;
* 2012-01-24 - [https://media.basilgohar.com/derf-talks/?C=M;O=A Introduction to Video Coding] - [https://people.xiph.org/~tterribe/pubs/lca2012/auckland/intro_to_video1.pdf Slides] (no video for slides 1-50)&lt;br /&gt;
&lt;br /&gt;
== Other Websites ==&lt;br /&gt;
* [https://www.youtube.com/playlist?list=PLEeMksZoEQ1xQEuLF50w0RwDwLgDGwSG- Daala Presentations on YouTube]&lt;br /&gt;
* [https://www.youtube.com/playlist?list=PLOU2XLYxmsIJGErt5rrCqaSGTMyyqNt2H Google&#039;s Compressor Head videos] - a beginner&#039;s introduction to the world of data compression&lt;br /&gt;
* [https://www.zazzle.com/daala_tee_shirt-235139149596175944 Daala T-shirts] - if you&#039;d like a free one, help out with the project and ask the Mozilla guys nicely for one :-)&lt;br /&gt;
* [https://www.xiph.org/donate/ Donate to Xiph.Org] &lt;br /&gt;
* [[Daala_on_Wheels|Historical Daala wiki page]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Daala]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Daala&amp;diff=16635</id>
		<title>Daala</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Daala&amp;diff=16635"/>
		<updated>2017-11-17T22:01:28Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* Presentations */ add IETF 100 CfL video&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Daala is the codename for a new video compression technology.&lt;br /&gt;
&lt;br /&gt;
The effort is a collaboration between the [https://www.mozilla.org/en-US/research/ Mozilla Foundation], the [https://www.xiph.org/ Xiph.Org Foundation] and any other contributors that wish to help.&lt;br /&gt;
&lt;br /&gt;
The goal of the project is to provide a video format that&#039;s free to implement, use and distribute, and a reference implementation with technical performance superior to [https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding H.265]. &lt;br /&gt;
&lt;br /&gt;
Please see the links below or the [https://www.xiph.org/daala/ main page] for more information.&lt;br /&gt;
&lt;br /&gt;
== Wiki Pages ==&lt;br /&gt;
* [[Daala Quickstart|Daala Quickstart (Linux/MacOS)]]&lt;br /&gt;
* [[Daala Quickstart Windows|Daala Quickstart (Windows)]]&lt;br /&gt;
* [[Daala MinGW64 Environment]]&lt;br /&gt;
&lt;br /&gt;
* [[Daala Weekly Meetings|Daala Weekly Meetings]]&lt;br /&gt;
&lt;br /&gt;
* [[AreWeCompressedYet]]&lt;br /&gt;
* [[RD Curve Data Format]]&lt;br /&gt;
&lt;br /&gt;
* [[DaalaTodo|Daala To-do List]]&lt;br /&gt;
* [[DaalaRoadmap|Daala Roadmap]]&lt;br /&gt;
&lt;br /&gt;
* [[Intra|Intra-prediction within Daala]]&lt;br /&gt;
&lt;br /&gt;
* [[Videos|Digital Primers]] - educational videos about audio/video technology&lt;br /&gt;
&lt;br /&gt;
== Communication ==&lt;br /&gt;
You are &#039;&#039;&#039;encouraged&#039;&#039;&#039; to join the&lt;br /&gt;
* [irc://irc.freenode.net/daala &#039;&#039;&#039;#daala&#039;&#039;&#039; IRC channel at freenode.net] - if you don&#039;t have an IRC client, you can use Freenode&#039;s &#039;&#039;&#039;[https://webchat.freenode.net/?channels=%23daala webchat]&#039;&#039;&#039; instead.&lt;br /&gt;
* [http://lists.xiph.org/mailman/listinfo/daala Daala Email List]&lt;br /&gt;
&lt;br /&gt;
=== Weekly Meetings ===&lt;br /&gt;
You are also welcome to attend the public [[Daala Weekly Meetings|weekly progress meetings]] by installing and using [http://wiki.mumble.info Mumble].&amp;lt;br /&amp;gt;&lt;br /&gt;
The address is &#039;&#039;&#039;mf4.xiph.org&#039;&#039;&#039; and the port is &#039;&#039;&#039;64738&#039;&#039;&#039; (you can run &#039;&#039;&#039;mumble://mf4.xiph.org:64738&#039;&#039;&#039; within your browser as a shortcut).&amp;lt;br /&amp;gt;&lt;br /&gt;
The meetings occur on &#039;&#039;&#039;Tuesdays&#039;&#039;&#039; at &#039;&#039;&#039;[http://www.timeanddate.com/worldclock/fixedtime.html?msg=Daala+Weekly+Meeting&amp;amp;iso=20150428T09&amp;amp;p1=1241 9AM Pacific Time]&#039;&#039;&#039; (5PM UTC/GMT).&lt;br /&gt;
The meeting agenda used to be available at &#039;&#039;&#039;[https://daala.etherpad.mozilla.org/weekly-meeting this Etherpad]&#039;&#039;&#039;, the October 13, 2015 meeting is available on [https://docs.google.com/document/d/1JP_Ko3wPuyDWhooZcp_m9kndyfZ75xN5YOi5yIMCW0s/edit?pli=1 Google Docs] and, following the migration to Etherpad Lite, the meeting agenda and minutes are now available at [https://public.etherpad-mozilla.org/p/daala-weekly-meeting this Etherpad].&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
* [http://forum.doom9.org/showthread.php?t=168004 Doom9 Forum discussion] - generic forum thread regarding Daala&lt;br /&gt;
* &amp;lt;del&amp;gt;[https://daala.etherpad.mozilla.org/ep/padlist/all-pads Daala Etherpads] - you can [https://daala.etherpad.mozilla.org/ep/account/request-account request a free account] to view these. You should receive access within a few days.&amp;lt;/del&amp;gt; Mozilla are transitioning to Etherpad Lite.&lt;br /&gt;
* [http://benjamin.smedbergs.us/weekly-updates.fcgi/project/daala Daala Project Status Board] - what Daala bits the Mozilla people are working on&lt;br /&gt;
&lt;br /&gt;
== Coding ==&lt;br /&gt;
You can get a copy of the latest Daala Source Code from [https://git.xiph.org/?p=daala.git;a=summary &#039;&#039;&#039;git.xiph.org&#039;&#039;&#039;] or [https://github.com/xiph/daala &#039;&#039;&#039;GitHub&#039;&#039;&#039;]. Please stick to the &#039;&#039;&#039;[https://git.xiph.org/?p=daala.git;a=blob_plain;f=doc/coding_style.html Coding Style Guide]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
* [https://review.xiph.org/all?limit=100 Xiph Code Reviews] - there is a proposal on the review process &#039;&#039;&#039;[[DaalaReview|here]]&#039;&#039;&#039;&lt;br /&gt;
* [https://github.com/xiph/daala/issues Daala&#039;s issues] - Issue/bug tracker on Github&lt;br /&gt;
* [https://mf4.xiph.org/jenkins/view/daala/ Continuous Integration Tests] - these run every time a new commit is made to the Daala git master, to make sure the new code hasn&#039;t broken existing functionality.&lt;br /&gt;
* [[OggDaala]] - definitions for embedding Daala video within an [[Ogg]] container.&lt;br /&gt;
&lt;br /&gt;
== Demos ==&lt;br /&gt;
* [https://people.xiph.org/~xiphmont/demo/daala/player-demo.shtml Daala Video Player] - an example implementation of a Daala decoder and player, ported to Javascript using [https://github.com/kripken/emscripten Emscripten].&lt;br /&gt;
&lt;br /&gt;
=== Codec Techniques ===&lt;br /&gt;
* [https://people.xiph.org/~xiphmont/demo/ Demo Articles] - explanations on certain techniques used in Daala (and other Xiph.Org projects)&lt;br /&gt;
* [http://exp.martres.me/edi/ Edge-Directed Interpolation] ([https://github.com/smarter/edi source code])&lt;br /&gt;
* [https://people.xiph.org/~ds/edi/info.html More Edge-Directed Interpolation]&lt;br /&gt;
* [https://people.xiph.org/~unlord/demo/intra.html Intra-prediction]&lt;br /&gt;
* [https://people.xiph.org/~unlord/zigzags.html Macroblock Coefficient Zigzag Graph] - HTML page generated using [https://github.com/xiph/daala/blob/master/tools/draw_zigzags.c tools/draw_zigzags.c] from the Daala source code.&lt;br /&gt;
* [https://jmvalin.ca/video/haar_example/ Still Image Screenshots] - comparison between Daala&#039;s Lapped Transform and Haar methods, and JPEG/x264/x265.&lt;br /&gt;
&lt;br /&gt;
== Documents ==&lt;br /&gt;
* [https://people.xiph.org/~unlord/spie_cfl.pdf Chroma from Luma (CfL)]&lt;br /&gt;
* [http://jmvalin.ca/papers/spie_pvq.pdf Perceptual Vector Quantisation (PVQ)] - see also [https://people.xiph.org/~yushin/ietf/draft-cho-netvc-applypvq.html Applying PVQ Outside Daala]&lt;br /&gt;
* [https://people.xiph.org/~tterribe/daala/vbsobmc.pdf Overlapped Block Motion Compensation (OBMC)]&lt;br /&gt;
* [https://mf4.xiph.org/jenkins/job/daala-autotools/ws/doc/html/index.html C API Documentation]&lt;br /&gt;
* [https://people.xiph.org/~yushin/tmp__/yushin_phd_thesis.pdf Image Coding Thesis] by Yushin Cho&lt;br /&gt;
* [http://arxiv.org/pdf/1411.4290v1.pdf Maximising Coding Efficiency Through Block Rotation] and why it [http://lists.xiph.org/pipermail/daala/2015-January/000054.html won&#039;t work well within Daala]&lt;br /&gt;
* [http://jmvalin.ca/video/theoretical_results.pdf JMSpeex&#039; Journal of Dubious Theoretical Results] - &amp;quot;take with an entire shaker-full of salt&amp;quot;&lt;br /&gt;
* [https://people.xiph.org/~unlord/pcs_daala.pdf Using Daala Intra Frames for Still Picture Coding]&lt;br /&gt;
* [http://arxiv.org/abs/1602.05975 The Daala Directional Deringing Filter]&lt;br /&gt;
* [https://people.xiph.org/~unlord/icip2016.pdf Daala: A Perceptually-Driven Still Image Codec](draft) - submitted at [http://2016.ieeeicip.org/ ICIP 2016].&lt;br /&gt;
* [http://people.xiph.org/~tterribe/daala/neon_tutorial.pdf SIMD Assembly Tutorial: ARM NEON]&lt;br /&gt;
* [https://jmvalin.ca/video/mmsp2016_poster.pdf Daala Technologies Poster]&lt;br /&gt;
&lt;br /&gt;
=== IETF Drafts ===&lt;br /&gt;
* [https://tools.ietf.org/html/draft-egge-videocodec-tdlt Time-Domain Lapped Transforms (TDLT)] - documents the Lapped Transform pre- and post-filters used for block-edge decorrelation&lt;br /&gt;
* [https://tools.ietf.org/html/draft-valin-videocodec-pvq Perceptual Vector Quantisation (PVQ)] - &lt;br /&gt;
* [https://tools.ietf.org/html/draft-terriberry-codingtools Coding Tools] - documents Entropy Coding, Integer Transforms and other techniques&lt;br /&gt;
* [https://tools.ietf.org/html/draft-moffitt-netvc-requirements Internet Video Codec (NetVC) Requirements] - explains what requirements and use cases Daala is trying to cater for&lt;br /&gt;
* [https://tools.ietf.org/html/draft-daede-netvc-testing Internet Video Codec (NetVC) Testing and Quality Measurement]&lt;br /&gt;
* [https://tools.ietf.org/html/draft-terriberry-ipr-license Example IPR Licence Terms]&lt;br /&gt;
&lt;br /&gt;
Additional drafts can be found at the [https://datatracker.ietf.org/wg/netvc/documents/ IETF DataTracker].&lt;br /&gt;
&lt;br /&gt;
== Presentations ==&lt;br /&gt;
For a more in-depth look at the IETF&#039;s NetVC Meetings, use the [https://datatracker.ietf.org/wg/netvc/meetings/ IETF DataTracker].&lt;br /&gt;
&lt;br /&gt;
* 2017-11-15 - IETF 100 - [https://www.youtube.com/watch?v=_wRLR8ypCg0&amp;amp;t=4682s Video] - Slides?&lt;br /&gt;
* 2017-02-05 - FOSDEM 2017 - [https://video.fosdem.org/2017/K.3.401/om_av1.vp8.webm Video] - [https://fosdem.org/2017/schedule/event/om_av1/attachments/slides/1795/export/events/attachments/om_av1/slides/1795/av1_update.pdf Slides]&lt;br /&gt;
* 2017-01-17 - Linux Conf AU - [https://www.youtube.com/watch?v=lzPaldsmJbk Video] - [https://people.xiph.org/~tterribe/pubs/lca2017/aom.pdf Slides]&lt;br /&gt;
-------&lt;br /&gt;
* 2016-11-15 - IETF 97 - [https://datatracker.ietf.org/meeting/97/agenda/netvc/ Agenda] - [http://recs.conf.meetecho.com/Playout/watch.jsp?recording=IETF97_NETVC&amp;amp;chapter=chapter_1 Video and Chat] - [https://datatracker.ietf.org/meeting/97/session/netvc/ Slides]&lt;br /&gt;
* 2016-09-04 - VideoLAN Dev Days 2016 - [https://www.youtube.co.uk/watch?v=AOssZFJ0EdI Video] - [http://people.xiph.org/~tterribe/daala/vdd2016.pdf Slides]&lt;br /&gt;
* 2016-08-31 - SPIE Royalty-free Video - [http://spie.org/OPO/conferencedetails/digital-image-processing#session-7 Schedule and Abstracts] - [https://www.youtube.co.uk/watch?v=wi1BefrfTos&amp;amp;t=41m40s Video] - [http://people.xiph.org/~tterribe/daala/daala-spie-adip2016-slides.pdf Slides]&lt;br /&gt;
* 2016-07-18 - IETF 96 - [https://datatracker.ietf.org/meeting/96/agenda/netvc/ Agenda] - [http://recs.conf.meetecho.com/Playout/watch.jsp?recording=IETF96_NETVC&amp;amp;chapter=chapter_1 Video and Chat] - [https://datatracker.ietf.org/meeting/96/session/netvc/ Slides]&lt;br /&gt;
* 2016-06-27 - Daala&#039;s Entropy Coder - [http://people.xiph.org/~tterribe/daala/daala_ec.pdf Slides]&lt;br /&gt;
* 2016-04-07 - IETF 95 - [https://datatracker.ietf.org/meeting/95/agenda/netvc/ Agenda] - [http://recs.conf.meetecho.com/Playout/watch.jsp?recording=IETF95_NETVC&amp;amp;chapter=chapter_1 Video and Chat] - [https://www.ietf.org/proceedings/95/slides/slides-95-netvc-2.pdf Slides] - [https://datatracker.ietf.org/meeting/95/session/netvc/ Other Materials]&lt;br /&gt;
* 2016-04-01 - DCC 2016 - [https://people.xiph.org/~unlord/Daala-DCC2016.pdf Slides] - [https://people.xiph.org/~unlord/1853a466.pdf Paper]&lt;br /&gt;
* 2016-01-30 - FOSDEM 2016 - [https://fosdem.org/2016/schedule/event/daala/ Summary] - [https://video.fosdem.org/2016/h2214/implementing-a-native-daala-decoder-in-ffmpeg.mp4 Video (MP4, 57MB)] - [https://people.xiph.org/~unlord/Xmi.pdf Slides]&lt;br /&gt;
-------&lt;br /&gt;
* 2015-11-02 - IETF 94 - [https://datatracker.ietf.org/meeting/94/agenda/netvc/ Agenda] - [http://www.meetecho.com/ietf94/netvc Video and Chat] - [https://datatracker.ietf.org/meeting/94/session/netvc/ Other Materials]&lt;br /&gt;
* 2015-10-24 - LinuxDay 24 (Turin) - [https://people.xiph.org/~tterribe/daala/linuxday24.pdf Slides]&lt;br /&gt;
* 2015-10-21 - MPEG 113 - Future Video Coding Workshop - [https://people.xiph.org/~tterribe/daala/mpeg113.pdf Slides]&lt;br /&gt;
* 2015-09-19 - VideoLAN Dev Days - [https://www.youtube.com/playlist?list=PLQLpBN3oI7E44HIdTOovThc1MNHLchgHE YouTube Playlist] - [https://people.xiph.org/~tterribe/daala/vdd2015.pdf Daala Slides]&lt;br /&gt;
* 2015-07-22 - IETF 93 - [http://recordings.conf.meetecho.com/Playout/watch.jsp?recording=IETF93_NETVC_II&amp;amp;chapter=chapter_1 NetVC Session 2/2] - [https://datatracker.ietf.org/meeting/93/agenda/netvc/ Agenda] - [http://www.meetecho.com/ietf93/netvc_II Video and Chat] - [https://www.ietf.org/proceedings/93/slides/slides-93-netvc-4.pdf Slides] - [https://www.ietf.org/jabber/logs/netvc/2015-07-22.html Jabber Log] - [https://datatracker.ietf.org/meeting/93/session/netvc/ Other Materials]&lt;br /&gt;
* 2015-07-20 - IETF 93 - [http://recordings.conf.meetecho.com/Playout/watch.jsp?recording=IETF93_NETVC&amp;amp;chapter=chapter_1 NetVC Session 1/2] - [https://datatracker.ietf.org/meeting/93/agenda/netvc/ Agenda] - [http://www.meetecho.com/ietf93/netvc Video and Chat] - [https://www.ietf.org/proceedings/93/slides/slides-93-netvc-3.pdf Slides] - [https://www.ietf.org/jabber/logs/netvc/2015-07-20.html Jabber Log]&lt;br /&gt;
* 2015-03-24 - IETF 92 - [http://recordings.conf.meetecho.com/Playout/watch.jsp?recording=IETF92_NETVC&amp;amp;chapter=chapter_0 NetVC Session] - Audio as [https://people.xiph.org/~tdaede/audio/ietf92-venetian-20150324-0900-am1.opus Opus] (29MB) or [https://www.ietf.org/audio/ietf92/ietf92-venetian-20150324-0900-am1.mp3 MP3] (119MB, action starts at 14:50) - [https://www.ietf.org/proceedings/92/slides/slides-92-netvc-0.pdf Slides] - [https://www.ietf.org/mail-archive/web/video-codec/current/msg00235.html Notes] - [https://www.ietf.org/jabber/logs/netvc/2015-03-24.html Jabber Log]&lt;br /&gt;
* 2015-02-11 - SPIE talks:&lt;br /&gt;
&amp;lt;!-- Originals of these 3 videos can be found at http://people.xiph.org/~unlord/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Someday, should do a better encode... --&amp;gt;&lt;br /&gt;
** [http://people.xiph.org/~tdaede/video/SPIE_Nathan.webm Chroma from Luma (CfL)] - [https://people.xiph.org/~unlord/SPIE-2015-CfL.pdf Slides] - [https://people.xiph.org/~unlord/spie_cfl.pdf Paper]&lt;br /&gt;
** [http://people.xiph.org/~tdaede/video/SPIE_PVQ.webm Perceptual Vector Quantisation (PVQ)] - [http://people.xiph.org/~tterribe/daala/spie_pvq_slides.pdf Slides] - [http://jmvalin.ca/papers/spie_pvq.pdf Paper]&lt;br /&gt;
** [http://people.xiph.org/~tdaede/video/SPIE_Tim.webm Adaptive Motion Compensation Without Blocking Artifacts] - [http://people.xiph.org/~tterribe/daala/spie_obmc_slides.pdf Slides] - [https://people.xiph.org/~tterribe/daala/vbsobmc.pdf Paper]&lt;br /&gt;
* 2015-01-31 - [http://ftp.osuosl.org/pub/fosdem/2015/devroom-open_media/daala.mp4 Daala Project Update at FOSDEM 2015] - [https://fosdem.org/2015/schedule/event/daala/ summary] - [https://fosdem.org/2015/schedule/event/daala/attachments/slides/569/export/events/attachments/daala/slides/569/Daala_FOSDEM_2015.pdf Slides]&lt;br /&gt;
* 2015-01-14 - [https://www.youtube.co.uk/watch?v=Dmho4gcRvQ4 Linux Conf 2015] - [http://lca2015.linux.org.au/schedule/30187/view_talk presentation summary] - [https://people.xiph.org/~tterribe/pubs/lca2015/daala.pdf Slides]&lt;br /&gt;
-------&lt;br /&gt;
* 2014-09-16 - [https://air.mozilla.org/daala-are-we-compressed-yet/ Daala: Are We Compressed Yet?]&lt;br /&gt;
* 2014-06-25 - [https://air.mozilla.org/sparsity-induced-prediction-for-images-and-video/ Sparsity Induced Prediction for Images and Video]&lt;br /&gt;
* 2014-06-06 - VP9 Summit (no video available) - [https://people.xiph.org/~xiphmont/demo/daala/daala-vp9summit-20140606.pdf Slides]&lt;br /&gt;
-------&lt;br /&gt;
* 2013-10-23 - [https://people.xiph.org/~xiphmont/video/Free_Codecs_Update_Opus_and_Daala.ogv Opus and Daala: State of the Art Royalty-free Codecs] - [https://people.xiph.org/~greg/gstreamer-daala-opus.pdf Slides]&lt;br /&gt;
* 2013-09-30 - [https://people.xiph.org/~tterribe/daala/coding_party2/?C=M;O=A Daala Coding Party 2] - [https://people.xiph.org/~unlord/Daala-Intra.pdf Slides]&lt;br /&gt;
* 2013-05-02 - [https://people.xiph.org/~xiphmont/tim-terriberry-presents-daala/ Tim Terriberry Presents Daala]&lt;br /&gt;
-------&lt;br /&gt;
* 2012-01-24 - [https://media.basilgohar.com/derf-talks/?C=M;O=A Introduction to Video Coding] - [https://people.xiph.org/~tterribe/pubs/lca2012/auckland/intro_to_video1.pdf Slides] (no video for slides 1-50)&lt;br /&gt;
&lt;br /&gt;
== Other Websites ==&lt;br /&gt;
* [https://www.youtube.com/playlist?list=PLEeMksZoEQ1xQEuLF50w0RwDwLgDGwSG- Daala Presentations on YouTube]&lt;br /&gt;
* [https://www.youtube.com/playlist?list=PLOU2XLYxmsIJGErt5rrCqaSGTMyyqNt2H Google&#039;s Compressor Head videos] - a beginner&#039;s introduction to the world of data compression&lt;br /&gt;
* [https://www.zazzle.com/daala_tee_shirt-235139149596175944 Daala T-shirts] - if you&#039;d like a free one, help out with the project and ask the Mozilla guys nicely for one :-)&lt;br /&gt;
* [https://www.xiph.org/donate/ Donate to Xiph.Org] &lt;br /&gt;
* [[Daala_on_Wheels|Historical Daala wiki page]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Daala]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Speex_FAQ&amp;diff=16634</id>
		<title>Speex FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Speex_FAQ&amp;diff=16634"/>
		<updated>2017-11-09T15:02:27Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* Can Speex run on fixed-point processors or DSPs? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== General ==&lt;br /&gt;
&lt;br /&gt;
=== Why do we need [[Speex]]? [[Vorbis]] is open source and patent-free.  ===&lt;br /&gt;
&lt;br /&gt;
[[Vorbis]] is a great project but its goals are not the same as Speex. Vorbis is mostly aimed at compressing music and audio in general, while Speex targets speech only. For that reason, Speex can achieve much better results than Vorbis on speech (typically 2-4 times higher compression at equal quality).&lt;br /&gt;
&lt;br /&gt;
=== Isn&#039;t there an open source implementation of the [https://en.wikipedia.org/wiki/Full_Rate GSM-FR] codec? Why is Speex necessary? ===&lt;br /&gt;
&lt;br /&gt;
First of all, it&#039;s not clear whether [https://en.wikipedia.org/wiki/Full_Rate GSM-FR] is covered by a Philips patent (see http://kbs.cs.tu-berlin.de/~jutta/toast.html). Also, GSM-FR offers mediocre quality at a relatively high bit-rate, while Speex can offer equivalent quality at almost half the bit-rate. Last but not least, Speex offers a wide range of bit-rates and sampling rates, while GSM-FR is limited to 8 kHz speech at 13 kbps.&lt;br /&gt;
&lt;br /&gt;
=== Ogg, Vorbis, Speex, what&#039;s the difference? ===&lt;br /&gt;
&lt;br /&gt;
[[Ogg]] is a &#039;&#039;&#039;container&#039;&#039;&#039; format for holding multimedia data (audio, video, subtitles, etc.).&lt;br /&gt;
&lt;br /&gt;
[[Vorbis]] is an &#039;&#039;&#039;audio codec&#039;&#039;&#039; that uses Ogg to store its bit-streams as files, hence the name &#039;&#039;&#039;Ogg Vorbis&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Speex]] is a &#039;&#039;&#039;speech codec&#039;&#039;&#039;, that also uses the Ogg format to store its bit-streams as files,&lt;br /&gt;
so technically they would be &#039;&#039;&#039;Ogg Speex&#039;&#039;&#039; files. However, most people refer to them just as Speex files.&lt;br /&gt;
&lt;br /&gt;
One difference Speex has with Vorbis, is that Speex is less tied to Ogg.&lt;br /&gt;
Actually, if you want to use Speex for Voice over IP (VoIP), you don&#039;t need to use an Ogg container at all.&lt;br /&gt;
&lt;br /&gt;
=== What&#039;s the extension for Speex files? ===&lt;br /&gt;
&lt;br /&gt;
Speex files tend to have the &#039;&#039;&#039;.spx&#039;&#039;&#039; extension. Note that the Speex tools (speexenc, speexdec) do not rely on the file extension at all, so any extension will work.&lt;br /&gt;
&lt;br /&gt;
=== Can I use Speex for compressing music? ===&lt;br /&gt;
&lt;br /&gt;
You can, but you&#039;ll be better off compressing with Vorbis when it comes to music.&lt;br /&gt;
Just like Vorbis is not really adapted to speech, Speex is really not adapted for music.&lt;br /&gt;
&lt;br /&gt;
=== I converted some MP3s to Speex and the quality is bad. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
This is called &#039;&#039;&#039;[https://en.wikipedia.org/wiki/Transcoding transcoding]&#039;&#039;&#039; (converting from one lossy format to another) and it will always result in much poorer quality than the original MP3.&lt;br /&gt;
&lt;br /&gt;
Avoid transcoding speech, unless you have a &#039;&#039;really&#039;&#039; good reason to do so (e.g. you need a smaller file size).&lt;br /&gt;
You should also avoid &#039;&#039;&#039;tandeming&#039;&#039;&#039; (self-transcoding). I.e. if you decode a Speex file and re-encode it again at the same bit-rate, you &#039;&#039;will&#039;&#039; lose quality.&lt;br /&gt;
&lt;br /&gt;
=== How does Speex compare to other proprietary codecs? ===&lt;br /&gt;
&lt;br /&gt;
It&#039;s hard to give precise figures since no formal listening tests have been performed yet. All I can say is that in terms of quality, Speex competes on the same ground as other proprietary codecs (not necessarily the best, but not the worst either).&lt;br /&gt;
&lt;br /&gt;
Speex also has many features that are not present in most other codecs. These include variable bit-rate (VBR), integration of narrowband and wideband, as well as stereo support. Of course, another area where Speex is really hard to beat is the quality/price ratio. Unlike many very expensive codecs, Speex is free and anyone may distribute or modify it at will.&lt;br /&gt;
&lt;br /&gt;
=== Can Speex pass [https://en.wikipedia.org/wiki/Dual-tone_multi-frequency_signaling DTMF] signals correctly? ===&lt;br /&gt;
&lt;br /&gt;
I guess it all depends on the bit-rate used. Though no formal testing has yet been performed, I&#039;d say it works correctly at 8 kbps and above. Make sure you don&#039;t use the lowest complexity (see SPEEX_SET_COMPLEXITY or --comp option), as it causes significant noise.&lt;br /&gt;
&lt;br /&gt;
=== Can Speex pass [https://en.wikipedia.org/wiki/List_of_ITU-T_V-series_recommendations#Simultaneous_transmission_of_data_and_other_signals V.90] / [https://en.wikipedia.org/wiki/V.92 V.92] modem signals correctly? ===&lt;br /&gt;
No it cannot, as that would break fundamental laws of information theory. If it &#039;&#039;&#039;could&#039;&#039;&#039; do that, I&#039;d be &#039;&#039;&#039;very&#039;&#039;&#039; rich by now :-)&lt;br /&gt;
&lt;br /&gt;
=== Does Speex have anything to do with the University of Sherbrooke? ===&lt;br /&gt;
&lt;br /&gt;
No.&lt;br /&gt;
&lt;br /&gt;
I wrote Speex while pursuing my Ph.D. at the University of Sherbrooke (2002-2005) in mobile robotics. Although I did my master with the Sherbrooke speech coding group (in speech enhancement, not coding), I was no longer associated with them when developing Speex. Furthermore, Speex does not make use of any code or proprietary technology developed in the Sherbrooke speech coding group. &lt;br /&gt;
&lt;br /&gt;
=== When will the next version of Speex be released? ===&lt;br /&gt;
&lt;br /&gt;
Speex has been superseded by the [[Opus]] codec, so probably no more versions of Speex will be released by Xiph. However, since the code is open-source, you are welcome to make your own additions to Speex as you please.&lt;br /&gt;
&lt;br /&gt;
=== How can I help if I don&#039;t know about speech processing? ===&lt;br /&gt;
&lt;br /&gt;
There&#039;s always &amp;quot;semi-technical&amp;quot; work to do. The documentation can be improved, and so can this FAQ.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
&lt;br /&gt;
=== Under what license is Speex released? ===&lt;br /&gt;
&lt;br /&gt;
As of version 1.0 beta 1, Speex is released under the revised (3-clause) BSD license. This license is one of the most permissive open source licenses.&lt;br /&gt;
&lt;br /&gt;
=== Am I allowed to use Speex in commercial software? ===&lt;br /&gt;
&lt;br /&gt;
Yes. As long as you comply with the license. This basically means you have to keep the copyright notice and you can&#039;t use our name to promote your product without authorization.&lt;br /&gt;
&lt;br /&gt;
=== Do I have to release source code if I use Speex in a proprietary application? ===&lt;br /&gt;
&lt;br /&gt;
No. The BSD license does &#039;&#039;&#039;not&#039;&#039;&#039; require you to release any source code. It is however &#039;&#039;&#039;appreciated&#039;&#039;&#039; (but not required) if you contribute back useful changes you make to Speex. This is generally also in your interest because it means you get maintenance of that code for free (i.e. no need to merge again in newer versions).&lt;br /&gt;
&lt;br /&gt;
== Using libspeex ==&lt;br /&gt;
&lt;br /&gt;
=== Does Speex run on Windows? ===&lt;br /&gt;
&lt;br /&gt;
Compilation on Windows has been supported since version 0.8.0. There are also several front-ends available from the website.&lt;br /&gt;
&lt;br /&gt;
=== Why is encoding so slow compared to decoding? ===&lt;br /&gt;
&lt;br /&gt;
For most kinds of compression, encoding is inherently slower than decoding.&lt;br /&gt;
&lt;br /&gt;
In the case of Speex, encoding consists of finding, for each vector of 5 to 10 samples, the entry that matches the best within a codebook consisting of 16 to 256 entries.&lt;br /&gt;
When decoding, all that needs to be done is look up the right entry in the codebook using the encoded index. Since a lookup is much faster than a search, the decoder works much faster than the encoder.&lt;br /&gt;
&lt;br /&gt;
=== Why is Speex so slow on my iPaq (or insert any platform without an FPU)? ===&lt;br /&gt;
&lt;br /&gt;
You probably didn&#039;t build Speex with the &#039;&#039;&#039;--enable-fixed-point&#039;&#039;&#039; option.&lt;br /&gt;
&lt;br /&gt;
Even if you did, not all modes have been ported to use fixed-point arithmetic, so the code may be slowed down by any float operations left (e.g. in the Wideband mode).&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m getting unusual background noise (hiss) when using libspeex in my application. How do I fix that? ===&lt;br /&gt;
&lt;br /&gt;
One of the causes could be scaling of the input speech. Speex expects signals to have a +-32767 (signed short) dynamic range. If the dynamic range of your signals is too small (e.g. +-1.0), you will suffer important quantization noise. A good target is to have a dynamic range around +=8000 which is large enough, but small enough to make sure there&#039;s no clipping when converting back to signed short.&lt;br /&gt;
&lt;br /&gt;
=== I get very distorted speech when using libspeex in my application. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
There are many possible causes for that. One of them is errors in the way the bits are manipulated. Another possible cause is the use of the same encoder or decoder state for more than one audio stream (channel), which produces strange effects with the filter memories. If the input speech has an amplitude close to +-32767, it is possible that at decoding, the amplitude be a bit higher than that, causing clipping when saving as 16-bit PCM.&lt;br /&gt;
&lt;br /&gt;
=== Can Speex run on fixed-point processors or DSPs? ===&lt;br /&gt;
&lt;br /&gt;
Yes. You can compile Speex for fixed-point CPUs by passing the &#039;&#039;&#039;--enable-fixed-point&#039;&#039;&#039; option to the configure script or defining &#039;&#039;&#039;FIXED_POINT&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== What architectures are supported? ===&lt;br /&gt;
&lt;br /&gt;
Speex is designed to run on pretty much any CPU that can do 16x16 multiplications. That includes:&lt;br /&gt;
* x86&lt;br /&gt;
* PowerPC&lt;br /&gt;
* ARM&lt;br /&gt;
* Blackfin&lt;br /&gt;
* TI C5x and C6x&lt;br /&gt;
* dsPIC (unsupported, unofficial port)&lt;br /&gt;
* Cell (in progress)&lt;br /&gt;
&lt;br /&gt;
...and many others&lt;br /&gt;
&lt;br /&gt;
=== Can I use Speex for 22.05 kHz, 44.1 kHz or 48 kHz signals? ===&lt;br /&gt;
&lt;br /&gt;
Yes, but you must resample the signal to a supported sample rate before encoding.&lt;br /&gt;
&lt;br /&gt;
Speex is optimised for &#039;&#039;&#039;8 kHz&#039;&#039;&#039; and &#039;&#039;&#039;16 kHz&#039;&#039;&#039; and it can also encode 32 kHz files as well (your mileage may vary). Anything else is &#039;&#039;unsupported&#039;&#039; and tends to be &#039;&#039;heavily sub-optimal&#039;&#039;. You might as well use Vorbis instead.&lt;br /&gt;
&lt;br /&gt;
Note that Speex includes a resampler module as of version &#039;&#039;&#039;1.2beta2&#039;&#039;&#039;. Refer to the section called Resampler in the Speex documentation.&lt;br /&gt;
&lt;br /&gt;
=== Should I use version 1.0.x or 1.2? ===&lt;br /&gt;
While currently 1.2 is marked as beta, the author believes 1.2 is vastly superior and more stable than the 1.0.x series regarding compression and API performance.  As such, it is recommended to use version 1.2, even though it is marked as beta.&lt;br /&gt;
&lt;br /&gt;
== Technical ==&lt;br /&gt;
&lt;br /&gt;
=== What&#039;s the difference between CELP and ACELP? ===&lt;br /&gt;
&lt;br /&gt;
CELP stands for &amp;quot;Code Excited Linear Prediction&amp;quot;, while ACELP stands for &amp;quot;Algebraic Code Excited Linear Prediction&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
That means ACELP is a CELP technique that uses an algebraic codebook represented as a sum of unit pulses, thus making the codebook search much more efficient. This technique was invented at the University of Sherbrooke and is now one of the most widely used forms of CELP.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, since ACELP is patented, it could not be used in Speex.&lt;br /&gt;
&lt;br /&gt;
=== Where can I get information about how Speex works? ===&lt;br /&gt;
&lt;br /&gt;
There is not (yet) a complete description of the algorithm (except for the source code itself).&lt;br /&gt;
&lt;br /&gt;
However, several aspects are documented either in the [http://speex.org/docs/ manual] or in the paper [http://people.xiph.org/~jm/papers/aes120_speex_vorbis.pdf Improved Noise Weighting in CELP Coding of Speech &amp;amp;mdash; Applying the Vorbis Psychoacoustic Model To Speex].&lt;br /&gt;
&lt;br /&gt;
[[Category:Speex]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Speex_FAQ&amp;diff=16633</id>
		<title>Speex FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Speex_FAQ&amp;diff=16633"/>
		<updated>2017-11-09T15:00:49Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* Why is Speex so slow on my iPaq (or insert any platform without an FPU)? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== General ==&lt;br /&gt;
&lt;br /&gt;
=== Why do we need [[Speex]]? [[Vorbis]] is open source and patent-free.  ===&lt;br /&gt;
&lt;br /&gt;
[[Vorbis]] is a great project but its goals are not the same as Speex. Vorbis is mostly aimed at compressing music and audio in general, while Speex targets speech only. For that reason, Speex can achieve much better results than Vorbis on speech (typically 2-4 times higher compression at equal quality).&lt;br /&gt;
&lt;br /&gt;
=== Isn&#039;t there an open source implementation of the [https://en.wikipedia.org/wiki/Full_Rate GSM-FR] codec? Why is Speex necessary? ===&lt;br /&gt;
&lt;br /&gt;
First of all, it&#039;s not clear whether [https://en.wikipedia.org/wiki/Full_Rate GSM-FR] is covered by a Philips patent (see http://kbs.cs.tu-berlin.de/~jutta/toast.html). Also, GSM-FR offers mediocre quality at a relatively high bit-rate, while Speex can offer equivalent quality at almost half the bit-rate. Last but not least, Speex offers a wide range of bit-rates and sampling rates, while GSM-FR is limited to 8 kHz speech at 13 kbps.&lt;br /&gt;
&lt;br /&gt;
=== Ogg, Vorbis, Speex, what&#039;s the difference? ===&lt;br /&gt;
&lt;br /&gt;
[[Ogg]] is a &#039;&#039;&#039;container&#039;&#039;&#039; format for holding multimedia data (audio, video, subtitles, etc.).&lt;br /&gt;
&lt;br /&gt;
[[Vorbis]] is an &#039;&#039;&#039;audio codec&#039;&#039;&#039; that uses Ogg to store its bit-streams as files, hence the name &#039;&#039;&#039;Ogg Vorbis&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Speex]] is a &#039;&#039;&#039;speech codec&#039;&#039;&#039;, that also uses the Ogg format to store its bit-streams as files,&lt;br /&gt;
so technically they would be &#039;&#039;&#039;Ogg Speex&#039;&#039;&#039; files. However, most people refer to them just as Speex files.&lt;br /&gt;
&lt;br /&gt;
One difference Speex has with Vorbis, is that Speex is less tied to Ogg.&lt;br /&gt;
Actually, if you want to use Speex for Voice over IP (VoIP), you don&#039;t need to use an Ogg container at all.&lt;br /&gt;
&lt;br /&gt;
=== What&#039;s the extension for Speex files? ===&lt;br /&gt;
&lt;br /&gt;
Speex files tend to have the &#039;&#039;&#039;.spx&#039;&#039;&#039; extension. Note that the Speex tools (speexenc, speexdec) do not rely on the file extension at all, so any extension will work.&lt;br /&gt;
&lt;br /&gt;
=== Can I use Speex for compressing music? ===&lt;br /&gt;
&lt;br /&gt;
You can, but you&#039;ll be better off compressing with Vorbis when it comes to music.&lt;br /&gt;
Just like Vorbis is not really adapted to speech, Speex is really not adapted for music.&lt;br /&gt;
&lt;br /&gt;
=== I converted some MP3s to Speex and the quality is bad. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
This is called &#039;&#039;&#039;[https://en.wikipedia.org/wiki/Transcoding transcoding]&#039;&#039;&#039; (converting from one lossy format to another) and it will always result in much poorer quality than the original MP3.&lt;br /&gt;
&lt;br /&gt;
Avoid transcoding speech, unless you have a &#039;&#039;really&#039;&#039; good reason to do so (e.g. you need a smaller file size).&lt;br /&gt;
You should also avoid &#039;&#039;&#039;tandeming&#039;&#039;&#039; (self-transcoding). I.e. if you decode a Speex file and re-encode it again at the same bit-rate, you &#039;&#039;will&#039;&#039; lose quality.&lt;br /&gt;
&lt;br /&gt;
=== How does Speex compare to other proprietary codecs? ===&lt;br /&gt;
&lt;br /&gt;
It&#039;s hard to give precise figures since no formal listening tests have been performed yet. All I can say is that in terms of quality, Speex competes on the same ground as other proprietary codecs (not necessarily the best, but not the worst either).&lt;br /&gt;
&lt;br /&gt;
Speex also has many features that are not present in most other codecs. These include variable bit-rate (VBR), integration of narrowband and wideband, as well as stereo support. Of course, another area where Speex is really hard to beat is the quality/price ratio. Unlike many very expensive codecs, Speex is free and anyone may distribute or modify it at will.&lt;br /&gt;
&lt;br /&gt;
=== Can Speex pass [https://en.wikipedia.org/wiki/Dual-tone_multi-frequency_signaling DTMF] signals correctly? ===&lt;br /&gt;
&lt;br /&gt;
I guess it all depends on the bit-rate used. Though no formal testing has yet been performed, I&#039;d say it works correctly at 8 kbps and above. Make sure you don&#039;t use the lowest complexity (see SPEEX_SET_COMPLEXITY or --comp option), as it causes significant noise.&lt;br /&gt;
&lt;br /&gt;
=== Can Speex pass [https://en.wikipedia.org/wiki/List_of_ITU-T_V-series_recommendations#Simultaneous_transmission_of_data_and_other_signals V.90] / [https://en.wikipedia.org/wiki/V.92 V.92] modem signals correctly? ===&lt;br /&gt;
No it cannot, as that would break fundamental laws of information theory. If it &#039;&#039;&#039;could&#039;&#039;&#039; do that, I&#039;d be &#039;&#039;&#039;very&#039;&#039;&#039; rich by now :-)&lt;br /&gt;
&lt;br /&gt;
=== Does Speex have anything to do with the University of Sherbrooke? ===&lt;br /&gt;
&lt;br /&gt;
No.&lt;br /&gt;
&lt;br /&gt;
I wrote Speex while pursuing my Ph.D. at the University of Sherbrooke (2002-2005) in mobile robotics. Although I did my master with the Sherbrooke speech coding group (in speech enhancement, not coding), I was no longer associated with them when developing Speex. Furthermore, Speex does not make use of any code or proprietary technology developed in the Sherbrooke speech coding group. &lt;br /&gt;
&lt;br /&gt;
=== When will the next version of Speex be released? ===&lt;br /&gt;
&lt;br /&gt;
Speex has been superseded by the [[Opus]] codec, so probably no more versions of Speex will be released by Xiph. However, since the code is open-source, you are welcome to make your own additions to Speex as you please.&lt;br /&gt;
&lt;br /&gt;
=== How can I help if I don&#039;t know about speech processing? ===&lt;br /&gt;
&lt;br /&gt;
There&#039;s always &amp;quot;semi-technical&amp;quot; work to do. The documentation can be improved, and so can this FAQ.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
&lt;br /&gt;
=== Under what license is Speex released? ===&lt;br /&gt;
&lt;br /&gt;
As of version 1.0 beta 1, Speex is released under the revised (3-clause) BSD license. This license is one of the most permissive open source licenses.&lt;br /&gt;
&lt;br /&gt;
=== Am I allowed to use Speex in commercial software? ===&lt;br /&gt;
&lt;br /&gt;
Yes. As long as you comply with the license. This basically means you have to keep the copyright notice and you can&#039;t use our name to promote your product without authorization.&lt;br /&gt;
&lt;br /&gt;
=== Do I have to release source code if I use Speex in a proprietary application? ===&lt;br /&gt;
&lt;br /&gt;
No. The BSD license does &#039;&#039;&#039;not&#039;&#039;&#039; require you to release any source code. It is however &#039;&#039;&#039;appreciated&#039;&#039;&#039; (but not required) if you contribute back useful changes you make to Speex. This is generally also in your interest because it means you get maintenance of that code for free (i.e. no need to merge again in newer versions).&lt;br /&gt;
&lt;br /&gt;
== Using libspeex ==&lt;br /&gt;
&lt;br /&gt;
=== Does Speex run on Windows? ===&lt;br /&gt;
&lt;br /&gt;
Compilation on Windows has been supported since version 0.8.0. There are also several front-ends available from the website.&lt;br /&gt;
&lt;br /&gt;
=== Why is encoding so slow compared to decoding? ===&lt;br /&gt;
&lt;br /&gt;
For most kinds of compression, encoding is inherently slower than decoding.&lt;br /&gt;
&lt;br /&gt;
In the case of Speex, encoding consists of finding, for each vector of 5 to 10 samples, the entry that matches the best within a codebook consisting of 16 to 256 entries.&lt;br /&gt;
When decoding, all that needs to be done is look up the right entry in the codebook using the encoded index. Since a lookup is much faster than a search, the decoder works much faster than the encoder.&lt;br /&gt;
&lt;br /&gt;
=== Why is Speex so slow on my iPaq (or insert any platform without an FPU)? ===&lt;br /&gt;
&lt;br /&gt;
You probably didn&#039;t build Speex with the &#039;&#039;&#039;--enable-fixed-point&#039;&#039;&#039; option.&lt;br /&gt;
&lt;br /&gt;
Even if you did, not all modes have been ported to use fixed-point arithmetic, so the code may be slowed down by any float operations left (e.g. in the Wideband mode).&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m getting unusual background noise (hiss) when using libspeex in my application. How do I fix that? ===&lt;br /&gt;
&lt;br /&gt;
One of the causes could be scaling of the input speech. Speex expects signals to have a +-32767 (signed short) dynamic range. If the dynamic range of your signals is too small (e.g. +-1.0), you will suffer important quantization noise. A good target is to have a dynamic range around +=8000 which is large enough, but small enough to make sure there&#039;s no clipping when converting back to signed short.&lt;br /&gt;
&lt;br /&gt;
=== I get very distorted speech when using libspeex in my application. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
There are many possible causes for that. One of them is errors in the way the bits are manipulated. Another possible cause is the use of the same encoder or decoder state for more than one audio stream (channel), which produces strange effects with the filter memories. If the input speech has an amplitude close to +-32767, it is possible that at decoding, the amplitude be a bit higher than that, causing clipping when saving as 16-bit PCM.&lt;br /&gt;
&lt;br /&gt;
=== Can Speex run on fixed-point processors or DSPs? ===&lt;br /&gt;
&lt;br /&gt;
Yes. You can compile Speex for fixed-point CPUs by passing the --enable-fixed-point option to the configure script or defining FIXED_POINT. &lt;br /&gt;
&lt;br /&gt;
=== What architectures are supported? ===&lt;br /&gt;
&lt;br /&gt;
Speex is designed to run on pretty much any CPU that can do 16x16 multiplications. That includes:&lt;br /&gt;
* x86&lt;br /&gt;
* PowerPC&lt;br /&gt;
* ARM&lt;br /&gt;
* Blackfin&lt;br /&gt;
* TI C5x and C6x&lt;br /&gt;
* dsPIC (unsupported, unofficial port)&lt;br /&gt;
* Cell (in progress)&lt;br /&gt;
&lt;br /&gt;
...and many others&lt;br /&gt;
&lt;br /&gt;
=== Can I use Speex for 22.05 kHz, 44.1 kHz or 48 kHz signals? ===&lt;br /&gt;
&lt;br /&gt;
Yes, but you must resample the signal to a supported sample rate before encoding.&lt;br /&gt;
&lt;br /&gt;
Speex is optimised for &#039;&#039;&#039;8 kHz&#039;&#039;&#039; and &#039;&#039;&#039;16 kHz&#039;&#039;&#039; and it can also encode 32 kHz files as well (your mileage may vary). Anything else is &#039;&#039;unsupported&#039;&#039; and tends to be &#039;&#039;heavily sub-optimal&#039;&#039;. You might as well use Vorbis instead.&lt;br /&gt;
&lt;br /&gt;
Note that Speex includes a resampler module as of version &#039;&#039;&#039;1.2beta2&#039;&#039;&#039;. Refer to the section called Resampler in the Speex documentation.&lt;br /&gt;
&lt;br /&gt;
=== Should I use version 1.0.x or 1.2? ===&lt;br /&gt;
While currently 1.2 is marked as beta, the author believes 1.2 is vastly superior and more stable than the 1.0.x series regarding compression and API performance.  As such, it is recommended to use version 1.2, even though it is marked as beta.&lt;br /&gt;
&lt;br /&gt;
== Technical ==&lt;br /&gt;
&lt;br /&gt;
=== What&#039;s the difference between CELP and ACELP? ===&lt;br /&gt;
&lt;br /&gt;
CELP stands for &amp;quot;Code Excited Linear Prediction&amp;quot;, while ACELP stands for &amp;quot;Algebraic Code Excited Linear Prediction&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
That means ACELP is a CELP technique that uses an algebraic codebook represented as a sum of unit pulses, thus making the codebook search much more efficient. This technique was invented at the University of Sherbrooke and is now one of the most widely used forms of CELP.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, since ACELP is patented, it could not be used in Speex.&lt;br /&gt;
&lt;br /&gt;
=== Where can I get information about how Speex works? ===&lt;br /&gt;
&lt;br /&gt;
There is not (yet) a complete description of the algorithm (except for the source code itself).&lt;br /&gt;
&lt;br /&gt;
However, several aspects are documented either in the [http://speex.org/docs/ manual] or in the paper [http://people.xiph.org/~jm/papers/aes120_speex_vorbis.pdf Improved Noise Weighting in CELP Coding of Speech &amp;amp;mdash; Applying the Vorbis Psychoacoustic Model To Speex].&lt;br /&gt;
&lt;br /&gt;
[[Category:Speex]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Speex_FAQ&amp;diff=16632</id>
		<title>Speex FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Speex_FAQ&amp;diff=16632"/>
		<updated>2017-11-08T12:57:05Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* Can Speex pass V.90/V.92 modem signals correctly? */ fix wiki link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== General ==&lt;br /&gt;
&lt;br /&gt;
=== Why do we need [[Speex]]? [[Vorbis]] is open source and patent-free.  ===&lt;br /&gt;
&lt;br /&gt;
[[Vorbis]] is a great project but its goals are not the same as Speex. Vorbis is mostly aimed at compressing music and audio in general, while Speex targets speech only. For that reason, Speex can achieve much better results than Vorbis on speech (typically 2-4 times higher compression at equal quality).&lt;br /&gt;
&lt;br /&gt;
=== Isn&#039;t there an open source implementation of the [https://en.wikipedia.org/wiki/Full_Rate GSM-FR] codec? Why is Speex necessary? ===&lt;br /&gt;
&lt;br /&gt;
First of all, it&#039;s not clear whether [https://en.wikipedia.org/wiki/Full_Rate GSM-FR] is covered by a Philips patent (see http://kbs.cs.tu-berlin.de/~jutta/toast.html). Also, GSM-FR offers mediocre quality at a relatively high bit-rate, while Speex can offer equivalent quality at almost half the bit-rate. Last but not least, Speex offers a wide range of bit-rates and sampling rates, while GSM-FR is limited to 8 kHz speech at 13 kbps.&lt;br /&gt;
&lt;br /&gt;
=== Ogg, Vorbis, Speex, what&#039;s the difference? ===&lt;br /&gt;
&lt;br /&gt;
[[Ogg]] is a &#039;&#039;&#039;container&#039;&#039;&#039; format for holding multimedia data (audio, video, subtitles, etc.).&lt;br /&gt;
&lt;br /&gt;
[[Vorbis]] is an &#039;&#039;&#039;audio codec&#039;&#039;&#039; that uses Ogg to store its bit-streams as files, hence the name &#039;&#039;&#039;Ogg Vorbis&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Speex]] is a &#039;&#039;&#039;speech codec&#039;&#039;&#039;, that also uses the Ogg format to store its bit-streams as files,&lt;br /&gt;
so technically they would be &#039;&#039;&#039;Ogg Speex&#039;&#039;&#039; files. However, most people refer to them just as Speex files.&lt;br /&gt;
&lt;br /&gt;
One difference Speex has with Vorbis, is that Speex is less tied to Ogg.&lt;br /&gt;
Actually, if you want to use Speex for Voice over IP (VoIP), you don&#039;t need to use an Ogg container at all.&lt;br /&gt;
&lt;br /&gt;
=== What&#039;s the extension for Speex files? ===&lt;br /&gt;
&lt;br /&gt;
Speex files tend to have the &#039;&#039;&#039;.spx&#039;&#039;&#039; extension. Note that the Speex tools (speexenc, speexdec) do not rely on the file extension at all, so any extension will work.&lt;br /&gt;
&lt;br /&gt;
=== Can I use Speex for compressing music? ===&lt;br /&gt;
&lt;br /&gt;
You can, but you&#039;ll be better off compressing with Vorbis when it comes to music.&lt;br /&gt;
Just like Vorbis is not really adapted to speech, Speex is really not adapted for music.&lt;br /&gt;
&lt;br /&gt;
=== I converted some MP3s to Speex and the quality is bad. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
This is called &#039;&#039;&#039;[https://en.wikipedia.org/wiki/Transcoding transcoding]&#039;&#039;&#039; (converting from one lossy format to another) and it will always result in much poorer quality than the original MP3.&lt;br /&gt;
&lt;br /&gt;
Avoid transcoding speech, unless you have a &#039;&#039;really&#039;&#039; good reason to do so (e.g. you need a smaller file size).&lt;br /&gt;
You should also avoid &#039;&#039;&#039;tandeming&#039;&#039;&#039; (self-transcoding). I.e. if you decode a Speex file and re-encode it again at the same bit-rate, you &#039;&#039;will&#039;&#039; lose quality.&lt;br /&gt;
&lt;br /&gt;
=== How does Speex compare to other proprietary codecs? ===&lt;br /&gt;
&lt;br /&gt;
It&#039;s hard to give precise figures since no formal listening tests have been performed yet. All I can say is that in terms of quality, Speex competes on the same ground as other proprietary codecs (not necessarily the best, but not the worst either).&lt;br /&gt;
&lt;br /&gt;
Speex also has many features that are not present in most other codecs. These include variable bit-rate (VBR), integration of narrowband and wideband, as well as stereo support. Of course, another area where Speex is really hard to beat is the quality/price ratio. Unlike many very expensive codecs, Speex is free and anyone may distribute or modify it at will.&lt;br /&gt;
&lt;br /&gt;
=== Can Speex pass [https://en.wikipedia.org/wiki/Dual-tone_multi-frequency_signaling DTMF] signals correctly? ===&lt;br /&gt;
&lt;br /&gt;
I guess it all depends on the bit-rate used. Though no formal testing has yet been performed, I&#039;d say it works correctly at 8 kbps and above. Make sure you don&#039;t use the lowest complexity (see SPEEX_SET_COMPLEXITY or --comp option), as it causes significant noise.&lt;br /&gt;
&lt;br /&gt;
=== Can Speex pass [https://en.wikipedia.org/wiki/List_of_ITU-T_V-series_recommendations#Simultaneous_transmission_of_data_and_other_signals V.90] / [https://en.wikipedia.org/wiki/V.92 V.92] modem signals correctly? ===&lt;br /&gt;
No it cannot, as that would break fundamental laws of information theory. If it &#039;&#039;&#039;could&#039;&#039;&#039; do that, I&#039;d be &#039;&#039;&#039;very&#039;&#039;&#039; rich by now :-)&lt;br /&gt;
&lt;br /&gt;
=== Does Speex have anything to do with the University of Sherbrooke? ===&lt;br /&gt;
&lt;br /&gt;
No.&lt;br /&gt;
&lt;br /&gt;
I wrote Speex while pursuing my Ph.D. at the University of Sherbrooke (2002-2005) in mobile robotics. Although I did my master with the Sherbrooke speech coding group (in speech enhancement, not coding), I was no longer associated with them when developing Speex. Furthermore, Speex does not make use of any code or proprietary technology developed in the Sherbrooke speech coding group. &lt;br /&gt;
&lt;br /&gt;
=== When will the next version of Speex be released? ===&lt;br /&gt;
&lt;br /&gt;
Speex has been superseded by the [[Opus]] codec, so probably no more versions of Speex will be released by Xiph. However, since the code is open-source, you are welcome to make your own additions to Speex as you please.&lt;br /&gt;
&lt;br /&gt;
=== How can I help if I don&#039;t know about speech processing? ===&lt;br /&gt;
&lt;br /&gt;
There&#039;s always &amp;quot;semi-technical&amp;quot; work to do. The documentation can be improved, and so can this FAQ.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
&lt;br /&gt;
=== Under what license is Speex released? ===&lt;br /&gt;
&lt;br /&gt;
As of version 1.0 beta 1, Speex is released under the revised (3-clause) BSD license. This license is one of the most permissive open source licenses.&lt;br /&gt;
&lt;br /&gt;
=== Am I allowed to use Speex in commercial software? ===&lt;br /&gt;
&lt;br /&gt;
Yes. As long as you comply with the license. This basically means you have to keep the copyright notice and you can&#039;t use our name to promote your product without authorization.&lt;br /&gt;
&lt;br /&gt;
=== Do I have to release source code if I use Speex in a proprietary application? ===&lt;br /&gt;
&lt;br /&gt;
No. The BSD license does &#039;&#039;&#039;not&#039;&#039;&#039; require you to release any source code. It is however &#039;&#039;&#039;appreciated&#039;&#039;&#039; (but not required) if you contribute back useful changes you make to Speex. This is generally also in your interest because it means you get maintenance of that code for free (i.e. no need to merge again in newer versions).&lt;br /&gt;
&lt;br /&gt;
== Using libspeex ==&lt;br /&gt;
&lt;br /&gt;
=== Does Speex run on Windows? ===&lt;br /&gt;
&lt;br /&gt;
Compilation on Windows has been supported since version 0.8.0. There are also several front-ends available from the website.&lt;br /&gt;
&lt;br /&gt;
=== Why is encoding so slow compared to decoding? ===&lt;br /&gt;
&lt;br /&gt;
For most kinds of compression, encoding is inherently slower than decoding.&lt;br /&gt;
&lt;br /&gt;
In the case of Speex, encoding consists of finding, for each vector of 5 to 10 samples, the entry that matches the best within a codebook consisting of 16 to 256 entries.&lt;br /&gt;
When decoding, all that needs to be done is look up the right entry in the codebook using the encoded index. Since a lookup is much faster than a search, the decoder works much faster than the encoder.&lt;br /&gt;
&lt;br /&gt;
=== Why is Speex so slow on my iPaq (or insert any platform without an FPU)? ===&lt;br /&gt;
&lt;br /&gt;
You probably didn&#039;t build Speex with the fixed-point option (--enable-fixed-point). Even if you did, not all modes have been ported to use fixed-point arithmetic, so the code may be slowed down by a few float operations left (e.g. in the wideband mode).&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m getting unusual background noise (hiss) when using libspeex in my application. How do I fix that? ===&lt;br /&gt;
&lt;br /&gt;
One of the causes could be scaling of the input speech. Speex expects signals to have a +-32767 (signed short) dynamic range. If the dynamic range of your signals is too small (e.g. +-1.0), you will suffer important quantization noise. A good target is to have a dynamic range around +=8000 which is large enough, but small enough to make sure there&#039;s no clipping when converting back to signed short.&lt;br /&gt;
&lt;br /&gt;
=== I get very distorted speech when using libspeex in my application. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
There are many possible causes for that. One of them is errors in the way the bits are manipulated. Another possible cause is the use of the same encoder or decoder state for more than one audio stream (channel), which produces strange effects with the filter memories. If the input speech has an amplitude close to +-32767, it is possible that at decoding, the amplitude be a bit higher than that, causing clipping when saving as 16-bit PCM.&lt;br /&gt;
&lt;br /&gt;
=== Can Speex run on fixed-point processors or DSPs? ===&lt;br /&gt;
&lt;br /&gt;
Yes. You can compile Speex for fixed-point CPUs by passing the --enable-fixed-point option to the configure script or defining FIXED_POINT. &lt;br /&gt;
&lt;br /&gt;
=== What architectures are supported? ===&lt;br /&gt;
&lt;br /&gt;
Speex is designed to run on pretty much any CPU that can do 16x16 multiplications. That includes:&lt;br /&gt;
* x86&lt;br /&gt;
* PowerPC&lt;br /&gt;
* ARM&lt;br /&gt;
* Blackfin&lt;br /&gt;
* TI C5x and C6x&lt;br /&gt;
* dsPIC (unsupported, unofficial port)&lt;br /&gt;
* Cell (in progress)&lt;br /&gt;
&lt;br /&gt;
...and many others&lt;br /&gt;
&lt;br /&gt;
=== Can I use Speex for 22.05 kHz, 44.1 kHz or 48 kHz signals? ===&lt;br /&gt;
&lt;br /&gt;
Yes, but you must resample the signal to a supported sample rate before encoding.&lt;br /&gt;
&lt;br /&gt;
Speex is optimised for &#039;&#039;&#039;8 kHz&#039;&#039;&#039; and &#039;&#039;&#039;16 kHz&#039;&#039;&#039; and it can also encode 32 kHz files as well (your mileage may vary). Anything else is &#039;&#039;unsupported&#039;&#039; and tends to be &#039;&#039;heavily sub-optimal&#039;&#039;. You might as well use Vorbis instead.&lt;br /&gt;
&lt;br /&gt;
Note that Speex includes a resampler module as of version &#039;&#039;&#039;1.2beta2&#039;&#039;&#039;. Refer to the section called Resampler in the Speex documentation.&lt;br /&gt;
&lt;br /&gt;
=== Should I use version 1.0.x or 1.2? ===&lt;br /&gt;
While currently 1.2 is marked as beta, the author believes 1.2 is vastly superior and more stable than the 1.0.x series regarding compression and API performance.  As such, it is recommended to use version 1.2, even though it is marked as beta.&lt;br /&gt;
&lt;br /&gt;
== Technical ==&lt;br /&gt;
&lt;br /&gt;
=== What&#039;s the difference between CELP and ACELP? ===&lt;br /&gt;
&lt;br /&gt;
CELP stands for &amp;quot;Code Excited Linear Prediction&amp;quot;, while ACELP stands for &amp;quot;Algebraic Code Excited Linear Prediction&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
That means ACELP is a CELP technique that uses an algebraic codebook represented as a sum of unit pulses, thus making the codebook search much more efficient. This technique was invented at the University of Sherbrooke and is now one of the most widely used forms of CELP.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, since ACELP is patented, it could not be used in Speex.&lt;br /&gt;
&lt;br /&gt;
=== Where can I get information about how Speex works? ===&lt;br /&gt;
&lt;br /&gt;
There is not (yet) a complete description of the algorithm (except for the source code itself).&lt;br /&gt;
&lt;br /&gt;
However, several aspects are documented either in the [http://speex.org/docs/ manual] or in the paper [http://people.xiph.org/~jm/papers/aes120_speex_vorbis.pdf Improved Noise Weighting in CELP Coding of Speech &amp;amp;mdash; Applying the Vorbis Psychoacoustic Model To Speex].&lt;br /&gt;
&lt;br /&gt;
[[Category:Speex]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=OpusFAQ&amp;diff=16631</id>
		<title>OpusFAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=OpusFAQ&amp;diff=16631"/>
		<updated>2017-11-07T17:03:55Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* Does Opus support higher sampling rates, such as 96 kHz or 192 kHz? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Opus logo trans.png]]&lt;br /&gt;
&lt;br /&gt;
If you are looking for info not covered in this FAQ, try the &#039;&#039;&#039;[https://opus-codec.org main Opus website]&#039;&#039;&#039; or the pages included in the &#039;&#039;&#039;[[:Category:Opus|Opus category]]&#039;&#039;&#039; of this wiki.&lt;br /&gt;
&lt;br /&gt;
== General Questions ==&lt;br /&gt;
&lt;br /&gt;
=== What is Opus? Who created it? ===&lt;br /&gt;
&lt;br /&gt;
Opus is a totally open, royalty-free, highly versatile audio codec.&lt;br /&gt;
&lt;br /&gt;
It is primarily designed for interactive speech and music transmission over the Internet, but is also applicable to storage and streaming applications. It incorporates technology from Skype&#039;s &#039;&#039;&#039;[https://en.wikipedia.org/wiki/SILK SILK]&#039;&#039;&#039; codec and Xiph.Org&#039;s &#039;&#039;&#039;[http://celt-codec.org/ CELT]&#039;&#039;&#039; codec. It has been standardized by the &#039;&#039;&#039;[https://www.ietf.org/ Internet Engineering Task Force]&#039;&#039;&#039; (IETF) as &#039;&#039;&#039;[https://tools.ietf.org/html/rfc6716 RFC 6716]&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Opus has been in development since early 2007. Programmers associated with &#039;&#039;&#039;[https://xiph.org/ Xiph.Org]&#039;&#039;&#039;, &#039;&#039;&#039;[https://www.skype.com/ Skype]&#039;&#039;&#039; and several other organizations have contributed to its development and to the standardization process as part of the &#039;&#039;&#039;[https://datatracker.ietf.org/wg/codec/charter/ IETF&#039;s Codec Working Group]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== How does Opus compare to other codecs? ===&lt;br /&gt;
&lt;br /&gt;
Opus is distinguished from most high quality formats (eg: [[Vorbis]], AAC, MP3) by having &#039;&#039;&#039;[https://tools.ietf.org/html/rfc6716#section-2 low delay]&#039;&#039;&#039; (5 ~ 66.5 ms) and distinguished from most low delay formats (eg: [[Speex]], G.711, GSM) by supporting &#039;&#039;&#039;[https://tools.ietf.org/html/rfc6716#section-2.1.1 high audio quality]&#039;&#039;&#039; (supports narrow-band all the way to full-band audio).&lt;br /&gt;
&lt;br /&gt;
It &#039;&#039;&#039;[https://opus-codec.org/comparison meets or exceeds existing codecs&#039; quality]&#039;&#039;&#039; across a wide range of bitrates, and it operates at lower delay than virtually any existing compressed format.&lt;br /&gt;
&lt;br /&gt;
Most importantly, the Opus format and its reference implementation are both available under &#039;&#039;&#039;[https://opus-codec.org/license/ liberal, royalty-free licenses]&#039;&#039;&#039;.&amp;lt;br /&amp;gt;&lt;br /&gt;
This makes it:&lt;br /&gt;
* easy to adopt&lt;br /&gt;
* compatible with free software&lt;br /&gt;
* suitable for use as part of the basic infrastructure of the Internet&lt;br /&gt;
&lt;br /&gt;
=== Does Opus make all those other lossy codecs obsolete? ===&lt;br /&gt;
&lt;br /&gt;
Yes.&lt;br /&gt;
&lt;br /&gt;
From a technical point of view (loss, delay, bitrates, ...) Opus renders &#039;&#039;&#039;[[Speex]]&#039;&#039;&#039; obsolete and should also replace &#039;&#039;&#039;[[Vorbis]]&#039;&#039;&#039; and the common proprietary codecs too (e.g. AAC, MP3, ...).&lt;br /&gt;
&lt;br /&gt;
=== Will Opus replace Vorbis in video files? ===&lt;br /&gt;
&lt;br /&gt;
For &#039;&#039;&#039;[[Ogg]]&#039;&#039;&#039; video files (which use the &#039;&#039;&#039;[[Theora]]&#039;&#039;&#039; video codec), you &#039;&#039;can&#039;&#039; use Opus instead of Vorbis, but the overall size reduction will be minimal and it will break compatibility with existing players.&lt;br /&gt;
&lt;br /&gt;
For WebM video files, the convention is to use the &#039;&#039;&#039;[http://www.webmproject.org/vp9/ VP9 video codec]&#039;&#039;&#039; when using Opus as an audio codec.&lt;br /&gt;
&lt;br /&gt;
=== How do I use Opus? ===&lt;br /&gt;
&lt;br /&gt;
For now, the best way to &#039;&#039;&#039;encode&#039;&#039;&#039; audio into Opus files is to use the &#039;&#039;&#039;opusenc&#039;&#039;&#039; command-line tool from the &#039;&#039;&#039;[https://opus-codec.org/downloads/ opus-tools package]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If you want to encode many files at once (e.g. your music library), try the applications listed in the &#039;&#039;&#039;[[OpusSupport|Opus Support]]&#039;&#039;&#039; page.&lt;br /&gt;
&lt;br /&gt;
For rough guidelines on encoding settings, see the &#039;&#039;&#039;[[Opus Recommended Settings]]&#039;&#039;&#039; page.&lt;br /&gt;
&lt;br /&gt;
=== What programs support Opus? ===&lt;br /&gt;
&lt;br /&gt;
Opus decoding support is now included in &#039;&#039;&#039;[http://caniuse.com/opus some Internet browsers]&#039;&#039;&#039; and &#039;&#039;&#039;[[OpusSupport|many applications]]&#039;&#039;&#039;, including &#039;&#039;&#039;[https://www.mozilla.org/firefox Firefox]&#039;&#039;&#039;, &#039;&#039;&#039;[https://www.foobar2000.org/ foobar2000]&#039;&#039;&#039; and &#039;&#039;&#039;[https://www.videolan.org/vlc/ VLC]&#039;&#039;&#039;, as well as in frameworks such as &#039;&#039;&#039;[https://gstreamer.freedesktop.org/ GStreamer]&#039;&#039;&#039; and &#039;&#039;&#039;[https://ffmpeg.org/ FFmpeg]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
For real-time applications, Opus support is available in &#039;&#039;&#039;[https://www.webrtc.org/ Google&#039;s WebRTC codebase]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Opus is a relatively new codec (standardized in September 2012), but &#039;&#039;&#039;[[OpusSupport|many more applications]]&#039;&#039;&#039; will support it in the near future.&lt;br /&gt;
&lt;br /&gt;
=== Does Opus support higher sampling rates, such as 96 kHz or 192 kHz? ===&lt;br /&gt;
&lt;br /&gt;
Yes and no.&lt;br /&gt;
&lt;br /&gt;
Opus encoding tools like opusenc will happily encode input files that are sampled at 96 or 192 kHz.&lt;br /&gt;
&lt;br /&gt;
However, files at these rates are internally &#039;&#039;&#039;converted to 48 kHz&#039;&#039;&#039; and then only frequencies &#039;&#039;&#039;up to 20 kHz&#039;&#039;&#039; are encoded.&lt;br /&gt;
&lt;br /&gt;
The reason is simple: lossy codecs are designed to preserve audible details while discarding irrelevant information. Since the human ear can only hear up to 20 kHz at best (usually lower than that), frequency content above 20 kHz is the first thing to go.&lt;br /&gt;
&lt;br /&gt;
See Monty&#039;s &#039;&#039;&#039;[https://people.xiph.org/~xiphmont/demo/neil-young.html article]&#039;&#039;&#039; for more details.&lt;br /&gt;
&lt;br /&gt;
If you want a codec to handle high sampling rates losslessly, use &#039;&#039;&#039;[[FLAC]]&#039;&#039;&#039;!&lt;br /&gt;
&lt;br /&gt;
=== What are the licensing requirements? ===&lt;br /&gt;
&lt;br /&gt;
The reference Opus source code is released under a three-clause BSD license, which is a very permissive Open Source license. Commercial use and distribution (including in proprietary software) is permitted, provided that some basic conditions specified in the license are met. &lt;br /&gt;
&lt;br /&gt;
Opus is also covered by some patents, for which royalty-free usage rights are granted, under conditions that the authors believe are compatible with (hopefully) all open source licenses, including the GPL (v2 and v3).&lt;br /&gt;
&lt;br /&gt;
See the &#039;&#039;&#039;[https://www.opus-codec.org/license/ Opus Licensing]&#039;&#039;&#039; page for details.&lt;br /&gt;
&lt;br /&gt;
=== Why make Opus free? ===&lt;br /&gt;
&lt;br /&gt;
On the Internet, protocol and codec standards are part of the common infrastructure everyone builds upon.&lt;br /&gt;
&lt;br /&gt;
Most of the value of a high-quality standard is the innovation and inter-operation provided by the systems built on top of it. When a few parties have monopoly rights to monetize a standard, that infrastructure stops being so common and everyone else has more reason to use their own solution instead, increasing cost and reducing efficiency.&lt;br /&gt;
&lt;br /&gt;
Imagine a road system where each type of car could only drive on its own manufacturer&#039;s pavement. We all benefit from living in a world where all the roads are connected.&lt;br /&gt;
&lt;br /&gt;
This is why Opus, unlike many codecs, is free.&lt;br /&gt;
&lt;br /&gt;
=== Is the SILK part of Opus compatible with the SILK implementation shipped in Skype? ===&lt;br /&gt;
&lt;br /&gt;
No.&lt;br /&gt;
&lt;br /&gt;
The SILK codec, as submitted by Skype to the IETF, was heavily modified as part of its integration within Opus. The modifications are significant enough that it is not possible to just write a &amp;quot;translator&amp;quot;. Even sharing code between Opus and the &amp;quot;old SILK&amp;quot; would be highly complex.&lt;br /&gt;
&lt;br /&gt;
=== Why not keep the SILK and CELT codecs separate? ===&lt;br /&gt;
Opus is more than just two independent codecs with a switch.&lt;br /&gt;
&lt;br /&gt;
In addition to a [https://en.wikipedia.org/wiki/Linear_predictive_coding Linear Prediction] &#039;&#039;&#039;SILK mode&#039;&#039;&#039; and an [https://en.wikipedia.org/wiki/Modified_discrete_cosine_transform MDCT] &#039;&#039;&#039;CELT mode&#039;&#039;&#039; it has a &#039;&#039;&#039;hybrid mode&#039;&#039;&#039;, where speech frequencies up to 8 kHz are encoded with LP while those between 8 and 20 kHz are encoded with MDCT. This is what allows Opus to have such high speech quality around 32 kbps.&lt;br /&gt;
&lt;br /&gt;
Another advantage of the integration is the ability to switch between these 3 modes seamlessly, without any audible &amp;quot;glitches&amp;quot; and without any out-of-band signalling.&lt;br /&gt;
&lt;br /&gt;
=== Now that Opus is standardized, will its development stop or can it be further improved? ===&lt;br /&gt;
Yes, Opus &#039;&#039;&#039;can&#039;&#039;&#039; and &#039;&#039;&#039;should&#039;&#039;&#039; be improved, because unlike most &#039;&#039;&#039;[https://en.wikipedia.org/wiki/ITU-T#Key_standards_published_by_ITU ITU-T codecs]&#039;&#039;&#039;, Opus is only defined in terms of its decoder.&lt;br /&gt;
&lt;br /&gt;
The encoder can keep evolving as long as the bitstream it produces can be decoded by the reference decoder. This is what made it possible for modern MP3 encoders (e.g. &#039;&#039;&#039;[https://en.wikipedia.org/wiki/LAME LAME]&#039;&#039;&#039;) to improve far beyond the original &#039;&#039;&#039;[https://en.wikipedia.org/wiki/L3enc L3enc]&#039;&#039;&#039; and &#039;&#039;&#039;dist10&#039;&#039;&#039; reference implementations.&lt;br /&gt;
&lt;br /&gt;
Although it is unlikely that Opus encoders will see such a spectacular evolution, we certainly hope that future encoders will become much better than the reference encoder.&lt;br /&gt;
&lt;br /&gt;
In fact, the 1.1 libopus release significantly improves on the reference encoder&#039;s quality. See &#039;&#039;&#039;[https://people.xiph.org/~xiphmont/demo/opus/demo3.shtml Monty&#039;s demo]&#039;&#039;&#039; for more details.&lt;br /&gt;
&lt;br /&gt;
=== Will all future Opus releases comply with the [https://tools.ietf.org/html/rfc6716 Opus specification]? ===&lt;br /&gt;
&lt;br /&gt;
Yes.&lt;br /&gt;
&lt;br /&gt;
=== In what ways is Opus optimized for the Internet? ===&lt;br /&gt;
&lt;br /&gt;
Opus has good packet loss robustness and concealment, but its optimisations go further.&lt;br /&gt;
&lt;br /&gt;
One of the first things we&#039;ve been asked when designing Opus was to make the rate &#039;&#039;&#039;really&#039;&#039;&#039; adaptable because we never know what kind of rates will be available. This not only meant having a wide range of bitrates, but also being able to vary in small increments.&lt;br /&gt;
&lt;br /&gt;
This is why Opus scales from about &#039;&#039;&#039;6 &#039;&#039;&#039; to &#039;&#039;&#039;512 kb/s&#039;&#039;&#039;, in increments of &#039;&#039;&#039;0.4 kb/s&#039;&#039;&#039; (one byte with 20 ms frames). Opus can have &#039;&#039;&#039;more than 1200 possible bitrates&#039;&#039;&#039; while spending only &#039;&#039;&#039;11 bits&#039;&#039;&#039; signalling the bitrate because UDP already encodes the packet size.&lt;br /&gt;
&lt;br /&gt;
One last aspect is that Opus is simple to transport over RTP, as can be seen from the [https://tools.ietf.org/html/rfc7587 Opus RTP payload format]. For example, it&#039;s possible to decode RTP packets without having even seen the SDP or any out-of-band signalling.&lt;br /&gt;
&lt;br /&gt;
=== What applications for Android can play Opus? ===&lt;br /&gt;
&lt;br /&gt;
Right now, there are just a few but that list is fast growing. Please reference [https://android.stackexchange.com/q/37970/7425 this question on android.stackexchange.com]. Feel free to suggest other applications.&lt;br /&gt;
&lt;br /&gt;
=== When will the next version be released? ===&lt;br /&gt;
&lt;br /&gt;
When it&#039;s done. Seriously, we do not know.&lt;br /&gt;
&lt;br /&gt;
Opus is not a large project with a fixed release schedule.&lt;br /&gt;
&lt;br /&gt;
That being said, our &#039;&#039;&#039;[https://www.opus-codec.org/downloads/ pre-releases]&#039;&#039;&#039; and even the git repositories (&#039;&#039;&#039;[https://git.xiph.org/?p=opus.git Xiph]&#039;&#039;&#039;, &#039;&#039;&#039;[https://github.com/xiph/opus GitHub]&#039;&#039;&#039;) are pretty stable and given proper testing (which you should always do anyway), are safe to distribute.&lt;br /&gt;
&lt;br /&gt;
Just be aware that the API of new features (that have never been included in a stable release) could potentially still change.&lt;br /&gt;
&lt;br /&gt;
== Software Developers&#039; Questions ==&lt;br /&gt;
&lt;br /&gt;
=== On what platforms does Opus run? ===&lt;br /&gt;
&lt;br /&gt;
The Opus code base is written in C89 and should run on the vast majority of recent (and not so recent) CPUs.&lt;br /&gt;
&lt;br /&gt;
Some of the platforms &#039;&#039;&#039;[https://mf4.xiph.org/jenkins/view/opus/ on which Opus has been tested]&#039;&#039;&#039; include x86, x86-64, ARM, Itanium, Blackfin, and SPARC.&lt;br /&gt;
&lt;br /&gt;
=== Is there a fixed-point implementation? ===&lt;br /&gt;
&lt;br /&gt;
Yes.&lt;br /&gt;
&lt;br /&gt;
The fixed-point and floating-point decoder and encoder implementations are part of the same code base.&lt;br /&gt;
&lt;br /&gt;
The code defaults to float, so you need to configure with &#039;&#039;&#039;--enable-fixed-point&#039;&#039;&#039; (or define &#039;&#039;&#039;FIXED_POINT&#039;&#039;&#039; if not using the configure script) to build the code for fixed-point.&lt;br /&gt;
&lt;br /&gt;
=== Which implementation should I use? ===&lt;br /&gt;
&lt;br /&gt;
While the implementation in RFC 6716 is what &#039;&#039;defines&#039;&#039; the standard, it is likely not the best and most up-to-date implementation.&lt;br /&gt;
&lt;br /&gt;
The [https://opus-codec.org/ Opus] website was set up for the purpose of continually improving the implementation — in terms of speed, encoding quality, device compatibility, etc — while still conforming to the standard.&lt;br /&gt;
&lt;br /&gt;
All Opus implementations are compatible by definition.&lt;br /&gt;
&lt;br /&gt;
=== How is supporting Opus different from supporting Speex/G.711/MP3? ===&lt;br /&gt;
&lt;br /&gt;
Opus has variable frame durations which can change on the fly, so an Opus decoder needs to be ready to accept packets with durations that are &#039;&#039;&#039;any multiple of 2.5ms&#039;&#039;&#039; up to a &#039;&#039;&#039;maximum of 120ms&#039;&#039;&#039;.  &lt;br /&gt;
&lt;br /&gt;
The opus encoder and decoder do not need to have matched sampling rates or channel counts.  It is recommended to always just decode at the highest rate the hardware supports (e.g. 48kHz stereo) so the user gets the full quality of whatever the far end is sending.&lt;br /&gt;
&lt;br /&gt;
=== My application doesn&#039;t work. Can anyone help me? ===&lt;br /&gt;
&lt;br /&gt;
It&#039;s possible to get help, but before doing so, there are a few basic things to try:&lt;br /&gt;
&lt;br /&gt;
* Implement your application with uncompressed audio instead of Opus. If it still doesn&#039;t work, then the problem isn&#039;t related to Opus.&lt;br /&gt;
* Read the [https://www.opus-codec.org/docs/ Opus documentation].&lt;br /&gt;
* Read the [https://git.xiph.org/?p=opus.git;a=blob;f=src/opus_demo.c opus_demo.c] source code to see how to use the encoder and decoder.&lt;br /&gt;
&lt;br /&gt;
If you still can&#039;t solve the problem, the best option is to ask for help on the [http://lists.xiph.org/mailman/listinfo/opus mailing list] or on the &#039;&#039;&#039;#opus&#039;&#039;&#039; IRC channel on &#039;&#039;&#039;irc.freenode.net&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== How do I report a bug? ===&lt;br /&gt;
&lt;br /&gt;
If you think you have found a bug in Opus (and not in your application), please [https://trac.xiph.org/newticket?component=Opus file a bug report].&lt;br /&gt;
&lt;br /&gt;
Please include a way for us to reproduce the problem. The best way to do this is to provide an input file, along with the opusenc/opusdec/opus_demo command line that causes the bug to occur.&lt;br /&gt;
&lt;br /&gt;
If the bug cannot be triggered by the command line tools, please provide a simple patch or C file that can help reproduce it. Please also provide any other relevant information, such as OS, CPU, build options, etc.&lt;br /&gt;
&lt;br /&gt;
Don&#039;t hesitate to also contact us on the [http://lists.xiph.org/mailman/listinfo/opus mailing list] or on [irc://irc.freenode.net/opus IRC].&lt;br /&gt;
&lt;br /&gt;
=== What is Opus Custom? ===&lt;br /&gt;
&lt;br /&gt;
Opus Custom is an &#039;&#039;&#039;optional&#039;&#039;&#039; part of the Opus standard that allows for sampling rates other than 8, 12, 16, 24, or 48 kHz and frame sizes other than multiples of 2.5 ms.&lt;br /&gt;
&lt;br /&gt;
Opus Custom requires additional out-of-band signalling that Opus does not normally require and disables many of Opus&#039; coding modes. Also, because it is an optional part of the specification, using Opus Custom may lead to compatibility problems.&lt;br /&gt;
&lt;br /&gt;
For these reasons, &#039;&#039;&#039;its use is discouraged&#039;&#039;&#039; outside of very specific applications. &lt;br /&gt;
&lt;br /&gt;
You may want to use Opus Custom for:&lt;br /&gt;
&lt;br /&gt;
* ultra-low-delay applications, where synchronization with the soundcard buffer is important. &lt;br /&gt;
* low-power embedded applications, where compatibility with others is not important.&lt;br /&gt;
&lt;br /&gt;
For almost all other types of applications, Opus Custom should not be used.&lt;br /&gt;
&lt;br /&gt;
=== How do I use 44.1 kHz or some other sampling rate not directly supported by Opus? ===&lt;br /&gt;
&lt;br /&gt;
Tools which read or write Opus should inter-operate with other sampling rates by transparently performing sample rate conversion behind the scenes whenever necessary. In particular, software developers should not use Opus Custom for 44.1 kHz support, except in the very specific circumstances outlined above.&lt;br /&gt;
&lt;br /&gt;
Note that it&#039;s generally preferable for a decoder to output at 48kHz, even when you know the original input was 44.1kHz. This is not only because you can skip resampling, but also because many cheaper audio interfaces have poor quality output for 44.1kHz.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;[https://opus-codec.org/downloads/ opus-tools]&#039;&#039;&#039; package source code contains a small, high quality, high performance, BSD licensed &#039;&#039;&#039;[https://github.com/xiph/opus-tools/blob/master/src/resample.c resampler]&#039;&#039;&#039; which can be used where resampling is required.&lt;br /&gt;
&lt;br /&gt;
=== But won&#039;t the resampler hurt the quality? Isn&#039;t it better to use 44.1 kHz directly? ===&lt;br /&gt;
&lt;br /&gt;
Not really. The quality degradation caused by any reasonable resampler (SoX, libspeexdsp, libsamplerate, ...) is far less than the distortion caused by the best lossy codec at its highest bitrate. If you can&#039;t tolerate the quality degradation caused by a good 44.1 ↔ 48 kHz resampler, then you shouldn&#039;t be using a lossy codec in the first place. Similarly, the extra CPU spent in the resampler is small compared to the rest of the codec. Not only that, but many soundcards only support 48 kHz on playback, so players can directly play the output rather than resample it to 48 kHz (e.g. for a 44.1 kHz MP3). So effectively, Opus is only shifting the burden of resampling from the decoder side to the encoder side.&lt;br /&gt;
&lt;br /&gt;
One advantage of supporting only one internal rate is that it makes it possible for Opus to support many features, including efficient speech compression (through SILK) and real-time applications. It also means all the quality tuning effort can be spent on a single configuration, which helps bring even better quality.&lt;br /&gt;
&lt;br /&gt;
=== How is the bitrate setting used in VBR mode? ===&lt;br /&gt;
&lt;br /&gt;
Variable bitrate (VBR) mode allows the bitrate to automatically vary over time based on the audio being encoded, in order to achieve a consistent quality.&lt;br /&gt;
&lt;br /&gt;
The bitrate setting controls the desired quality, on a scale that is calibrated to closely approximate the average bitrate that would be obtained over a large and diverse collection of audio.  The actual bitrate of any particular audio stream may be higher or lower than this average.&lt;br /&gt;
&lt;br /&gt;
=== What frame size should I use? ===&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;20ms&#039;&#039;&#039; frame size works well for most applications. Smaller frame sizes may be used to achieve lower latency, but have lower quality at a given bitrate.&lt;br /&gt;
&lt;br /&gt;
Sizes greater than 20 ms increase latency and are generally beneficial only at fairly low bitrates, or when used to reduce external overhead (e.g. by reducing the number of packets that are sent). For file encoding, using a frame size larger than 20 ms will usually result in &#039;&#039;&#039;worse&#039;&#039;&#039; quality for the same bitrate because it constrains the encoder in the decisions it can make.&lt;br /&gt;
&lt;br /&gt;
=== Forward Error correction (FEC) doesn&#039;t appear to do anything! HELP! ===&lt;br /&gt;
&lt;br /&gt;
The in-band FEC feature of Opus helps reduce the harm of packet loss by encoding some information about the prior packet.&lt;br /&gt;
&lt;br /&gt;
In order to make use of in-band FEC the decoder must delay its output by at least one frame so that it can call the decoder with the decode_fec argument on the &#039;&#039;next&#039;&#039; frame in order to reconstruct the missed frame. This works best if it&#039;s integrated with a jitter buffer.&lt;br /&gt;
&lt;br /&gt;
FEC is only used by the encoder under certain conditions:&lt;br /&gt;
* the feature must be enabled via the &#039;&#039;&#039;OPUS_SET_INBAND_FEC&#039;&#039;&#039; CTL&lt;br /&gt;
* the encoder must be told to expect loss via the &#039;&#039;&#039;OPUS_SET_PACKET_LOSS_PERC&#039;&#039;&#039; CTL&lt;br /&gt;
* the codec must be operated in any of the &#039;&#039;&#039;Linear Prediction&#039;&#039;&#039; or &#039;&#039;&#039;Hybrid&#039;&#039;&#039; modes&lt;br /&gt;
&lt;br /&gt;
Frame durations shorter than 10ms and very high bitrates will use the MDCT modes, where FEC is not available.&lt;br /&gt;
&lt;br /&gt;
Even when FEC is not used, telling the encoder about the expected level of loss will help it make more intelligent decisions. By default, the implementation assumes there is no loss.&lt;br /&gt;
&lt;br /&gt;
=== I can&#039;t use malloc or much stack on my embedded platform. How do I make Opus work? ===&lt;br /&gt;
&lt;br /&gt;
A normal build of libopus only uses &amp;lt;tt&amp;gt;malloc/free&amp;lt;/tt&amp;gt; in the &amp;lt;tt&amp;gt;_create()&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;_destroy()&amp;lt;/tt&amp;gt; calls, making it safe for realtime use as long as the codec state is pre-created.&lt;br /&gt;
&lt;br /&gt;
To build Opus without the references to &amp;lt;tt&amp;gt;malloc/free&amp;lt;/tt&amp;gt;, you must:&lt;br /&gt;
&lt;br /&gt;
* use &amp;lt;tt&amp;gt;init()&amp;lt;/tt&amp;gt; calls rather than &amp;lt;tt&amp;gt;create()&amp;lt;/tt&amp;gt; calls in your application&lt;br /&gt;
* compile with &amp;lt;tt&amp;gt;CFLAGS=&amp;quot;-DOVERRIDE_OPUS_ALLOC -DOVERRIDE_OPUS_FREE  -D&#039;opus_alloc(x)=NULL&#039; -D&#039;opus_free(x)=NULL&#039; &amp;quot;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If libopus is built with &amp;lt;tt&amp;gt;-DNONTHREADSAFE_PSEUDOSTACK&amp;lt;/tt&amp;gt; (instead of &amp;lt;tt&amp;gt;VAR_ARRAYS&amp;lt;/tt&amp;gt;, or &amp;lt;tt&amp;gt;USE_ALLOCA&amp;lt;/tt&amp;gt;), it will use a user-provided block of heap instead of stack for many things, resulting in much lower stack usage.&amp;lt;br&amp;gt;&lt;br /&gt;
This makes the resulting library &#039;&#039;&#039;non-threadsafe&#039;&#039;&#039; and is &#039;&#039;&#039;not recommended&#039;&#039;&#039; on anything except limited embedded platforms.&lt;br /&gt;
&lt;br /&gt;
=== How can I ensure that my software interoperates with other software implementing Opus? ===&lt;br /&gt;
&lt;br /&gt;
For applications using Ogg files, there are some [https://people.xiph.org/~greg/opus_testvectors/ Ogg Opus testvectors] to test decoders and you can test encoders with opusdec. For RTP applications, the opusrtp tool can be useful.&lt;br /&gt;
&lt;br /&gt;
In general, here&#039;s a list of specific issues to check:&lt;br /&gt;
* Can your application handle all frame sizes, including changing the frame size from frame to frame?&lt;br /&gt;
* Does your application react properly to lost packets, by calling the decoder with a NULL packet?&lt;br /&gt;
&lt;br /&gt;
=== What is the complexity of Opus? ===&lt;br /&gt;
&lt;br /&gt;
The complexity of Opus varies by a large amount based on the settings used.&lt;br /&gt;
&lt;br /&gt;
It depends on the mode, audio bandwidth, number of channels, and even a &amp;quot;complexity knob&amp;quot; that can trade complexity for quality. It will run easily on any recent PC or smartphone. &lt;br /&gt;
&lt;br /&gt;
For slower embedded CPUs/DSPs, the amount of CPU required will vary depending on the configuration and the exact CPU, so you will need to experiment. Do not expect Opus to run quickly on really slow devices like 8-bit micro-controllers.&lt;br /&gt;
&lt;br /&gt;
=== Opus is using too much CPU for my application. What can I do? ===&lt;br /&gt;
&lt;br /&gt;
First don&#039;t panic and don&#039;t start writing assembly just yet.&lt;br /&gt;
&lt;br /&gt;
It&#039;s possible that you&#039;re just not using the right set of options.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re targeting an embedded/mobile platform, chances are the fixed-point build will be faster, so make sure you&#039;re using &#039;&#039;&#039;--enable-fixed-point&#039;&#039;&#039; or defining &#039;&#039;&#039;FIXED_POINT&#039;&#039;&#039; in the build system.&lt;br /&gt;
&lt;br /&gt;
Opus also has a complexity option that can trade quality for complexity. The default is highest quality and highest complexity. You can control this using &#039;&#039;&#039;OPUS_SET_COMPLEXITY()&#039;&#039;&#039; (see the &#039;&#039;&#039;[https://www.opus-codec.org/docs/ Documentation]&#039;&#039;&#039; for details).&lt;br /&gt;
&lt;br /&gt;
If all else fails and you need to optimize the Opus code, see the next question.&lt;br /&gt;
&lt;br /&gt;
=== I would like to optimize/improve/help with Opus. Where should I start? ===&lt;br /&gt;
&lt;br /&gt;
Please &#039;&#039;&#039;[https://www.opus-codec.org/contact/ contact us]&#039;&#039;&#039; before you start, or at least before you get too far.&lt;br /&gt;
&lt;br /&gt;
This will help coordinate the efforts made on Opus and reduce the probability of wasting your time on duplicated effort or going down the wrong path. More details in the &#039;&#039;&#039;[[OpusContributing|contributing page]]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Does Opus have an echo canceller like Speex does? ===&lt;br /&gt;
&lt;br /&gt;
Echo cancellation is completely independent from codecs.&lt;br /&gt;
&lt;br /&gt;
You can use any echo canceller (including the one from libspeexdsp) along with Opus.&lt;br /&gt;
&lt;br /&gt;
That being said, among the free acoustic echo cancelers (AEC) we&#039;re aware of, the best is probably the Google AEC from the [https://code.google.com/p/webrtc/ WebRTC codebase].&lt;br /&gt;
&lt;br /&gt;
=== How do I get the duration of a .opus file? ===&lt;br /&gt;
&lt;br /&gt;
Use &#039;&#039;&#039;[https://mf4.xiph.org/jenkins/view/opus/job/opusfile-autotools/ws/doc/html/group__stream__info.html op_pcm_total()]&#039;&#039;&#039; from &#039;&#039;&#039;[https://opus-codec.org/downloads/ libopusfile]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If you want to implement this yourself, you need to&lt;br /&gt;
* Read the BOS (Beginning Of Stream) pages to enumerate the serial numbers of all concurrently multiplexed streams, identify the Opus stream you want, and get its preskip value.&lt;br /&gt;
* Read up through the first complete audio data page to compute the starting granule position (since the timestamps might not start at 0, e.g., if the file was captured from a live stream that was joined after the start).&lt;br /&gt;
* Seek near the end of a file and look for a page with the same serial number as found in the headers (just under 64 kB from the end should be sufficient to ensure you find a page, assuming the Opus data is not multiplexed with another stream and there is no trailing garbage in the file).&lt;br /&gt;
* If you find a page whose serial number was not included in the original set of BOS pages, you have a chained stream. You need to bisect the file to identify the end of the first chain and the start of the next, and repeat this process for each link in the chain.&lt;br /&gt;
* If you don&#039;t find any pages at all, or find a page whose serial number was included in the original set of BOS pages, but was not the serial number of the Opus stream you want, back up and try again (being careful to avoid rescanning the same data, which can produce quadratic worst-case complexity).&lt;br /&gt;
* If you find a page whose serial number matches the Opus stream you want, look at its final granule position, and compute the total duration (in seconds) as (final_granule_position - initial_granule_position - preskip)/48000.0.&lt;br /&gt;
&lt;br /&gt;
=== Why don&#039;t you store the duration in the header? Isn&#039;t all of that slow and complicated? ===&lt;br /&gt;
&lt;br /&gt;
Computing the duration directly from the file contents allows files to be written in a single pass, without any seeking, which is necessary for live streaming. Chaining also simplifies live streaming, as you can just pipe multiple files into the same network connection, with all associated metadata updates, etc., and the results are still valid .opus files (contrast with the &#039;&#039;&#039;[http://www.smackfu.com/stuff/programming/shoutcast.html hacks used to add metadata to MP3 streams]&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
Opening a typical .opus file, which is not multiplexed and not chained, and computing the duration over the network requires just one extra HTTP request, which can proceed in parallel with the buffering in the main request. This is the behavior you will get from libopusfile&#039;s HTTP backend by default.&lt;br /&gt;
&lt;br /&gt;
Enumeration of chain boundaries can be expensive in files with many links, but in our testing libopusfile used nearly an order of magnitude fewer seeks to do this than some other media frameworks (at the time). Storing a duration in a header wouldn&#039;t solve this, since every link in a chain has its own, independent headers. If the cost of chain enumeration is a problem, the best way to avoid it is to store the links in separate files (i.e., don&#039;t use chaining).&lt;br /&gt;
&lt;br /&gt;
=== How do I seek in a .opus file? ===&lt;br /&gt;
&lt;br /&gt;
Use &#039;&#039;&#039;[https://mf4.xiph.org/jenkins/view/opus/job/opusfile-autotools/ws/doc/html/group__stream__seeking.html op_pcm_seek() or op_raw_seek()]&#039;&#039;&#039; from &#039;&#039;&#039;[https://opus-codec.org/downloads/ libopusfile]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If you want to implement seeking yourself, you need to&lt;br /&gt;
* Identify the link that contains the target (if you have a chained file).&lt;br /&gt;
* Adjust the target by 80 ms to get enough pre-roll data (to ensure the decoder will have converged by the time you reach the target), as recommended by &#039;&#039;&#039;[https://tools.ietf.org/html/rfc7845 RFC 7845]&#039;&#039;&#039;.&lt;br /&gt;
* Estimate the location of the last audio data page with a completed packet prior to the adjusted target, using the duration and size (in bytes) of the link.&lt;br /&gt;
* Seek to that location and scan forward until you find an audio data page with a completed packet (that contains a valid granule position).&lt;br /&gt;
* If you think you are sufficiently close to the adjusted target, scan forward until you find the next audio data page with a completed packet.&lt;br /&gt;
* If the adjusted target lies between the first audio data page with a completed packet you found and the next one, stop. You can decode forward from here and start playing when you reach your (original, unadjusted) target.&lt;br /&gt;
* Otherwise, go back and re-estimate the seek location using the granule positions and file offsets of the page(s) you just found.&lt;br /&gt;
&lt;br /&gt;
libopusfile includes fallbacks to prevent pathological worst-case behavior when its guesses are repeatedly wrong. Weighted bisection can degrade to a linear scan, but libopusfile&#039;s worst case is within a constant factor of naive bisection (i.e., logarithmic). We have only ever observed such pathological behavior in files we manually constructed to trigger it.&lt;br /&gt;
&lt;br /&gt;
libopusfile also takes shortcuts when the target location is near the current position, to make small seeks cheaper. In the best case it can loop forever over very short files whose data is contained in a single page (e.g., less than 1 second long with default encoder settings) without any seeking at all.&lt;br /&gt;
&lt;br /&gt;
You can find more information on seeking in files that contain Opus multiplexed with other streams (e.g., video) &#039;&#039;&#039;[[GranulePosAndSeeking|on this page]]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Wouldn&#039;t it be better to build an index? ===&lt;br /&gt;
&lt;br /&gt;
As with file durations, an index at the beginning of the file is incompatible with live streaming. It also means more data has to be fetched before a file can start playing over the network, because you must read past the index even when you don&#039;t intend to seek. The index could be stored at the end (which even still allows encoding the file in a single pass), but this requires one (or more) extra seeks to read the index (especially if its exact location at the end is not known), either on file open or on first seek. Unlike the final timestamp, which is small and fixed in size, an index grows with the file duration, and can have unbounded size. It is also easy for an index to become out of sync with a file that has been edited or damaged, in which case seeking will simply fail. By contrast, you can seek in a truncated .opus download without issues.&lt;br /&gt;
&lt;br /&gt;
In practice, bisection seeking on VBR audio achieves performance that is very nearly as good as seeking with an index, without any of the drawbacks of an index. libopusfile provides a test program called seeking_example which can be used to benchmark the performance on your files.&lt;br /&gt;
&lt;br /&gt;
On a 96 kbps VBR file nearly one hour long (the second movement of Mahler&#039;s Symphony No. 8 &amp;quot;Symphony of a Thousand&amp;quot;):&lt;br /&gt;
&lt;br /&gt;
    Testing exact PCM seeking to random places in 169680000 samples (58m55.000s)...&lt;br /&gt;
    Total seek operations: 1020 (1.020 per exact seek, 2 maximum).&lt;br /&gt;
&lt;br /&gt;
On a chained file formed by concatenating the eight test vectors for the currently supported channel layouts in mapping family 1:&lt;br /&gt;
&lt;br /&gt;
    Opened file containing 8 links with 18 seeks (2.250 per link).&lt;br /&gt;
    Testing exact PCM seeking to random places in 2759064 samples (57.481s)...&lt;br /&gt;
    Total seek operations: 946 (0.946 per exact seek, 2 maximum).&lt;br /&gt;
&lt;br /&gt;
That is, the number of physical seeks required is almost always 1, every once in a while 2, and in short files, sometimes even 0.&lt;br /&gt;
&lt;br /&gt;
[[Category:Opus]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=OpusFAQ&amp;diff=16630</id>
		<title>OpusFAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=OpusFAQ&amp;diff=16630"/>
		<updated>2017-11-07T16:40:23Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* What programs support Opus? */ add context to &amp;quot;relatively new codec&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Opus logo trans.png]]&lt;br /&gt;
&lt;br /&gt;
If you are looking for info not covered in this FAQ, try the &#039;&#039;&#039;[https://opus-codec.org main Opus website]&#039;&#039;&#039; or the pages included in the &#039;&#039;&#039;[[:Category:Opus|Opus category]]&#039;&#039;&#039; of this wiki.&lt;br /&gt;
&lt;br /&gt;
== General Questions ==&lt;br /&gt;
&lt;br /&gt;
=== What is Opus? Who created it? ===&lt;br /&gt;
&lt;br /&gt;
Opus is a totally open, royalty-free, highly versatile audio codec.&lt;br /&gt;
&lt;br /&gt;
It is primarily designed for interactive speech and music transmission over the Internet, but is also applicable to storage and streaming applications. It incorporates technology from Skype&#039;s &#039;&#039;&#039;[https://en.wikipedia.org/wiki/SILK SILK]&#039;&#039;&#039; codec and Xiph.Org&#039;s &#039;&#039;&#039;[http://celt-codec.org/ CELT]&#039;&#039;&#039; codec. It has been standardized by the &#039;&#039;&#039;[https://www.ietf.org/ Internet Engineering Task Force]&#039;&#039;&#039; (IETF) as &#039;&#039;&#039;[https://tools.ietf.org/html/rfc6716 RFC 6716]&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Opus has been in development since early 2007. Programmers associated with &#039;&#039;&#039;[https://xiph.org/ Xiph.Org]&#039;&#039;&#039;, &#039;&#039;&#039;[https://www.skype.com/ Skype]&#039;&#039;&#039; and several other organizations have contributed to its development and to the standardization process as part of the &#039;&#039;&#039;[https://datatracker.ietf.org/wg/codec/charter/ IETF&#039;s Codec Working Group]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== How does Opus compare to other codecs? ===&lt;br /&gt;
&lt;br /&gt;
Opus is distinguished from most high quality formats (eg: [[Vorbis]], AAC, MP3) by having &#039;&#039;&#039;[https://tools.ietf.org/html/rfc6716#section-2 low delay]&#039;&#039;&#039; (5 ~ 66.5 ms) and distinguished from most low delay formats (eg: [[Speex]], G.711, GSM) by supporting &#039;&#039;&#039;[https://tools.ietf.org/html/rfc6716#section-2.1.1 high audio quality]&#039;&#039;&#039; (supports narrow-band all the way to full-band audio).&lt;br /&gt;
&lt;br /&gt;
It &#039;&#039;&#039;[https://opus-codec.org/comparison meets or exceeds existing codecs&#039; quality]&#039;&#039;&#039; across a wide range of bitrates, and it operates at lower delay than virtually any existing compressed format.&lt;br /&gt;
&lt;br /&gt;
Most importantly, the Opus format and its reference implementation are both available under &#039;&#039;&#039;[https://opus-codec.org/license/ liberal, royalty-free licenses]&#039;&#039;&#039;.&amp;lt;br /&amp;gt;&lt;br /&gt;
This makes it:&lt;br /&gt;
* easy to adopt&lt;br /&gt;
* compatible with free software&lt;br /&gt;
* suitable for use as part of the basic infrastructure of the Internet&lt;br /&gt;
&lt;br /&gt;
=== Does Opus make all those other lossy codecs obsolete? ===&lt;br /&gt;
&lt;br /&gt;
Yes.&lt;br /&gt;
&lt;br /&gt;
From a technical point of view (loss, delay, bitrates, ...) Opus renders &#039;&#039;&#039;[[Speex]]&#039;&#039;&#039; obsolete and should also replace &#039;&#039;&#039;[[Vorbis]]&#039;&#039;&#039; and the common proprietary codecs too (e.g. AAC, MP3, ...).&lt;br /&gt;
&lt;br /&gt;
=== Will Opus replace Vorbis in video files? ===&lt;br /&gt;
&lt;br /&gt;
For &#039;&#039;&#039;[[Ogg]]&#039;&#039;&#039; video files (which use the &#039;&#039;&#039;[[Theora]]&#039;&#039;&#039; video codec), you &#039;&#039;can&#039;&#039; use Opus instead of Vorbis, but the overall size reduction will be minimal and it will break compatibility with existing players.&lt;br /&gt;
&lt;br /&gt;
For WebM video files, the convention is to use the &#039;&#039;&#039;[http://www.webmproject.org/vp9/ VP9 video codec]&#039;&#039;&#039; when using Opus as an audio codec.&lt;br /&gt;
&lt;br /&gt;
=== How do I use Opus? ===&lt;br /&gt;
&lt;br /&gt;
For now, the best way to &#039;&#039;&#039;encode&#039;&#039;&#039; audio into Opus files is to use the &#039;&#039;&#039;opusenc&#039;&#039;&#039; command-line tool from the &#039;&#039;&#039;[https://opus-codec.org/downloads/ opus-tools package]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If you want to encode many files at once (e.g. your music library), try the applications listed in the &#039;&#039;&#039;[[OpusSupport|Opus Support]]&#039;&#039;&#039; page.&lt;br /&gt;
&lt;br /&gt;
For rough guidelines on encoding settings, see the &#039;&#039;&#039;[[Opus Recommended Settings]]&#039;&#039;&#039; page.&lt;br /&gt;
&lt;br /&gt;
=== What programs support Opus? ===&lt;br /&gt;
&lt;br /&gt;
Opus decoding support is now included in &#039;&#039;&#039;[http://caniuse.com/opus some Internet browsers]&#039;&#039;&#039; and &#039;&#039;&#039;[[OpusSupport|many applications]]&#039;&#039;&#039;, including &#039;&#039;&#039;[https://www.mozilla.org/firefox Firefox]&#039;&#039;&#039;, &#039;&#039;&#039;[https://www.foobar2000.org/ foobar2000]&#039;&#039;&#039; and &#039;&#039;&#039;[https://www.videolan.org/vlc/ VLC]&#039;&#039;&#039;, as well as in frameworks such as &#039;&#039;&#039;[https://gstreamer.freedesktop.org/ GStreamer]&#039;&#039;&#039; and &#039;&#039;&#039;[https://ffmpeg.org/ FFmpeg]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
For real-time applications, Opus support is available in &#039;&#039;&#039;[https://www.webrtc.org/ Google&#039;s WebRTC codebase]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Opus is a relatively new codec (standardized in September 2012), but &#039;&#039;&#039;[[OpusSupport|many more applications]]&#039;&#039;&#039; will support it in the near future.&lt;br /&gt;
&lt;br /&gt;
=== Does Opus support higher sampling rates, such as 96 kHz or 192 kHz? ===&lt;br /&gt;
&lt;br /&gt;
Yes and no.&lt;br /&gt;
&lt;br /&gt;
Opus encoding tools like opusenc will happily encode input files that are sampled at 96 or 192 kHz.&lt;br /&gt;
&lt;br /&gt;
However, files at these rates are internally &#039;&#039;&#039;converted to 48 kHz&#039;&#039;&#039; and then only frequencies &#039;&#039;&#039;up to 20 kHz&#039;&#039;&#039; are encoded.&lt;br /&gt;
&lt;br /&gt;
The reason is simple: lossy codecs are designed to preserve audible details while discarding irrelevant information. Since the human ear can only hear up to 20 kHz at best (usually lower than that), frequency content above 20 kHz is the first thing to go.&lt;br /&gt;
&lt;br /&gt;
See Monty&#039;s &#039;&#039;&#039;[https://people.xiph.org/~xiphmont/demo/neil-young.html article]&#039;&#039;&#039; for more details.&lt;br /&gt;
&lt;br /&gt;
If you want a codec to handle higher sampling rates losslessly, use &#039;&#039;&#039;[[FLAC]]&#039;&#039;&#039;!&lt;br /&gt;
&lt;br /&gt;
=== What are the licensing requirements? ===&lt;br /&gt;
&lt;br /&gt;
The reference Opus source code is released under a three-clause BSD license, which is a very permissive Open Source license. Commercial use and distribution (including in proprietary software) is permitted, provided that some basic conditions specified in the license are met. &lt;br /&gt;
&lt;br /&gt;
Opus is also covered by some patents, for which royalty-free usage rights are granted, under conditions that the authors believe are compatible with (hopefully) all open source licenses, including the GPL (v2 and v3).&lt;br /&gt;
&lt;br /&gt;
See the &#039;&#039;&#039;[https://www.opus-codec.org/license/ Opus Licensing]&#039;&#039;&#039; page for details.&lt;br /&gt;
&lt;br /&gt;
=== Why make Opus free? ===&lt;br /&gt;
&lt;br /&gt;
On the Internet, protocol and codec standards are part of the common infrastructure everyone builds upon.&lt;br /&gt;
&lt;br /&gt;
Most of the value of a high-quality standard is the innovation and inter-operation provided by the systems built on top of it. When a few parties have monopoly rights to monetize a standard, that infrastructure stops being so common and everyone else has more reason to use their own solution instead, increasing cost and reducing efficiency.&lt;br /&gt;
&lt;br /&gt;
Imagine a road system where each type of car could only drive on its own manufacturer&#039;s pavement. We all benefit from living in a world where all the roads are connected.&lt;br /&gt;
&lt;br /&gt;
This is why Opus, unlike many codecs, is free.&lt;br /&gt;
&lt;br /&gt;
=== Is the SILK part of Opus compatible with the SILK implementation shipped in Skype? ===&lt;br /&gt;
&lt;br /&gt;
No.&lt;br /&gt;
&lt;br /&gt;
The SILK codec, as submitted by Skype to the IETF, was heavily modified as part of its integration within Opus. The modifications are significant enough that it is not possible to just write a &amp;quot;translator&amp;quot;. Even sharing code between Opus and the &amp;quot;old SILK&amp;quot; would be highly complex.&lt;br /&gt;
&lt;br /&gt;
=== Why not keep the SILK and CELT codecs separate? ===&lt;br /&gt;
Opus is more than just two independent codecs with a switch.&lt;br /&gt;
&lt;br /&gt;
In addition to a [https://en.wikipedia.org/wiki/Linear_predictive_coding Linear Prediction] &#039;&#039;&#039;SILK mode&#039;&#039;&#039; and an [https://en.wikipedia.org/wiki/Modified_discrete_cosine_transform MDCT] &#039;&#039;&#039;CELT mode&#039;&#039;&#039; it has a &#039;&#039;&#039;hybrid mode&#039;&#039;&#039;, where speech frequencies up to 8 kHz are encoded with LP while those between 8 and 20 kHz are encoded with MDCT. This is what allows Opus to have such high speech quality around 32 kbps.&lt;br /&gt;
&lt;br /&gt;
Another advantage of the integration is the ability to switch between these 3 modes seamlessly, without any audible &amp;quot;glitches&amp;quot; and without any out-of-band signalling.&lt;br /&gt;
&lt;br /&gt;
=== Now that Opus is standardized, will its development stop or can it be further improved? ===&lt;br /&gt;
Yes, Opus &#039;&#039;&#039;can&#039;&#039;&#039; and &#039;&#039;&#039;should&#039;&#039;&#039; be improved, because unlike most &#039;&#039;&#039;[https://en.wikipedia.org/wiki/ITU-T#Key_standards_published_by_ITU ITU-T codecs]&#039;&#039;&#039;, Opus is only defined in terms of its decoder.&lt;br /&gt;
&lt;br /&gt;
The encoder can keep evolving as long as the bitstream it produces can be decoded by the reference decoder. This is what made it possible for modern MP3 encoders (e.g. &#039;&#039;&#039;[https://en.wikipedia.org/wiki/LAME LAME]&#039;&#039;&#039;) to improve far beyond the original &#039;&#039;&#039;[https://en.wikipedia.org/wiki/L3enc L3enc]&#039;&#039;&#039; and &#039;&#039;&#039;dist10&#039;&#039;&#039; reference implementations.&lt;br /&gt;
&lt;br /&gt;
Although it is unlikely that Opus encoders will see such a spectacular evolution, we certainly hope that future encoders will become much better than the reference encoder.&lt;br /&gt;
&lt;br /&gt;
In fact, the 1.1 libopus release significantly improves on the reference encoder&#039;s quality. See &#039;&#039;&#039;[https://people.xiph.org/~xiphmont/demo/opus/demo3.shtml Monty&#039;s demo]&#039;&#039;&#039; for more details.&lt;br /&gt;
&lt;br /&gt;
=== Will all future Opus releases comply with the [https://tools.ietf.org/html/rfc6716 Opus specification]? ===&lt;br /&gt;
&lt;br /&gt;
Yes.&lt;br /&gt;
&lt;br /&gt;
=== In what ways is Opus optimized for the Internet? ===&lt;br /&gt;
&lt;br /&gt;
Opus has good packet loss robustness and concealment, but its optimisations go further.&lt;br /&gt;
&lt;br /&gt;
One of the first things we&#039;ve been asked when designing Opus was to make the rate &#039;&#039;&#039;really&#039;&#039;&#039; adaptable because we never know what kind of rates will be available. This not only meant having a wide range of bitrates, but also being able to vary in small increments.&lt;br /&gt;
&lt;br /&gt;
This is why Opus scales from about &#039;&#039;&#039;6 &#039;&#039;&#039; to &#039;&#039;&#039;512 kb/s&#039;&#039;&#039;, in increments of &#039;&#039;&#039;0.4 kb/s&#039;&#039;&#039; (one byte with 20 ms frames). Opus can have &#039;&#039;&#039;more than 1200 possible bitrates&#039;&#039;&#039; while spending only &#039;&#039;&#039;11 bits&#039;&#039;&#039; signalling the bitrate because UDP already encodes the packet size.&lt;br /&gt;
&lt;br /&gt;
One last aspect is that Opus is simple to transport over RTP, as can be seen from the [https://tools.ietf.org/html/rfc7587 Opus RTP payload format]. For example, it&#039;s possible to decode RTP packets without having even seen the SDP or any out-of-band signalling.&lt;br /&gt;
&lt;br /&gt;
=== What applications for Android can play Opus? ===&lt;br /&gt;
&lt;br /&gt;
Right now, there are just a few but that list is fast growing. Please reference [https://android.stackexchange.com/q/37970/7425 this question on android.stackexchange.com]. Feel free to suggest other applications.&lt;br /&gt;
&lt;br /&gt;
=== When will the next version be released? ===&lt;br /&gt;
&lt;br /&gt;
When it&#039;s done. Seriously, we do not know.&lt;br /&gt;
&lt;br /&gt;
Opus is not a large project with a fixed release schedule.&lt;br /&gt;
&lt;br /&gt;
That being said, our &#039;&#039;&#039;[https://www.opus-codec.org/downloads/ pre-releases]&#039;&#039;&#039; and even the git repositories (&#039;&#039;&#039;[https://git.xiph.org/?p=opus.git Xiph]&#039;&#039;&#039;, &#039;&#039;&#039;[https://github.com/xiph/opus GitHub]&#039;&#039;&#039;) are pretty stable and given proper testing (which you should always do anyway), are safe to distribute.&lt;br /&gt;
&lt;br /&gt;
Just be aware that the API of new features (that have never been included in a stable release) could potentially still change.&lt;br /&gt;
&lt;br /&gt;
== Software Developers&#039; Questions ==&lt;br /&gt;
&lt;br /&gt;
=== On what platforms does Opus run? ===&lt;br /&gt;
&lt;br /&gt;
The Opus code base is written in C89 and should run on the vast majority of recent (and not so recent) CPUs.&lt;br /&gt;
&lt;br /&gt;
Some of the platforms &#039;&#039;&#039;[https://mf4.xiph.org/jenkins/view/opus/ on which Opus has been tested]&#039;&#039;&#039; include x86, x86-64, ARM, Itanium, Blackfin, and SPARC.&lt;br /&gt;
&lt;br /&gt;
=== Is there a fixed-point implementation? ===&lt;br /&gt;
&lt;br /&gt;
Yes.&lt;br /&gt;
&lt;br /&gt;
The fixed-point and floating-point decoder and encoder implementations are part of the same code base.&lt;br /&gt;
&lt;br /&gt;
The code defaults to float, so you need to configure with &#039;&#039;&#039;--enable-fixed-point&#039;&#039;&#039; (or define &#039;&#039;&#039;FIXED_POINT&#039;&#039;&#039; if not using the configure script) to build the code for fixed-point.&lt;br /&gt;
&lt;br /&gt;
=== Which implementation should I use? ===&lt;br /&gt;
&lt;br /&gt;
While the implementation in RFC 6716 is what &#039;&#039;defines&#039;&#039; the standard, it is likely not the best and most up-to-date implementation.&lt;br /&gt;
&lt;br /&gt;
The [https://opus-codec.org/ Opus] website was set up for the purpose of continually improving the implementation — in terms of speed, encoding quality, device compatibility, etc — while still conforming to the standard.&lt;br /&gt;
&lt;br /&gt;
All Opus implementations are compatible by definition.&lt;br /&gt;
&lt;br /&gt;
=== How is supporting Opus different from supporting Speex/G.711/MP3? ===&lt;br /&gt;
&lt;br /&gt;
Opus has variable frame durations which can change on the fly, so an Opus decoder needs to be ready to accept packets with durations that are &#039;&#039;&#039;any multiple of 2.5ms&#039;&#039;&#039; up to a &#039;&#039;&#039;maximum of 120ms&#039;&#039;&#039;.  &lt;br /&gt;
&lt;br /&gt;
The opus encoder and decoder do not need to have matched sampling rates or channel counts.  It is recommended to always just decode at the highest rate the hardware supports (e.g. 48kHz stereo) so the user gets the full quality of whatever the far end is sending.&lt;br /&gt;
&lt;br /&gt;
=== My application doesn&#039;t work. Can anyone help me? ===&lt;br /&gt;
&lt;br /&gt;
It&#039;s possible to get help, but before doing so, there are a few basic things to try:&lt;br /&gt;
&lt;br /&gt;
* Implement your application with uncompressed audio instead of Opus. If it still doesn&#039;t work, then the problem isn&#039;t related to Opus.&lt;br /&gt;
* Read the [https://www.opus-codec.org/docs/ Opus documentation].&lt;br /&gt;
* Read the [https://git.xiph.org/?p=opus.git;a=blob;f=src/opus_demo.c opus_demo.c] source code to see how to use the encoder and decoder.&lt;br /&gt;
&lt;br /&gt;
If you still can&#039;t solve the problem, the best option is to ask for help on the [http://lists.xiph.org/mailman/listinfo/opus mailing list] or on the &#039;&#039;&#039;#opus&#039;&#039;&#039; IRC channel on &#039;&#039;&#039;irc.freenode.net&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== How do I report a bug? ===&lt;br /&gt;
&lt;br /&gt;
If you think you have found a bug in Opus (and not in your application), please [https://trac.xiph.org/newticket?component=Opus file a bug report].&lt;br /&gt;
&lt;br /&gt;
Please include a way for us to reproduce the problem. The best way to do this is to provide an input file, along with the opusenc/opusdec/opus_demo command line that causes the bug to occur.&lt;br /&gt;
&lt;br /&gt;
If the bug cannot be triggered by the command line tools, please provide a simple patch or C file that can help reproduce it. Please also provide any other relevant information, such as OS, CPU, build options, etc.&lt;br /&gt;
&lt;br /&gt;
Don&#039;t hesitate to also contact us on the [http://lists.xiph.org/mailman/listinfo/opus mailing list] or on [irc://irc.freenode.net/opus IRC].&lt;br /&gt;
&lt;br /&gt;
=== What is Opus Custom? ===&lt;br /&gt;
&lt;br /&gt;
Opus Custom is an &#039;&#039;&#039;optional&#039;&#039;&#039; part of the Opus standard that allows for sampling rates other than 8, 12, 16, 24, or 48 kHz and frame sizes other than multiples of 2.5 ms.&lt;br /&gt;
&lt;br /&gt;
Opus Custom requires additional out-of-band signalling that Opus does not normally require and disables many of Opus&#039; coding modes. Also, because it is an optional part of the specification, using Opus Custom may lead to compatibility problems.&lt;br /&gt;
&lt;br /&gt;
For these reasons, &#039;&#039;&#039;its use is discouraged&#039;&#039;&#039; outside of very specific applications. &lt;br /&gt;
&lt;br /&gt;
You may want to use Opus Custom for:&lt;br /&gt;
&lt;br /&gt;
* ultra-low-delay applications, where synchronization with the soundcard buffer is important. &lt;br /&gt;
* low-power embedded applications, where compatibility with others is not important.&lt;br /&gt;
&lt;br /&gt;
For almost all other types of applications, Opus Custom should not be used.&lt;br /&gt;
&lt;br /&gt;
=== How do I use 44.1 kHz or some other sampling rate not directly supported by Opus? ===&lt;br /&gt;
&lt;br /&gt;
Tools which read or write Opus should inter-operate with other sampling rates by transparently performing sample rate conversion behind the scenes whenever necessary. In particular, software developers should not use Opus Custom for 44.1 kHz support, except in the very specific circumstances outlined above.&lt;br /&gt;
&lt;br /&gt;
Note that it&#039;s generally preferable for a decoder to output at 48kHz, even when you know the original input was 44.1kHz. This is not only because you can skip resampling, but also because many cheaper audio interfaces have poor quality output for 44.1kHz.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;[https://opus-codec.org/downloads/ opus-tools]&#039;&#039;&#039; package source code contains a small, high quality, high performance, BSD licensed &#039;&#039;&#039;[https://github.com/xiph/opus-tools/blob/master/src/resample.c resampler]&#039;&#039;&#039; which can be used where resampling is required.&lt;br /&gt;
&lt;br /&gt;
=== But won&#039;t the resampler hurt the quality? Isn&#039;t it better to use 44.1 kHz directly? ===&lt;br /&gt;
&lt;br /&gt;
Not really. The quality degradation caused by any reasonable resampler (SoX, libspeexdsp, libsamplerate, ...) is far less than the distortion caused by the best lossy codec at its highest bitrate. If you can&#039;t tolerate the quality degradation caused by a good 44.1 ↔ 48 kHz resampler, then you shouldn&#039;t be using a lossy codec in the first place. Similarly, the extra CPU spent in the resampler is small compared to the rest of the codec. Not only that, but many soundcards only support 48 kHz on playback, so players can directly play the output rather than resample it to 48 kHz (e.g. for a 44.1 kHz MP3). So effectively, Opus is only shifting the burden of resampling from the decoder side to the encoder side.&lt;br /&gt;
&lt;br /&gt;
One advantage of supporting only one internal rate is that it makes it possible for Opus to support many features, including efficient speech compression (through SILK) and real-time applications. It also means all the quality tuning effort can be spent on a single configuration, which helps bring even better quality.&lt;br /&gt;
&lt;br /&gt;
=== How is the bitrate setting used in VBR mode? ===&lt;br /&gt;
&lt;br /&gt;
Variable bitrate (VBR) mode allows the bitrate to automatically vary over time based on the audio being encoded, in order to achieve a consistent quality.&lt;br /&gt;
&lt;br /&gt;
The bitrate setting controls the desired quality, on a scale that is calibrated to closely approximate the average bitrate that would be obtained over a large and diverse collection of audio.  The actual bitrate of any particular audio stream may be higher or lower than this average.&lt;br /&gt;
&lt;br /&gt;
=== What frame size should I use? ===&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;20ms&#039;&#039;&#039; frame size works well for most applications. Smaller frame sizes may be used to achieve lower latency, but have lower quality at a given bitrate.&lt;br /&gt;
&lt;br /&gt;
Sizes greater than 20 ms increase latency and are generally beneficial only at fairly low bitrates, or when used to reduce external overhead (e.g. by reducing the number of packets that are sent). For file encoding, using a frame size larger than 20 ms will usually result in &#039;&#039;&#039;worse&#039;&#039;&#039; quality for the same bitrate because it constrains the encoder in the decisions it can make.&lt;br /&gt;
&lt;br /&gt;
=== Forward Error correction (FEC) doesn&#039;t appear to do anything! HELP! ===&lt;br /&gt;
&lt;br /&gt;
The in-band FEC feature of Opus helps reduce the harm of packet loss by encoding some information about the prior packet.&lt;br /&gt;
&lt;br /&gt;
In order to make use of in-band FEC the decoder must delay its output by at least one frame so that it can call the decoder with the decode_fec argument on the &#039;&#039;next&#039;&#039; frame in order to reconstruct the missed frame. This works best if it&#039;s integrated with a jitter buffer.&lt;br /&gt;
&lt;br /&gt;
FEC is only used by the encoder under certain conditions:&lt;br /&gt;
* the feature must be enabled via the &#039;&#039;&#039;OPUS_SET_INBAND_FEC&#039;&#039;&#039; CTL&lt;br /&gt;
* the encoder must be told to expect loss via the &#039;&#039;&#039;OPUS_SET_PACKET_LOSS_PERC&#039;&#039;&#039; CTL&lt;br /&gt;
* the codec must be operated in any of the &#039;&#039;&#039;Linear Prediction&#039;&#039;&#039; or &#039;&#039;&#039;Hybrid&#039;&#039;&#039; modes&lt;br /&gt;
&lt;br /&gt;
Frame durations shorter than 10ms and very high bitrates will use the MDCT modes, where FEC is not available.&lt;br /&gt;
&lt;br /&gt;
Even when FEC is not used, telling the encoder about the expected level of loss will help it make more intelligent decisions. By default, the implementation assumes there is no loss.&lt;br /&gt;
&lt;br /&gt;
=== I can&#039;t use malloc or much stack on my embedded platform. How do I make Opus work? ===&lt;br /&gt;
&lt;br /&gt;
A normal build of libopus only uses &amp;lt;tt&amp;gt;malloc/free&amp;lt;/tt&amp;gt; in the &amp;lt;tt&amp;gt;_create()&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;_destroy()&amp;lt;/tt&amp;gt; calls, making it safe for realtime use as long as the codec state is pre-created.&lt;br /&gt;
&lt;br /&gt;
To build Opus without the references to &amp;lt;tt&amp;gt;malloc/free&amp;lt;/tt&amp;gt;, you must:&lt;br /&gt;
&lt;br /&gt;
* use &amp;lt;tt&amp;gt;init()&amp;lt;/tt&amp;gt; calls rather than &amp;lt;tt&amp;gt;create()&amp;lt;/tt&amp;gt; calls in your application&lt;br /&gt;
* compile with &amp;lt;tt&amp;gt;CFLAGS=&amp;quot;-DOVERRIDE_OPUS_ALLOC -DOVERRIDE_OPUS_FREE  -D&#039;opus_alloc(x)=NULL&#039; -D&#039;opus_free(x)=NULL&#039; &amp;quot;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If libopus is built with &amp;lt;tt&amp;gt;-DNONTHREADSAFE_PSEUDOSTACK&amp;lt;/tt&amp;gt; (instead of &amp;lt;tt&amp;gt;VAR_ARRAYS&amp;lt;/tt&amp;gt;, or &amp;lt;tt&amp;gt;USE_ALLOCA&amp;lt;/tt&amp;gt;), it will use a user-provided block of heap instead of stack for many things, resulting in much lower stack usage.&amp;lt;br&amp;gt;&lt;br /&gt;
This makes the resulting library &#039;&#039;&#039;non-threadsafe&#039;&#039;&#039; and is &#039;&#039;&#039;not recommended&#039;&#039;&#039; on anything except limited embedded platforms.&lt;br /&gt;
&lt;br /&gt;
=== How can I ensure that my software interoperates with other software implementing Opus? ===&lt;br /&gt;
&lt;br /&gt;
For applications using Ogg files, there are some [https://people.xiph.org/~greg/opus_testvectors/ Ogg Opus testvectors] to test decoders and you can test encoders with opusdec. For RTP applications, the opusrtp tool can be useful.&lt;br /&gt;
&lt;br /&gt;
In general, here&#039;s a list of specific issues to check:&lt;br /&gt;
* Can your application handle all frame sizes, including changing the frame size from frame to frame?&lt;br /&gt;
* Does your application react properly to lost packets, by calling the decoder with a NULL packet?&lt;br /&gt;
&lt;br /&gt;
=== What is the complexity of Opus? ===&lt;br /&gt;
&lt;br /&gt;
The complexity of Opus varies by a large amount based on the settings used.&lt;br /&gt;
&lt;br /&gt;
It depends on the mode, audio bandwidth, number of channels, and even a &amp;quot;complexity knob&amp;quot; that can trade complexity for quality. It will run easily on any recent PC or smartphone. &lt;br /&gt;
&lt;br /&gt;
For slower embedded CPUs/DSPs, the amount of CPU required will vary depending on the configuration and the exact CPU, so you will need to experiment. Do not expect Opus to run quickly on really slow devices like 8-bit micro-controllers.&lt;br /&gt;
&lt;br /&gt;
=== Opus is using too much CPU for my application. What can I do? ===&lt;br /&gt;
&lt;br /&gt;
First don&#039;t panic and don&#039;t start writing assembly just yet.&lt;br /&gt;
&lt;br /&gt;
It&#039;s possible that you&#039;re just not using the right set of options.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re targeting an embedded/mobile platform, chances are the fixed-point build will be faster, so make sure you&#039;re using &#039;&#039;&#039;--enable-fixed-point&#039;&#039;&#039; or defining &#039;&#039;&#039;FIXED_POINT&#039;&#039;&#039; in the build system.&lt;br /&gt;
&lt;br /&gt;
Opus also has a complexity option that can trade quality for complexity. The default is highest quality and highest complexity. You can control this using &#039;&#039;&#039;OPUS_SET_COMPLEXITY()&#039;&#039;&#039; (see the &#039;&#039;&#039;[https://www.opus-codec.org/docs/ Documentation]&#039;&#039;&#039; for details).&lt;br /&gt;
&lt;br /&gt;
If all else fails and you need to optimize the Opus code, see the next question.&lt;br /&gt;
&lt;br /&gt;
=== I would like to optimize/improve/help with Opus. Where should I start? ===&lt;br /&gt;
&lt;br /&gt;
Please &#039;&#039;&#039;[https://www.opus-codec.org/contact/ contact us]&#039;&#039;&#039; before you start, or at least before you get too far.&lt;br /&gt;
&lt;br /&gt;
This will help coordinate the efforts made on Opus and reduce the probability of wasting your time on duplicated effort or going down the wrong path. More details in the &#039;&#039;&#039;[[OpusContributing|contributing page]]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Does Opus have an echo canceller like Speex does? ===&lt;br /&gt;
&lt;br /&gt;
Echo cancellation is completely independent from codecs.&lt;br /&gt;
&lt;br /&gt;
You can use any echo canceller (including the one from libspeexdsp) along with Opus.&lt;br /&gt;
&lt;br /&gt;
That being said, among the free acoustic echo cancelers (AEC) we&#039;re aware of, the best is probably the Google AEC from the [https://code.google.com/p/webrtc/ WebRTC codebase].&lt;br /&gt;
&lt;br /&gt;
=== How do I get the duration of a .opus file? ===&lt;br /&gt;
&lt;br /&gt;
Use &#039;&#039;&#039;[https://mf4.xiph.org/jenkins/view/opus/job/opusfile-autotools/ws/doc/html/group__stream__info.html op_pcm_total()]&#039;&#039;&#039; from &#039;&#039;&#039;[https://opus-codec.org/downloads/ libopusfile]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If you want to implement this yourself, you need to&lt;br /&gt;
* Read the BOS (Beginning Of Stream) pages to enumerate the serial numbers of all concurrently multiplexed streams, identify the Opus stream you want, and get its preskip value.&lt;br /&gt;
* Read up through the first complete audio data page to compute the starting granule position (since the timestamps might not start at 0, e.g., if the file was captured from a live stream that was joined after the start).&lt;br /&gt;
* Seek near the end of a file and look for a page with the same serial number as found in the headers (just under 64 kB from the end should be sufficient to ensure you find a page, assuming the Opus data is not multiplexed with another stream and there is no trailing garbage in the file).&lt;br /&gt;
* If you find a page whose serial number was not included in the original set of BOS pages, you have a chained stream. You need to bisect the file to identify the end of the first chain and the start of the next, and repeat this process for each link in the chain.&lt;br /&gt;
* If you don&#039;t find any pages at all, or find a page whose serial number was included in the original set of BOS pages, but was not the serial number of the Opus stream you want, back up and try again (being careful to avoid rescanning the same data, which can produce quadratic worst-case complexity).&lt;br /&gt;
* If you find a page whose serial number matches the Opus stream you want, look at its final granule position, and compute the total duration (in seconds) as (final_granule_position - initial_granule_position - preskip)/48000.0.&lt;br /&gt;
&lt;br /&gt;
=== Why don&#039;t you store the duration in the header? Isn&#039;t all of that slow and complicated? ===&lt;br /&gt;
&lt;br /&gt;
Computing the duration directly from the file contents allows files to be written in a single pass, without any seeking, which is necessary for live streaming. Chaining also simplifies live streaming, as you can just pipe multiple files into the same network connection, with all associated metadata updates, etc., and the results are still valid .opus files (contrast with the &#039;&#039;&#039;[http://www.smackfu.com/stuff/programming/shoutcast.html hacks used to add metadata to MP3 streams]&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
Opening a typical .opus file, which is not multiplexed and not chained, and computing the duration over the network requires just one extra HTTP request, which can proceed in parallel with the buffering in the main request. This is the behavior you will get from libopusfile&#039;s HTTP backend by default.&lt;br /&gt;
&lt;br /&gt;
Enumeration of chain boundaries can be expensive in files with many links, but in our testing libopusfile used nearly an order of magnitude fewer seeks to do this than some other media frameworks (at the time). Storing a duration in a header wouldn&#039;t solve this, since every link in a chain has its own, independent headers. If the cost of chain enumeration is a problem, the best way to avoid it is to store the links in separate files (i.e., don&#039;t use chaining).&lt;br /&gt;
&lt;br /&gt;
=== How do I seek in a .opus file? ===&lt;br /&gt;
&lt;br /&gt;
Use &#039;&#039;&#039;[https://mf4.xiph.org/jenkins/view/opus/job/opusfile-autotools/ws/doc/html/group__stream__seeking.html op_pcm_seek() or op_raw_seek()]&#039;&#039;&#039; from &#039;&#039;&#039;[https://opus-codec.org/downloads/ libopusfile]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If you want to implement seeking yourself, you need to&lt;br /&gt;
* Identify the link that contains the target (if you have a chained file).&lt;br /&gt;
* Adjust the target by 80 ms to get enough pre-roll data (to ensure the decoder will have converged by the time you reach the target), as recommended by &#039;&#039;&#039;[https://tools.ietf.org/html/rfc7845 RFC 7845]&#039;&#039;&#039;.&lt;br /&gt;
* Estimate the location of the last audio data page with a completed packet prior to the adjusted target, using the duration and size (in bytes) of the link.&lt;br /&gt;
* Seek to that location and scan forward until you find an audio data page with a completed packet (that contains a valid granule position).&lt;br /&gt;
* If you think you are sufficiently close to the adjusted target, scan forward until you find the next audio data page with a completed packet.&lt;br /&gt;
* If the adjusted target lies between the first audio data page with a completed packet you found and the next one, stop. You can decode forward from here and start playing when you reach your (original, unadjusted) target.&lt;br /&gt;
* Otherwise, go back and re-estimate the seek location using the granule positions and file offsets of the page(s) you just found.&lt;br /&gt;
&lt;br /&gt;
libopusfile includes fallbacks to prevent pathological worst-case behavior when its guesses are repeatedly wrong. Weighted bisection can degrade to a linear scan, but libopusfile&#039;s worst case is within a constant factor of naive bisection (i.e., logarithmic). We have only ever observed such pathological behavior in files we manually constructed to trigger it.&lt;br /&gt;
&lt;br /&gt;
libopusfile also takes shortcuts when the target location is near the current position, to make small seeks cheaper. In the best case it can loop forever over very short files whose data is contained in a single page (e.g., less than 1 second long with default encoder settings) without any seeking at all.&lt;br /&gt;
&lt;br /&gt;
You can find more information on seeking in files that contain Opus multiplexed with other streams (e.g., video) &#039;&#039;&#039;[[GranulePosAndSeeking|on this page]]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Wouldn&#039;t it be better to build an index? ===&lt;br /&gt;
&lt;br /&gt;
As with file durations, an index at the beginning of the file is incompatible with live streaming. It also means more data has to be fetched before a file can start playing over the network, because you must read past the index even when you don&#039;t intend to seek. The index could be stored at the end (which even still allows encoding the file in a single pass), but this requires one (or more) extra seeks to read the index (especially if its exact location at the end is not known), either on file open or on first seek. Unlike the final timestamp, which is small and fixed in size, an index grows with the file duration, and can have unbounded size. It is also easy for an index to become out of sync with a file that has been edited or damaged, in which case seeking will simply fail. By contrast, you can seek in a truncated .opus download without issues.&lt;br /&gt;
&lt;br /&gt;
In practice, bisection seeking on VBR audio achieves performance that is very nearly as good as seeking with an index, without any of the drawbacks of an index. libopusfile provides a test program called seeking_example which can be used to benchmark the performance on your files.&lt;br /&gt;
&lt;br /&gt;
On a 96 kbps VBR file nearly one hour long (the second movement of Mahler&#039;s Symphony No. 8 &amp;quot;Symphony of a Thousand&amp;quot;):&lt;br /&gt;
&lt;br /&gt;
    Testing exact PCM seeking to random places in 169680000 samples (58m55.000s)...&lt;br /&gt;
    Total seek operations: 1020 (1.020 per exact seek, 2 maximum).&lt;br /&gt;
&lt;br /&gt;
On a chained file formed by concatenating the eight test vectors for the currently supported channel layouts in mapping family 1:&lt;br /&gt;
&lt;br /&gt;
    Opened file containing 8 links with 18 seeks (2.250 per link).&lt;br /&gt;
    Testing exact PCM seeking to random places in 2759064 samples (57.481s)...&lt;br /&gt;
    Total seek operations: 946 (0.946 per exact seek, 2 maximum).&lt;br /&gt;
&lt;br /&gt;
That is, the number of physical seeks required is almost always 1, every once in a while 2, and in short files, sometimes even 0.&lt;br /&gt;
&lt;br /&gt;
[[Category:Opus]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Icecast_Server/known_https_restrictions&amp;diff=16629</id>
		<title>Icecast Server/known https restrictions</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Icecast_Server/known_https_restrictions&amp;diff=16629"/>
		<updated>2017-11-03T16:40:43Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* TLS Mode compatibility charts */ whitespace, grammar, emboldening&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists known problems of latest released Icecast when operating with TLS enabled.&lt;br /&gt;
&lt;br /&gt;
* &#039;listenurl&#039; in the internal XML status representation is not protocol aware and will always use &#039;http&#039; + global hostname (default: &amp;quot;localhost&amp;quot;) and port (default: first listen-socket).&lt;br /&gt;
* Virtual playlist files don&#039;t work&lt;br /&gt;
* Authentication helper doesn&#039;t work (needs verification)&lt;br /&gt;
* Certificate reload is not implemented in 2.4.x. Icecast2 2.4.x needs to be restarted to reload the certificate. (supported in branch ph3-update-TLS.)&lt;br /&gt;
* …&lt;br /&gt;
&lt;br /&gt;
== TLS Mode compatibility charts ==&lt;br /&gt;
The following tables list Icecast configuration settings (horizontal) versus client settings (vertical).&lt;br /&gt;
&lt;br /&gt;
Note: While &#039;&#039;&#039;auto&#039;&#039;&#039; mode may connect using TLS, it will not establish a secure connection. &#039;&#039;&#039;auto_no_plain&#039;&#039;&#039; will ensure a secure connection.&lt;br /&gt;
&lt;br /&gt;
=== Icecast2 2.4.x ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | libshout&lt;br /&gt;
|-&lt;br /&gt;
! 0 !! 1&lt;br /&gt;
|-&lt;br /&gt;
! disabled&lt;br /&gt;
| Yes || No&lt;br /&gt;
|-&lt;br /&gt;
! auto&lt;br /&gt;
| Yes || Yes&lt;br /&gt;
|-&lt;br /&gt;
! auto_no_plain&lt;br /&gt;
| No || Yes&lt;br /&gt;
|-&lt;br /&gt;
! [https://tools.ietf.org/html/rfc2817 RFC2817]&lt;br /&gt;
| No || No&lt;br /&gt;
|-&lt;br /&gt;
! [https://tools.ietf.org/html/rfc2818 RFC2818]&lt;br /&gt;
| No || Yes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Icecast2 2.5.x (branch &amp;quot;master&amp;quot;) ===&lt;br /&gt;
Note: for truth values the following keywords can be used in the configuration: 0, false, no, off, 1, true, yes, on&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! rowspan=&amp;quot;3&amp;quot; |&lt;br /&gt;
! colspan=&amp;quot;7&amp;quot; | libshout&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | TLS not configured&lt;br /&gt;
! colspan=&amp;quot;5&amp;quot; | TLS configured&lt;br /&gt;
|-&lt;br /&gt;
! disabled !! auto, false&lt;br /&gt;
! disabled !! auto, false !! auto_no_plain !! rfc2817 !! rfc2818, true&lt;br /&gt;
|-&lt;br /&gt;
! disabled&lt;br /&gt;
| Yes || Yes || Yes || Yes || No || No || No&lt;br /&gt;
|-&lt;br /&gt;
! auto&lt;br /&gt;
| Yes || Yes || Yes || Yes || Yes || Yes || Yes&lt;br /&gt;
|-&lt;br /&gt;
! auto_no_plain&lt;br /&gt;
| No || No || No || Yes || Yes || Yes || Yes&lt;br /&gt;
|-&lt;br /&gt;
! [https://tools.ietf.org/html/rfc2817 RFC2817]&lt;br /&gt;
| No || No || No || Yes || Yes || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
! [https://tools.ietf.org/html/rfc2818 RFC2818]&lt;br /&gt;
| No || No || No || Yes || Yes || No || Yes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Icecast]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Icecast_Server/known_https_restrictions&amp;diff=16628</id>
		<title>Icecast Server/known https restrictions</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Icecast_Server/known_https_restrictions&amp;diff=16628"/>
		<updated>2017-11-03T16:38:21Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* TLS Mode compatibility charts */ linkify RFC mentions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists known problems of latest released Icecast when operating with TLS enabled.&lt;br /&gt;
&lt;br /&gt;
* &#039;listenurl&#039; in the internal XML status representation is not protocol aware and will always use &#039;http&#039; + global hostname (default: &amp;quot;localhost&amp;quot;) and port (default: first listen-socket).&lt;br /&gt;
* Virtual playlist files don&#039;t work&lt;br /&gt;
* Authentication helper doesn&#039;t work (needs verification)&lt;br /&gt;
* Certificate reload is not implemented in 2.4.x. Icecast2 2.4.x needs to be restarted to reload the certificate. (supported in branch ph3-update-TLS.)&lt;br /&gt;
* …&lt;br /&gt;
&lt;br /&gt;
== TLS Mode compatibility charts ==&lt;br /&gt;
The following list Icecast configuration settings (horizontal) versus client settings (vertical).&lt;br /&gt;
Note: While auto mode may connect using TLS it will not establish a secure connection. auto_no_plain will ensure a secure connection.&lt;br /&gt;
&lt;br /&gt;
=== Icecast2 2.4.x ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | libshout&lt;br /&gt;
|-&lt;br /&gt;
! 0 !! 1&lt;br /&gt;
|-&lt;br /&gt;
! disabled&lt;br /&gt;
| Yes || No&lt;br /&gt;
|-&lt;br /&gt;
! auto&lt;br /&gt;
| Yes || Yes&lt;br /&gt;
|-&lt;br /&gt;
! auto_no_plain&lt;br /&gt;
| No || Yes&lt;br /&gt;
|-&lt;br /&gt;
! [https://tools.ietf.org/html/rfc2817 RFC2817]&lt;br /&gt;
| No || No&lt;br /&gt;
|-&lt;br /&gt;
! [https://tools.ietf.org/html/rfc2818 RFC2818]&lt;br /&gt;
| No || Yes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Icecast2 2.5.x (branch &amp;quot;master&amp;quot;) ===&lt;br /&gt;
Note: for truth values the following keywords can be used in the configuration: 0, false, no, off, 1, true, yes, on&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! rowspan=&amp;quot;3&amp;quot; |&lt;br /&gt;
! colspan=&amp;quot;7&amp;quot; | libshout&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | TLS not configured&lt;br /&gt;
! colspan=&amp;quot;5&amp;quot; | TLS configured&lt;br /&gt;
|-&lt;br /&gt;
! disabled !! auto, false&lt;br /&gt;
! disabled !! auto, false !! auto_no_plain !! rfc2817 !! rfc2818, true&lt;br /&gt;
|-&lt;br /&gt;
! disabled&lt;br /&gt;
| Yes || Yes || Yes || Yes || No || No || No&lt;br /&gt;
|-&lt;br /&gt;
! auto&lt;br /&gt;
| Yes || Yes || Yes || Yes || Yes || Yes || Yes&lt;br /&gt;
|-&lt;br /&gt;
! auto_no_plain&lt;br /&gt;
| No || No || No || Yes || Yes || Yes || Yes&lt;br /&gt;
|-&lt;br /&gt;
! [https://tools.ietf.org/html/rfc2817 RFC2817]&lt;br /&gt;
| No || No || No || Yes || Yes || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
! [https://tools.ietf.org/html/rfc2818 RFC2818]&lt;br /&gt;
| No || No || No || Yes || Yes || No || Yes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Icecast]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Icecast_Server/Git_workflow&amp;diff=16627</id>
		<title>Icecast Server/Git workflow</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Icecast_Server/Git_workflow&amp;diff=16627"/>
		<updated>2017-11-03T16:05:33Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* Repositories */ headerize headers.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Icecast project recently migrated from Subversion to Git, this page outlines how to get started with it!&lt;br /&gt;
&lt;br /&gt;
== Repositories ==&lt;br /&gt;
&lt;br /&gt;
The repositories are at [https://git.xiph.org git.xiph.org] and are mirrored to [https://github.com/xiph GitHub]. All repository names start with &amp;quot;icecast-&amp;quot; for clarity.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Name&lt;br /&gt;
!Anonymous access URL&lt;br /&gt;
!SSH URL (only project members)&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|[https://git.xiph.org/?p=icecast-server.git Icecast server]&lt;br /&gt;
|&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://git.xiph.org/icecast-server.git&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;code&amp;gt;ssh://git@git.xiph.org/icecast-server.git&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|[https://git.xiph.org/?p=icecast-ices.git IceS]&lt;br /&gt;
|&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://git.xiph.org/icecast-ices.git&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;code&amp;gt;ssh://git@git.xiph.org/icecast-ices.git&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|[https://git.xiph.org/?p=icecast-libshout.git libshout]&lt;br /&gt;
|&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://git.xiph.org/icecast-libshout.git&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;code&amp;gt;ssh://git@git.xiph.org/icecast-libshout.git&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|[https://git.xiph.org/?p=icecast-directory.git Icecast directory]&lt;br /&gt;
|&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://git.xiph.org/icecast-directory.git&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;code&amp;gt;ssh://git@git.xiph.org/icecast-directory.git&amp;lt;/code&amp;gt;&lt;br /&gt;
|As seen running on http://dir.xiph.org - soon™&lt;br /&gt;
|-&lt;br /&gt;
|[https://git.xiph.org/?p=icecast-common.git Icecast shared code]&lt;br /&gt;
|&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://git.xiph.org/icecast-common.git&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;code&amp;gt;ssh://git@git.xiph.org/icecast-common.git&amp;lt;/code&amp;gt;&lt;br /&gt;
|No need to check out separately, see below.&lt;br /&gt;
|-&lt;br /&gt;
|[https://git.xiph.org/?p=icecast-m4.git Icecast shared autofoo]&lt;br /&gt;
|&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://git.xiph.org/icecast-m4.git&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;code&amp;gt;ssh://git@git.xiph.org/icecast-m4.git&amp;lt;/code&amp;gt;&lt;br /&gt;
|No need to check out separately, see below.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The repositories were migrated with their full history, but for reference the old subversion repository structure remains [https://trac.xiph.org/browser/icecast/ browseable] and all subprojects can be checked out below &amp;lt;nowiki&amp;gt;http://svn.xiph.org/icecast/trunk/&amp;lt;/nowiki&amp;gt;&amp;lt;projectname&amp;gt;. This might be useful in case of some branches (not all were migrated) and no longer maintained projects that were not migrated to Git.&lt;br /&gt;
&lt;br /&gt;
== Cloning the Repo ==&lt;br /&gt;
First you need to clone the Git repository, because we use submodules, these should also be cloned, do to this, run:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;git clone --recursive https://git.xiph.org/icecast-server.git&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your Git version (&amp;lt;code&amp;gt;git --version&amp;lt;/code&amp;gt;) is lower than 1.6.5, do:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;git clone https://git.xiph.org/icecast-server.git&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 cd icecast-server&lt;br /&gt;
 git submodule update --init&lt;br /&gt;
&lt;br /&gt;
== Initializing the Submodules ==&lt;br /&gt;
The steps we did above, for cloning, initialized the Submodules, &amp;lt;i&amp;gt;but&amp;lt;/i&amp;gt; if you want to do any changes to them&lt;br /&gt;
and push them back to the remote repository, we need to set them to a specific branch, in this case, master.&lt;br /&gt;
&lt;br /&gt;
First of all, checkout the master branch, depending on your git version, your modules may be initialized in a detached HEAD state.&lt;br /&gt;
&lt;br /&gt;
  git submodule foreach git checkout master&lt;br /&gt;
&lt;br /&gt;
(If your git version does not support this, &amp;lt;code&amp;gt;cd&amp;lt;/code&amp;gt; into each submodule and run &amp;lt;code&amp;gt;git checkout master&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
== Pushing changes to a remote Server ==&lt;br /&gt;
When you are done with some super cool new feature, or even while working on it, you may want to push your current state to the remote repository, so others can test it and give you&lt;br /&gt;
some Feedback!&lt;br /&gt;
For this example let&#039;s assume you&#039;ve built an ACL, therefore changed something in httpp.c which is in the common submodule and changed a lot of stuff in parent repository.&lt;br /&gt;
&lt;br /&gt;
First you need to commit the changed you made in the common submodule, so &amp;lt;code&amp;gt;cd&amp;lt;/code&amp;gt; into it, and do&lt;br /&gt;
&lt;br /&gt;
 git status&lt;br /&gt;
&lt;br /&gt;
This will list you the changes you made, each change you want to have in the commit needs to be added, let&#039;s assume (which is the most common case) you want to commit all changes.&lt;br /&gt;
You could either do &amp;lt;code&amp;gt;git add .&amp;lt;/code&amp;gt; or even shorter:&lt;br /&gt;
&lt;br /&gt;
 git commit -a&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-a&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;--all&amp;lt;/code&amp;gt; option will add all changed or deleted files, but not add any untracked files.&lt;br /&gt;
&lt;br /&gt;
Now enter a meaningful commit message, the first line should be a rough summary, followed by two newlines and a more verbose description. Less is not more in this case, that’s what the summary is for.&lt;br /&gt;
&lt;br /&gt;
Ok now it&#039;s time to push the changes to the remote server, if this is the first time you do this, you might need to set the origin url, because it defaults to a http(s) one, so that people without ssh access can clone the repository and submodules too, but for cloning you want to use ssh. Let’s set the remote origin like this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;git remote set-url origin ssh://git@git.xiph.org/icecast-common.git&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now push the changes to the remote location:&lt;br /&gt;
&lt;br /&gt;
 git push origin master&lt;br /&gt;
&lt;br /&gt;
This tells git to push your copy of the master branch to the remote location origin (that we’ve just set to the right url).&lt;br /&gt;
&lt;br /&gt;
Ok now that we cared about the submodule, let&#039;s &amp;lt;code&amp;gt;cd&amp;lt;/code&amp;gt; back into the parent repository, and commit the changes we made there:&lt;br /&gt;
&lt;br /&gt;
 git commit -a&lt;br /&gt;
&lt;br /&gt;
Now enter a meaningful commit message. (Yes, I sound like a broken record, but this is important)&lt;br /&gt;
&lt;br /&gt;
Push the stuff to the remote:&lt;br /&gt;
&lt;br /&gt;
 git push origin master&lt;br /&gt;
&lt;br /&gt;
(If you are on a different branch than master, you probably want to replace master with the branch you are on, obviously, or just do &amp;lt;code&amp;gt;git push&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;NOTE&amp;lt;/b&amp;gt;: Even if you hadn&#039;t changed anything in the parent repository but just in the submodule repository, you would need to commit the change of the version of the submodule to the parent repository. If you just had updated the httpp.c you still would needed to do &amp;lt;code&amp;gt;git commit -a -m &amp;quot;Update commons to recent version for latest httpp changes&amp;quot;&amp;lt;/code&amp;gt;, and push it, to make the parent repository point to the right submodule version.&lt;br /&gt;
&lt;br /&gt;
== Updating the local repository ==&lt;br /&gt;
Let&#039;s say someone else committed something and pushed it, and you want to update your local copy to the one of the remote. Let&#039;s assume you have nothing changed, so you are just a bit behind in history, then it is a simple as:&lt;br /&gt;
&lt;br /&gt;
 git pull&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
 git submodule update&lt;br /&gt;
&lt;br /&gt;
to make sure submodules are up to date too.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If something changed, then git needs to reconcile the local changes and the remote changes. We prefer to avoid merge commits, unless there is a larger branch developed feature.&lt;br /&gt;
&lt;br /&gt;
This can be either accomplished by always running:&lt;br /&gt;
&lt;br /&gt;
 git pull --rebase&lt;br /&gt;
&lt;br /&gt;
Or by setting up git to do this automatically for you. The following passage is taken verbatim from [https://coderwall.com/p/tnoiug/rebase-by-default-when-doing-git-pull Marcin Kulik&#039;s blog post on the same topic]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;In git &amp;gt;= 1.7.9:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 git config --global pull.rebase true&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;In git &amp;lt; 1.7.9:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 git config --global branch.autosetuprebase always&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The latter has the effect of automatically adding branch.&amp;lt;name&amp;gt;.rebase true for each checked out local branch that is tracking an upstream branch to the repository config file.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note that if you have both options set (not really recommended) then branch.&amp;lt;name&amp;gt;.rebase true that is automatically added for each branch takes precedence over global pull.rebase true.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category: Icecast]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Ambisonics&amp;diff=16626</id>
		<title>Ambisonics</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Ambisonics&amp;diff=16626"/>
		<updated>2017-11-03T12:32:59Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* Malham notation */ remove extra table row&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;This page is part of the Xiph Wiki, and is aimed at people developing file formats and associated software for Ambisonics. For an general introduction to Ambisonics, please go to the &#039;&#039;[[Wikipedia:Ambisonics|Wikipedia page on Ambisonics]]&#039;&#039;.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Ambisonics&#039;&#039;&#039; is a surround sound system first developed in the 1970s. Its main difference from other surround techniques is that it separates transmission channels from speaker feeds, the speaker feeds being derived using a decoder situated in the living room.  Decoders can be implemented in either hardware or software. Typically more speakers are used than transmission channels, and the more speakers used then the more stable the resulting soundfield. Speakers can be arranged in a number of configurations, regular polygons being the most popular.&lt;br /&gt;
&lt;br /&gt;
Ambisonic files can come in a number of different formats. The main one is called B-Format, the other formats being derived from this. UHJ format is mono- and stereo-compatible. G-Format is a set of speaker feeds, so can be enjoyed in surround sound without the need for a decoder in the living room.&lt;br /&gt;
&lt;br /&gt;
== Ambisonics and 5.1 ==&lt;br /&gt;
&lt;br /&gt;
Ambisonics and conventional 5.1 surround sound are very different. 5.1 is a set speaker feeds, the signal only being fully defined for sounds coming from a speaker. Phantom images between speakers can be created, but the technique to do so is left unspecified. Many 5.1 releases use pair-wise mixing to create phantom images. This is understandable as almost all stereo recordings are mixed using pair-wise mixing.&lt;br /&gt;
&lt;br /&gt;
Pair-wise mixing is also called &amp;quot;pan-potting&amp;quot;, &amp;quot;amplitude mixing&amp;quot; and &amp;quot;intensity stereophony&amp;quot;. It mixes signals into the feeds for a pair of speakers to create the illusion that a sound is coming from a point somewhere between the speakers. During mixing, the apparent location of each sound is determined only by the relative amplitude of that sound in the two speakers.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, pair-wise mixing works poorly when the speakers are to the rear of the listener and not-at-all when they are to one side. You can demonstrate this for yourself by performing [http://members.tripod.com/martin_leese/Ambisonic/experiment.html a very simple experiment]. Pair-wise mixing did not work in the quadraphonic era and it will not work now. Such an absolute statement can be made because the way that humans localize sound has not changed.&lt;br /&gt;
&lt;br /&gt;
Ambisonics is fundamentally different from 5.1. What is encoded in Ambisonics is not speaker feeds, but &#039;&#039;direction&#039;&#039;. When mixing in Ambisonics, the positions of the speakers are unknown &#039;&#039;and are of no interest&#039;&#039;. Further, when Ambisonics is decoded to speaker feeds all of the speakers cooperate to localize a sound in its correct position so, for example, when the speakers on the left push those on the right pull. The speakers all contribute to the creation of a single coherent soundfield.&lt;br /&gt;
&lt;br /&gt;
=== Ambisonics to 5.1 ===&lt;br /&gt;
Converting Ambisonics to 5.1 is straightforward, and is discussed below (see [[#G-Format|G-Format]]).&lt;br /&gt;
&lt;br /&gt;
=== 5.1 to Ambisonics ===&lt;br /&gt;
Converting 5.1 to Ambisonics is more difficult. It is easy to make the five speaker feeds phantom images, called &amp;quot;virtual speakers&amp;quot;. (The &amp;quot;.1&amp;quot; channel can be folded into W.)  The problem with this is that even if the Ambisonic rendering is perfect, the result will only be as good as the original 5.1 played through &#039;&#039;real&#039;&#039; speakers. It will not be an improvement. Nobody has yet come up with a way for Ambisonics to improve 5.1; 5.1 is simply too broken.&lt;br /&gt;
&lt;br /&gt;
== B-Format ==&lt;br /&gt;
&lt;br /&gt;
B-Format is a single coherent soundfield composed of a set of related channels.  The number of channels used depends on whether the soundfield is horizontal-only or full-sphere, and on the order. These B-Format channels are transmission channels, not speaker feeds. Listening to B-Format requires a decoder in your living room. Some numbers of channels are tabulated below.&lt;br /&gt;
&lt;br /&gt;
=== Channel correlation ===&lt;br /&gt;
Compression techniques typically make use of channel correlation to remove redundancy from the audio data, and so improve the compression ratio.&lt;br /&gt;
&lt;br /&gt;
The correlation between B-Format channels depends on the content. Four-channel B-Format consists of an omni-directional component, called W, and three figure-of-eight components pointing forward, left and up, called X, Y, Z. ([http://members.tripod.com/martin_leese/Ambisonic/Harmonic.html Pictures are available].) Three-channel, horizontal-only B-Format simply omits the Z channel. This means that anything in X also appears in W. Same for Y and Z. (W is omni-directional; everything appears in W.) Also, if content comes from Front-Left then it appears equally in X and Y. Same for content from Front-Right, Back-Left, Back-Right; only the relative polarities change. So there can be a lot of correlation between B-Format channels, but it is content dependent.&lt;br /&gt;
&lt;br /&gt;
One problem with B-Format is that it is big on low-frequency phase. The phase relationships between the different B-Format channels are important if the resulting soundfield is to correctly &amp;quot;gel&amp;quot;. This may be a problem when B-Format channels are compressed using lossy compression.&lt;br /&gt;
&lt;br /&gt;
There is a file specification in use for downloadable B-Format files called the [http://members.tripod.com/martin_leese/Ambisonic/B-Format_file_format.html &amp;quot;.amb&amp;quot; specification].&lt;br /&gt;
&lt;br /&gt;
=== Limitations of the &amp;quot;.amb&amp;quot; specification ===&lt;br /&gt;
The [http://members.tripod.com/martin_leese/Ambisonic/B-Format_file_format.html &amp;quot;.amb&amp;quot; specification] for downloadable B-Format files is based on the WAVE-EX format.  There are currently over 200 pieces available in this format [http://www.ambisonia.com for free download]. Most of these are first-order full-sphere soundfields. (A [https://en.wikipedia.org/wiki/List_of_Ambisonic_Software list of Ambisonic software decoders] is avaialble on Wikipedia.) Some of the limitations of the specification are:  &lt;br /&gt;
&lt;br /&gt;
#It is limited to 4 GByte files (2 GBytes if somebody screwed up).&lt;br /&gt;
#It is limited to third-order soundfields and below. While third-order looks like a lot (16 channels), there are already research rigs that reproduce fourth-order (25 channels).&lt;br /&gt;
#No compression (particularly lossless).&lt;br /&gt;
&lt;br /&gt;
The reason that the &amp;quot;.amb&amp;quot; file specification is limited to third-order and below is because it uses the number of channels to uniquely define the soundfield order. Unfortunately this simple and elegant scheme does not work above third-order as ambiguities creep in. (One ambiguity is illustrated in the table below.)&lt;br /&gt;
&lt;br /&gt;
A more general file format will have to use something else, such as &#039;&#039;Malham notation&#039;&#039;, or storing both the horizontal-order and height-order. There is a one-to-one correspondence between Malham notation and the pair of orders, and either can generate the number of channels.&lt;br /&gt;
&lt;br /&gt;
==== Malham notation ====&lt;br /&gt;
Malham notation specifies the order of a B-Format soundfield using a string of characters, each character being either &#039;&#039;&#039;f&#039;&#039;&#039; (for full-sphere) or &#039;&#039;&#039;h&#039;&#039;&#039; (for horizontal). The first character in the string specifies the type of the first-order components, the second character the type of the second-order components, etc.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!&amp;lt;span style=&amp;quot;font-size:80%&amp;quot;&amp;gt;Horizontal&amp;lt;br&amp;gt;order&amp;lt;/span&amp;gt;&lt;br /&gt;
!&amp;lt;span style=&amp;quot;font-size:80%&amp;quot;&amp;gt;Height&amp;lt;br&amp;gt;order&amp;lt;/span&amp;gt;&lt;br /&gt;
!&amp;lt;span style=&amp;quot;font-size:80%&amp;quot;&amp;gt;Soundfield_type&amp;lt;/span&amp;gt;&lt;br /&gt;
!&amp;lt;span style=&amp;quot;font-size:80%&amp;quot;&amp;gt;Malham&amp;lt;br&amp;gt;notation&amp;lt;/span&amp;gt;&lt;br /&gt;
!&amp;lt;span style=&amp;quot;font-size:80%&amp;quot;&amp;gt;Number&amp;lt;br&amp;gt;of_channels&amp;lt;/span&amp;gt;&lt;br /&gt;
!&amp;lt;span style=&amp;quot;font-size:80%&amp;quot;&amp;gt;Channels&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 1|| 0||horizontal||&#039;&#039;&#039;h&#039;&#039;&#039;|| 3||WXY&lt;br /&gt;
|-&lt;br /&gt;
| 1|| 1||full-sphere||&#039;&#039;&#039;f&#039;&#039;&#039;|| 4||WXYZ&lt;br /&gt;
|-&lt;br /&gt;
| 2|| 0||horizontal||&#039;&#039;&#039;hh&#039;&#039;&#039;|| 5||WXYUV&lt;br /&gt;
|-&lt;br /&gt;
| 2|| 1||mixed-order||&#039;&#039;&#039;fh&#039;&#039;&#039;|| 6||WXYZUV&lt;br /&gt;
|-&lt;br /&gt;
| 2|| 2||full-sphere||&#039;&#039;&#039;ff&#039;&#039;&#039;|| 9||WXYZRSTUV&lt;br /&gt;
|-&lt;br /&gt;
| 3|| 0||horizontal||&#039;&#039;&#039;hhh&#039;&#039;&#039;|| 7||WXYUVPQ&lt;br /&gt;
|-&lt;br /&gt;
| 3|| 1||mixed-order||&#039;&#039;&#039;fhh&#039;&#039;&#039;|| 8||WXYZUVPQ&lt;br /&gt;
|-&lt;br /&gt;
| 3|| 2||mixed-order||&#039;&#039;&#039;ffh&#039;&#039;&#039;|| 11||WXYZRSTUVPQ&lt;br /&gt;
|-&lt;br /&gt;
| 3|| 3||full-sphere||&#039;&#039;&#039;fff&#039;&#039;&#039;|| 16||WXYZRSTUVKLMNOPQ&lt;br /&gt;
|-&lt;br /&gt;
| 4|| 0||horizontal||&#039;&#039;&#039;hhhh&#039;&#039;&#039;|| 9||extra channels unlabled&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Default channel conversions from B-Format ===&lt;br /&gt;
Converting a B-Format file to a mono file is straightforward.  Use Mono = W*sqrt(2).&lt;br /&gt;
&lt;br /&gt;
Converting a B-Format file to a stereo file is more difficult.  The &amp;quot;proper&amp;quot; way to do this is to convert the W,X,Y channels to two-channel UHJ. Unfortunately this requires the use of wide-band 90-degree phase shifters. In the digital domain these are usually implemented as convolution filters.&lt;br /&gt;
&lt;br /&gt;
Assuming 90-degree phase shifters are unavailable then the problem is one of choice. Starting from B-Format, it is possible to synthesize &#039;&#039;any&#039;&#039; mic response pointing in &#039;&#039;any&#039;&#039; direction.  Hence, it is possible to synthesize &#039;&#039;all&#039;&#039; coincident stereo mic techniques.  Two popular stereo techniques are &#039;&#039;Blumlein Mid-Side&#039;&#039; and &#039;&#039;Blumlein Crossed Pair&#039;&#039;.&lt;br /&gt;
  &lt;br /&gt;
==== Blumlein Mid-Side ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Mid = (W*sqrt(2)) + X  /*This is a cardioid response pointing forward*/&lt;br /&gt;
Left = Mid + Y&lt;br /&gt;
Right = Mid - Y&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Blumlein Crossed Pair ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Left = (X + Y)/sqrt(2)   /* (Left, Right) are just the (Y, X) */&lt;br /&gt;
Right = (X - Y)/sqrt(2)  /* responses rotated by -45 degrees  */&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which conversion to stereo is better depends on the material and how it was recorded.  A good suggestion is to not specify a &#039;&#039;particular&#039;&#039; default channel conversion; instead, simply specify that there must be one.  If one has to be specified then Blumlein Crossed Pair is the simpler.&lt;br /&gt;
&lt;br /&gt;
== UHJ format ==&lt;br /&gt;
&lt;br /&gt;
B-Format is the main format for Ambisonic files. However, B-Format is not mono- or stereo-compatible. This is why the UHJ hierarchical system was developed. Depending on the number of channels available, the UHJ system can carry more or less information, but at all times it is fully mono- and stereo-compatible. Up to four channels (Left, Right, T, Q) may be used. The T-channel can also be band-limited but, as this &amp;quot;2&amp;amp;frac12;-channel UHJ&amp;quot; was only ever used for FM radio transmission, it will not be discussed further.&lt;br /&gt;
&lt;br /&gt;
To listen to UHJ files in surround requires a decoder in your living room. Also, UHJ is restricted to first-order soundfields, either horizontal (two- and three-channel UHJ) or full-sphere (four-channel UHJ).&lt;br /&gt;
&lt;br /&gt;
Converting B-Format channels to UHJ channels, and vice versa, requires the use of wide-band 90-degree phase shifters. In the digital domain these are usually implemented as convolution filters. Conversion between four-channel B-Format (W, X, Y, Z) and four-channel UHJ (Left, Right, T, Q) can be accomplished without loss of information. The same with three-channel to three-channel (W, X, Y) &amp;lt;=&amp;gt; (Left, Right, T). It is possible to recover three-channel B-Format (W, X, Y) from two-channel UHJ (Left, Right), but not without loss. It is also important for the Ambisonic decoder to be aware that the B-Format channels were recovered from two-channel UHJ (because of the need to apply different shelf filters).&lt;br /&gt;
&lt;br /&gt;
Several hundred [http://surrounddiscography.com/ two-channel UHJ LPs and CDs] have been released. Three- and four-channel UHJ recordings have never been commercially released.&lt;br /&gt;
&lt;br /&gt;
=== UHJ encoding and decoding equations ===&lt;br /&gt;
&lt;br /&gt;
==== Encoding ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S = 0.9396926*W + 0.1855740*X&lt;br /&gt;
D = j(-0.3420201*W + 0.5098604*X) + 0.6554516*Y&lt;br /&gt;
&lt;br /&gt;
Left = (S + D)/2.0&lt;br /&gt;
Right = (S - D)/2.0&lt;br /&gt;
T = j(-0.1432*W + 0.6512*X) - 0.7071*Y&lt;br /&gt;
Q = 0.9772*Z&lt;br /&gt;
&lt;br /&gt;
where j is a +90 degree phase shift&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Decoding ====&lt;br /&gt;
For two-channel UHJ:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S = (Left + Right)/2.0&lt;br /&gt;
D = (Left - Right)/2.0&lt;br /&gt;
&lt;br /&gt;
W = 0.982*S + j*0.164*D&lt;br /&gt;
X = 0.419*S - j*0.828*D&lt;br /&gt;
Y = 0.763*D + j*0.385*S&lt;br /&gt;
&lt;br /&gt;
where j is a +90 degree phase shift&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that two-channel UHJ requires the player to use different shelf filters than for B-Format (or for three- and four-channel UHJ).&lt;br /&gt;
&lt;br /&gt;
For three- and four-channel UHJ:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
S = (Left + Right)/2.0&lt;br /&gt;
D = (Left - Right)/2.0&lt;br /&gt;
&lt;br /&gt;
W = 0.982*S + j*0.197(0.828*D + 0.768*T)&lt;br /&gt;
X = 0.419*S - j(0.828*D + 0.768*T)&lt;br /&gt;
Y = 0.796*D - 0.676*T + j*0.187*S&lt;br /&gt;
Z = 1.023*Q&lt;br /&gt;
&lt;br /&gt;
where j is a +90 degree phase shift&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is a file specification for downloadable two-channel UHJ files &lt;br /&gt;
called the [http://members.tripod.com/martin_leese/Ambisonic/UHJ_file_format.html &amp;quot;.uhj&amp;quot; specification], but it is not currently in use.&lt;br /&gt;
&lt;br /&gt;
=== Limitations of the &amp;quot;.uhj&amp;quot; specification ===&lt;br /&gt;
The [http://members.tripod.com/martin_leese/Ambisonic/UHJ_file_format.html &amp;quot;.uhj&amp;quot; specification] for downloadable two-channel UHJ files is based on the WAVE or WAVE-EX format. A UHJ chunk is added to the file to indicate it is UHJ. As unrecognized chunks are always skipped, use of this chunk maintains stereo compatibility. Some of the limitations of the specification are:  &lt;br /&gt;
&lt;br /&gt;
#It is limited to 4 GByte files (2 GBytes if somebody screwed up).&lt;br /&gt;
#It is limited to two-channel UHJ files. Three- and four-channel UHJ are not accommodated.&lt;br /&gt;
#No compression.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;.uhj&amp;quot; spcecification is only defined for two-channel UHJ to maintain stereo compatibility. While it would be possible to add the UHJ chunk to three- and four-channel WAVE-EX files, the recommendations from Microsoft for playing such files is that the audio device should render the extra channels to output ports not in use. This can happen even when the extra channels are masked off. (Put simply, in WAVE-EX files the channel mask does &#039;&#039;not&#039;&#039; mask channels.) Because of this, three- and four-channel WAVE-EX files can not be made stereo compatible.&lt;br /&gt;
&lt;br /&gt;
In the Xiph world, it should be possible to use default channel conversions to ensure that three- and four-channel UHJ files remain stereo compatible.&lt;br /&gt;
&lt;br /&gt;
=== Default channel conversions from UHJ ===&lt;br /&gt;
Converting a UHJ file to a mono file is straightforward. Use Mono = &lt;br /&gt;
(Left + Right) / sqrt(2).&lt;br /&gt;
&lt;br /&gt;
Converting a UHJ file to a stereo file is even easier. Use Left = Left, Right = Right, and discard T and Q if present.&lt;br /&gt;
&lt;br /&gt;
== G-Format ==&lt;br /&gt;
&lt;br /&gt;
A G-Format file is any common multi-channel surround file containing an Ambisonic soundfield pre-decoded to its speaker feeds. This allows listeners who do not own an Ambisonic decoder to enjoy Ambisonics.&lt;br /&gt;
&lt;br /&gt;
The sound engineer creates a set of speaker feeds for a particular number and arrangement of speakers. This is typically four speakers arranged in a square. Other speaker arrangements are also possible&lt;br /&gt;
&lt;br /&gt;
In Ambisonics, all speakers cooperate to localize sounds in any particular direction; there are no &amp;quot;surround speakers&amp;quot; as such. Because of this, best results when playing G-Format recordings (and Ambisonics in general) are obtained when the speakers are matched. The easiest way to accomplish this is to use identical speakers. Unfortunately, many home theater systems include a center-front speaker which is different from the other speakers.&lt;br /&gt;
&lt;br /&gt;
An easy way to cope with this is adopted on G-Format recordings commercially released on DVD-A by [http://www.wyastone.co.uk/all-labels/nimbus/dvd-audio.html Nimbus Records]. They use four speakers in a square, the center-front speaker being unused. &lt;br /&gt;
&lt;br /&gt;
=== Recovering B-Format from G-Format ===&lt;br /&gt;
It is sometimes possible to recover the original B-Format channels from the G-Format speaker feeds. The recovered B-Format channels can then be fed to a decoder in the listener&#039;s living room, and so accommodate a speaker arrangement different from the one used when the G-Format file was produced. Each B-Format channel is recovered using a weighted combination of the speaker feeds in the G-Format file. The conversion coefficients required for the B-Format recovery depend on the particular speaker arrangement chosen by the sound engineer. (Obviously, if a B-Format version of the file also exists then it can be fed to the decoder directly without the need for G-Format.)&lt;br /&gt;
&lt;br /&gt;
File formats for G-Format include all multi-channel formats that contain speaker feeds. However, these will not contain information to allow the B-Format channels to be automatically recovered. A [http://members.tripod.com/martin_leese/Ambisonic/G-Format_chunk.html &amp;quot;.amg&amp;quot; file format] (based on WAVE-EX) for downloadable G-Format files, which will allow the B-Format channels to be automatically recovered, has been proposed. Such file formats have the advantage of storing the conversion coefficients at the time the G-Format file is created. This is the only time the required information is readily available.&lt;br /&gt;
&lt;br /&gt;
=== Default channel conversions from G-Format ===&lt;br /&gt;
Converting a G-Format file to a mono or stereo file is straightforward. First, recover the B-Format channels using the conversion coefficients contained in the file. Second, follow the advice given above for [[#Default channel conversions from B-Format|Default channel conversions from B-Format]].&lt;br /&gt;
&lt;br /&gt;
An alternative approach is to encode directly into the file the coefficients for producing the stereo mix. An appropriate [http://members.tripod.com/martin_leese/Audio/StereoMix_chunk.html chunk for WAVE-EX files] has been proposed. This could be [http://members.tripod.com/martin_leese/Audio/stereo_mix_proposal.html extended to other multi-channel file formats].&lt;br /&gt;
&lt;br /&gt;
== Resources on Ambisonics ==&lt;br /&gt;
&lt;br /&gt;
*There is a set of [http://en.wikipedia.org/wiki/Ambisonics Wikipedia articles on Ambisonics].&lt;br /&gt;
*Of particular relevance is the [http://members.tripod.com/martin_leese/Ambisonic/B-Format_file_format.html &amp;quot;.amb&amp;quot; specification] in use for downloadable B-Format files.  However the &amp;quot;.amb&amp;quot; spec has some limitations which it would be useful to overcome.&lt;br /&gt;
*There is also the [http://members.tripod.com/martin_leese/Ambisonic/UHJ_file_format.html &amp;quot;.uhj&amp;quot; specification] for downloadable two-channel UHJ files, but it is not currently in use.  The &amp;quot;.uhj&amp;quot; spec also has some limitations which it would be useful to overcome.&lt;br /&gt;
*[http://members.tripod.com/martin_leese/Ambisonic/ This website] has many pages on Ambisonics (including at the bottom links to other Ambisonic websites).&lt;br /&gt;
*[http://www.ambisonic.net/ Ambisonic.Net website] includes a detailed series of descriptive and practical articles on current and past Ambisonic techniques with links to tools, other sites and additional material.&lt;br /&gt;
*[http://ambisonic.info/info/ricardo.html Richard Lee&#039;s page on Ambisonics] contains articles on shelf filters and the design of Ambisonic decoders.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developers stuff]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Icecast_Server/known_https_restrictions&amp;diff=16625</id>
		<title>Icecast Server/known https restrictions</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Icecast_Server/known_https_restrictions&amp;diff=16625"/>
		<updated>2017-11-03T12:11:35Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* Icecast2 2.4.x */ and again&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists known problems of latest released Icecast when operating with TLS enabled.&lt;br /&gt;
&lt;br /&gt;
* &#039;listenurl&#039; in the internal XML status representation is not protocol aware and will always use &#039;http&#039; + global hostname (default: &amp;quot;localhost&amp;quot;) and port (default: first listen-socket).&lt;br /&gt;
* Virtual playlist files don&#039;t work&lt;br /&gt;
* Authentication helper doesn&#039;t work (needs verification)&lt;br /&gt;
* Certificate reload is not implemented in 2.4.x. Icecast2 2.4.x needs to be restarted to reload the certificate. (supported in branch ph3-update-TLS.)&lt;br /&gt;
* …&lt;br /&gt;
&lt;br /&gt;
== TLS Mode compatibility charts ==&lt;br /&gt;
The following list Icecast configuration settings (horizontal) versus client settings (vertical).&lt;br /&gt;
Note: While auto mode may connect using TLS it will not establish a secure connection. auto_no_plain will ensure a secure connection.&lt;br /&gt;
&lt;br /&gt;
=== Icecast2 2.4.x ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! rowspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | libshout&lt;br /&gt;
|-&lt;br /&gt;
! 0 !! 1&lt;br /&gt;
|-&lt;br /&gt;
! disabled&lt;br /&gt;
| Yes || No&lt;br /&gt;
|-&lt;br /&gt;
! auto&lt;br /&gt;
| Yes || Yes&lt;br /&gt;
|-&lt;br /&gt;
! auto_no_plain&lt;br /&gt;
| No || Yes&lt;br /&gt;
|-&lt;br /&gt;
! RFC2817&lt;br /&gt;
| No || No&lt;br /&gt;
|-&lt;br /&gt;
! RFC2818&lt;br /&gt;
| No || Yes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Icecast2 2.5.x (branch &amp;quot;master&amp;quot;) ===&lt;br /&gt;
Note: for truth values the following keywords can be used in the configuration: 0, false, no, off, 1, true, yes, on&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! rowspan=&amp;quot;3&amp;quot; |&lt;br /&gt;
! colspan=&amp;quot;7&amp;quot; | libshout&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | TLS not configured&lt;br /&gt;
! colspan=&amp;quot;5&amp;quot; | TLS configured&lt;br /&gt;
|-&lt;br /&gt;
! disabled !! auto, false&lt;br /&gt;
! disabled !! auto, false !! auto_no_plain !! rfc2817 !! rfc2818, true&lt;br /&gt;
|-&lt;br /&gt;
! disabled&lt;br /&gt;
| Yes || Yes || Yes || Yes || No || No || No&lt;br /&gt;
|-&lt;br /&gt;
! auto&lt;br /&gt;
| Yes || Yes || Yes || Yes || Yes || Yes || Yes&lt;br /&gt;
|-&lt;br /&gt;
! auto_no_plain&lt;br /&gt;
| No || No || No || Yes || Yes || Yes || Yes&lt;br /&gt;
|-&lt;br /&gt;
! RFC2817&lt;br /&gt;
| No || No || No || Yes || Yes || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
! RFC2818&lt;br /&gt;
| No || No || No || Yes || Yes || No || Yes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Icecast]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Icecast_Server/known_https_restrictions&amp;diff=16624</id>
		<title>Icecast Server/known https restrictions</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Icecast_Server/known_https_restrictions&amp;diff=16624"/>
		<updated>2017-11-03T12:09:46Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* Icecast2 2.5.x (branch &amp;quot;master&amp;quot;) */ prettify table&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists known problems of latest released Icecast when operating with TLS enabled.&lt;br /&gt;
&lt;br /&gt;
* &#039;listenurl&#039; in the internal XML status representation is not protocol aware and will always use &#039;http&#039; + global hostname (default: &amp;quot;localhost&amp;quot;) and port (default: first listen-socket).&lt;br /&gt;
* Virtual playlist files don&#039;t work&lt;br /&gt;
* Authentication helper doesn&#039;t work (needs verification)&lt;br /&gt;
* Certificate reload is not implemented in 2.4.x. Icecast2 2.4.x needs to be restarted to reload the certificate. (supported in branch ph3-update-TLS.)&lt;br /&gt;
* …&lt;br /&gt;
&lt;br /&gt;
== TLS Mode compatibility charts ==&lt;br /&gt;
The following list Icecast configuration settings (horizontal) versus client settings (vertical).&lt;br /&gt;
Note: While auto mode may connect using TLS it will not establish a secure connection. auto_no_plain will ensure a secure connection.&lt;br /&gt;
&lt;br /&gt;
=== Icecast2 2.4.x ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! !! 0 !! 1&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | libshout&lt;br /&gt;
|-&lt;br /&gt;
! disabled&lt;br /&gt;
| Yes || No&lt;br /&gt;
|-&lt;br /&gt;
! auto&lt;br /&gt;
| Yes || Yes&lt;br /&gt;
|-&lt;br /&gt;
! auto_no_plain&lt;br /&gt;
| No || Yes&lt;br /&gt;
|-&lt;br /&gt;
! RFC2817&lt;br /&gt;
| No || No&lt;br /&gt;
|-&lt;br /&gt;
! RFC2818&lt;br /&gt;
| No || Yes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Icecast2 2.5.x (branch &amp;quot;master&amp;quot;) ===&lt;br /&gt;
Note: for truth values the following keywords can be used in the configuration: 0, false, no, off, 1, true, yes, on&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! rowspan=&amp;quot;3&amp;quot; |&lt;br /&gt;
! colspan=&amp;quot;7&amp;quot; | libshout&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | TLS not configured&lt;br /&gt;
! colspan=&amp;quot;5&amp;quot; | TLS configured&lt;br /&gt;
|-&lt;br /&gt;
! disabled !! auto, false&lt;br /&gt;
! disabled !! auto, false !! auto_no_plain !! rfc2817 !! rfc2818, true&lt;br /&gt;
|-&lt;br /&gt;
! disabled&lt;br /&gt;
| Yes || Yes || Yes || Yes || No || No || No&lt;br /&gt;
|-&lt;br /&gt;
! auto&lt;br /&gt;
| Yes || Yes || Yes || Yes || Yes || Yes || Yes&lt;br /&gt;
|-&lt;br /&gt;
! auto_no_plain&lt;br /&gt;
| No || No || No || Yes || Yes || Yes || Yes&lt;br /&gt;
|-&lt;br /&gt;
! RFC2817&lt;br /&gt;
| No || No || No || Yes || Yes || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
! RFC2818&lt;br /&gt;
| No || No || No || Yes || Yes || No || Yes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Icecast]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Games_that_use_Vorbis&amp;diff=16619</id>
		<title>Games that use Vorbis</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Games_that_use_Vorbis&amp;diff=16619"/>
		<updated>2017-10-06T14:07:04Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: lighten block quote bg colour, to make them more readable&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following games use [[Vorbis]], most frequently for their in-game music or sound effects:&lt;br /&gt;
&lt;br /&gt;
* All Games By [http://www.reflexive.com/index.php?CAT=Search&amp;amp;SEARCH=dev%3AReflexive+Entertainment&amp;amp;PAGE=GameList Reflexive Entertainment].&lt;br /&gt;
&lt;br /&gt;
* [http://www.mobygames.com/game/windows/007-nightfire 007: Nightfire]: Uses Ogg Vorbis for background soundtrack.&lt;br /&gt;
&lt;br /&gt;
* [http://www.asciisector.net/ Ascii Sector]: Space combat/exploration/trading game.  Uses Ogg Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.ageofconan.com/ Age of Conan — Hyborian Adventures]: Uses Ogg Vorbis for all audio.&lt;br /&gt;
&lt;br /&gt;
* [http://www.americasarmy.com/ America’s Army]: Uses Ogg Vorbis for main theme.&lt;br /&gt;
&lt;br /&gt;
* [http://www.amnesiagame.com/ Amnesia: The Dark Descent]: Uses Ogg Vorbis for all audio.&lt;br /&gt;
&lt;br /&gt;
* [http://assault.cubers.net/ AssaultCube]: A free fast paced first-person shooter with little hardware requirements for Windows, Linux and OS X. Uses Ogg Vorbis for all game sounds and music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.lionhead.com/bw2/ Black &amp;amp; White 2]: Uses Ogg Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.pyrogon.com/games/candycruncher/ Candy Cruncher]: This cute puzzle game from Brian Hook’s company, Pyrogon, uses Vorbis for the addictive music you hear while you race the clock.&lt;br /&gt;
&lt;br /&gt;
* [http://www.callofcthulhu.com/ Call of Cthulhu] is a first-person horror game that combines intense action and adventure elements. It uses Ogg Vorbis for music and speech.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mobygames.com/game/windows/catechumen Catechumen] is a Christian-themed FPS that uses Ogg Vorbis.&lt;br /&gt;
&lt;br /&gt;
* [http://www.civilization5.com/ Civilization V] is a turn-based strategy game that uses Ogg Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.atari.com/crashday/ Crashday]: Stunt racing game, developed by independent German studio Moon Byte. Uses Ogg Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://buenavistagames.go.com/product/chickenLittlePC.html Chicken Litte]: Adventure game for children inspired by the motion picture in PC edition uses Vorbis for dialogs and music. (not sure if sound effects too)&lt;br /&gt;
&lt;br /&gt;
* [http://www.cossacks2.de/ Cossacks 2]: “Cossacks II: Napoleonic Wars” is a sequel of “Cossacks: European Wars”. Ogg Vorbis 1.0 files are in \data\music\&lt;br /&gt;
&lt;br /&gt;
* [http://www.darwinia.co.uk/ Darwinia]: The second title from Indy developer Introversion Software. Darwinia is a stylised retro — Tron meets Cannon Fodder. It uses Vorbis for all in game sound effects and music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.introversion.co.uk/defcon/ DEFCON]: The third title from Introversion Software.  Uses Vorbis for music, effects, everything, like Darwinia.&lt;br /&gt;
&lt;br /&gt;
* [http://devilmaycry.com/ Devil May Cry 4] (for the PC, at least): Uses (occasionally multichannel) Ogg Vorbis for ingame and cutscene music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.eidos.co.uk/gss/dxiw/ Deus Ex: Invisible War] by Ion Storm/Eidos: Uses Ogg Vorbis for music and voice (and possibly for sound fx too).&lt;br /&gt;
&lt;br /&gt;
* [http://diablo3.com Diablo III] uses Vorbis for audio.&lt;br /&gt;
&lt;br /&gt;
* [http://www.idsoftware.com/games/doom/doom3/ DOOM 3]:  The latest version of this famous first person shooter game from id software uses Vorbis for the theme music as well as their ambient and game sounds.&lt;br /&gt;
&lt;br /&gt;
* [http://mobygames.com/game/sheet/p,3/gameId,6505/ Duke Nukem: Manhattan Project]: This game from 3D Realms was released in 2002 and used Vorbis for their music. (Official website is down, using  Mobygames link)&lt;br /&gt;
&lt;br /&gt;
* [http://www.popcap.com/games/free/dynomite Dynomite]: Puzzle Bobble/Bust A Move clone for Windows by PopCap Games, with mouse control. Uses Ogg Vorbis for nearly all sound effects.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Eschalon:_Book_I Eschalon]: A classic-style roleplaying game, for Windows, Mac, and Linux.  Music is in &#039;&#039;Ogg Vorbis&#039;&#039; format.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mobygames.com/game/enclave/ Enclave] by Starbreeze/Black Label Games: Uses Ogg Vorbis for music (and possibly for sound fx and voice too).&lt;br /&gt;
&lt;br /&gt;
* [http://www.eve-online.com EVE Online] by CCP Games, the Icelandic-homed space-based single-shard persistent world game uses Ogg Vorbis for its music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.lionhead.com/fabletlc/ Fable: The Lost Chapters]: Uses Ogg Vorbis for music and cutscenes (Ancient libVorbis version, 1.0 RC2).&lt;br /&gt;
&lt;br /&gt;
* [http://farcry.ubi.com/ FarCry] by Crytek: uses Ogg Vorbis for music and effects.&lt;br /&gt;
&lt;br /&gt;
* [http://www.freedom-fighters.co.uk/ Freedom Fighters] by IO Interactive: String search reveals “libVorbis I 20011217” in freedom.exe.&lt;br /&gt;
&lt;br /&gt;
* [http://www.siriusgames.dk/index.php?pageid=67 Gangland] by MediaMobsters: Uses Ogg Vorbis for music and cutscenes (Data\streams\). Encoded with Xiph.Org libVorbis I 20020717. Decoder library: FMOD 3.71.&lt;br /&gt;
&lt;br /&gt;
* [http://www.rockstargames.com/vicecity/ Grand Theft Auto: Vice City] by Rockstar Games/Rockstar North uses Ogg Vorbis to store music, radio, ambient sounds, police messages and cutscene audio. Players can also store their custom tracks (accessible in-game via the “User Track Player” radio station) in Ogg Vorbis.&lt;br /&gt;
&lt;br /&gt;
* [http://www.rockstargames.com/sanandreas/ Grand Theft Auto: San Andreas] by Rockstar Games/Rockstar North uses Ogg Vorbis to store music, radio, ambient sounds, police messages and cutscene audio. Players can also store their custom tracks (accessible in-game via the “User Track Player” radio station) in Ogg Vorbis.&lt;br /&gt;
&lt;br /&gt;
* [http://www.gothic3.com/ Gothic 3] by Piranha Bytes: Vorbis is used in the ogg container for everything (music, speech, effects) except of the intro video. For example: Music @ 256 kb/s, Speech @ 86 kb/s. About 18 hours of speech compressed to 700 MB.&lt;br /&gt;
&lt;br /&gt;
* [http://www.guiltygearx2reload.com/ Guilty Gear XX]: The PC version, at least, uses Ogg Vorbis for all the music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.guitarherogame.com/gh2/ Guitar Hero II] by Red Octane (Activision), XBox360 platform only (multichannel Vorbis with 5 or 6 channels per song)&lt;br /&gt;
&lt;br /&gt;
* [http://halo.bungie.org/ Halo]: Mac and PC versions of Halo use Ogg Vorbis for all audio, it seems. The Xiph license and dynamically linked libraries of Ogg and Vorbis are included in the Halo directory. XBox version does not use Ogg Vorbis.&lt;br /&gt;
&lt;br /&gt;
* [http://harrypotter.ea.com/cofs/index.html Harry Potter II (Chamber of Secrets)]: This is unsubstantiated, it was reported on one of the vorbis mailing lists, but there is little evidence either way on this title.  EA has been supportive of Vorbis though, so it’s not entirely impossible.  If anyone can give us a yay or nay on this, please do.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mightandmagicgame.com/HeroesV/ Heroes of Might and Magic V]: Uses Vorbis for audio and Theora for video.&lt;br /&gt;
&lt;br /&gt;
* [http://www.eidosinteractive.com/games/info.html?gmid=118 Hitman 2]: uses Vorbis. (PC only or consoles too?)&lt;br /&gt;
&lt;br /&gt;
* [http://www.codemasters.com/igi2/front.htm IGI2: Covert Strike]: Not a Norwegian first-person shooter.&lt;br /&gt;
&lt;br /&gt;
* [http://www.inthegroove.com In The Groove]: The premier dance game created by [http://www.roxorgames.com Roxor Games, Inc.] Uses Vorbis for all of the in-game music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.agdinteractive.com/games/kq1/ King&#039;s Quest I]: King&#039;s Quest I: Quest for the Crown (Enchanced) is a fan remake of the original Sierra classic.  Uses Ogg Vorbis for sound and Ogg Theora for cutscene movies.&lt;br /&gt;
&lt;br /&gt;
* [http://www.p3int.com/KULT/ KULT Heretic Kingdoms] by 3D People/Project 3 Interactive: Uses Vorbis (1.0) for music, voice and sound effects.&lt;br /&gt;
&lt;br /&gt;
* Recent Legacy of Kain Games: On the PC, both &#039;&#039;&#039;Soul Reaver 2&#039;&#039;&#039; and &#039;&#039;&#039;Blood Omen 2&#039;&#039;&#039; by Crystal Dynamics/Eidos use Ogg Vorbis for music and sound effects. (Source: [http://www.thelostworlds.net/FAQ.HTML#ogg])&lt;br /&gt;
&lt;br /&gt;
* [http://www.ncsoft.net/eng/ncgames/lineage2_intro.asp Lineage II]: NCSoft Corporation’s 3D MMORPG Lineage II uses Ogg Vorbis for its music. They use 1.0beta3, though.&lt;br /&gt;
&lt;br /&gt;
* [http://www.liveforspeed.net/ Live for Speed]: Online racing simulator uses Ogg for all audio and sound effects.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mobygames.com/game/lock-on-modern-air-combat Lock On: Modern Air Combat]: Published by Ubisoft; CD-ROM contains over 1800 Ogg Vorbis files for speech.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mafia-game.com/ Mafia: The City Of Lost Heaven]: Not sure about any console version, but PC version is reported to use Ogg Vorbis.&lt;br /&gt;
&lt;br /&gt;
* [http://www.popcap.com/games/magicmatch Magic Match]: A very elaborate &amp;quot;Match 3&amp;quot; casual game that uses Ogg Vorbis for its audio.&lt;br /&gt;
&lt;br /&gt;
* [http://www.capcom.co.jp/rockmanx8/ Mega Man X8]: The PC version of Mega Man X8 makes use of Vorbis for music and dialogue during cutscenes.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mobygames.com/game/gamecube/metal-gear-solid-the-twin-snakes Metal Gear Solid: The Twin Snakes]: Uses Ogg Vorbis for all speech in the game.&lt;br /&gt;
&lt;br /&gt;
* [http://minecraft.net Minecraft]: Uses Ogg Vorbis for music and sound effects.&lt;br /&gt;
&lt;br /&gt;
* MotoGP: This motorcycle racing sim uses Vorbis for the music and allows players to drop their own .ogg files into the music dir to listen to them in-game.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mystrevelation.com/ Myst IV: Revelation]: Fourth game in the Myst series. Uses Ogg Vorbis for all music, speech and sound effects.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mystvgame.com/ Myst V: End of Ages]: Fifth and final game in the Myst series. Uses Ogg Vorbis for all music, speech and sound effects.&lt;br /&gt;
&lt;br /&gt;
* Nascar Racing Games from Papyrus: They had this to say about their decision and experience:&lt;br /&gt;
&amp;lt;blockquote style=&amp;quot;background-color: #eeeeee&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;We’re using a lot of spoken audio in this title (a first for us) and your codec has allowed us to reduce more than 350MB of audio data to about 40MB, a huge savings of memory and disk space! We are very impressed.&amp;quot; — Tom Faiano, Producer&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;blockquote style=&amp;quot;background-color: #eeeeee&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;Incorprating Ogg Vorbis into our codebase was quite painless, and in the end, even refreshing. No fuss no muss. Thank you for your efforts!&amp;quot; — Bill Farquhar, Soundguy du jour&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://www.nexuiz.com/ Nexuiz], a fast-paced FPS with roots in Quake I, uses Vorbis for background music. The minstagib mod uses Vorbis for all of its sound.&lt;br /&gt;
&lt;br /&gt;
* [http://www.codemasters.com/flashpoint/ Operation Flashpoint]: This highly successful military simulation/action game from Codemasters uses Vorbis for the in-game music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.orunner.com/ Ostrich Runner] by Geleos: This funny Russian cartoon-style game for kids and not only kids uses Ogg Vorbis for sound, speech and music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.ysagoon.com/glob2/ Globulation 2]: State of the art GPL-ed strategy game!&lt;br /&gt;
&lt;br /&gt;
* [http://www.penumbragame.com Penumbra: Black Plague]: Uses Ogg Vorbis for all audio.&lt;br /&gt;
&lt;br /&gt;
* [http://www.psobb.com/index.php Phantasy Star Online: Blue Burst]:  Uses Ogg Vorbis for music, stored in data/ogg.&lt;br /&gt;
&lt;br /&gt;
* [http://www.gopostal.com/ Postal 2]: Probably not the game we want to use to showcase Vorbis, but it’s being used in this Unreal-engine-powered ultra-violent game.&lt;br /&gt;
&lt;br /&gt;
* [http://www.praetoriansgame.com/ Praetorians]: This very successful game from Pyro Studios uses Vorbis for its music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.psychonauts.com/ Psychonauts]: Has vorbis.dll and vorbisfile.dll.&lt;br /&gt;
&lt;br /&gt;
* [http://www.quake4game.com/ Quake 4]: Quake 4 is the fourth title in the series of Quake FPS computer games. All game music, speech and sound effects make use of Vorbis.&lt;br /&gt;
&lt;br /&gt;
* [http://www.restricted-area.net/ Restricted Area]: by Master Creating uses Ogg Vorbis for music and VP3 for videos.&lt;br /&gt;
&lt;br /&gt;
* Ricochet: An addictive version of Break out.&lt;br /&gt;
&lt;br /&gt;
* [http://www.rockband.com/ Rock Band]: XBox360 version uses the same type of multichannel Vorbis files as Guitar Hero II, but with more channels to handle the drums and vocals separately.&lt;br /&gt;
&lt;br /&gt;
* [http://www.rockmanager.net/ Rock Manager]: Vorbis is used in this “new rock ’n roll management sim for PC from Pan Vision and Monsterland”.&lt;br /&gt;
&lt;br /&gt;
* [http://www.sacred2.com/ Sacred 2] by Studio II: uses multichannel(!) Ogg Vorbis for music, speech and sound effects.&lt;br /&gt;
&lt;br /&gt;
* [http://www.s2games.com/savage/ Savage]: This S2 Games “RTSS” hybrid genre game uses Vorbis for all the in-game music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.serioussam.com/se/ Serious Sam: The Second Encounter]: uses Vorbis for the music, although it is slightly obfuscated so as not to be easily playable by standard Ogg Vorbis players.&lt;br /&gt;
&lt;br /&gt;
* [http://www.serioussam2.com/ Serious Sam 2]: not only uses Vorbis for the music but even Theora for the videos&lt;br /&gt;
&lt;br /&gt;
* [http://www.totalwar.com/community/warlord.htm Shogun: Total War]: Shogun uses Vorbis, but only to distribute — everything is decompressed to wav during the install.&lt;br /&gt;
 &lt;br /&gt;
* [http://www.singles2.com/englisch/index.html Singles 2]: Uses ogg vorbis for sound&lt;br /&gt;
&lt;br /&gt;
* [http://www.lart.pl/en/portfolioItem.php?id=91 Ski Jumping 2004]: A commerical game that accurately models the activity of ski jumping. The game also contains over 700 Ogg Vorbis files.&lt;br /&gt;
&lt;br /&gt;
* [http://mobygames.com/game/sheet/p,3/gameId,3453/ Star Trek: Away Team]: Vorbis is used for all sound in the game — music, voiceover and SFX. This squad-based strategy game is set in the Star Trek Next Generation universe. (Official website is down, using Mobygames link)&lt;br /&gt;
&lt;br /&gt;
* [http://starcraft2.com/ StarCraft II]: Uses Vorbis for audio&lt;br /&gt;
&lt;br /&gt;
* StoneLoops! Of Jurassica ([http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=315210057&amp;amp;mt=8 Apple iTunes App Store link]): Colorful puzzle game for the iPhone/iPod Touch that uses Ogg Vorbis for audio.&lt;br /&gt;
&lt;br /&gt;
* [http://supertux.lethargik.org/ Super Tux]: Uses Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.splintercell3.com/ Tom Clancy’s Splinter Cell Chaos Theory]: .LS0 files are in fact Ogg Vorbis files.&lt;br /&gt;
&lt;br /&gt;
* [http://www.lucasarts.com/games/swrepubliccommando/ Star Wars Republic Commando]: Vorbis is used in the ambient and game music in this latest action game from LucasArts.&lt;br /&gt;
&lt;br /&gt;
* [http://www.reflexive.net/index.php?PAGE=game_detail&amp;amp;AID=30 Swarm]: A fun little arcade shooter.&lt;br /&gt;
&lt;br /&gt;
* [http://www.swat4.com/ SWAT 4]: SWAT 4 uses Ogg Vorbis for audio files.&lt;br /&gt;
&lt;br /&gt;
* [http://www.croteam.com/talosprinciple/ The Talos Principle] is a first-person puzzle game that uses Ogg Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.there.com/ There]: uses both Ogg Vorbis for the sound effects and Ogg Speex for realtime group voice chat, a first for an immersive consumer-oriented world.&lt;br /&gt;
&amp;lt;blockquote style=&amp;quot;background-color: #eeeeee&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;Voice has become a very popular part of our product!&amp;quot; — David Weekly, a There developer&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://www.wesnoth.org The Battle for Wesnoth]: uses Ogg Vorbis for it&#039;s music and for most of it&#039;s sounds.&lt;br /&gt;
&lt;br /&gt;
* [http://www.riddickgame.com/ The Chronicles of Riddick: Escape From Butcher’s Bay (Director’s Cut)]: Uses Vorbis for all audio and Theora for cutscenes.&lt;br /&gt;
&lt;br /&gt;
* [https://thimbleweedpark.com/ Thimbleweed Park]: Retro-looking point-and-click adventure, [https://blog.thimbleweedpark.com/tracking_talkies using Ogg Vorbis for its music, character voices and sound effects].&lt;br /&gt;
&amp;lt;blockquote style=&amp;quot;background-color: #eeeeee&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;[The characters&#039; dialog is] around 6GB of .wav files and we needed to compress them for inclusion in the game. We used .ogg files due to it being free of the patent and licensing issues that .mp3 has, although either would have worked.&amp;quot; — Ron Gilbert&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://www.thethinggames.com/ The Thing]: Uses Vorbis&lt;br /&gt;
&amp;lt;blockquote style=&amp;quot;background-color: #eeeeee&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;The original multilanguage distro took three CDs, and went down to  only one after I converted all wavs to oggs. Nifty :) Sadly enough,  marketing decided to not have one language per CD anyway (probably to  annoy people who migrate) :/ Thanks for a very cool (and easy to use) lib/format!&amp;quot; — Vincent Penquerc’h&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://www.asahi-net.or.jp/~cs8k-cyu/windows/tt_e.html Torus Trooper]: Frantic 3D shootemup, using Vorbis for the music. (see also the [http://www.emhsoft.net/ttrooper/ Linux port] and [http://www.apple.com/downloads/macosx/games/action_adventure/torustrooper.html MacOS version])&lt;br /&gt;
&lt;br /&gt;
* [http://www.trackmania.com/ TrackMania] uses Vorbis for music in menu and tracks. [music in self-made tracks also need to be in Vorbis]&lt;br /&gt;
&lt;br /&gt;
* [http://www.mikeoldfield.com/ Tr3s Lunas] (aka Music VR episode 1): This game, featuring the music of Mike Oldfield, uses Vorbis for the music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.tribesvengeance.com Tribes: Vengance] by Irration Games/Sierra use Ogg Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mobygames.com/game/gamecube/true-crime-new-york-city True Crime: New York City]: GameCube version contains over 11,500 Ogg Vorbis files. It is likely that other platform ports also use the same files (note that the [http://www.mobygames.com/game/xbox/true-crime-new-york-city Xbox version] uses Windows Media Audio files in place of Ogg Vorbis files)&lt;br /&gt;
&lt;br /&gt;
* [http://tuxtype.sourceforge.net/ Tuxtyping 2]: Educational typing tutor for kids of all ages! &lt;br /&gt;
&lt;br /&gt;
* [http://www.ufo-aftershock.com/ UFO: Aftershock]: Uses Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.ufo-afterlight.com/ UFO: Afterlight]: Uses Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.atari.com/us/games/unreal2/pc Unreal 2]: PC version uses Vorbis, usage on consoles not confirmed.&lt;br /&gt;
&amp;lt;blockquote style=&amp;quot;background-color: #eeeeee&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;We went with Ogg Vorbis due to its excellent playback and compression, and we used it not only for music but also all of the in-game voice. Without it, we never would have been able to fit on two CDs.&amp;quot; — [http://www.4unrealers.com/entrevistas/263/ 4unrealers.com]&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://www.unrealtournament.com/ut2003/ Unreal Tournament 2003]: This overwhelmingly-popular multiplayer first person shooter PC title uses Vorbis for its music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.unrealtournament.com/ut2004/ Unreal Tournament 2004]: Yet another Unreal game which uses Vorbis for the music (What about effects and voice? Does anyone know?). The readme file of the demo even mentions Speex!&lt;br /&gt;
&lt;br /&gt;
* [http://sc2.sourceforge.net/ The Ur-Quan Masters]: Port of Star Control 2 to modern computers. Toys for Bob released the source of this amazing game under the GPL in 2002. Ogg Vorbis is used for the dialogue and the background music.&lt;br /&gt;
&lt;br /&gt;
* [http://uru.ubi.com/ Uru: Ages Beyond Myst]: Spinoff from the Myst series. Uses Ogg Vorbis for all music, speech and sound effects.&lt;br /&gt;
&lt;br /&gt;
* [http://mobygames.com/game/sheet/p,3/gameId,8635/ Lionheart — Legacy of the Crusader]: An 3/4 RPG from Black Isle. Uses Vorbis for all audio. Thanks to all the guys that made Vorbis great.. (I even donated money myself, someday maybe I can convince the company to kick in some bucks as well). Official site is down, using mobygames link.&lt;br /&gt;
&lt;br /&gt;
* [http://www.global-gaming.com/Dominion/ Urban Dominion] (beta): First Person Massively Multiplayer Online Role-Playing Game by Global-Gaming. Uses Ogg Vorbis for the sound system.&lt;br /&gt;
&lt;br /&gt;
* [http://www.vietcong-game.com/ Vietcong]: Vietnam War First Person Shooter by Pterodon. Uses Ogg Vorbis I believe for the background music.&lt;br /&gt;
&lt;br /&gt;
* [http://vegastrike.sourceforge.net/ Vega Strike]: It is a free spacesim. Ogg Vorbis files are stored in \music\ .&lt;br /&gt;
&lt;br /&gt;
* [http://www.gathering.com/wingsofwar/ Wings Of War]: It is an arcade shooter in times of WWI. Game has ogg.dll, vorbis.dll and vorbisfile.dll — but *.ogg files are not accesible.&lt;br /&gt;
&lt;br /&gt;
* [http://jonof.edgenetwork.org/winbuild/ WinBuild]: Winbuild is a port of Ken Silverman’s [http://www.advsys.net/ken/buildsrc/default.htm original Build engine demo] (for DOS) to Windows. It uses Vorbis compression for the music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.worldofwarcraft.com/ World of Warcraft]: popular massively multiplayer online role-playing game from Blizzard Entertainment use Vorbis for speech and sound effects.&lt;br /&gt;
&lt;br /&gt;
* [http://www.zax-game.com/ Zax — The Alien Hunter]: A large 3/4 view action adventure game.&lt;br /&gt;
&lt;br /&gt;
[[Category:Vorbis]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Games_that_use_Vorbis&amp;diff=16616</id>
		<title>Games that use Vorbis</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Games_that_use_Vorbis&amp;diff=16616"/>
		<updated>2017-10-04T11:32:40Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following games use [[Vorbis]], most frequently for their in-game music or sound effects:&lt;br /&gt;
&lt;br /&gt;
* All Games By [http://www.reflexive.com/index.php?CAT=Search&amp;amp;SEARCH=dev%3AReflexive+Entertainment&amp;amp;PAGE=GameList Reflexive Entertainment].&lt;br /&gt;
&lt;br /&gt;
* [http://www.mobygames.com/game/windows/007-nightfire 007: Nightfire]: Uses Ogg Vorbis for background soundtrack.&lt;br /&gt;
&lt;br /&gt;
* [http://www.asciisector.net/ Ascii Sector]: Space combat/exploration/trading game.  Uses Ogg Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.ageofconan.com/ Age of Conan — Hyborian Adventures]: Uses Ogg Vorbis for all audio.&lt;br /&gt;
&lt;br /&gt;
* [http://www.americasarmy.com/ America’s Army]: Uses Ogg Vorbis for main theme.&lt;br /&gt;
&lt;br /&gt;
* [http://www.amnesiagame.com/ Amnesia: The Dark Descent]: Uses Ogg Vorbis for all audio.&lt;br /&gt;
&lt;br /&gt;
* [http://assault.cubers.net/ AssaultCube]: A free fast paced first-person shooter with little hardware requirements for Windows, Linux and OS X. Uses Ogg Vorbis for all game sounds and music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.lionhead.com/bw2/ Black &amp;amp; White 2]: Uses Ogg Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.pyrogon.com/games/candycruncher/ Candy Cruncher]: This cute puzzle game from Brian Hook’s company, Pyrogon, uses Vorbis for the addictive music you hear while you race the clock.&lt;br /&gt;
&lt;br /&gt;
* [http://www.callofcthulhu.com/ Call of Cthulhu] is a first-person horror game that combines intense action and adventure elements. It uses Ogg Vorbis for music and speech.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mobygames.com/game/windows/catechumen Catechumen] is a Christian-themed FPS that uses Ogg Vorbis.&lt;br /&gt;
&lt;br /&gt;
* [http://www.civilization5.com/ Civilization V] is a turn-based strategy game that uses Ogg Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.atari.com/crashday/ Crashday]: Stunt racing game, developed by independent German studio Moon Byte. Uses Ogg Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://buenavistagames.go.com/product/chickenLittlePC.html Chicken Litte]: Adventure game for children inspired by the motion picture in PC edition uses Vorbis for dialogs and music. (not sure if sound effects too)&lt;br /&gt;
&lt;br /&gt;
* [http://www.cossacks2.de/ Cossacks 2]: “Cossacks II: Napoleonic Wars” is a sequel of “Cossacks: European Wars”. Ogg Vorbis 1.0 files are in \data\music\&lt;br /&gt;
&lt;br /&gt;
* [http://www.darwinia.co.uk/ Darwinia]: The second title from Indy developer Introversion Software. Darwinia is a stylised retro — Tron meets Cannon Fodder. It uses Vorbis for all in game sound effects and music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.introversion.co.uk/defcon/ DEFCON]: The third title from Introversion Software.  Uses Vorbis for music, effects, everything, like Darwinia.&lt;br /&gt;
&lt;br /&gt;
* [http://devilmaycry.com/ Devil May Cry 4] (for the PC, at least): Uses (occasionally multichannel) Ogg Vorbis for ingame and cutscene music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.eidos.co.uk/gss/dxiw/ Deus Ex: Invisible War] by Ion Storm/Eidos: Uses Ogg Vorbis for music and voice (and possibly for sound fx too).&lt;br /&gt;
&lt;br /&gt;
* [http://diablo3.com Diablo III] uses Vorbis for audio.&lt;br /&gt;
&lt;br /&gt;
* [http://www.idsoftware.com/games/doom/doom3/ DOOM 3]:  The latest version of this famous first person shooter game from id software uses Vorbis for the theme music as well as their ambient and game sounds.&lt;br /&gt;
&lt;br /&gt;
* [http://mobygames.com/game/sheet/p,3/gameId,6505/ Duke Nukem: Manhattan Project]: This game from 3D Realms was released in 2002 and used Vorbis for their music. (Official website is down, using  Mobygames link)&lt;br /&gt;
&lt;br /&gt;
* [http://www.popcap.com/games/free/dynomite Dynomite]: Puzzle Bobble/Bust A Move clone for Windows by PopCap Games, with mouse control. Uses Ogg Vorbis for nearly all sound effects.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Eschalon:_Book_I Eschalon]: A classic-style roleplaying game, for Windows, Mac, and Linux.  Music is in &#039;&#039;Ogg Vorbis&#039;&#039; format.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mobygames.com/game/enclave/ Enclave] by Starbreeze/Black Label Games: Uses Ogg Vorbis for music (and possibly for sound fx and voice too).&lt;br /&gt;
&lt;br /&gt;
* [http://www.eve-online.com EVE Online] by CCP Games, the Icelandic-homed space-based single-shard persistent world game uses Ogg Vorbis for its music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.lionhead.com/fabletlc/ Fable: The Lost Chapters]: Uses Ogg Vorbis for music and cutscenes (Ancient libVorbis version, 1.0 RC2).&lt;br /&gt;
&lt;br /&gt;
* [http://farcry.ubi.com/ FarCry] by Crytek: uses Ogg Vorbis for music and effects.&lt;br /&gt;
&lt;br /&gt;
* [http://www.freedom-fighters.co.uk/ Freedom Fighters] by IO Interactive: String search reveals “libVorbis I 20011217” in freedom.exe.&lt;br /&gt;
&lt;br /&gt;
* [http://www.siriusgames.dk/index.php?pageid=67 Gangland] by MediaMobsters: Uses Ogg Vorbis for music and cutscenes (Data\streams\). Encoded with Xiph.Org libVorbis I 20020717. Decoder library: FMOD 3.71.&lt;br /&gt;
&lt;br /&gt;
* [http://www.rockstargames.com/vicecity/ Grand Theft Auto: Vice City] by Rockstar Games/Rockstar North uses Ogg Vorbis to store music, radio, ambient sounds, police messages and cutscene audio. Players can also store their custom tracks (accessible in-game via the “User Track Player” radio station) in Ogg Vorbis.&lt;br /&gt;
&lt;br /&gt;
* [http://www.rockstargames.com/sanandreas/ Grand Theft Auto: San Andreas] by Rockstar Games/Rockstar North uses Ogg Vorbis to store music, radio, ambient sounds, police messages and cutscene audio. Players can also store their custom tracks (accessible in-game via the “User Track Player” radio station) in Ogg Vorbis.&lt;br /&gt;
&lt;br /&gt;
* [http://www.gothic3.com/ Gothic 3] by Piranha Bytes: Vorbis is used in the ogg container for everything (music, speech, effects) except of the intro video. For example: Music @ 256 kb/s, Speech @ 86 kb/s. About 18 hours of speech compressed to 700 MB.&lt;br /&gt;
&lt;br /&gt;
* [http://www.guiltygearx2reload.com/ Guilty Gear XX]: The PC version, at least, uses Ogg Vorbis for all the music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.guitarherogame.com/gh2/ Guitar Hero II] by Red Octane (Activision), XBox360 platform only (multichannel Vorbis with 5 or 6 channels per song)&lt;br /&gt;
&lt;br /&gt;
* [http://halo.bungie.org/ Halo]: Mac and PC versions of Halo use Ogg Vorbis for all audio, it seems. The Xiph license and dynamically linked libraries of Ogg and Vorbis are included in the Halo directory. XBox version does not use Ogg Vorbis.&lt;br /&gt;
&lt;br /&gt;
* [http://harrypotter.ea.com/cofs/index.html Harry Potter II (Chamber of Secrets)]: This is unsubstantiated, it was reported on one of the vorbis mailing lists, but there is little evidence either way on this title.  EA has been supportive of Vorbis though, so it’s not entirely impossible.  If anyone can give us a yay or nay on this, please do.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mightandmagicgame.com/HeroesV/ Heroes of Might and Magic V]: Uses Vorbis for audio and Theora for video.&lt;br /&gt;
&lt;br /&gt;
* [http://www.eidosinteractive.com/games/info.html?gmid=118 Hitman 2]: uses Vorbis. (PC only or consoles too?)&lt;br /&gt;
&lt;br /&gt;
* [http://www.codemasters.com/igi2/front.htm IGI2: Covert Strike]: Not a Norwegian first-person shooter.&lt;br /&gt;
&lt;br /&gt;
* [http://www.inthegroove.com In The Groove]: The premier dance game created by [http://www.roxorgames.com Roxor Games, Inc.] Uses Vorbis for all of the in-game music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.agdinteractive.com/games/kq1/ King&#039;s Quest I]: King&#039;s Quest I: Quest for the Crown (Enchanced) is a fan remake of the original Sierra classic.  Uses Ogg Vorbis for sound and Ogg Theora for cutscene movies.&lt;br /&gt;
&lt;br /&gt;
* [http://www.p3int.com/KULT/ KULT Heretic Kingdoms] by 3D People/Project 3 Interactive: Uses Vorbis (1.0) for music, voice and sound effects.&lt;br /&gt;
&lt;br /&gt;
* Recent Legacy of Kain Games: On the PC, both &amp;lt;b&amp;gt;Soul Reaver 2&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;Blood Omen 2&amp;lt;/b&amp;gt; by Crystal Dynamics/Eidos use Ogg Vorbis for music and sound effects. (Source: [http://www.thelostworlds.net/FAQ.HTML#ogg])&lt;br /&gt;
&lt;br /&gt;
* [http://www.ncsoft.net/eng/ncgames/lineage2_intro.asp Lineage II]: NCSoft Corporation’s 3D MMORPG Lineage II uses Ogg Vorbis for its music. They use 1.0beta3, though.&lt;br /&gt;
&lt;br /&gt;
* [http://www.liveforspeed.net/ Live for Speed]: Online racing simulator uses Ogg for all audio and sound effects.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mobygames.com/game/lock-on-modern-air-combat Lock On: Modern Air Combat]: Published by Ubisoft; CD-ROM contains over 1800 Ogg Vorbis files for speech.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mafia-game.com/ Mafia: The City Of Lost Heaven]: Not sure about any console version, but PC version is reported to use Ogg Vorbis.&lt;br /&gt;
&lt;br /&gt;
* [http://www.popcap.com/games/magicmatch Magic Match]: A very elaborate &amp;quot;Match 3&amp;quot; casual game that uses Ogg Vorbis for its audio.&lt;br /&gt;
&lt;br /&gt;
* [http://www.capcom.co.jp/rockmanx8/ Mega Man X8]: The PC version of Mega Man X8 makes use of Vorbis for music and dialogue during cutscenes.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mobygames.com/game/gamecube/metal-gear-solid-the-twin-snakes Metal Gear Solid: The Twin Snakes]: Uses Ogg Vorbis for all speech in the game.&lt;br /&gt;
&lt;br /&gt;
* [http://minecraft.net Minecraft]: Uses Ogg Vorbis for music and sound effects.&lt;br /&gt;
&lt;br /&gt;
* MotoGP: This motorcycle racing sim uses Vorbis for the music and allows players to drop their own .ogg files into the music dir to listen to them in-game.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mystrevelation.com/ Myst IV: Revelation]: Fourth game in the Myst series. Uses Ogg Vorbis for all music, speech and sound effects.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mystvgame.com/ Myst V: End of Ages]: Fifth and final game in the Myst series. Uses Ogg Vorbis for all music, speech and sound effects.&lt;br /&gt;
&lt;br /&gt;
* Nascar Racing Games from Papyrus: They had this to say about their decision and experience:&lt;br /&gt;
  &lt;br /&gt;
  “We’re using a lot of spoken audio in this title (a first for us) and&lt;br /&gt;
  your codec has allowed us to reduce more than 350MB of audio data to&lt;br /&gt;
  about 40MB, a huge savings of memory and disk space! We are very&lt;br /&gt;
  impressed.” — Tom Faiano, Producer 	 &lt;br /&gt;
 &lt;br /&gt;
  “Incorprating Ogg Vorbis into our codebase was quite painless, and in the&lt;br /&gt;
  end, even refreshing. No fuss no muss. Thank you for your efforts!”&lt;br /&gt;
  — Bill Farquhar, Soundguy du jour&lt;br /&gt;
&lt;br /&gt;
* [http://www.nexuiz.com/ Nexuiz], a fast-paced FPS with roots in Quake I, uses Vorbis for background music. The minstagib mod uses Vorbis for all of its sound.&lt;br /&gt;
&lt;br /&gt;
* [http://www.codemasters.com/flashpoint/ Operation Flashpoint]: This highly successful military simulation/action game from Codemasters uses Vorbis for the in-game music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.orunner.com/ Ostrich Runner] by Geleos: This funny Russian cartoon-style game for kids and not only kids uses Ogg Vorbis for sound, speech and music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.ysagoon.com/glob2/ Globulation 2]: State of the art GPL-ed strategy game!&lt;br /&gt;
&lt;br /&gt;
* [http://www.penumbragame.com Penumbra: Black Plague]: Uses Ogg Vorbis for all audio.&lt;br /&gt;
&lt;br /&gt;
* [http://www.psobb.com/index.php Phantasy Star Online: Blue Burst]:  Uses Ogg Vorbis for music, stored in data/ogg.&lt;br /&gt;
&lt;br /&gt;
* [http://www.gopostal.com/ Postal 2]: Probably not the game we want to use to showcase Vorbis, but it’s being used in this Unreal-engine-powered ultra-violent game.&lt;br /&gt;
&lt;br /&gt;
* [http://www.praetoriansgame.com/ Praetorians]: This very successful game from Pyro Studios uses Vorbis for its music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.psychonauts.com/ Psychonauts]: Has vorbis.dll and vorbisfile.dll.&lt;br /&gt;
&lt;br /&gt;
* [http://www.quake4game.com/ Quake 4]: Quake 4 is the fourth title in the series of Quake FPS computer games. All game music, speech and sound effects make use of Vorbis.&lt;br /&gt;
&lt;br /&gt;
* [http://www.restricted-area.net/ Restricted Area]: by Master Creating uses Ogg Vorbis for music and VP3 for videos.&lt;br /&gt;
&lt;br /&gt;
* Ricochet: An addictive version of Break out.&lt;br /&gt;
&lt;br /&gt;
* [http://www.rockband.com/ Rock Band]: XBox360 version uses the same type of multichannel Vorbis files as Guitar Hero II, but with more channels to handle the drums and vocals separately.&lt;br /&gt;
&lt;br /&gt;
* [http://www.rockmanager.net/ Rock Manager]: Vorbis is used in this “new rock ’n roll management sim for PC from Pan Vision and Monsterland”.&lt;br /&gt;
&lt;br /&gt;
* [http://www.sacred2.com/ Sacred 2] by Studio II: uses multichannel(!) Ogg Vorbis for music, speech and sound effects.&lt;br /&gt;
&lt;br /&gt;
* [http://www.s2games.com/savage/ Savage]: This S2 Games “RTSS” hybrid genre game uses Vorbis for all the in-game music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.serioussam.com/se/ Serious Sam: The Second Encounter]: uses Vorbis for the music, although it is slightly obfuscated so as not to be easily playable by standard Ogg Vorbis players.&lt;br /&gt;
&lt;br /&gt;
* [http://www.serioussam2.com/ Serious Sam 2]: not only uses Vorbis for the music but even Theora for the videos&lt;br /&gt;
&lt;br /&gt;
* [http://www.totalwar.com/community/warlord.htm Shogun: Total War]: Shogun uses Vorbis, but only to distribute — everything is decompressed to wav during the install.&lt;br /&gt;
 &lt;br /&gt;
* [http://www.singles2.com/englisch/index.html Singles 2]: Uses ogg vorbis for sound&lt;br /&gt;
&lt;br /&gt;
* [http://www.lart.pl/en/portfolioItem.php?id=91 Ski Jumping 2004]: A commerical game that accurately models the activity of ski jumping. The game also contains over 700 Ogg Vorbis files.&lt;br /&gt;
&lt;br /&gt;
* [http://mobygames.com/game/sheet/p,3/gameId,3453/ Star Trek: Away Team]: Vorbis is used for all sound in the game — music, voiceover and SFX. This squad-based strategy game is set in the Star Trek Next Generation universe. (Official website is down, using Mobygames link)&lt;br /&gt;
&lt;br /&gt;
* [http://starcraft2.com/ StarCraft II]: Uses Vorbis for audio&lt;br /&gt;
&lt;br /&gt;
* StoneLoops! Of Jurassica ([http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=315210057&amp;amp;mt=8 Apple iTunes App Store link]): Colorful puzzle game for the iPhone/iPod Touch that uses Ogg Vorbis for audio.&lt;br /&gt;
&lt;br /&gt;
* [http://supertux.lethargik.org/ Super Tux]: Uses Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.splintercell3.com/ Tom Clancy’s Splinter Cell Chaos Theory]: .LS0 files are in fact Ogg Vorbis files.&lt;br /&gt;
&lt;br /&gt;
* [http://www.lucasarts.com/games/swrepubliccommando/ Star Wars Republic Commando]: Vorbis is used in the ambient and game music in this latest action game from LucasArts.&lt;br /&gt;
&lt;br /&gt;
* [http://www.reflexive.net/index.php?PAGE=game_detail&amp;amp;AID=30 Swarm]: A fun little arcade shooter.&lt;br /&gt;
&lt;br /&gt;
* [http://www.swat4.com/ SWAT 4]: SWAT 4 uses Ogg Vorbis for audio files.&lt;br /&gt;
&lt;br /&gt;
* [http://www.croteam.com/talosprinciple/ The Talos Principle] is a first-person puzzle game that uses Ogg Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.there.com/ There]: uses both Ogg Vorbis for the sound effects and Ogg Speex for realtime group voice chat, a first for an immersive consumer-oriented world. Voice has become a very popular part of our product! ** posted by [http://david.weekly.org David Weekly], a There developer.&lt;br /&gt;
&lt;br /&gt;
* [http://www.wesnoth.org The Battle for Wesnoth]: uses Ogg Vorbis for it&#039;s music and for most of it&#039;s sounds.&lt;br /&gt;
&lt;br /&gt;
* [http://www.riddickgame.com/ The Chronicles of Riddick: Escape From Butcher’s Bay (Director’s Cut)]: Uses Vorbis for all audio and Theora for cutscenes.&lt;br /&gt;
&lt;br /&gt;
* [https://thimbleweedpark.com/ Thimbleweed Park]: Retro-looking point-and-click adventure, [https://blog.thimbleweedpark.com/tracking_talkies using Ogg Vorbis for its music, character voices and sound effects].&lt;br /&gt;
&lt;br /&gt;
  &amp;quot;[The characters&#039; dialog is] around 6GB of .wav files&lt;br /&gt;
  and we needed to compress them for inclusion in the game.&lt;br /&gt;
  We used .ogg files due to it being free of the patent&lt;br /&gt;
  and licensing issues that .mp3 has, although either would have worked.&amp;quot;&lt;br /&gt;
  — Ron Gilbert&lt;br /&gt;
&lt;br /&gt;
* [http://www.thethinggames.com/ The Thing]: Uses Vorbis&lt;br /&gt;
&lt;br /&gt;
  “The original multilanguage distro took three CDs, and went down to &lt;br /&gt;
  only one after I converted all wavs to oggs. Nifty :) Sadly enough, &lt;br /&gt;
  marketing decided to not have one language per CD anyway (probably to &lt;br /&gt;
  annoy people who migrate) :/ Thanks for a very cool (and easy to use)&lt;br /&gt;
  lib/format!” — Vincent Penquerc’h&lt;br /&gt;
&lt;br /&gt;
* [http://www.asahi-net.or.jp/~cs8k-cyu/windows/tt_e.html Torus Trooper]: Frantic 3D shootemup, using Vorbis for the music. (see also the [http://www.emhsoft.net/ttrooper/ Linux port] and [http://www.apple.com/downloads/macosx/games/action_adventure/torustrooper.html MacOS version])&lt;br /&gt;
&lt;br /&gt;
* [http://www.trackmania.com/ TrackMania] uses Vorbis for music in menu and tracks. [music in self-made tracks also need to be in Vorbis]&lt;br /&gt;
&lt;br /&gt;
* [http://www.mikeoldfield.com/ Tr3s Lunas] (aka Music VR episode 1): This game, featuring the music of Mike Oldfield, uses Vorbis for the music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.tribesvengeance.com Tribes: Vengance] by Irration Games/Sierra use Ogg Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mobygames.com/game/gamecube/true-crime-new-york-city True Crime: New York City]: GameCube version contains over 11,500 Ogg Vorbis files. It is likely that other platform ports also use the same files (note that the [http://www.mobygames.com/game/xbox/true-crime-new-york-city Xbox version] uses Windows Media Audio files in place of Ogg Vorbis files)&lt;br /&gt;
&lt;br /&gt;
* [http://tuxtype.sourceforge.net/ Tuxtyping 2]: Educational typing tutor for kids of all ages! &lt;br /&gt;
&lt;br /&gt;
* [http://www.ufo-aftershock.com/ UFO: Aftershock]: Uses Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.ufo-afterlight.com/ UFO: Afterlight]: Uses Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.atari.com/us/games/unreal2/pc Unreal 2]: PC version uses Vorbis, usage on consoles not confirmed.&lt;br /&gt;
&lt;br /&gt;
  “We went with Ogg Vorbis due to its excellent playback and compression,&lt;br /&gt;
  and we used it not only for music but also all of the in-game voice.&lt;br /&gt;
  Without it, we never would have been able to fit on two CDs.”&lt;br /&gt;
  — [http://www.4unrealers.com/entrevistas/263/ 4unrealers.com]&lt;br /&gt;
&lt;br /&gt;
* [http://www.unrealtournament.com/ut2003/ Unreal Tournament 2003]: This overwhelmingly-popular multiplayer first person shooter PC title uses Vorbis for its music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.unrealtournament.com/ut2004/ Unreal Tournament 2004]: Yet another Unreal game which uses Vorbis for the music (What about effects and voice? Does anyone know?). The readme file of the demo even mentions Speex!&lt;br /&gt;
&lt;br /&gt;
* [http://sc2.sourceforge.net/ The Ur-Quan Masters]: Port of Star Control 2 to modern computers. Toys for Bob released the source of this amazing game under the GPL in 2002. Ogg Vorbis is used for the dialogue and the background music.&lt;br /&gt;
&lt;br /&gt;
* [http://uru.ubi.com/ Uru: Ages Beyond Myst]: Spinoff from the Myst series. Uses Ogg Vorbis for all music, speech and sound effects.&lt;br /&gt;
&lt;br /&gt;
* [http://mobygames.com/game/sheet/p,3/gameId,8635/ Lionheart — Legacy of the Crusader]: An 3/4 RPG from Black Isle. Uses Vorbis for all audio. Thanks to all the guys that made Vorbis great.. (I even donated money myself, someday maybe I can convince the company to kick in some bucks as well). Official site is down, using mobygames link.&lt;br /&gt;
&lt;br /&gt;
* [http://www.global-gaming.com/Dominion/ Urban Dominion] (beta): First Person Massively Multiplayer Online Role-Playing Game by Global-Gaming. Uses Ogg Vorbis for the sound system.&lt;br /&gt;
&lt;br /&gt;
* [http://www.vietcong-game.com/ Vietcong]: Vietnam War First Person Shooter by Pterodon. Uses Ogg Vorbis I believe for the background music.&lt;br /&gt;
&lt;br /&gt;
* [http://vegastrike.sourceforge.net/ Vega Strike]: It is a free spacesim. Ogg Vorbis files are stored in \music\ .&lt;br /&gt;
&lt;br /&gt;
* [http://www.gathering.com/wingsofwar/ Wings Of War]: It is an arcade shooter in times of WWI. Game has ogg.dll, vorbis.dll and vorbisfile.dll — but *.ogg files are not accesible.&lt;br /&gt;
&lt;br /&gt;
* [http://jonof.edgenetwork.org/winbuild/ WinBuild]: Winbuild is a port of Ken Silverman’s [http://www.advsys.net/ken/buildsrc/default.htm original Build engine demo] (for DOS) to Windows. It uses Vorbis compression for the music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.worldofwarcraft.com/ World of Warcraft]: popular massively multiplayer online role-playing game from Blizzard Entertainment use Vorbis for speech and sound effects.&lt;br /&gt;
&lt;br /&gt;
* [http://www.zax-game.com/ Zax — The Alien Hunter]: A large 3/4 view action adventure game.&lt;br /&gt;
&lt;br /&gt;
[[Category:Vorbis]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Games_that_use_Vorbis&amp;diff=16615</id>
		<title>Games that use Vorbis</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Games_that_use_Vorbis&amp;diff=16615"/>
		<updated>2017-10-04T09:20:33Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: fix alphabetic ordering...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following games use [[Vorbis]], most frequently for their in-game music or sound effects:&lt;br /&gt;
&lt;br /&gt;
* All Games By [http://www.reflexive.com/index.php?CAT=Search&amp;amp;SEARCH=dev%3AReflexive+Entertainment&amp;amp;PAGE=GameList Reflexive Entertainment].&lt;br /&gt;
&lt;br /&gt;
* [http://www.mobygames.com/game/windows/007-nightfire 007: Nightfire]: Uses Ogg Vorbis for background soundtrack.&lt;br /&gt;
&lt;br /&gt;
* [http://www.asciisector.net/ Ascii Sector]: Space combat/exploration/trading game.  Uses Ogg Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.ageofconan.com/ Age of Conan — Hyborian Adventures]: Uses Ogg Vorbis for all audio.&lt;br /&gt;
&lt;br /&gt;
* [http://www.americasarmy.com/ America’s Army]: Uses Ogg Vorbis for main theme.&lt;br /&gt;
&lt;br /&gt;
* [http://www.amnesiagame.com/ Amnesia: The Dark Descent]: Uses Ogg Vorbis for all audio.&lt;br /&gt;
&lt;br /&gt;
* [http://assault.cubers.net/ AssaultCube]: A free fast paced first-person shooter with little hardware requirements for Windows, Linux and OS X. Uses Ogg Vorbis for all game sounds and music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.lionhead.com/bw2/ Black &amp;amp; White 2]: Uses Ogg Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.pyrogon.com/games/candycruncher/ Candy Cruncher]: This cute puzzle game from Brian Hook’s company, Pyrogon, uses Vorbis for the addictive music you hear while you race the clock.&lt;br /&gt;
&lt;br /&gt;
* [http://www.callofcthulhu.com/ Call of Cthulhu] is a first-person horror game that combines intense action and adventure elements. It uses Ogg Vorbis for music and speech.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mobygames.com/game/windows/catechumen Catechumen] is a Christian-themed FPS that uses Ogg Vorbis.&lt;br /&gt;
&lt;br /&gt;
* [http://www.civilization5.com/ Civilization V] is a turn-based strategy game that uses Ogg Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.atari.com/crashday/ Crashday]: Stunt racing game, developed by independent German studio Moon Byte. Uses Ogg Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://buenavistagames.go.com/product/chickenLittlePC.html Chicken Litte]: Adventure game for children inspired by the motion picture in PC edition uses Vorbis for dialogs and music. (not sure if sound effects too)&lt;br /&gt;
&lt;br /&gt;
* [http://www.cossacks2.de/ Cossacks 2]: “Cossacks II: Napoleonic Wars” is a sequel of “Cossacks: European Wars”. Ogg Vorbis 1.0 files are in \data\music\&lt;br /&gt;
&lt;br /&gt;
* [http://www.darwinia.co.uk/ Darwinia]: The second title from Indy developer Introversion Software. Darwinia is a stylised retro — Tron meets Cannon Fodder. It uses Vorbis for all in game sound effects and music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.introversion.co.uk/defcon/ DEFCON]: The third title from Introversion Software.  Uses Vorbis for music, effects, everything, like Darwinia.&lt;br /&gt;
&lt;br /&gt;
* [http://devilmaycry.com/ Devil May Cry 4] (for the PC, at least): Uses (occasionally multichannel) Ogg Vorbis for ingame and cutscene music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.eidos.co.uk/gss/dxiw/ Deus Ex: Invisible War] by Ion Storm/Eidos: Uses Ogg Vorbis for music and voice (and possibly for sound fx too).&lt;br /&gt;
&lt;br /&gt;
* [http://diablo3.com Diablo III] uses Vorbis for audio.&lt;br /&gt;
&lt;br /&gt;
* [http://www.idsoftware.com/games/doom/doom3/ DOOM 3]:  The latest version of this famous first person shooter game from id software uses Vorbis for the theme music as well as their ambient and game sounds.&lt;br /&gt;
&lt;br /&gt;
* [http://mobygames.com/game/sheet/p,3/gameId,6505/ Duke Nukem: Manhattan Project]: This game from 3D Realms was released in 2002 and used Vorbis for their music. (Official website is down, using  Mobygames link)&lt;br /&gt;
&lt;br /&gt;
* [http://www.popcap.com/games/free/dynomite Dynomite]: Puzzle Bobble/Bust A Move clone for Windows by PopCap Games, with mouse control. Uses Ogg Vorbis for nearly all sound effects.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Eschalon:_Book_I Eschalon]: A classic-style roleplaying game, for Windows, Mac, and Linux.  Music is in &#039;&#039;Ogg Vorbis&#039;&#039; format.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mobygames.com/game/enclave/ Enclave] by Starbreeze/Black Label Games: Uses Ogg Vorbis for music (and possibly for sound fx and voice too).&lt;br /&gt;
&lt;br /&gt;
* [http://www.eve-online.com EVE Online] by CCP Games, the Icelandic-homed space-based single-shard persistent world game uses Ogg Vorbis for its music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.lionhead.com/fabletlc/ Fable: The Lost Chapters]: Uses Ogg Vorbis for music and cutscenes (Ancient libVorbis version, 1.0 RC2).&lt;br /&gt;
&lt;br /&gt;
* [http://farcry.ubi.com/ FarCry] by Crytek: uses Ogg Vorbis for music and effects.&lt;br /&gt;
&lt;br /&gt;
* [http://www.freedom-fighters.co.uk/ Freedom Fighters] by IO Interactive: String search reveals “libVorbis I 20011217” in freedom.exe.&lt;br /&gt;
&lt;br /&gt;
* [http://www.siriusgames.dk/index.php?pageid=67 Gangland] by MediaMobsters: Uses Ogg Vorbis for music and cutscenes (Data\streams\). Encoded with Xiph.Org libVorbis I 20020717. Decoder library: FMOD 3.71.&lt;br /&gt;
&lt;br /&gt;
* [http://www.rockstargames.com/vicecity/ Grand Theft Auto: Vice City] by Rockstar Games/Rockstar North uses Ogg Vorbis to store music, radio, ambient sounds, police messages and cutscene audio. Players can also store their custom tracks (accessible in-game via the “User Track Player” radio station) in Ogg Vorbis.&lt;br /&gt;
&lt;br /&gt;
* [http://www.rockstargames.com/sanandreas/ Grand Theft Auto: San Andreas] by Rockstar Games/Rockstar North uses Ogg Vorbis to store music, radio, ambient sounds, police messages and cutscene audio. Players can also store their custom tracks (accessible in-game via the “User Track Player” radio station) in Ogg Vorbis.&lt;br /&gt;
&lt;br /&gt;
* [http://www.gothic3.com/ Gothic 3] by Piranha Bytes: Vorbis is used in the ogg container for everything (music, speech, effects) except of the intro video. For example: Music @ 256 kb/s, Speech @ 86 kb/s. About 18 hours of speech compressed to 700 MB.&lt;br /&gt;
&lt;br /&gt;
* [http://www.guiltygearx2reload.com/ Guilty Gear XX]: The PC version, at least, uses Ogg Vorbis for all the music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.guitarherogame.com/gh2/ Guitar Hero II] by Red Octane (Activision), XBox360 platform only (multichannel Vorbis with 5 or 6 channels per song)&lt;br /&gt;
&lt;br /&gt;
* [http://halo.bungie.org/ Halo]: Mac and PC versions of Halo use Ogg Vorbis for all audio, it seems. The Xiph license and dynamically linked libraries of Ogg and Vorbis are included in the Halo directory. XBox version does not use Ogg Vorbis.&lt;br /&gt;
&lt;br /&gt;
* [http://harrypotter.ea.com/cofs/index.html Harry Potter II (Chamber of Secrets)]: This is unsubstantiated, it was reported on one of the vorbis mailing lists, but there is little evidence either way on this title.  EA has been supportive of Vorbis though, so it’s not entirely impossible.  If anyone can give us a yay or nay on this, please do.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mightandmagicgame.com/HeroesV/ Heroes of Might and Magic V]: Uses Vorbis for audio and Theora for video.&lt;br /&gt;
&lt;br /&gt;
* [http://www.eidosinteractive.com/games/info.html?gmid=118 Hitman 2]: uses Vorbis. (PC only or consoles too?)&lt;br /&gt;
&lt;br /&gt;
* [http://www.codemasters.com/igi2/front.htm IGI2: Covert Strike]: Not a Norwegian first-person shooter.&lt;br /&gt;
&lt;br /&gt;
* [http://www.inthegroove.com In The Groove]: The premier dance game created by [http://www.roxorgames.com Roxor Games, Inc.] Uses Vorbis for all of the in-game music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.agdinteractive.com/games/kq1/ King&#039;s Quest I]: King&#039;s Quest I: Quest for the Crown (Enchanced) is a fan remake of the original Sierra classic.  Uses Ogg Vorbis for sound and Ogg Theora for cutscene movies.&lt;br /&gt;
&lt;br /&gt;
* [http://www.p3int.com/KULT/ KULT Heretic Kingdoms] by 3D People/Project 3 Interactive: Uses Vorbis (1.0) for music, voice and sound effects.&lt;br /&gt;
&lt;br /&gt;
* Recent Legacy of Kain Games: On the PC, both &amp;lt;b&amp;gt;Soul Reaver 2&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;Blood Omen 2&amp;lt;/b&amp;gt; by Crystal Dynamics/Eidos use Ogg Vorbis for music and sound effects. (Source: [http://www.thelostworlds.net/FAQ.HTML#ogg])&lt;br /&gt;
&lt;br /&gt;
* [http://www.ncsoft.net/eng/ncgames/lineage2_intro.asp Lineage II]: NCSoft Corporation’s 3D MMORPG Lineage II uses Ogg Vorbis for its music. They use 1.0beta3, though.&lt;br /&gt;
&lt;br /&gt;
* [http://www.liveforspeed.net/ Live for Speed]: Online racing simulator uses Ogg for all audio and sound effects.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mobygames.com/game/lock-on-modern-air-combat Lock On: Modern Air Combat]: Published by Ubisoft; CD-ROM contains over 1800 Ogg Vorbis files for speech.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mafia-game.com/ Mafia: The City Of Lost Heaven]: Not sure about any console version, but PC version is reported to use Ogg Vorbis.&lt;br /&gt;
&lt;br /&gt;
* [http://www.popcap.com/games/magicmatch Magic Match]: A very elaborate &amp;quot;Match 3&amp;quot; casual game that uses Ogg Vorbis for its audio.&lt;br /&gt;
&lt;br /&gt;
* [http://www.capcom.co.jp/rockmanx8/ Mega Man X8]: The PC version of Mega Man X8 makes use of Vorbis for music and dialogue during cutscenes.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mobygames.com/game/gamecube/metal-gear-solid-the-twin-snakes Metal Gear Solid: The Twin Snakes]: Uses Ogg Vorbis for all speech in the game.&lt;br /&gt;
&lt;br /&gt;
* [http://minecraft.net Minecraft]: Uses Ogg Vorbis for music and sound effects.&lt;br /&gt;
&lt;br /&gt;
* MotoGP: This motorcycle racing sim uses Vorbis for the music and allows players to drop their own .ogg files into the music dir to listen to them in-game.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mystrevelation.com/ Myst IV: Revelation]: Fourth game in the Myst series. Uses Ogg Vorbis for all music, speech and sound effects.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mystvgame.com/ Myst V: End of Ages]: Fifth and final game in the Myst series. Uses Ogg Vorbis for all music, speech and sound effects.&lt;br /&gt;
&lt;br /&gt;
* Nascar Racing Games from Papyrus: They had this to say about their decision and experience:&lt;br /&gt;
  &lt;br /&gt;
  “We’re using a lot of spoken audio in this title (a first for us) and&lt;br /&gt;
  your codec has allowed us to reduce more than 350MB of audio data to&lt;br /&gt;
  about 40MB, a huge savings of memory and disk space! We are very&lt;br /&gt;
  impressed.” —Tom Faiano, Producer 	 &lt;br /&gt;
 &lt;br /&gt;
  “Incorprating Ogg Vorbis into our codebase was quite painless, and in the&lt;br /&gt;
  end, even refreshing. No fuss no muss. Thank you for your efforts!”&lt;br /&gt;
  —Bill Farquhar, Soundguy du jour&lt;br /&gt;
&lt;br /&gt;
* [http://www.nexuiz.com/ Nexuiz], a fast-paced FPS with roots in Quake I, uses Vorbis for background music. The minstagib mod uses Vorbis for all of its sound.&lt;br /&gt;
&lt;br /&gt;
* [http://www.codemasters.com/flashpoint/ Operation Flashpoint]: This highly successful military simulation/action game from Codemasters uses Vorbis for the in-game music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.orunner.com/ Ostrich Runner] by Geleos: This funny Russian cartoon-style game for kids and not only kids uses Ogg Vorbis for sound, speech and music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.ysagoon.com/glob2/ Globulation 2]: State of the art GPL-ed strategy game!&lt;br /&gt;
&lt;br /&gt;
* [http://www.penumbragame.com Penumbra: Black Plague]: Uses Ogg Vorbis for all audio.&lt;br /&gt;
&lt;br /&gt;
* [http://www.psobb.com/index.php Phantasy Star Online: Blue Burst]:  Uses Ogg Vorbis for music, stored in data/ogg.&lt;br /&gt;
&lt;br /&gt;
* [http://www.gopostal.com/ Postal 2]: Probably not the game we want to use to showcase Vorbis, but it’s being used in this Unreal-engine-powered ultra-violent game.&lt;br /&gt;
&lt;br /&gt;
* [http://www.praetoriansgame.com/ Praetorians]: This very successful game from Pyro Studios uses Vorbis for its music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.psychonauts.com/ Psychonauts]: Has vorbis.dll and vorbisfile.dll.&lt;br /&gt;
&lt;br /&gt;
* [http://www.quake4game.com/ Quake 4]: Quake 4 is the fourth title in the series of Quake FPS computer games. All game music, speech and sound effects make use of Vorbis.&lt;br /&gt;
&lt;br /&gt;
* [http://www.restricted-area.net/ Restricted Area]: by Master Creating uses Ogg Vorbis for music and VP3 for videos.&lt;br /&gt;
&lt;br /&gt;
* Ricochet: An addictive version of Break out.&lt;br /&gt;
&lt;br /&gt;
* [http://www.rockband.com/ Rock Band]: XBox360 version uses the same type of multichannel Vorbis files as Guitar Hero II, but with more channels to handle the drums and vocals separately.&lt;br /&gt;
&lt;br /&gt;
* [http://www.rockmanager.net/ Rock Manager]: Vorbis is used in this “new rock ’n roll management sim for PC from Pan Vision and Monsterland”.&lt;br /&gt;
&lt;br /&gt;
* [http://www.sacred2.com/ Sacred 2] by Studio II: uses multichannel(!) Ogg Vorbis for music, speech and sound effects.&lt;br /&gt;
&lt;br /&gt;
* [http://www.s2games.com/savage/ Savage]: This S2 Games “RTSS” hybrid genre game uses Vorbis for all the in-game music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.serioussam.com/se/ Serious Sam: The Second Encounter]: uses Vorbis for the music, although it is slightly obfuscated so as not to be easily playable by standard Ogg Vorbis players.&lt;br /&gt;
&lt;br /&gt;
* [http://www.serioussam2.com/ Serious Sam 2]: not only uses Vorbis for the music but even Theora for the videos&lt;br /&gt;
&lt;br /&gt;
* [http://www.totalwar.com/community/warlord.htm Shogun: Total War]: Shogun uses Vorbis, but only to distribute — everything is decompressed to wav during the install.&lt;br /&gt;
 &lt;br /&gt;
* [http://www.singles2.com/englisch/index.html Singles 2]: Uses ogg vorbis for sound&lt;br /&gt;
&lt;br /&gt;
* [http://www.lart.pl/en/portfolioItem.php?id=91 Ski Jumping 2004]: A commerical game that accurately models the activity of ski jumping. The game also contains over 700 Ogg Vorbis files.&lt;br /&gt;
&lt;br /&gt;
* [http://mobygames.com/game/sheet/p,3/gameId,3453/ Star Trek: Away Team]: Vorbis is used for all sound in the game — music, voiceover and SFX. This squad-based strategy game is set in the Star Trek Next Generation universe. (Official website is down, using Mobygames link)&lt;br /&gt;
&lt;br /&gt;
* [http://starcraft2.com/ StarCraft II]: Uses Vorbis for audio&lt;br /&gt;
&lt;br /&gt;
* StoneLoops! Of Jurassica ([http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=315210057&amp;amp;mt=8 Apple iTunes App Store link]): Colorful puzzle game for the iPhone/iPod Touch that uses Ogg Vorbis for audio.&lt;br /&gt;
&lt;br /&gt;
* [http://supertux.lethargik.org/ Super Tux]: Uses Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.splintercell3.com/ Tom Clancy’s Splinter Cell Chaos Theory]: .LS0 files are in fact Ogg Vorbis files.&lt;br /&gt;
&lt;br /&gt;
* [http://www.lucasarts.com/games/swrepubliccommando/ Star Wars Republic Commando]: Vorbis is used in the ambient and game music in this latest action game from LucasArts.&lt;br /&gt;
&lt;br /&gt;
* [http://www.reflexive.net/index.php?PAGE=game_detail&amp;amp;AID=30 Swarm]: A fun little arcade shooter.&lt;br /&gt;
&lt;br /&gt;
* [http://www.swat4.com/ SWAT 4]: SWAT 4 uses Ogg Vorbis for audio files.&lt;br /&gt;
&lt;br /&gt;
* [http://www.croteam.com/talosprinciple/ The Talos Principle] is a first-person puzzle game that uses Ogg Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.there.com/ There]: uses both Ogg Vorbis for the sound effects and Ogg Speex for realtime group voice chat, a first for an immersive consumer-oriented world. Voice has become a very popular part of our product! ** posted by [http://david.weekly.org David Weekly], a There developer.&lt;br /&gt;
&lt;br /&gt;
* [http://www.wesnoth.org The Battle for Wesnoth]: uses Ogg Vorbis for it&#039;s music and for most of it&#039;s sounds.&lt;br /&gt;
&lt;br /&gt;
* [http://www.riddickgame.com/ The Chronicles of Riddick: Escape From Butcher’s Bay (Director’s Cut)]: Uses Vorbis for all audio and Theora for cutscenes.&lt;br /&gt;
&lt;br /&gt;
* [https://thimbleweedpark.com/ Thimbleweed Park]: Retro-looking point-and-click adventure, [https://blog.thimbleweedpark.com/tracking_talkies using Ogg Vorbis for its music, character voices and sound effects].&lt;br /&gt;
&lt;br /&gt;
  &amp;quot;[The characters&#039; dialog is] around 6GB of .wav files&lt;br /&gt;
  and we needed to compress them for inclusion in the game.&lt;br /&gt;
  We used .ogg files due to it being free of the patent&lt;br /&gt;
  and licensing issues that .mp3 has, although either would have worked.&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  —Ron Gilbert&lt;br /&gt;
&lt;br /&gt;
* [http://www.thethinggames.com/ The Thing]: Uses Vorbis&lt;br /&gt;
&lt;br /&gt;
  “The original multilanguage distro took three CDs, and went down to &lt;br /&gt;
  only one after I converted all wavs to oggs. Nifty :) Sadly enough, &lt;br /&gt;
  marketing decided to not have one language per CD anyway (probably to &lt;br /&gt;
  annoy people who migrate) :/ Thanks for a very cool (and easy to use)&lt;br /&gt;
  lib/format!”&lt;br /&gt;
 &lt;br /&gt;
  —Vincent Penquerc’h&lt;br /&gt;
&lt;br /&gt;
* [http://www.asahi-net.or.jp/~cs8k-cyu/windows/tt_e.html Torus Trooper]: Frantic 3D shootemup, using Vorbis for the music. (see also the [http://www.emhsoft.net/ttrooper/ Linux port] and [http://www.apple.com/downloads/macosx/games/action_adventure/torustrooper.html MacOS version])&lt;br /&gt;
&lt;br /&gt;
* [http://www.trackmania.com/ TrackMania] uses Vorbis for music in menu and tracks. [music in self-made tracks also need to be in Vorbis]&lt;br /&gt;
&lt;br /&gt;
* [http://www.mikeoldfield.com/ Tr3s Lunas] (aka Music VR episode 1): This game, featuring the music of Mike Oldfield, uses Vorbis for the music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.tribesvengeance.com Tribes: Vengance] by Irration Games/Sierra use Ogg Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mobygames.com/game/gamecube/true-crime-new-york-city True Crime: New York City]: GameCube version contains over 11,500 Ogg Vorbis files. It is likely that other platform ports also use the same files (note that the [http://www.mobygames.com/game/xbox/true-crime-new-york-city Xbox version] uses Windows Media Audio files in place of Ogg Vorbis files)&lt;br /&gt;
&lt;br /&gt;
* [http://tuxtype.sourceforge.net/ Tuxtyping 2]: Educational typing tutor for kids of all ages! &lt;br /&gt;
&lt;br /&gt;
* [http://www.ufo-aftershock.com/ UFO: Aftershock]: Uses Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.ufo-afterlight.com/ UFO: Afterlight]: Uses Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.atari.com/us/games/unreal2/pc Unreal 2]: PC version uses Vorbis, usage on consoles not confirmed.&lt;br /&gt;
&lt;br /&gt;
  “We went with Ogg Vorbis due to its excellent playback and compression,&lt;br /&gt;
  and we used it not only for music but also all of the in-game voice.&lt;br /&gt;
  Without it, we never would have been able to fit on two CDs.”&lt;br /&gt;
 &lt;br /&gt;
  — http://www.4unrealers.com/entrevistas/263/&lt;br /&gt;
&lt;br /&gt;
* [http://www.unrealtournament.com/ut2003/ Unreal Tournament 2003]: This overwhelmingly-popular multiplayer first person shooter PC title uses Vorbis for its music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.unrealtournament.com/ut2004/ Unreal Tournament 2004]: Yet another Unreal game which uses Vorbis for the music (What about effects and voice? Does anyone know?). The readme file of the demo even mentions Speex!&lt;br /&gt;
&lt;br /&gt;
* [http://sc2.sourceforge.net/ The Ur-Quan Masters]: Port of Star Control 2 to modern computers. Toys for Bob released the source of this amazing game under the GPL in 2002. Ogg Vorbis is used for the dialogue and the background music.&lt;br /&gt;
&lt;br /&gt;
* [http://uru.ubi.com/ Uru: Ages Beyond Myst]: Spinoff from the Myst series. Uses Ogg Vorbis for all music, speech and sound effects.&lt;br /&gt;
&lt;br /&gt;
* [http://mobygames.com/game/sheet/p,3/gameId,8635/ Lionheart — Legacy of the Crusader]: An 3/4 RPG from Black Isle. Uses Vorbis for all audio. Thanks to all the guys that made Vorbis great.. (I even donated money myself, someday maybe I can convince the company to kick in some bucks as well). Official site is down, using mobygames link.&lt;br /&gt;
&lt;br /&gt;
* [http://www.global-gaming.com/Dominion/ Urban Dominion] (beta): First Person Massively Multiplayer Online Role-Playing Game by Global-Gaming. Uses Ogg Vorbis for the sound system.&lt;br /&gt;
&lt;br /&gt;
* [http://www.vietcong-game.com/ Vietcong]: Vietnam War First Person Shooter by Pterodon. Uses Ogg Vorbis I believe for the background music.&lt;br /&gt;
&lt;br /&gt;
* [http://vegastrike.sourceforge.net/ Vega Strike]: It is a free spacesim. Ogg Vorbis files are stored in \music\ .&lt;br /&gt;
&lt;br /&gt;
* [http://www.gathering.com/wingsofwar/ Wings Of War]: It is an arcade shooter in times of WWI. Game has ogg.dll, vorbis.dll and vorbisfile.dll — but *.ogg files are not accesible.&lt;br /&gt;
&lt;br /&gt;
* [http://jonof.edgenetwork.org/winbuild/ WinBuild]: Winbuild is a port of Ken Silverman’s [http://www.advsys.net/ken/buildsrc/default.htm original Build engine demo] (for DOS) to Windows. It uses Vorbis compression for the music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.worldofwarcraft.com/ World of Warcraft]: popular massively multiplayer online role-playing game from Blizzard Entertainment use Vorbis for speech and sound effects.&lt;br /&gt;
&lt;br /&gt;
* [http://www.zax-game.com/ Zax — The Alien Hunter]: A large 3/4 view action adventure game.&lt;br /&gt;
&lt;br /&gt;
[[Category:Vorbis]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Games_that_use_Vorbis&amp;diff=16614</id>
		<title>Games that use Vorbis</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Games_that_use_Vorbis&amp;diff=16614"/>
		<updated>2017-10-04T09:19:00Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: add Thimbleweed Park!&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following games use [[Vorbis]], most frequently for their in-game music or sound effects:&lt;br /&gt;
&lt;br /&gt;
* All Games By [http://www.reflexive.com/index.php?CAT=Search&amp;amp;SEARCH=dev%3AReflexive+Entertainment&amp;amp;PAGE=GameList Reflexive Entertainment].&lt;br /&gt;
&lt;br /&gt;
* [http://www.mobygames.com/game/windows/007-nightfire 007: Nightfire]: Uses Ogg Vorbis for background soundtrack.&lt;br /&gt;
&lt;br /&gt;
* [http://www.asciisector.net/ Ascii Sector]: Space combat/exploration/trading game.  Uses Ogg Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.ageofconan.com/ Age of Conan — Hyborian Adventures]: Uses Ogg Vorbis for all audio.&lt;br /&gt;
&lt;br /&gt;
* [http://www.americasarmy.com/ America’s Army]: Uses Ogg Vorbis for main theme.&lt;br /&gt;
&lt;br /&gt;
* [http://www.amnesiagame.com/ Amnesia: The Dark Descent]: Uses Ogg Vorbis for all audio.&lt;br /&gt;
&lt;br /&gt;
* [http://assault.cubers.net/ AssaultCube]: A free fast paced first-person shooter with little hardware requirements for Windows, Linux and OS X. Uses Ogg Vorbis for all game sounds and music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.lionhead.com/bw2/ Black &amp;amp; White 2]: Uses Ogg Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.pyrogon.com/games/candycruncher/ Candy Cruncher]: This cute puzzle game from Brian Hook’s company, Pyrogon, uses Vorbis for the addictive music you hear while you race the clock.&lt;br /&gt;
&lt;br /&gt;
* [http://www.callofcthulhu.com/ Call of Cthulhu] is a first-person horror game that combines intense action and adventure elements. It uses Ogg Vorbis for music and speech.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mobygames.com/game/windows/catechumen Catechumen] is a Christian-themed FPS that uses Ogg Vorbis.&lt;br /&gt;
&lt;br /&gt;
* [http://www.civilization5.com/ Civilization V] is a turn-based strategy game that uses Ogg Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.atari.com/crashday/ Crashday]: Stunt racing game, developed by independent German studio Moon Byte. Uses Ogg Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://buenavistagames.go.com/product/chickenLittlePC.html Chicken Litte]: Adventure game for children inspired by the motion picture in PC edition uses Vorbis for dialogs and music. (not sure if sound effects too)&lt;br /&gt;
&lt;br /&gt;
* [http://www.cossacks2.de/ Cossacks 2]: “Cossacks II: Napoleonic Wars” is a sequel of “Cossacks: European Wars”. Ogg Vorbis 1.0 files are in \data\music\&lt;br /&gt;
&lt;br /&gt;
* [http://www.darwinia.co.uk/ Darwinia]: The second title from Indy developer Introversion Software. Darwinia is a stylised retro — Tron meets Cannon Fodder. It uses Vorbis for all in game sound effects and music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.introversion.co.uk/defcon/ DEFCON]: The third title from Introversion Software.  Uses Vorbis for music, effects, everything, like Darwinia.&lt;br /&gt;
&lt;br /&gt;
* [http://devilmaycry.com/ Devil May Cry 4] (for the PC, at least): Uses (occasionally multichannel) Ogg Vorbis for ingame and cutscene music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.eidos.co.uk/gss/dxiw/ Deus Ex: Invisible War] by Ion Storm/Eidos: Uses Ogg Vorbis for music and voice (and possibly for sound fx too).&lt;br /&gt;
&lt;br /&gt;
* [http://diablo3.com Diablo III] uses Vorbis for audio.&lt;br /&gt;
&lt;br /&gt;
* [http://www.idsoftware.com/games/doom/doom3/ DOOM 3]:  The latest version of this famous first person shooter game from id software uses Vorbis for the theme music as well as their ambient and game sounds.&lt;br /&gt;
&lt;br /&gt;
* [http://mobygames.com/game/sheet/p,3/gameId,6505/ Duke Nukem: Manhattan Project]: This game from 3D Realms was released in 2002 and used Vorbis for their music. (Official website is down, using  Mobygames link)&lt;br /&gt;
&lt;br /&gt;
* [http://www.popcap.com/games/free/dynomite Dynomite]: Puzzle Bobble/Bust A Move clone for Windows by PopCap Games, with mouse control. Uses Ogg Vorbis for nearly all sound effects.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Eschalon:_Book_I Eschalon]: A classic-style roleplaying game, for Windows, Mac, and Linux.  Music is in &#039;&#039;Ogg Vorbis&#039;&#039; format.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mobygames.com/game/enclave/ Enclave] by Starbreeze/Black Label Games: Uses Ogg Vorbis for music (and possibly for sound fx and voice too).&lt;br /&gt;
&lt;br /&gt;
* [http://www.eve-online.com EVE Online] by CCP Games, the Icelandic-homed space-based single-shard persistent world game uses Ogg Vorbis for its music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.lionhead.com/fabletlc/ Fable: The Lost Chapters]: Uses Ogg Vorbis for music and cutscenes (Ancient libVorbis version, 1.0 RC2).&lt;br /&gt;
&lt;br /&gt;
* [http://farcry.ubi.com/ FarCry] by Crytek: uses Ogg Vorbis for music and effects.&lt;br /&gt;
&lt;br /&gt;
* [http://www.freedom-fighters.co.uk/ Freedom Fighters] by IO Interactive: String search reveals “libVorbis I 20011217” in freedom.exe.&lt;br /&gt;
&lt;br /&gt;
* [http://www.siriusgames.dk/index.php?pageid=67 Gangland] by MediaMobsters: Uses Ogg Vorbis for music and cutscenes (Data\streams\). Encoded with Xiph.Org libVorbis I 20020717. Decoder library: FMOD 3.71.&lt;br /&gt;
&lt;br /&gt;
* [http://www.rockstargames.com/vicecity/ Grand Theft Auto: Vice City] by Rockstar Games/Rockstar North uses Ogg Vorbis to store music, radio, ambient sounds, police messages and cutscene audio. Players can also store their custom tracks (accessible in-game via the “User Track Player” radio station) in Ogg Vorbis.&lt;br /&gt;
&lt;br /&gt;
* [http://www.rockstargames.com/sanandreas/ Grand Theft Auto: San Andreas] by Rockstar Games/Rockstar North uses Ogg Vorbis to store music, radio, ambient sounds, police messages and cutscene audio. Players can also store their custom tracks (accessible in-game via the “User Track Player” radio station) in Ogg Vorbis.&lt;br /&gt;
&lt;br /&gt;
* [http://www.gothic3.com/ Gothic 3] by Piranha Bytes: Vorbis is used in the ogg container for everything (music, speech, effects) except of the intro video. For example: Music @ 256 kb/s, Speech @ 86 kb/s. About 18 hours of speech compressed to 700 MB.&lt;br /&gt;
&lt;br /&gt;
* [http://www.guiltygearx2reload.com/ Guilty Gear XX]: The PC version, at least, uses Ogg Vorbis for all the music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.guitarherogame.com/gh2/ Guitar Hero II] by Red Octane (Activision), XBox360 platform only (multichannel Vorbis with 5 or 6 channels per song)&lt;br /&gt;
&lt;br /&gt;
* [http://halo.bungie.org/ Halo]: Mac and PC versions of Halo use Ogg Vorbis for all audio, it seems. The Xiph license and dynamically linked libraries of Ogg and Vorbis are included in the Halo directory. XBox version does not use Ogg Vorbis.&lt;br /&gt;
&lt;br /&gt;
* [http://harrypotter.ea.com/cofs/index.html Harry Potter II (Chamber of Secrets)]: This is unsubstantiated, it was reported on one of the vorbis mailing lists, but there is little evidence either way on this title.  EA has been supportive of Vorbis though, so it’s not entirely impossible.  If anyone can give us a yay or nay on this, please do.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mightandmagicgame.com/HeroesV/ Heroes of Might and Magic V]: Uses Vorbis for audio and Theora for video.&lt;br /&gt;
&lt;br /&gt;
* [http://www.eidosinteractive.com/games/info.html?gmid=118 Hitman 2]: uses Vorbis. (PC only or consoles too?)&lt;br /&gt;
&lt;br /&gt;
* [http://www.codemasters.com/igi2/front.htm IGI2: Covert Strike]: Not a Norwegian first-person shooter.&lt;br /&gt;
&lt;br /&gt;
* [http://www.inthegroove.com In The Groove]: The premier dance game created by [http://www.roxorgames.com Roxor Games, Inc.] Uses Vorbis for all of the in-game music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.agdinteractive.com/games/kq1/ King&#039;s Quest I]: King&#039;s Quest I: Quest for the Crown (Enchanced) is a fan remake of the original Sierra classic.  Uses Ogg Vorbis for sound and Ogg Theora for cutscene movies.&lt;br /&gt;
&lt;br /&gt;
* [http://www.p3int.com/KULT/ KULT Heretic Kingdoms] by 3D People/Project 3 Interactive: Uses Vorbis (1.0) for music, voice and sound effects.&lt;br /&gt;
&lt;br /&gt;
* Recent Legacy of Kain Games: On the PC, both &amp;lt;b&amp;gt;Soul Reaver 2&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;Blood Omen 2&amp;lt;/b&amp;gt; by Crystal Dynamics/Eidos use Ogg Vorbis for music and sound effects. (Source: [http://www.thelostworlds.net/FAQ.HTML#ogg])&lt;br /&gt;
&lt;br /&gt;
* [http://www.ncsoft.net/eng/ncgames/lineage2_intro.asp Lineage II]: NCSoft Corporation’s 3D MMORPG Lineage II uses Ogg Vorbis for its music. They use 1.0beta3, though.&lt;br /&gt;
&lt;br /&gt;
* [http://www.liveforspeed.net/ Live for Speed]: Online racing simulator uses Ogg for all audio and sound effects.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mobygames.com/game/lock-on-modern-air-combat Lock On: Modern Air Combat]: Published by Ubisoft; CD-ROM contains over 1800 Ogg Vorbis files for speech.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mafia-game.com/ Mafia: The City Of Lost Heaven]: Not sure about any console version, but PC version is reported to use Ogg Vorbis.&lt;br /&gt;
&lt;br /&gt;
* [http://www.popcap.com/games/magicmatch Magic Match]: A very elaborate &amp;quot;Match 3&amp;quot; casual game that uses Ogg Vorbis for its audio.&lt;br /&gt;
&lt;br /&gt;
* [http://www.capcom.co.jp/rockmanx8/ Mega Man X8]: The PC version of Mega Man X8 makes use of Vorbis for music and dialogue during cutscenes.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mobygames.com/game/gamecube/metal-gear-solid-the-twin-snakes Metal Gear Solid: The Twin Snakes]: Uses Ogg Vorbis for all speech in the game.&lt;br /&gt;
&lt;br /&gt;
* [http://minecraft.net Minecraft]: Uses Ogg Vorbis for music and sound effects.&lt;br /&gt;
&lt;br /&gt;
* MotoGP: This motorcycle racing sim uses Vorbis for the music and allows players to drop their own .ogg files into the music dir to listen to them in-game.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mystrevelation.com/ Myst IV: Revelation]: Fourth game in the Myst series. Uses Ogg Vorbis for all music, speech and sound effects.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mystvgame.com/ Myst V: End of Ages]: Fifth and final game in the Myst series. Uses Ogg Vorbis for all music, speech and sound effects.&lt;br /&gt;
&lt;br /&gt;
* Nascar Racing Games from Papyrus: They had this to say about their decision and experience:&lt;br /&gt;
  &lt;br /&gt;
  “We’re using a lot of spoken audio in this title (a first for us) and&lt;br /&gt;
  your codec has allowed us to reduce more than 350MB of audio data to&lt;br /&gt;
  about 40MB, a huge savings of memory and disk space! We are very&lt;br /&gt;
  impressed.” —Tom Faiano, Producer 	 &lt;br /&gt;
 &lt;br /&gt;
  “Incorprating Ogg Vorbis into our codebase was quite painless, and in the&lt;br /&gt;
  end, even refreshing. No fuss no muss. Thank you for your efforts!”&lt;br /&gt;
  —Bill Farquhar, Soundguy du jour&lt;br /&gt;
&lt;br /&gt;
* [http://www.nexuiz.com/ Nexuiz], a fast-paced FPS with roots in Quake I, uses Vorbis for background music. The minstagib mod uses Vorbis for all of its sound.&lt;br /&gt;
&lt;br /&gt;
* [http://www.codemasters.com/flashpoint/ Operation Flashpoint]: This highly successful military simulation/action game from Codemasters uses Vorbis for the in-game music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.orunner.com/ Ostrich Runner] by Geleos: This funny Russian cartoon-style game for kids and not only kids uses Ogg Vorbis for sound, speech and music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.ysagoon.com/glob2/ Globulation 2]: State of the art GPL-ed strategy game!&lt;br /&gt;
&lt;br /&gt;
* [http://www.penumbragame.com Penumbra: Black Plague]: Uses Ogg Vorbis for all audio.&lt;br /&gt;
&lt;br /&gt;
* [http://www.psobb.com/index.php Phantasy Star Online: Blue Burst]:  Uses Ogg Vorbis for music, stored in data/ogg.&lt;br /&gt;
&lt;br /&gt;
* [http://www.gopostal.com/ Postal 2]: Probably not the game we want to use to showcase Vorbis, but it’s being used in this Unreal-engine-powered ultra-violent game.&lt;br /&gt;
&lt;br /&gt;
* [http://www.praetoriansgame.com/ Praetorians]: This very successful game from Pyro Studios uses Vorbis for its music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.psychonauts.com/ Psychonauts]: Has vorbis.dll and vorbisfile.dll.&lt;br /&gt;
&lt;br /&gt;
* [http://www.quake4game.com/ Quake 4]: Quake 4 is the fourth title in the series of Quake FPS computer games. All game music, speech and sound effects make use of Vorbis.&lt;br /&gt;
&lt;br /&gt;
* [http://www.restricted-area.net/ Restricted Area]: by Master Creating uses Ogg Vorbis for music and VP3 for videos.&lt;br /&gt;
&lt;br /&gt;
* Ricochet: An addictive version of Break out.&lt;br /&gt;
&lt;br /&gt;
* [http://www.rockband.com/ Rock Band]: XBox360 version uses the same type of multichannel Vorbis files as Guitar Hero II, but with more channels to handle the drums and vocals separately.&lt;br /&gt;
&lt;br /&gt;
* [http://www.rockmanager.net/ Rock Manager]: Vorbis is used in this “new rock ’n roll management sim for PC from Pan Vision and Monsterland”.&lt;br /&gt;
&lt;br /&gt;
* [http://www.sacred2.com/ Sacred 2] by Studio II: uses multichannel(!) Ogg Vorbis for music, speech and sound effects.&lt;br /&gt;
&lt;br /&gt;
* [http://www.s2games.com/savage/ Savage]: This S2 Games “RTSS” hybrid genre game uses Vorbis for all the in-game music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.serioussam.com/se/ Serious Sam: The Second Encounter]: uses Vorbis for the music, although it is slightly obfuscated so as not to be easily playable by standard Ogg Vorbis players.&lt;br /&gt;
&lt;br /&gt;
* [http://www.serioussam2.com/ Serious Sam 2]: not only uses Vorbis for the music but even Theora for the videos&lt;br /&gt;
&lt;br /&gt;
* [http://www.totalwar.com/community/warlord.htm Shogun: Total War]: Shogun uses Vorbis, but only to distribute — everything is decompressed to wav during the install.&lt;br /&gt;
 &lt;br /&gt;
* [http://www.singles2.com/englisch/index.html Singles 2]: Uses ogg vorbis for sound&lt;br /&gt;
&lt;br /&gt;
* [http://www.lart.pl/en/portfolioItem.php?id=91 Ski Jumping 2004]: A commerical game that accurately models the activity of ski jumping. The game also contains over 700 Ogg Vorbis files.&lt;br /&gt;
&lt;br /&gt;
* [http://mobygames.com/game/sheet/p,3/gameId,3453/ Star Trek: Away Team]: Vorbis is used for all sound in the game — music, voiceover and SFX. This squad-based strategy game is set in the Star Trek Next Generation universe. (Official website is down, using Mobygames link)&lt;br /&gt;
&lt;br /&gt;
* [http://starcraft2.com/ StarCraft II]: Uses Vorbis for audio&lt;br /&gt;
&lt;br /&gt;
* StoneLoops! Of Jurassica ([http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=315210057&amp;amp;mt=8 Apple iTunes App Store link]): Colorful puzzle game for the iPhone/iPod Touch that uses Ogg Vorbis for audio.&lt;br /&gt;
&lt;br /&gt;
* [http://supertux.lethargik.org/ Super Tux]: Uses Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.splintercell3.com/ Tom Clancy’s Splinter Cell Chaos Theory]: .LS0 files are in fact Ogg Vorbis files.&lt;br /&gt;
&lt;br /&gt;
* [http://www.lucasarts.com/games/swrepubliccommando/ Star Wars Republic Commando]: Vorbis is used in the ambient and game music in this latest action game from LucasArts.&lt;br /&gt;
&lt;br /&gt;
* [http://www.reflexive.net/index.php?PAGE=game_detail&amp;amp;AID=30 Swarm]: A fun little arcade shooter.&lt;br /&gt;
&lt;br /&gt;
* [http://www.swat4.com/ SWAT 4]: SWAT 4 uses Ogg Vorbis for audio files.&lt;br /&gt;
&lt;br /&gt;
* [http://www.croteam.com/talosprinciple/ The Talos Principle] is a first-person puzzle game that uses Ogg Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.there.com/ There]: uses both Ogg Vorbis for the sound effects and Ogg Speex for realtime group voice chat, a first for an immersive consumer-oriented world. Voice has become a very popular part of our product! ** posted by [http://david.weekly.org David Weekly], a There developer.&lt;br /&gt;
&lt;br /&gt;
* [http://www.wesnoth.org The Battle for Wesnoth]: uses Ogg Vorbis for it&#039;s music and for most of it&#039;s sounds.&lt;br /&gt;
&lt;br /&gt;
* [http://www.riddickgame.com/ The Chronicles of Riddick: Escape From Butcher’s Bay (Director’s Cut)]: Uses Vorbis for all audio and Theora for cutscenes.&lt;br /&gt;
&lt;br /&gt;
* [http://www.thethinggames.com/ The Thing]: Uses Vorbis&lt;br /&gt;
&lt;br /&gt;
  “The original multilanguage distro took three CDs, and went down to &lt;br /&gt;
  only one after I converted all wavs to oggs. Nifty :) Sadly enough, &lt;br /&gt;
  marketing decided to not have one language per CD anyway (probably to &lt;br /&gt;
  annoy people who migrate) :/ Thanks for a very cool (and easy to use)&lt;br /&gt;
  lib/format!”&lt;br /&gt;
 &lt;br /&gt;
  —Vincent Penquerc’h&lt;br /&gt;
&lt;br /&gt;
* [https://thimbleweedpark.com/ Thimbleweed Park]: Retro-looking point-and-click adventure, [https://blog.thimbleweedpark.com/tracking_talkies using Ogg Vorbis for its music, character voices and sound effects].&lt;br /&gt;
&lt;br /&gt;
  &amp;quot;[The characters&#039; dialog is] around 6GB of .wav files&lt;br /&gt;
  and we needed to compress them for inclusion in the game.&lt;br /&gt;
  We used .ogg files due to it being free of the patent&lt;br /&gt;
  and licensing issues that .mp3 has, although either would have worked.&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  —Ron Gilbert&lt;br /&gt;
&lt;br /&gt;
* [http://www.asahi-net.or.jp/~cs8k-cyu/windows/tt_e.html Torus Trooper]: Frantic 3D shootemup, using Vorbis for the music. (see also the [http://www.emhsoft.net/ttrooper/ Linux port] and [http://www.apple.com/downloads/macosx/games/action_adventure/torustrooper.html MacOS version])&lt;br /&gt;
&lt;br /&gt;
* [http://www.trackmania.com/ TrackMania] uses Vorbis for music in menu and tracks. [music in self-made tracks also need to be in Vorbis]&lt;br /&gt;
&lt;br /&gt;
* [http://www.mikeoldfield.com/ Tr3s Lunas] (aka Music VR episode 1): This game, featuring the music of Mike Oldfield, uses Vorbis for the music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.tribesvengeance.com Tribes: Vengance] by Irration Games/Sierra use Ogg Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.mobygames.com/game/gamecube/true-crime-new-york-city True Crime: New York City]: GameCube version contains over 11,500 Ogg Vorbis files. It is likely that other platform ports also use the same files (note that the [http://www.mobygames.com/game/xbox/true-crime-new-york-city Xbox version] uses Windows Media Audio files in place of Ogg Vorbis files)&lt;br /&gt;
&lt;br /&gt;
* [http://tuxtype.sourceforge.net/ Tuxtyping 2]: Educational typing tutor for kids of all ages! &lt;br /&gt;
&lt;br /&gt;
* [http://www.ufo-aftershock.com/ UFO: Aftershock]: Uses Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.ufo-afterlight.com/ UFO: Afterlight]: Uses Vorbis for music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.atari.com/us/games/unreal2/pc Unreal 2]: PC version uses Vorbis, usage on consoles not confirmed.&lt;br /&gt;
&lt;br /&gt;
  “We went with Ogg Vorbis due to its excellent playback and compression,&lt;br /&gt;
  and we used it not only for music but also all of the in-game voice.&lt;br /&gt;
  Without it, we never would have been able to fit on two CDs.”&lt;br /&gt;
 &lt;br /&gt;
  — http://www.4unrealers.com/entrevistas/263/&lt;br /&gt;
&lt;br /&gt;
* [http://www.unrealtournament.com/ut2003/ Unreal Tournament 2003]: This overwhelmingly-popular multiplayer first person shooter PC title uses Vorbis for its music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.unrealtournament.com/ut2004/ Unreal Tournament 2004]: Yet another Unreal game which uses Vorbis for the music (What about effects and voice? Does anyone know?). The readme file of the demo even mentions Speex!&lt;br /&gt;
&lt;br /&gt;
* [http://sc2.sourceforge.net/ The Ur-Quan Masters]: Port of Star Control 2 to modern computers. Toys for Bob released the source of this amazing game under the GPL in 2002. Ogg Vorbis is used for the dialogue and the background music.&lt;br /&gt;
&lt;br /&gt;
* [http://uru.ubi.com/ Uru: Ages Beyond Myst]: Spinoff from the Myst series. Uses Ogg Vorbis for all music, speech and sound effects.&lt;br /&gt;
&lt;br /&gt;
* [http://mobygames.com/game/sheet/p,3/gameId,8635/ Lionheart — Legacy of the Crusader]: An 3/4 RPG from Black Isle. Uses Vorbis for all audio. Thanks to all the guys that made Vorbis great.. (I even donated money myself, someday maybe I can convince the company to kick in some bucks as well). Official site is down, using mobygames link.&lt;br /&gt;
&lt;br /&gt;
* [http://www.global-gaming.com/Dominion/ Urban Dominion] (beta): First Person Massively Multiplayer Online Role-Playing Game by Global-Gaming. Uses Ogg Vorbis for the sound system.&lt;br /&gt;
&lt;br /&gt;
* [http://www.vietcong-game.com/ Vietcong]: Vietnam War First Person Shooter by Pterodon. Uses Ogg Vorbis I believe for the background music.&lt;br /&gt;
&lt;br /&gt;
* [http://vegastrike.sourceforge.net/ Vega Strike]: It is a free spacesim. Ogg Vorbis files are stored in \music\ .&lt;br /&gt;
&lt;br /&gt;
* [http://www.gathering.com/wingsofwar/ Wings Of War]: It is an arcade shooter in times of WWI. Game has ogg.dll, vorbis.dll and vorbisfile.dll — but *.ogg files are not accesible.&lt;br /&gt;
&lt;br /&gt;
* [http://jonof.edgenetwork.org/winbuild/ WinBuild]: Winbuild is a port of Ken Silverman’s [http://www.advsys.net/ken/buildsrc/default.htm original Build engine demo] (for DOS) to Windows. It uses Vorbis compression for the music.&lt;br /&gt;
&lt;br /&gt;
* [http://www.worldofwarcraft.com/ World of Warcraft]: popular massively multiplayer online role-playing game from Blizzard Entertainment use Vorbis for speech and sound effects.&lt;br /&gt;
&lt;br /&gt;
* [http://www.zax-game.com/ Zax — The Alien Hunter]: A large 3/4 view action adventure game.&lt;br /&gt;
&lt;br /&gt;
[[Category:Vorbis]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Ogg&amp;diff=16611</id>
		<title>Ogg</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Ogg&amp;diff=16611"/>
		<updated>2017-08-01T10:26:53Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* Ogg page format */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Ogg&#039;&#039;&#039; transport bitstream is designed to provide framing, error protection and seeking structure for higher-level codec streams that consist of raw, unencapsulated data packets, such as the [[Opus]], [[Vorbis]] and [[FLAC]] audio codecs or the [[Theora]] and [[Dirac]] video codecs.&lt;br /&gt;
&lt;br /&gt;
== Name ==&lt;br /&gt;
&lt;br /&gt;
Ogg derives from &amp;quot;ogging&amp;quot;, jargon from the computer game Netrek.  Ogg is not an acronym and should not be mentioned as &amp;quot;OGG&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Design constraints for Ogg bitstreams ==&lt;br /&gt;
&lt;br /&gt;
* True streaming; we must not need to seek to build a 100% complete bitstream.&lt;br /&gt;
* Use no more than approximately 1-2% of bitstream bandwidth for packet boundary marking, high-level framing, sync and seeking.&lt;br /&gt;
* Specification of absolute position within the original sample stream.&lt;br /&gt;
* Simple mechanism to ease limited editing, such as a simplified concatenation mechanism.&lt;br /&gt;
* Detection of corruption, recapture after error and direct, random access to data at arbitrary positions in the bitstream.&lt;br /&gt;
&lt;br /&gt;
== Specification / standard==&lt;br /&gt;
&lt;br /&gt;
The Ogg transport bitstream and file format is defined in RFC 3533 approved 2003-May. As RFC documents are invariable once approved, there will never be newer versions of RFC 3533, but an [[RFC_3533_Errata]] exists instead. Existing flaws are discussed at [[OggIssues]], ideas for the future at [[TransOgg]].&lt;br /&gt;
&lt;br /&gt;
== Detecting Ogg files and extracting information ==&lt;br /&gt;
&lt;br /&gt;
Ogg files begin with a signature &amp;quot;OggS&amp;quot;. This signature also repeats many times inside the file, at the beginning of every page. There are several tools to get information about Ogg files:&lt;br /&gt;
* Ogginfo - part of Vorbis-Tools, supports Vorbis codec only (historical Ogg-vs-Vorbis issue), other codecs cause it to report garbage&lt;br /&gt;
* Opusinfo - part of Opus-Tools, supports only Opus codec well, only minimal Vorbis support&lt;br /&gt;
* Oggz ???&lt;br /&gt;
* MediaInfo [http://sourceforge.net/projects/mediainfo/ sf.net/projects/mediainfo] - provides information about media (and some other) files, supports many types, also Ogg with various codecs, generic audio and video information only, no Ogg-specific details&lt;br /&gt;
&lt;br /&gt;
== Projects using Ogg ==&lt;br /&gt;
&lt;br /&gt;
=== Codecs ===&lt;br /&gt;
&lt;br /&gt;
* [[Opus]]&lt;br /&gt;
* [[CMML]]&lt;br /&gt;
* [[FLAC]] ([http://xiph.org/flac/ogg_mapping.html Ogg mapping])&lt;br /&gt;
* [[OggKate|Kate]]&lt;br /&gt;
* [http://opus-codec.org/ Opus] ([[OggOpus|Ogg mapping]])&lt;br /&gt;
* [[OggPCM|PCM]]&lt;br /&gt;
* [[Ogg Skeleton|Skeleton]]&lt;br /&gt;
* [[Speex]] ([[OggSpeex|Ogg mapping]])&lt;br /&gt;
* [[Theora]] ([[OggTheora|Ogg mapping]])&lt;br /&gt;
* [[Vorbis]] ([[OggVorbis|Ogg mapping]])&lt;br /&gt;
* [[OggWrit|Writ]]&lt;br /&gt;
&lt;br /&gt;
=== Servers ===&lt;br /&gt;
&lt;br /&gt;
* [[Icecast]]&lt;br /&gt;
* [http://www.metavid.org/ Metavid]&lt;br /&gt;
&lt;br /&gt;
== Developer info ==&lt;br /&gt;
&lt;br /&gt;
* [[GranulePosAndSeeking]] - a discussion of the interpretation of granulepos, and the algorithm for seeking on Ogg files&lt;br /&gt;
* [[FishFaq]] - also discusses Granule Position&lt;br /&gt;
&lt;br /&gt;
=== Ogg page format ===&lt;br /&gt;
&lt;br /&gt;
The LSb (least significant bit) comes first in the Bytes.  Fields&lt;br /&gt;
with more than one byte length are encoded LSB (least significant&lt;br /&gt;
byte) first.&lt;br /&gt;
&lt;br /&gt;
   0                   1                   2                   3&lt;br /&gt;
   0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1| Byte&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  | capture_pattern: Magic number for page start &amp;quot;OggS&amp;quot;           | 0-3&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  | version       | header_type   | granule_position              | 4-7&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  |                                                               | 8-11&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  |                               | bitstream_serial_number       | 12-15&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  |                               | page_sequence_number          | 16-19&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  |                               | CRC_checksum                  | 20-23&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  |                               | page_segments | segment_table | 24-27&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
  | ...                                                           | 28-&lt;br /&gt;
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
== Implementations ==&lt;br /&gt;
&lt;br /&gt;
The Ogg encapsulation format can be handled with the following libraries:&lt;br /&gt;
&lt;br /&gt;
* libogg: [http://svn.xiph.org/trunk/ogg/ libogg svn] (C, cross-platform) Low-level Ogg parsing and writing.&lt;br /&gt;
* liboggz: [http://git.xiph.org/?p=liboggz.git liboggz git] (C, cross-platform) liboggz wraps libogg and provides features such as seeking.&lt;br /&gt;
* the Ogg Directshow filters: see [http://www.illiminable.com/ogg/ illiminable] (C++, Win32)&lt;br /&gt;
* [http://www.kfish.org/software/hogg HOgg] (pure Haskell)&lt;br /&gt;
* [http://www.jcraft.com/jorbis/ JOrbis] (pure Java) contains com.jcraft.jogg&lt;br /&gt;
* [http://www.sacredchao.net/quodlibet/wiki/Development/Mutagen Mutagen] (pure Python)&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Flash]]&lt;br /&gt;
* [[Oggless]]&lt;br /&gt;
* [[MIME Types and File Extensions]]&lt;br /&gt;
* [[RFC_3533_Errata]] - errors and flaws in the specification&lt;br /&gt;
* [[Nut_Container]]&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.xiph.org/ogg/doc/ Ogg documentation]&lt;br /&gt;
* [http://www.ietf.org/rfc/rfc3533.txt Ogg RFC]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ogg Ogg at Wikipedia]&lt;br /&gt;
* [http://wiki.multimedia.cx/index.php?title=Ogg Ogg at Multimedia Wiki]&lt;br /&gt;
&lt;br /&gt;
[[Category:Ogg]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=XiphInfra:List_of_services&amp;diff=16593</id>
		<title>XiphInfra:List of services</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=XiphInfra:List_of_services&amp;diff=16593"/>
		<updated>2017-06-22T12:07:45Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: there is working HTTPS on these servers for now&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Service&lt;br /&gt;
! URL&lt;br /&gt;
! VM&lt;br /&gt;
! Host&lt;br /&gt;
! Maintainer(s)&lt;br /&gt;
|-&lt;br /&gt;
| [[AreWeCompressedYet]]&lt;br /&gt;
| style=&amp;quot;text-align:right;&amp;quot;| https://arewecompressedyet.com&lt;br /&gt;
| awcy&lt;br /&gt;
| style=&amp;quot;text-align:right;&amp;quot;| https://catfish.xiph.org&lt;br /&gt;
| TD-Linux&lt;br /&gt;
|-&lt;br /&gt;
| Git Repos&lt;br /&gt;
| style=&amp;quot;text-align:right;&amp;quot;| https://git.xiph.org&lt;br /&gt;
| &lt;br /&gt;
| style=&amp;quot;text-align:right;&amp;quot;| https://mf4.xiph.org&lt;br /&gt;
| rillian&lt;br /&gt;
|-&lt;br /&gt;
| Home Pages&lt;br /&gt;
| style=&amp;quot;text-align:right;&amp;quot;| https://people.xiph.org&lt;br /&gt;
| &lt;br /&gt;
| style=&amp;quot;text-align:right;&amp;quot;| https://mf4.xiph.org&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [[Icecast]] Streams&lt;br /&gt;
| style=&amp;quot;text-align:right;&amp;quot;| http://dir.xiph.org&lt;br /&gt;
| &lt;br /&gt;
| style=&amp;quot;text-align:right;&amp;quot;| https://mf4.xiph.org&lt;br /&gt;
| tbr&lt;br /&gt;
|-&lt;br /&gt;
| [[Icecast]] Streams (Beta)&lt;br /&gt;
| style=&amp;quot;text-align:right;&amp;quot;| http://dir-test.xiph.org&lt;br /&gt;
| &lt;br /&gt;
| style=&amp;quot;text-align:right;&amp;quot;| https://catfish.xiph.org&lt;br /&gt;
| ePirat, tbr&lt;br /&gt;
|-&lt;br /&gt;
| Jenkins&lt;br /&gt;
| style=&amp;quot;text-align:right;&amp;quot;| https://mf4.xiph.org/jenkins/&lt;br /&gt;
| jenkins&lt;br /&gt;
| style=&amp;quot;text-align:right;&amp;quot;| https://mf4.xiph.org&lt;br /&gt;
| TD-Linux&lt;br /&gt;
|-&lt;br /&gt;
| Mail&lt;br /&gt;
| style=&amp;quot;text-align:right;&amp;quot;| xiph.org&lt;br /&gt;
| mailfish&lt;br /&gt;
| style=&amp;quot;text-align:right;&amp;quot;| https://catfish.xiph.org&lt;br /&gt;
| ePirat, tbr&lt;br /&gt;
|-&lt;br /&gt;
| MailMan&lt;br /&gt;
| style=&amp;quot;text-align:right;&amp;quot;| http://lists.xiph.org&lt;br /&gt;
| mailfish&lt;br /&gt;
| style=&amp;quot;text-align:right;&amp;quot;| https://catfish.xiph.org&lt;br /&gt;
| ePirat, tbr&lt;br /&gt;
|-&lt;br /&gt;
| Media&lt;br /&gt;
| style=&amp;quot;text-align:right;&amp;quot;| https://media.xiph.org&lt;br /&gt;
| &lt;br /&gt;
| style=&amp;quot;text-align:right;&amp;quot;| https://media.xiph.org&lt;br /&gt;
| TD-Linux&lt;br /&gt;
|-&lt;br /&gt;
| Opus Boodler Streams&lt;br /&gt;
| style=&amp;quot;text-align:right;&amp;quot;| https://opus-codec.org&lt;br /&gt;
| &lt;br /&gt;
| style=&amp;quot;text-align:right;&amp;quot;| https://mf4.xiph.org&lt;br /&gt;
| gmaxwell&lt;br /&gt;
|-&lt;br /&gt;
| Rietveld&lt;br /&gt;
| style=&amp;quot;text-align:right;&amp;quot;| https://review.xiph.org&lt;br /&gt;
| jenkins&lt;br /&gt;
| style=&amp;quot;text-align:right;&amp;quot;| https://mf4.xiph.org&lt;br /&gt;
| TD-Linux&lt;br /&gt;
|-&lt;br /&gt;
| Subversion Repos&lt;br /&gt;
| style=&amp;quot;text-align:right;&amp;quot;| https://svn.xiph.org&lt;br /&gt;
| &lt;br /&gt;
| style=&amp;quot;text-align:right;&amp;quot;| https://mf4.xiph.org&lt;br /&gt;
| rillian&lt;br /&gt;
|-&lt;br /&gt;
| Trac Bug Tracker&lt;br /&gt;
| style=&amp;quot;text-align:right;&amp;quot;| https://trac.xiph.org&lt;br /&gt;
| &lt;br /&gt;
| style=&amp;quot;text-align:right;&amp;quot;| https://mf4.xiph.org&lt;br /&gt;
| tbr&lt;br /&gt;
|-&lt;br /&gt;
| [[XiphWiki:Features|Wiki]]&lt;br /&gt;
| style=&amp;quot;text-align:right;&amp;quot;| https://wiki.xiph.org&lt;br /&gt;
| [[XiphInfra:Wiki VM|wiki]]&lt;br /&gt;
| style=&amp;quot;text-align:right;&amp;quot;| https://mf4.xiph.org&lt;br /&gt;
| ePirat&lt;br /&gt;
|-&lt;br /&gt;
| Xiph Mirror Repos&lt;br /&gt;
| style=&amp;quot;text-align:right;&amp;quot;| https://github.com/xiph&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| rillian&lt;br /&gt;
|-&lt;br /&gt;
| XiphBot-ng&lt;br /&gt;
| style=&amp;quot;text-align:right;&amp;quot;| XiphWiki on freenode.net&lt;br /&gt;
| &lt;br /&gt;
| style=&amp;quot;text-align:right;&amp;quot;| https://mf4.xiph.org&lt;br /&gt;
| TD-Linux&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;See the [[XiphInfra:Overview|Overview]] page for more information.&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Speex_FAQ&amp;diff=16588</id>
		<title>Speex FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Speex_FAQ&amp;diff=16588"/>
		<updated>2017-06-08T16:00:22Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* Why is encoding so slow compared to decoding? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== General ==&lt;br /&gt;
&lt;br /&gt;
=== Why do we need [[Speex]]? [[Vorbis]] is open source and patent-free.  ===&lt;br /&gt;
&lt;br /&gt;
[[Vorbis]] is a great project but its goals are not the same as Speex. Vorbis is mostly aimed at compressing music and audio in general, while Speex targets speech only. For that reason, Speex can achieve much better results than Vorbis on speech (typically 2-4 times higher compression at equal quality).&lt;br /&gt;
&lt;br /&gt;
=== Isn&#039;t there an open source implementation of the [https://en.wikipedia.org/wiki/Full_Rate GSM-FR] codec? Why is Speex necessary? ===&lt;br /&gt;
&lt;br /&gt;
First of all, it&#039;s not clear whether [https://en.wikipedia.org/wiki/Full_Rate GSM-FR] is covered by a Philips patent (see http://kbs.cs.tu-berlin.de/~jutta/toast.html). Also, GSM-FR offers mediocre quality at a relatively high bit-rate, while Speex can offer equivalent quality at almost half the bit-rate. Last but not least, Speex offers a wide range of bit-rates and sampling rates, while GSM-FR is limited to 8 kHz speech at 13 kbps.&lt;br /&gt;
&lt;br /&gt;
=== Ogg, Vorbis, Speex, what&#039;s the difference? ===&lt;br /&gt;
&lt;br /&gt;
[[Ogg]] is a &#039;&#039;&#039;container&#039;&#039;&#039; format for holding multimedia data (audio, video, subtitles, etc.).&lt;br /&gt;
&lt;br /&gt;
[[Vorbis]] is an &#039;&#039;&#039;audio codec&#039;&#039;&#039; that uses Ogg to store its bit-streams as files, hence the name &#039;&#039;&#039;Ogg Vorbis&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Speex]] is a &#039;&#039;&#039;speech codec&#039;&#039;&#039;, that also uses the Ogg format to store its bit-streams as files,&lt;br /&gt;
so technically they would be &#039;&#039;&#039;Ogg Speex&#039;&#039;&#039; files. However, most people refer to them just as Speex files.&lt;br /&gt;
&lt;br /&gt;
One difference Speex has with Vorbis, is that Speex is less tied to Ogg.&lt;br /&gt;
Actually, if you want to use Speex for Voice over IP (VoIP), you don&#039;t need to use an Ogg container at all.&lt;br /&gt;
&lt;br /&gt;
=== What&#039;s the extension for Speex files? ===&lt;br /&gt;
&lt;br /&gt;
Speex files tend to have the &#039;&#039;&#039;.spx&#039;&#039;&#039; extension. Note that the Speex tools (speexenc, speexdec) do not rely on the file extension at all, so any extension will work.&lt;br /&gt;
&lt;br /&gt;
=== Can I use Speex for compressing music? ===&lt;br /&gt;
&lt;br /&gt;
You can, but you&#039;ll be better off compressing with Vorbis when it comes to music.&lt;br /&gt;
Just like Vorbis is not really adapted to speech, Speex is really not adapted for music.&lt;br /&gt;
&lt;br /&gt;
=== I converted some MP3s to Speex and the quality is bad. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
This is called &#039;&#039;&#039;[https://en.wikipedia.org/wiki/Transcoding transcoding]&#039;&#039;&#039; (converting from one lossy format to another) and it will always result in much poorer quality than the original MP3.&lt;br /&gt;
&lt;br /&gt;
Avoid transcoding speech, unless you have a &#039;&#039;really&#039;&#039; good reason to do so (e.g. you need a smaller file size).&lt;br /&gt;
You should also avoid &#039;&#039;&#039;tandeming&#039;&#039;&#039; (self-transcoding). I.e. if you decode a Speex file and re-encode it again at the same bit-rate, you &#039;&#039;will&#039;&#039; lose quality.&lt;br /&gt;
&lt;br /&gt;
=== How does Speex compare to other proprietary codecs? ===&lt;br /&gt;
&lt;br /&gt;
It&#039;s hard to give precise figures since no formal listening tests have been performed yet. All I can say is that in terms of quality, Speex competes on the same ground as other proprietary codecs (not necessarily the best, but not the worst either).&lt;br /&gt;
&lt;br /&gt;
Speex also has many features that are not present in most other codecs. These include variable bit-rate (VBR), integration of narrowband and wideband, as well as stereo support. Of course, another area where Speex is really hard to beat is the quality/price ratio. Unlike many very expensive codecs, Speex is free and anyone may distribute or modify it at will.&lt;br /&gt;
&lt;br /&gt;
=== Can Speex pass [https://en.wikipedia.org/wiki/Dual-tone_multi-frequency_signaling DTMF] signals correctly? ===&lt;br /&gt;
&lt;br /&gt;
I guess it all depends on the bit-rate used. Though no formal testing has yet been performed, I&#039;d say it works correctly at 8 kbps and above. Make sure you don&#039;t use the lowest complexity (see SPEEX_SET_COMPLEXITY or --comp option), as it causes significant noise.&lt;br /&gt;
&lt;br /&gt;
=== Can Speex pass [https://en.wikipedia.org/wiki/V.90_(recommendation) V.90]/[https://en.wikipedia.org/wiki/V.92 V.92] modem signals correctly? ===&lt;br /&gt;
&lt;br /&gt;
If it could do that I&#039;d be very rich by now :-) No it cannot, as that would break fundamental laws of information theory.&lt;br /&gt;
&lt;br /&gt;
=== Does Speex have anything to do with the University of Sherbrooke? ===&lt;br /&gt;
&lt;br /&gt;
No.&lt;br /&gt;
&lt;br /&gt;
I wrote Speex while pursuing my Ph.D. at the University of Sherbrooke (2002-2005) in mobile robotics. Although I did my master with the Sherbrooke speech coding group (in speech enhancement, not coding), I was no longer associated with them when developing Speex. Furthermore, Speex does not make use of any code or proprietary technology developed in the Sherbrooke speech coding group. &lt;br /&gt;
&lt;br /&gt;
=== When will the next version of Speex be released? ===&lt;br /&gt;
&lt;br /&gt;
Speex has been superseded by the [[Opus]] codec, so probably no more versions of Speex will be released by Xiph. However, since the code is open-source, you are welcome to make your own additions to Speex as you please.&lt;br /&gt;
&lt;br /&gt;
=== How can I help if I don&#039;t know about speech processing? ===&lt;br /&gt;
&lt;br /&gt;
There&#039;s always &amp;quot;semi-technical&amp;quot; work to do. The documentation can be improved, and so can this FAQ.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
&lt;br /&gt;
=== Under what license is Speex released? ===&lt;br /&gt;
&lt;br /&gt;
As of version 1.0 beta 1, Speex is released under the revised (3-clause) BSD license. This license is one of the most permissive open source licenses.&lt;br /&gt;
&lt;br /&gt;
=== Am I allowed to use Speex in commercial software? ===&lt;br /&gt;
&lt;br /&gt;
Yes. As long as you comply with the license. This basically means you have to keep the copyright notice and you can&#039;t use our name to promote your product without authorization.&lt;br /&gt;
&lt;br /&gt;
=== Do I have to release source code if I use Speex in a proprietary application? ===&lt;br /&gt;
&lt;br /&gt;
No. The BSD license does &#039;&#039;&#039;not&#039;&#039;&#039; require you to release any source code. It is however &#039;&#039;&#039;appreciated&#039;&#039;&#039; (but not required) if you contribute back useful changes you make to Speex. This is generally also in your interest because it means you get maintenance of that code for free (i.e. no need to merge again in newer versions).&lt;br /&gt;
&lt;br /&gt;
== Using libspeex ==&lt;br /&gt;
&lt;br /&gt;
=== Does Speex run on Windows? ===&lt;br /&gt;
&lt;br /&gt;
Compilation on Windows has been supported since version 0.8.0. There are also several front-ends available from the website.&lt;br /&gt;
&lt;br /&gt;
=== Why is encoding so slow compared to decoding? ===&lt;br /&gt;
&lt;br /&gt;
For most kinds of compression, encoding is inherently slower than decoding.&lt;br /&gt;
&lt;br /&gt;
In the case of Speex, encoding consists of finding, for each vector of 5 to 10 samples, the entry that matches the best within a codebook consisting of 16 to 256 entries.&lt;br /&gt;
When decoding, all that needs to be done is look up the right entry in the codebook using the encoded index. Since a lookup is much faster than a search, the decoder works much faster than the encoder.&lt;br /&gt;
&lt;br /&gt;
=== Why is Speex so slow on my iPaq (or insert any platform without an FPU)? ===&lt;br /&gt;
&lt;br /&gt;
You probably didn&#039;t build Speex with the fixed-point option (--enable-fixed-point). Even if you did, not all modes have been ported to use fixed-point arithmetic, so the code may be slowed down by a few float operations left (e.g. in the wideband mode).&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m getting unusual background noise (hiss) when using libspeex in my application. How do I fix that? ===&lt;br /&gt;
&lt;br /&gt;
One of the causes could be scaling of the input speech. Speex expects signals to have a +-32767 (signed short) dynamic range. If the dynamic range of your signals is too small (e.g. +-1.0), you will suffer important quantization noise. A good target is to have a dynamic range around +=8000 which is large enough, but small enough to make sure there&#039;s no clipping when converting back to signed short.&lt;br /&gt;
&lt;br /&gt;
=== I get very distorted speech when using libspeex in my application. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
There are many possible causes for that. One of them is errors in the way the bits are manipulated. Another possible cause is the use of the same encoder or decoder state for more than one audio stream (channel), which produces strange effects with the filter memories. If the input speech has an amplitude close to +-32767, it is possible that at decoding, the amplitude be a bit higher than that, causing clipping when saving as 16-bit PCM.&lt;br /&gt;
&lt;br /&gt;
=== Can Speex run on fixed-point processors or DSPs? ===&lt;br /&gt;
&lt;br /&gt;
Yes. You can compile Speex for fixed-point CPUs by passing the --enable-fixed-point option to the configure script or defining FIXED_POINT. &lt;br /&gt;
&lt;br /&gt;
=== What architectures are supported? ===&lt;br /&gt;
&lt;br /&gt;
Speex is designed to run on pretty much any CPU that can do 16x16 multiplications. That includes:&lt;br /&gt;
* x86&lt;br /&gt;
* PowerPC&lt;br /&gt;
* ARM&lt;br /&gt;
* Blackfin&lt;br /&gt;
* TI C5x and C6x&lt;br /&gt;
* dsPIC (unsupported, unofficial port)&lt;br /&gt;
* Cell (in progress)&lt;br /&gt;
&lt;br /&gt;
...and many others&lt;br /&gt;
&lt;br /&gt;
=== Can I use Speex for 22.05 kHz, 44.1 kHz or 48 kHz signals? ===&lt;br /&gt;
&lt;br /&gt;
Yes, but you must resample the signal to a supported sample rate before encoding.&lt;br /&gt;
&lt;br /&gt;
Speex is optimised for &#039;&#039;&#039;8 kHz&#039;&#039;&#039; and &#039;&#039;&#039;16 kHz&#039;&#039;&#039; and it can also encode 32 kHz files as well (your mileage may vary). Anything else is &#039;&#039;unsupported&#039;&#039; and tends to be &#039;&#039;heavily sub-optimal&#039;&#039;. You might as well use Vorbis instead.&lt;br /&gt;
&lt;br /&gt;
Note that Speex includes a resampler module as of version &#039;&#039;&#039;1.2beta2&#039;&#039;&#039;. Refer to the section called Resampler in the Speex documentation.&lt;br /&gt;
&lt;br /&gt;
=== Should I use version 1.0.x or 1.2? ===&lt;br /&gt;
While currently 1.2 is marked as beta, the author believes 1.2 is vastly superior and more stable than the 1.0.x series regarding compression and API performance.  As such, it is recommended to use version 1.2, even though it is marked as beta.&lt;br /&gt;
&lt;br /&gt;
== Technical ==&lt;br /&gt;
&lt;br /&gt;
=== What&#039;s the difference between CELP and ACELP? ===&lt;br /&gt;
&lt;br /&gt;
CELP stands for &amp;quot;Code Excited Linear Prediction&amp;quot;, while ACELP stands for &amp;quot;Algebraic Code Excited Linear Prediction&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
That means ACELP is a CELP technique that uses an algebraic codebook represented as a sum of unit pulses, thus making the codebook search much more efficient. This technique was invented at the University of Sherbrooke and is now one of the most widely used forms of CELP.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, since ACELP is patented, it could not be used in Speex.&lt;br /&gt;
&lt;br /&gt;
=== Where can I get information about how Speex works? ===&lt;br /&gt;
&lt;br /&gt;
There is not (yet) a complete description of the algorithm (except for the source code itself).&lt;br /&gt;
&lt;br /&gt;
However, several aspects are documented either in the [http://speex.org/docs/ manual] or in the paper [http://people.xiph.org/~jm/papers/aes120_speex_vorbis.pdf Improved Noise Weighting in CELP Coding of Speech &amp;amp;mdash; Applying the Vorbis Psychoacoustic Model To Speex].&lt;br /&gt;
&lt;br /&gt;
[[Category:Speex]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Speex_FAQ&amp;diff=16587</id>
		<title>Speex FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Speex_FAQ&amp;diff=16587"/>
		<updated>2017-06-08T15:08:18Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* Where can I get information about how Speex works? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== General ==&lt;br /&gt;
&lt;br /&gt;
=== Why do we need [[Speex]]? [[Vorbis]] is open source and patent-free.  ===&lt;br /&gt;
&lt;br /&gt;
[[Vorbis]] is a great project but its goals are not the same as Speex. Vorbis is mostly aimed at compressing music and audio in general, while Speex targets speech only. For that reason, Speex can achieve much better results than Vorbis on speech (typically 2-4 times higher compression at equal quality).&lt;br /&gt;
&lt;br /&gt;
=== Isn&#039;t there an open source implementation of the [https://en.wikipedia.org/wiki/Full_Rate GSM-FR] codec? Why is Speex necessary? ===&lt;br /&gt;
&lt;br /&gt;
First of all, it&#039;s not clear whether [https://en.wikipedia.org/wiki/Full_Rate GSM-FR] is covered by a Philips patent (see http://kbs.cs.tu-berlin.de/~jutta/toast.html). Also, GSM-FR offers mediocre quality at a relatively high bit-rate, while Speex can offer equivalent quality at almost half the bit-rate. Last but not least, Speex offers a wide range of bit-rates and sampling rates, while GSM-FR is limited to 8 kHz speech at 13 kbps.&lt;br /&gt;
&lt;br /&gt;
=== Ogg, Vorbis, Speex, what&#039;s the difference? ===&lt;br /&gt;
&lt;br /&gt;
[[Ogg]] is a &#039;&#039;&#039;container&#039;&#039;&#039; format for holding multimedia data (audio, video, subtitles, etc.).&lt;br /&gt;
&lt;br /&gt;
[[Vorbis]] is an &#039;&#039;&#039;audio codec&#039;&#039;&#039; that uses Ogg to store its bit-streams as files, hence the name &#039;&#039;&#039;Ogg Vorbis&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Speex]] is a &#039;&#039;&#039;speech codec&#039;&#039;&#039;, that also uses the Ogg format to store its bit-streams as files,&lt;br /&gt;
so technically they would be &#039;&#039;&#039;Ogg Speex&#039;&#039;&#039; files. However, most people refer to them just as Speex files.&lt;br /&gt;
&lt;br /&gt;
One difference Speex has with Vorbis, is that Speex is less tied to Ogg.&lt;br /&gt;
Actually, if you want to use Speex for Voice over IP (VoIP), you don&#039;t need to use an Ogg container at all.&lt;br /&gt;
&lt;br /&gt;
=== What&#039;s the extension for Speex files? ===&lt;br /&gt;
&lt;br /&gt;
Speex files tend to have the &#039;&#039;&#039;.spx&#039;&#039;&#039; extension. Note that the Speex tools (speexenc, speexdec) do not rely on the file extension at all, so any extension will work.&lt;br /&gt;
&lt;br /&gt;
=== Can I use Speex for compressing music? ===&lt;br /&gt;
&lt;br /&gt;
You can, but you&#039;ll be better off compressing with Vorbis when it comes to music.&lt;br /&gt;
Just like Vorbis is not really adapted to speech, Speex is really not adapted for music.&lt;br /&gt;
&lt;br /&gt;
=== I converted some MP3s to Speex and the quality is bad. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
This is called &#039;&#039;&#039;[https://en.wikipedia.org/wiki/Transcoding transcoding]&#039;&#039;&#039; (converting from one lossy format to another) and it will always result in much poorer quality than the original MP3.&lt;br /&gt;
&lt;br /&gt;
Avoid transcoding speech, unless you have a &#039;&#039;really&#039;&#039; good reason to do so (e.g. you need a smaller file size).&lt;br /&gt;
You should also avoid &#039;&#039;&#039;tandeming&#039;&#039;&#039; (self-transcoding). I.e. if you decode a Speex file and re-encode it again at the same bit-rate, you &#039;&#039;will&#039;&#039; lose quality.&lt;br /&gt;
&lt;br /&gt;
=== How does Speex compare to other proprietary codecs? ===&lt;br /&gt;
&lt;br /&gt;
It&#039;s hard to give precise figures since no formal listening tests have been performed yet. All I can say is that in terms of quality, Speex competes on the same ground as other proprietary codecs (not necessarily the best, but not the worst either).&lt;br /&gt;
&lt;br /&gt;
Speex also has many features that are not present in most other codecs. These include variable bit-rate (VBR), integration of narrowband and wideband, as well as stereo support. Of course, another area where Speex is really hard to beat is the quality/price ratio. Unlike many very expensive codecs, Speex is free and anyone may distribute or modify it at will.&lt;br /&gt;
&lt;br /&gt;
=== Can Speex pass [https://en.wikipedia.org/wiki/Dual-tone_multi-frequency_signaling DTMF] signals correctly? ===&lt;br /&gt;
&lt;br /&gt;
I guess it all depends on the bit-rate used. Though no formal testing has yet been performed, I&#039;d say it works correctly at 8 kbps and above. Make sure you don&#039;t use the lowest complexity (see SPEEX_SET_COMPLEXITY or --comp option), as it causes significant noise.&lt;br /&gt;
&lt;br /&gt;
=== Can Speex pass [https://en.wikipedia.org/wiki/V.90_(recommendation) V.90]/[https://en.wikipedia.org/wiki/V.92 V.92] modem signals correctly? ===&lt;br /&gt;
&lt;br /&gt;
If it could do that I&#039;d be very rich by now :-) No it cannot, as that would break fundamental laws of information theory.&lt;br /&gt;
&lt;br /&gt;
=== Does Speex have anything to do with the University of Sherbrooke? ===&lt;br /&gt;
&lt;br /&gt;
No.&lt;br /&gt;
&lt;br /&gt;
I wrote Speex while pursuing my Ph.D. at the University of Sherbrooke (2002-2005) in mobile robotics. Although I did my master with the Sherbrooke speech coding group (in speech enhancement, not coding), I was no longer associated with them when developing Speex. Furthermore, Speex does not make use of any code or proprietary technology developed in the Sherbrooke speech coding group. &lt;br /&gt;
&lt;br /&gt;
=== When will the next version of Speex be released? ===&lt;br /&gt;
&lt;br /&gt;
Speex has been superseded by the [[Opus]] codec, so probably no more versions of Speex will be released by Xiph. However, since the code is open-source, you are welcome to make your own additions to Speex as you please.&lt;br /&gt;
&lt;br /&gt;
=== How can I help if I don&#039;t know about speech processing? ===&lt;br /&gt;
&lt;br /&gt;
There&#039;s always &amp;quot;semi-technical&amp;quot; work to do. The documentation can be improved, and so can this FAQ.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
&lt;br /&gt;
=== Under what license is Speex released? ===&lt;br /&gt;
&lt;br /&gt;
As of version 1.0 beta 1, Speex is released under the revised (3-clause) BSD license. This license is one of the most permissive open source licenses.&lt;br /&gt;
&lt;br /&gt;
=== Am I allowed to use Speex in commercial software? ===&lt;br /&gt;
&lt;br /&gt;
Yes. As long as you comply with the license. This basically means you have to keep the copyright notice and you can&#039;t use our name to promote your product without authorization.&lt;br /&gt;
&lt;br /&gt;
=== Do I have to release source code if I use Speex in a proprietary application? ===&lt;br /&gt;
&lt;br /&gt;
No. The BSD license does &#039;&#039;&#039;not&#039;&#039;&#039; require you to release any source code. It is however &#039;&#039;&#039;appreciated&#039;&#039;&#039; (but not required) if you contribute back useful changes you make to Speex. This is generally also in your interest because it means you get maintenance of that code for free (i.e. no need to merge again in newer versions).&lt;br /&gt;
&lt;br /&gt;
== Using libspeex ==&lt;br /&gt;
&lt;br /&gt;
=== Does Speex run on Windows? ===&lt;br /&gt;
&lt;br /&gt;
Compilation on Windows has been supported since version 0.8.0. There are also several front-ends available from the website.&lt;br /&gt;
&lt;br /&gt;
=== Why is encoding so slow compared to decoding? ===&lt;br /&gt;
&lt;br /&gt;
For most kinds of compression, encoding is inherently slower than decoding.&lt;br /&gt;
&lt;br /&gt;
In the case of Speex, encoding consists of finding, for each vector of 5 to 10 samples, the entry that matches the best within a codebook consisting of 16 to 256 entries.&lt;br /&gt;
When decoding, all that needs to be done is look up the right entry in the codebook using the encoded index. Since a lookup is much faster than a search, the decoder works much faster than the encoder.&lt;br /&gt;
&lt;br /&gt;
This behaviour ties in with the assumption that in most use cases, people will be encoding a file once, but then decode it multiple times.&lt;br /&gt;
&lt;br /&gt;
=== Why is Speex so slow on my iPaq (or insert any platform without an FPU)? ===&lt;br /&gt;
&lt;br /&gt;
You probably didn&#039;t build Speex with the fixed-point option (--enable-fixed-point). Even if you did, not all modes have been ported to use fixed-point arithmetic, so the code may be slowed down by a few float operations left (e.g. in the wideband mode).&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m getting unusual background noise (hiss) when using libspeex in my application. How do I fix that? ===&lt;br /&gt;
&lt;br /&gt;
One of the causes could be scaling of the input speech. Speex expects signals to have a +-32767 (signed short) dynamic range. If the dynamic range of your signals is too small (e.g. +-1.0), you will suffer important quantization noise. A good target is to have a dynamic range around +=8000 which is large enough, but small enough to make sure there&#039;s no clipping when converting back to signed short.&lt;br /&gt;
&lt;br /&gt;
=== I get very distorted speech when using libspeex in my application. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
There are many possible causes for that. One of them is errors in the way the bits are manipulated. Another possible cause is the use of the same encoder or decoder state for more than one audio stream (channel), which produces strange effects with the filter memories. If the input speech has an amplitude close to +-32767, it is possible that at decoding, the amplitude be a bit higher than that, causing clipping when saving as 16-bit PCM.&lt;br /&gt;
&lt;br /&gt;
=== Can Speex run on fixed-point processors or DSPs? ===&lt;br /&gt;
&lt;br /&gt;
Yes. You can compile Speex for fixed-point CPUs by passing the --enable-fixed-point option to the configure script or defining FIXED_POINT. &lt;br /&gt;
&lt;br /&gt;
=== What architectures are supported? ===&lt;br /&gt;
&lt;br /&gt;
Speex is designed to run on pretty much any CPU that can do 16x16 multiplications. That includes:&lt;br /&gt;
* x86&lt;br /&gt;
* PowerPC&lt;br /&gt;
* ARM&lt;br /&gt;
* Blackfin&lt;br /&gt;
* TI C5x and C6x&lt;br /&gt;
* dsPIC (unsupported, unofficial port)&lt;br /&gt;
* Cell (in progress)&lt;br /&gt;
&lt;br /&gt;
...and many others&lt;br /&gt;
&lt;br /&gt;
=== Can I use Speex for 22.05 kHz, 44.1 kHz or 48 kHz signals? ===&lt;br /&gt;
&lt;br /&gt;
Yes, but you must resample the signal to a supported sample rate before encoding.&lt;br /&gt;
&lt;br /&gt;
Speex is optimised for &#039;&#039;&#039;8 kHz&#039;&#039;&#039; and &#039;&#039;&#039;16 kHz&#039;&#039;&#039; and it can also encode 32 kHz files as well (your mileage may vary). Anything else is &#039;&#039;unsupported&#039;&#039; and tends to be &#039;&#039;heavily sub-optimal&#039;&#039;. You might as well use Vorbis instead.&lt;br /&gt;
&lt;br /&gt;
Note that Speex includes a resampler module as of version &#039;&#039;&#039;1.2beta2&#039;&#039;&#039;. Refer to the section called Resampler in the Speex documentation.&lt;br /&gt;
&lt;br /&gt;
=== Should I use version 1.0.x or 1.2? ===&lt;br /&gt;
While currently 1.2 is marked as beta, the author believes 1.2 is vastly superior and more stable than the 1.0.x series regarding compression and API performance.  As such, it is recommended to use version 1.2, even though it is marked as beta.&lt;br /&gt;
&lt;br /&gt;
== Technical ==&lt;br /&gt;
&lt;br /&gt;
=== What&#039;s the difference between CELP and ACELP? ===&lt;br /&gt;
&lt;br /&gt;
CELP stands for &amp;quot;Code Excited Linear Prediction&amp;quot;, while ACELP stands for &amp;quot;Algebraic Code Excited Linear Prediction&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
That means ACELP is a CELP technique that uses an algebraic codebook represented as a sum of unit pulses, thus making the codebook search much more efficient. This technique was invented at the University of Sherbrooke and is now one of the most widely used forms of CELP.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, since ACELP is patented, it could not be used in Speex.&lt;br /&gt;
&lt;br /&gt;
=== Where can I get information about how Speex works? ===&lt;br /&gt;
&lt;br /&gt;
There is not (yet) a complete description of the algorithm (except for the source code itself).&lt;br /&gt;
&lt;br /&gt;
However, several aspects are documented either in the [http://speex.org/docs/ manual] or in the paper [http://people.xiph.org/~jm/papers/aes120_speex_vorbis.pdf Improved Noise Weighting in CELP Coding of Speech &amp;amp;mdash; Applying the Vorbis Psychoacoustic Model To Speex].&lt;br /&gt;
&lt;br /&gt;
[[Category:Speex]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Speex_FAQ&amp;diff=16586</id>
		<title>Speex FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Speex_FAQ&amp;diff=16586"/>
		<updated>2017-06-08T15:07:24Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* CELP, ACELP, what&amp;#039;s the difference? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== General ==&lt;br /&gt;
&lt;br /&gt;
=== Why do we need [[Speex]]? [[Vorbis]] is open source and patent-free.  ===&lt;br /&gt;
&lt;br /&gt;
[[Vorbis]] is a great project but its goals are not the same as Speex. Vorbis is mostly aimed at compressing music and audio in general, while Speex targets speech only. For that reason, Speex can achieve much better results than Vorbis on speech (typically 2-4 times higher compression at equal quality).&lt;br /&gt;
&lt;br /&gt;
=== Isn&#039;t there an open source implementation of the [https://en.wikipedia.org/wiki/Full_Rate GSM-FR] codec? Why is Speex necessary? ===&lt;br /&gt;
&lt;br /&gt;
First of all, it&#039;s not clear whether [https://en.wikipedia.org/wiki/Full_Rate GSM-FR] is covered by a Philips patent (see http://kbs.cs.tu-berlin.de/~jutta/toast.html). Also, GSM-FR offers mediocre quality at a relatively high bit-rate, while Speex can offer equivalent quality at almost half the bit-rate. Last but not least, Speex offers a wide range of bit-rates and sampling rates, while GSM-FR is limited to 8 kHz speech at 13 kbps.&lt;br /&gt;
&lt;br /&gt;
=== Ogg, Vorbis, Speex, what&#039;s the difference? ===&lt;br /&gt;
&lt;br /&gt;
[[Ogg]] is a &#039;&#039;&#039;container&#039;&#039;&#039; format for holding multimedia data (audio, video, subtitles, etc.).&lt;br /&gt;
&lt;br /&gt;
[[Vorbis]] is an &#039;&#039;&#039;audio codec&#039;&#039;&#039; that uses Ogg to store its bit-streams as files, hence the name &#039;&#039;&#039;Ogg Vorbis&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Speex]] is a &#039;&#039;&#039;speech codec&#039;&#039;&#039;, that also uses the Ogg format to store its bit-streams as files,&lt;br /&gt;
so technically they would be &#039;&#039;&#039;Ogg Speex&#039;&#039;&#039; files. However, most people refer to them just as Speex files.&lt;br /&gt;
&lt;br /&gt;
One difference Speex has with Vorbis, is that Speex is less tied to Ogg.&lt;br /&gt;
Actually, if you want to use Speex for Voice over IP (VoIP), you don&#039;t need to use an Ogg container at all.&lt;br /&gt;
&lt;br /&gt;
=== What&#039;s the extension for Speex files? ===&lt;br /&gt;
&lt;br /&gt;
Speex files tend to have the &#039;&#039;&#039;.spx&#039;&#039;&#039; extension. Note that the Speex tools (speexenc, speexdec) do not rely on the file extension at all, so any extension will work.&lt;br /&gt;
&lt;br /&gt;
=== Can I use Speex for compressing music? ===&lt;br /&gt;
&lt;br /&gt;
You can, but you&#039;ll be better off compressing with Vorbis when it comes to music.&lt;br /&gt;
Just like Vorbis is not really adapted to speech, Speex is really not adapted for music.&lt;br /&gt;
&lt;br /&gt;
=== I converted some MP3s to Speex and the quality is bad. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
This is called &#039;&#039;&#039;[https://en.wikipedia.org/wiki/Transcoding transcoding]&#039;&#039;&#039; (converting from one lossy format to another) and it will always result in much poorer quality than the original MP3.&lt;br /&gt;
&lt;br /&gt;
Avoid transcoding speech, unless you have a &#039;&#039;really&#039;&#039; good reason to do so (e.g. you need a smaller file size).&lt;br /&gt;
You should also avoid &#039;&#039;&#039;tandeming&#039;&#039;&#039; (self-transcoding). I.e. if you decode a Speex file and re-encode it again at the same bit-rate, you &#039;&#039;will&#039;&#039; lose quality.&lt;br /&gt;
&lt;br /&gt;
=== How does Speex compare to other proprietary codecs? ===&lt;br /&gt;
&lt;br /&gt;
It&#039;s hard to give precise figures since no formal listening tests have been performed yet. All I can say is that in terms of quality, Speex competes on the same ground as other proprietary codecs (not necessarily the best, but not the worst either).&lt;br /&gt;
&lt;br /&gt;
Speex also has many features that are not present in most other codecs. These include variable bit-rate (VBR), integration of narrowband and wideband, as well as stereo support. Of course, another area where Speex is really hard to beat is the quality/price ratio. Unlike many very expensive codecs, Speex is free and anyone may distribute or modify it at will.&lt;br /&gt;
&lt;br /&gt;
=== Can Speex pass [https://en.wikipedia.org/wiki/Dual-tone_multi-frequency_signaling DTMF] signals correctly? ===&lt;br /&gt;
&lt;br /&gt;
I guess it all depends on the bit-rate used. Though no formal testing has yet been performed, I&#039;d say it works correctly at 8 kbps and above. Make sure you don&#039;t use the lowest complexity (see SPEEX_SET_COMPLEXITY or --comp option), as it causes significant noise.&lt;br /&gt;
&lt;br /&gt;
=== Can Speex pass [https://en.wikipedia.org/wiki/V.90_(recommendation) V.90]/[https://en.wikipedia.org/wiki/V.92 V.92] modem signals correctly? ===&lt;br /&gt;
&lt;br /&gt;
If it could do that I&#039;d be very rich by now :-) No it cannot, as that would break fundamental laws of information theory.&lt;br /&gt;
&lt;br /&gt;
=== Does Speex have anything to do with the University of Sherbrooke? ===&lt;br /&gt;
&lt;br /&gt;
No.&lt;br /&gt;
&lt;br /&gt;
I wrote Speex while pursuing my Ph.D. at the University of Sherbrooke (2002-2005) in mobile robotics. Although I did my master with the Sherbrooke speech coding group (in speech enhancement, not coding), I was no longer associated with them when developing Speex. Furthermore, Speex does not make use of any code or proprietary technology developed in the Sherbrooke speech coding group. &lt;br /&gt;
&lt;br /&gt;
=== When will the next version of Speex be released? ===&lt;br /&gt;
&lt;br /&gt;
Speex has been superseded by the [[Opus]] codec, so probably no more versions of Speex will be released by Xiph. However, since the code is open-source, you are welcome to make your own additions to Speex as you please.&lt;br /&gt;
&lt;br /&gt;
=== How can I help if I don&#039;t know about speech processing? ===&lt;br /&gt;
&lt;br /&gt;
There&#039;s always &amp;quot;semi-technical&amp;quot; work to do. The documentation can be improved, and so can this FAQ.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
&lt;br /&gt;
=== Under what license is Speex released? ===&lt;br /&gt;
&lt;br /&gt;
As of version 1.0 beta 1, Speex is released under the revised (3-clause) BSD license. This license is one of the most permissive open source licenses.&lt;br /&gt;
&lt;br /&gt;
=== Am I allowed to use Speex in commercial software? ===&lt;br /&gt;
&lt;br /&gt;
Yes. As long as you comply with the license. This basically means you have to keep the copyright notice and you can&#039;t use our name to promote your product without authorization.&lt;br /&gt;
&lt;br /&gt;
=== Do I have to release source code if I use Speex in a proprietary application? ===&lt;br /&gt;
&lt;br /&gt;
No. The BSD license does &#039;&#039;&#039;not&#039;&#039;&#039; require you to release any source code. It is however &#039;&#039;&#039;appreciated&#039;&#039;&#039; (but not required) if you contribute back useful changes you make to Speex. This is generally also in your interest because it means you get maintenance of that code for free (i.e. no need to merge again in newer versions).&lt;br /&gt;
&lt;br /&gt;
== Using libspeex ==&lt;br /&gt;
&lt;br /&gt;
=== Does Speex run on Windows? ===&lt;br /&gt;
&lt;br /&gt;
Compilation on Windows has been supported since version 0.8.0. There are also several front-ends available from the website.&lt;br /&gt;
&lt;br /&gt;
=== Why is encoding so slow compared to decoding? ===&lt;br /&gt;
&lt;br /&gt;
For most kinds of compression, encoding is inherently slower than decoding.&lt;br /&gt;
&lt;br /&gt;
In the case of Speex, encoding consists of finding, for each vector of 5 to 10 samples, the entry that matches the best within a codebook consisting of 16 to 256 entries.&lt;br /&gt;
When decoding, all that needs to be done is look up the right entry in the codebook using the encoded index. Since a lookup is much faster than a search, the decoder works much faster than the encoder.&lt;br /&gt;
&lt;br /&gt;
This behaviour ties in with the assumption that in most use cases, people will be encoding a file once, but then decode it multiple times.&lt;br /&gt;
&lt;br /&gt;
=== Why is Speex so slow on my iPaq (or insert any platform without an FPU)? ===&lt;br /&gt;
&lt;br /&gt;
You probably didn&#039;t build Speex with the fixed-point option (--enable-fixed-point). Even if you did, not all modes have been ported to use fixed-point arithmetic, so the code may be slowed down by a few float operations left (e.g. in the wideband mode).&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m getting unusual background noise (hiss) when using libspeex in my application. How do I fix that? ===&lt;br /&gt;
&lt;br /&gt;
One of the causes could be scaling of the input speech. Speex expects signals to have a +-32767 (signed short) dynamic range. If the dynamic range of your signals is too small (e.g. +-1.0), you will suffer important quantization noise. A good target is to have a dynamic range around +=8000 which is large enough, but small enough to make sure there&#039;s no clipping when converting back to signed short.&lt;br /&gt;
&lt;br /&gt;
=== I get very distorted speech when using libspeex in my application. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
There are many possible causes for that. One of them is errors in the way the bits are manipulated. Another possible cause is the use of the same encoder or decoder state for more than one audio stream (channel), which produces strange effects with the filter memories. If the input speech has an amplitude close to +-32767, it is possible that at decoding, the amplitude be a bit higher than that, causing clipping when saving as 16-bit PCM.&lt;br /&gt;
&lt;br /&gt;
=== Can Speex run on fixed-point processors or DSPs? ===&lt;br /&gt;
&lt;br /&gt;
Yes. You can compile Speex for fixed-point CPUs by passing the --enable-fixed-point option to the configure script or defining FIXED_POINT. &lt;br /&gt;
&lt;br /&gt;
=== What architectures are supported? ===&lt;br /&gt;
&lt;br /&gt;
Speex is designed to run on pretty much any CPU that can do 16x16 multiplications. That includes:&lt;br /&gt;
* x86&lt;br /&gt;
* PowerPC&lt;br /&gt;
* ARM&lt;br /&gt;
* Blackfin&lt;br /&gt;
* TI C5x and C6x&lt;br /&gt;
* dsPIC (unsupported, unofficial port)&lt;br /&gt;
* Cell (in progress)&lt;br /&gt;
&lt;br /&gt;
...and many others&lt;br /&gt;
&lt;br /&gt;
=== Can I use Speex for 22.05 kHz, 44.1 kHz or 48 kHz signals? ===&lt;br /&gt;
&lt;br /&gt;
Yes, but you must resample the signal to a supported sample rate before encoding.&lt;br /&gt;
&lt;br /&gt;
Speex is optimised for &#039;&#039;&#039;8 kHz&#039;&#039;&#039; and &#039;&#039;&#039;16 kHz&#039;&#039;&#039; and it can also encode 32 kHz files as well (your mileage may vary). Anything else is &#039;&#039;unsupported&#039;&#039; and tends to be &#039;&#039;heavily sub-optimal&#039;&#039;. You might as well use Vorbis instead.&lt;br /&gt;
&lt;br /&gt;
Note that Speex includes a resampler module as of version &#039;&#039;&#039;1.2beta2&#039;&#039;&#039;. Refer to the section called Resampler in the Speex documentation.&lt;br /&gt;
&lt;br /&gt;
=== Should I use version 1.0.x or 1.2? ===&lt;br /&gt;
While currently 1.2 is marked as beta, the author believes 1.2 is vastly superior and more stable than the 1.0.x series regarding compression and API performance.  As such, it is recommended to use version 1.2, even though it is marked as beta.&lt;br /&gt;
&lt;br /&gt;
== Technical ==&lt;br /&gt;
&lt;br /&gt;
=== What&#039;s the difference between CELP and ACELP? ===&lt;br /&gt;
&lt;br /&gt;
CELP stands for &amp;quot;Code Excited Linear Prediction&amp;quot;, while ACELP stands for &amp;quot;Algebraic Code Excited Linear Prediction&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
That means ACELP is a CELP technique that uses an algebraic codebook represented as a sum of unit pulses, thus making the codebook search much more efficient. This technique was invented at the University of Sherbrooke and is now one of the most widely used forms of CELP.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, since ACELP is patented, it could not be used in Speex.&lt;br /&gt;
&lt;br /&gt;
=== Where can I get information about how Speex works? ===&lt;br /&gt;
&lt;br /&gt;
There is not (yet) a complete description of the algorithm (except for the source code itself). However, several aspects are documented either in the [http://speex.org/docs/ manual] or in the paper [http://people.xiph.org/~jm/papers/aes120_speex_vorbis.pdf Improved Noise Weighting in CELP Coding of Speech &amp;amp;mdash; Applying the Vorbis Psychoacoustic Model To Speex].&lt;br /&gt;
&lt;br /&gt;
[[Category:Speex]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Speex_FAQ&amp;diff=16585</id>
		<title>Speex FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Speex_FAQ&amp;diff=16585"/>
		<updated>2017-06-08T14:59:55Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* Can I use Speex for 22.05 kHz, 44.1 kHz or 48 kHz signals? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== General ==&lt;br /&gt;
&lt;br /&gt;
=== Why do we need [[Speex]]? [[Vorbis]] is open source and patent-free.  ===&lt;br /&gt;
&lt;br /&gt;
[[Vorbis]] is a great project but its goals are not the same as Speex. Vorbis is mostly aimed at compressing music and audio in general, while Speex targets speech only. For that reason, Speex can achieve much better results than Vorbis on speech (typically 2-4 times higher compression at equal quality).&lt;br /&gt;
&lt;br /&gt;
=== Isn&#039;t there an open source implementation of the [https://en.wikipedia.org/wiki/Full_Rate GSM-FR] codec? Why is Speex necessary? ===&lt;br /&gt;
&lt;br /&gt;
First of all, it&#039;s not clear whether [https://en.wikipedia.org/wiki/Full_Rate GSM-FR] is covered by a Philips patent (see http://kbs.cs.tu-berlin.de/~jutta/toast.html). Also, GSM-FR offers mediocre quality at a relatively high bit-rate, while Speex can offer equivalent quality at almost half the bit-rate. Last but not least, Speex offers a wide range of bit-rates and sampling rates, while GSM-FR is limited to 8 kHz speech at 13 kbps.&lt;br /&gt;
&lt;br /&gt;
=== Ogg, Vorbis, Speex, what&#039;s the difference? ===&lt;br /&gt;
&lt;br /&gt;
[[Ogg]] is a &#039;&#039;&#039;container&#039;&#039;&#039; format for holding multimedia data (audio, video, subtitles, etc.).&lt;br /&gt;
&lt;br /&gt;
[[Vorbis]] is an &#039;&#039;&#039;audio codec&#039;&#039;&#039; that uses Ogg to store its bit-streams as files, hence the name &#039;&#039;&#039;Ogg Vorbis&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Speex]] is a &#039;&#039;&#039;speech codec&#039;&#039;&#039;, that also uses the Ogg format to store its bit-streams as files,&lt;br /&gt;
so technically they would be &#039;&#039;&#039;Ogg Speex&#039;&#039;&#039; files. However, most people refer to them just as Speex files.&lt;br /&gt;
&lt;br /&gt;
One difference Speex has with Vorbis, is that Speex is less tied to Ogg.&lt;br /&gt;
Actually, if you want to use Speex for Voice over IP (VoIP), you don&#039;t need to use an Ogg container at all.&lt;br /&gt;
&lt;br /&gt;
=== What&#039;s the extension for Speex files? ===&lt;br /&gt;
&lt;br /&gt;
Speex files tend to have the &#039;&#039;&#039;.spx&#039;&#039;&#039; extension. Note that the Speex tools (speexenc, speexdec) do not rely on the file extension at all, so any extension will work.&lt;br /&gt;
&lt;br /&gt;
=== Can I use Speex for compressing music? ===&lt;br /&gt;
&lt;br /&gt;
You can, but you&#039;ll be better off compressing with Vorbis when it comes to music.&lt;br /&gt;
Just like Vorbis is not really adapted to speech, Speex is really not adapted for music.&lt;br /&gt;
&lt;br /&gt;
=== I converted some MP3s to Speex and the quality is bad. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
This is called &#039;&#039;&#039;[https://en.wikipedia.org/wiki/Transcoding transcoding]&#039;&#039;&#039; (converting from one lossy format to another) and it will always result in much poorer quality than the original MP3.&lt;br /&gt;
&lt;br /&gt;
Avoid transcoding speech, unless you have a &#039;&#039;really&#039;&#039; good reason to do so (e.g. you need a smaller file size).&lt;br /&gt;
You should also avoid &#039;&#039;&#039;tandeming&#039;&#039;&#039; (self-transcoding). I.e. if you decode a Speex file and re-encode it again at the same bit-rate, you &#039;&#039;will&#039;&#039; lose quality.&lt;br /&gt;
&lt;br /&gt;
=== How does Speex compare to other proprietary codecs? ===&lt;br /&gt;
&lt;br /&gt;
It&#039;s hard to give precise figures since no formal listening tests have been performed yet. All I can say is that in terms of quality, Speex competes on the same ground as other proprietary codecs (not necessarily the best, but not the worst either).&lt;br /&gt;
&lt;br /&gt;
Speex also has many features that are not present in most other codecs. These include variable bit-rate (VBR), integration of narrowband and wideband, as well as stereo support. Of course, another area where Speex is really hard to beat is the quality/price ratio. Unlike many very expensive codecs, Speex is free and anyone may distribute or modify it at will.&lt;br /&gt;
&lt;br /&gt;
=== Can Speex pass [https://en.wikipedia.org/wiki/Dual-tone_multi-frequency_signaling DTMF] signals correctly? ===&lt;br /&gt;
&lt;br /&gt;
I guess it all depends on the bit-rate used. Though no formal testing has yet been performed, I&#039;d say it works correctly at 8 kbps and above. Make sure you don&#039;t use the lowest complexity (see SPEEX_SET_COMPLEXITY or --comp option), as it causes significant noise.&lt;br /&gt;
&lt;br /&gt;
=== Can Speex pass [https://en.wikipedia.org/wiki/V.90_(recommendation) V.90]/[https://en.wikipedia.org/wiki/V.92 V.92] modem signals correctly? ===&lt;br /&gt;
&lt;br /&gt;
If it could do that I&#039;d be very rich by now :-) No it cannot, as that would break fundamental laws of information theory.&lt;br /&gt;
&lt;br /&gt;
=== Does Speex have anything to do with the University of Sherbrooke? ===&lt;br /&gt;
&lt;br /&gt;
No.&lt;br /&gt;
&lt;br /&gt;
I wrote Speex while pursuing my Ph.D. at the University of Sherbrooke (2002-2005) in mobile robotics. Although I did my master with the Sherbrooke speech coding group (in speech enhancement, not coding), I was no longer associated with them when developing Speex. Furthermore, Speex does not make use of any code or proprietary technology developed in the Sherbrooke speech coding group. &lt;br /&gt;
&lt;br /&gt;
=== When will the next version of Speex be released? ===&lt;br /&gt;
&lt;br /&gt;
Speex has been superseded by the [[Opus]] codec, so probably no more versions of Speex will be released by Xiph. However, since the code is open-source, you are welcome to make your own additions to Speex as you please.&lt;br /&gt;
&lt;br /&gt;
=== How can I help if I don&#039;t know about speech processing? ===&lt;br /&gt;
&lt;br /&gt;
There&#039;s always &amp;quot;semi-technical&amp;quot; work to do. The documentation can be improved, and so can this FAQ.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
&lt;br /&gt;
=== Under what license is Speex released? ===&lt;br /&gt;
&lt;br /&gt;
As of version 1.0 beta 1, Speex is released under the revised (3-clause) BSD license. This license is one of the most permissive open source licenses.&lt;br /&gt;
&lt;br /&gt;
=== Am I allowed to use Speex in commercial software? ===&lt;br /&gt;
&lt;br /&gt;
Yes. As long as you comply with the license. This basically means you have to keep the copyright notice and you can&#039;t use our name to promote your product without authorization.&lt;br /&gt;
&lt;br /&gt;
=== Do I have to release source code if I use Speex in a proprietary application? ===&lt;br /&gt;
&lt;br /&gt;
No. The BSD license does &#039;&#039;&#039;not&#039;&#039;&#039; require you to release any source code. It is however &#039;&#039;&#039;appreciated&#039;&#039;&#039; (but not required) if you contribute back useful changes you make to Speex. This is generally also in your interest because it means you get maintenance of that code for free (i.e. no need to merge again in newer versions).&lt;br /&gt;
&lt;br /&gt;
== Using libspeex ==&lt;br /&gt;
&lt;br /&gt;
=== Does Speex run on Windows? ===&lt;br /&gt;
&lt;br /&gt;
Compilation on Windows has been supported since version 0.8.0. There are also several front-ends available from the website.&lt;br /&gt;
&lt;br /&gt;
=== Why is encoding so slow compared to decoding? ===&lt;br /&gt;
&lt;br /&gt;
For most kinds of compression, encoding is inherently slower than decoding.&lt;br /&gt;
&lt;br /&gt;
In the case of Speex, encoding consists of finding, for each vector of 5 to 10 samples, the entry that matches the best within a codebook consisting of 16 to 256 entries.&lt;br /&gt;
When decoding, all that needs to be done is look up the right entry in the codebook using the encoded index. Since a lookup is much faster than a search, the decoder works much faster than the encoder.&lt;br /&gt;
&lt;br /&gt;
This behaviour ties in with the assumption that in most use cases, people will be encoding a file once, but then decode it multiple times.&lt;br /&gt;
&lt;br /&gt;
=== Why is Speex so slow on my iPaq (or insert any platform without an FPU)? ===&lt;br /&gt;
&lt;br /&gt;
You probably didn&#039;t build Speex with the fixed-point option (--enable-fixed-point). Even if you did, not all modes have been ported to use fixed-point arithmetic, so the code may be slowed down by a few float operations left (e.g. in the wideband mode).&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m getting unusual background noise (hiss) when using libspeex in my application. How do I fix that? ===&lt;br /&gt;
&lt;br /&gt;
One of the causes could be scaling of the input speech. Speex expects signals to have a +-32767 (signed short) dynamic range. If the dynamic range of your signals is too small (e.g. +-1.0), you will suffer important quantization noise. A good target is to have a dynamic range around +=8000 which is large enough, but small enough to make sure there&#039;s no clipping when converting back to signed short.&lt;br /&gt;
&lt;br /&gt;
=== I get very distorted speech when using libspeex in my application. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
There are many possible causes for that. One of them is errors in the way the bits are manipulated. Another possible cause is the use of the same encoder or decoder state for more than one audio stream (channel), which produces strange effects with the filter memories. If the input speech has an amplitude close to +-32767, it is possible that at decoding, the amplitude be a bit higher than that, causing clipping when saving as 16-bit PCM.&lt;br /&gt;
&lt;br /&gt;
=== Can Speex run on fixed-point processors or DSPs? ===&lt;br /&gt;
&lt;br /&gt;
Yes. You can compile Speex for fixed-point CPUs by passing the --enable-fixed-point option to the configure script or defining FIXED_POINT. &lt;br /&gt;
&lt;br /&gt;
=== What architectures are supported? ===&lt;br /&gt;
&lt;br /&gt;
Speex is designed to run on pretty much any CPU that can do 16x16 multiplications. That includes:&lt;br /&gt;
* x86&lt;br /&gt;
* PowerPC&lt;br /&gt;
* ARM&lt;br /&gt;
* Blackfin&lt;br /&gt;
* TI C5x and C6x&lt;br /&gt;
* dsPIC (unsupported, unofficial port)&lt;br /&gt;
* Cell (in progress)&lt;br /&gt;
&lt;br /&gt;
...and many others&lt;br /&gt;
&lt;br /&gt;
=== Can I use Speex for 22.05 kHz, 44.1 kHz or 48 kHz signals? ===&lt;br /&gt;
&lt;br /&gt;
Yes, but you must resample the signal to a supported sample rate before encoding.&lt;br /&gt;
&lt;br /&gt;
Speex is optimised for &#039;&#039;&#039;8 kHz&#039;&#039;&#039; and &#039;&#039;&#039;16 kHz&#039;&#039;&#039; and it can also encode 32 kHz files as well (your mileage may vary). Anything else is &#039;&#039;unsupported&#039;&#039; and tends to be &#039;&#039;heavily sub-optimal&#039;&#039;. You might as well use Vorbis instead.&lt;br /&gt;
&lt;br /&gt;
Note that Speex includes a resampler module as of version &#039;&#039;&#039;1.2beta2&#039;&#039;&#039;. Refer to the section called Resampler in the Speex documentation.&lt;br /&gt;
&lt;br /&gt;
=== Should I use version 1.0.x or 1.2? ===&lt;br /&gt;
While currently 1.2 is marked as beta, the author believes 1.2 is vastly superior and more stable than the 1.0.x series regarding compression and API performance.  As such, it is recommended to use version 1.2, even though it is marked as beta.&lt;br /&gt;
&lt;br /&gt;
== Technical ==&lt;br /&gt;
&lt;br /&gt;
=== CELP, ACELP, what&#039;s the difference? ===&lt;br /&gt;
&lt;br /&gt;
CELP stands for &amp;quot;Code Excited Linear Prediction&amp;quot;, while ACELP stands for &amp;quot;Algebraic Code Excited Linear Prediction&amp;quot;. That means ACELP is a CELP technique that uses an algebraic codebook represented as a sum of unit pulses, thus making the codebook search much more efficient. This technique was invented at the University of Sherbrooke and is now one of the most widely used form of CELP. Unfortunately, since it is patented, it could not be used in Speex.&lt;br /&gt;
&lt;br /&gt;
=== Where can I get information about how Speex works? ===&lt;br /&gt;
&lt;br /&gt;
There is not (yet) a complete description of the algorithm (except for the source code itself). However, several aspects are documented either in the [http://speex.org/docs/ manual] or in the paper [http://people.xiph.org/~jm/papers/aes120_speex_vorbis.pdf Improved Noise Weighting in CELP Coding of Speech &amp;amp;mdash; Applying the Vorbis Psychoacoustic Model To Speex].&lt;br /&gt;
&lt;br /&gt;
[[Category:Speex]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Speex_FAQ&amp;diff=16584</id>
		<title>Speex FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Speex_FAQ&amp;diff=16584"/>
		<updated>2017-06-08T14:56:05Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* Why is encoding so slow compared to decoding? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== General ==&lt;br /&gt;
&lt;br /&gt;
=== Why do we need [[Speex]]? [[Vorbis]] is open source and patent-free.  ===&lt;br /&gt;
&lt;br /&gt;
[[Vorbis]] is a great project but its goals are not the same as Speex. Vorbis is mostly aimed at compressing music and audio in general, while Speex targets speech only. For that reason, Speex can achieve much better results than Vorbis on speech (typically 2-4 times higher compression at equal quality).&lt;br /&gt;
&lt;br /&gt;
=== Isn&#039;t there an open source implementation of the [https://en.wikipedia.org/wiki/Full_Rate GSM-FR] codec? Why is Speex necessary? ===&lt;br /&gt;
&lt;br /&gt;
First of all, it&#039;s not clear whether [https://en.wikipedia.org/wiki/Full_Rate GSM-FR] is covered by a Philips patent (see http://kbs.cs.tu-berlin.de/~jutta/toast.html). Also, GSM-FR offers mediocre quality at a relatively high bit-rate, while Speex can offer equivalent quality at almost half the bit-rate. Last but not least, Speex offers a wide range of bit-rates and sampling rates, while GSM-FR is limited to 8 kHz speech at 13 kbps.&lt;br /&gt;
&lt;br /&gt;
=== Ogg, Vorbis, Speex, what&#039;s the difference? ===&lt;br /&gt;
&lt;br /&gt;
[[Ogg]] is a &#039;&#039;&#039;container&#039;&#039;&#039; format for holding multimedia data (audio, video, subtitles, etc.).&lt;br /&gt;
&lt;br /&gt;
[[Vorbis]] is an &#039;&#039;&#039;audio codec&#039;&#039;&#039; that uses Ogg to store its bit-streams as files, hence the name &#039;&#039;&#039;Ogg Vorbis&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Speex]] is a &#039;&#039;&#039;speech codec&#039;&#039;&#039;, that also uses the Ogg format to store its bit-streams as files,&lt;br /&gt;
so technically they would be &#039;&#039;&#039;Ogg Speex&#039;&#039;&#039; files. However, most people refer to them just as Speex files.&lt;br /&gt;
&lt;br /&gt;
One difference Speex has with Vorbis, is that Speex is less tied to Ogg.&lt;br /&gt;
Actually, if you want to use Speex for Voice over IP (VoIP), you don&#039;t need to use an Ogg container at all.&lt;br /&gt;
&lt;br /&gt;
=== What&#039;s the extension for Speex files? ===&lt;br /&gt;
&lt;br /&gt;
Speex files tend to have the &#039;&#039;&#039;.spx&#039;&#039;&#039; extension. Note that the Speex tools (speexenc, speexdec) do not rely on the file extension at all, so any extension will work.&lt;br /&gt;
&lt;br /&gt;
=== Can I use Speex for compressing music? ===&lt;br /&gt;
&lt;br /&gt;
You can, but you&#039;ll be better off compressing with Vorbis when it comes to music.&lt;br /&gt;
Just like Vorbis is not really adapted to speech, Speex is really not adapted for music.&lt;br /&gt;
&lt;br /&gt;
=== I converted some MP3s to Speex and the quality is bad. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
This is called &#039;&#039;&#039;[https://en.wikipedia.org/wiki/Transcoding transcoding]&#039;&#039;&#039; (converting from one lossy format to another) and it will always result in much poorer quality than the original MP3.&lt;br /&gt;
&lt;br /&gt;
Avoid transcoding speech, unless you have a &#039;&#039;really&#039;&#039; good reason to do so (e.g. you need a smaller file size).&lt;br /&gt;
You should also avoid &#039;&#039;&#039;tandeming&#039;&#039;&#039; (self-transcoding). I.e. if you decode a Speex file and re-encode it again at the same bit-rate, you &#039;&#039;will&#039;&#039; lose quality.&lt;br /&gt;
&lt;br /&gt;
=== How does Speex compare to other proprietary codecs? ===&lt;br /&gt;
&lt;br /&gt;
It&#039;s hard to give precise figures since no formal listening tests have been performed yet. All I can say is that in terms of quality, Speex competes on the same ground as other proprietary codecs (not necessarily the best, but not the worst either).&lt;br /&gt;
&lt;br /&gt;
Speex also has many features that are not present in most other codecs. These include variable bit-rate (VBR), integration of narrowband and wideband, as well as stereo support. Of course, another area where Speex is really hard to beat is the quality/price ratio. Unlike many very expensive codecs, Speex is free and anyone may distribute or modify it at will.&lt;br /&gt;
&lt;br /&gt;
=== Can Speex pass [https://en.wikipedia.org/wiki/Dual-tone_multi-frequency_signaling DTMF] signals correctly? ===&lt;br /&gt;
&lt;br /&gt;
I guess it all depends on the bit-rate used. Though no formal testing has yet been performed, I&#039;d say it works correctly at 8 kbps and above. Make sure you don&#039;t use the lowest complexity (see SPEEX_SET_COMPLEXITY or --comp option), as it causes significant noise.&lt;br /&gt;
&lt;br /&gt;
=== Can Speex pass [https://en.wikipedia.org/wiki/V.90_(recommendation) V.90]/[https://en.wikipedia.org/wiki/V.92 V.92] modem signals correctly? ===&lt;br /&gt;
&lt;br /&gt;
If it could do that I&#039;d be very rich by now :-) No it cannot, as that would break fundamental laws of information theory.&lt;br /&gt;
&lt;br /&gt;
=== Does Speex have anything to do with the University of Sherbrooke? ===&lt;br /&gt;
&lt;br /&gt;
No.&lt;br /&gt;
&lt;br /&gt;
I wrote Speex while pursuing my Ph.D. at the University of Sherbrooke (2002-2005) in mobile robotics. Although I did my master with the Sherbrooke speech coding group (in speech enhancement, not coding), I was no longer associated with them when developing Speex. Furthermore, Speex does not make use of any code or proprietary technology developed in the Sherbrooke speech coding group. &lt;br /&gt;
&lt;br /&gt;
=== When will the next version of Speex be released? ===&lt;br /&gt;
&lt;br /&gt;
Speex has been superseded by the [[Opus]] codec, so probably no more versions of Speex will be released by Xiph. However, since the code is open-source, you are welcome to make your own additions to Speex as you please.&lt;br /&gt;
&lt;br /&gt;
=== How can I help if I don&#039;t know about speech processing? ===&lt;br /&gt;
&lt;br /&gt;
There&#039;s always &amp;quot;semi-technical&amp;quot; work to do. The documentation can be improved, and so can this FAQ.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
&lt;br /&gt;
=== Under what license is Speex released? ===&lt;br /&gt;
&lt;br /&gt;
As of version 1.0 beta 1, Speex is released under the revised (3-clause) BSD license. This license is one of the most permissive open source licenses.&lt;br /&gt;
&lt;br /&gt;
=== Am I allowed to use Speex in commercial software? ===&lt;br /&gt;
&lt;br /&gt;
Yes. As long as you comply with the license. This basically means you have to keep the copyright notice and you can&#039;t use our name to promote your product without authorization.&lt;br /&gt;
&lt;br /&gt;
=== Do I have to release source code if I use Speex in a proprietary application? ===&lt;br /&gt;
&lt;br /&gt;
No. The BSD license does &#039;&#039;&#039;not&#039;&#039;&#039; require you to release any source code. It is however &#039;&#039;&#039;appreciated&#039;&#039;&#039; (but not required) if you contribute back useful changes you make to Speex. This is generally also in your interest because it means you get maintenance of that code for free (i.e. no need to merge again in newer versions).&lt;br /&gt;
&lt;br /&gt;
== Using libspeex ==&lt;br /&gt;
&lt;br /&gt;
=== Does Speex run on Windows? ===&lt;br /&gt;
&lt;br /&gt;
Compilation on Windows has been supported since version 0.8.0. There are also several front-ends available from the website.&lt;br /&gt;
&lt;br /&gt;
=== Why is encoding so slow compared to decoding? ===&lt;br /&gt;
&lt;br /&gt;
For most kinds of compression, encoding is inherently slower than decoding.&lt;br /&gt;
&lt;br /&gt;
In the case of Speex, encoding consists of finding, for each vector of 5 to 10 samples, the entry that matches the best within a codebook consisting of 16 to 256 entries.&lt;br /&gt;
When decoding, all that needs to be done is look up the right entry in the codebook using the encoded index. Since a lookup is much faster than a search, the decoder works much faster than the encoder.&lt;br /&gt;
&lt;br /&gt;
This behaviour ties in with the assumption that in most use cases, people will be encoding a file once, but then decode it multiple times.&lt;br /&gt;
&lt;br /&gt;
=== Why is Speex so slow on my iPaq (or insert any platform without an FPU)? ===&lt;br /&gt;
&lt;br /&gt;
You probably didn&#039;t build Speex with the fixed-point option (--enable-fixed-point). Even if you did, not all modes have been ported to use fixed-point arithmetic, so the code may be slowed down by a few float operations left (e.g. in the wideband mode).&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m getting unusual background noise (hiss) when using libspeex in my application. How do I fix that? ===&lt;br /&gt;
&lt;br /&gt;
One of the causes could be scaling of the input speech. Speex expects signals to have a +-32767 (signed short) dynamic range. If the dynamic range of your signals is too small (e.g. +-1.0), you will suffer important quantization noise. A good target is to have a dynamic range around +=8000 which is large enough, but small enough to make sure there&#039;s no clipping when converting back to signed short.&lt;br /&gt;
&lt;br /&gt;
=== I get very distorted speech when using libspeex in my application. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
There are many possible causes for that. One of them is errors in the way the bits are manipulated. Another possible cause is the use of the same encoder or decoder state for more than one audio stream (channel), which produces strange effects with the filter memories. If the input speech has an amplitude close to +-32767, it is possible that at decoding, the amplitude be a bit higher than that, causing clipping when saving as 16-bit PCM.&lt;br /&gt;
&lt;br /&gt;
=== Can Speex run on fixed-point processors or DSPs? ===&lt;br /&gt;
&lt;br /&gt;
Yes. You can compile Speex for fixed-point CPUs by passing the --enable-fixed-point option to the configure script or defining FIXED_POINT. &lt;br /&gt;
&lt;br /&gt;
=== What architectures are supported? ===&lt;br /&gt;
&lt;br /&gt;
Speex is designed to run on pretty much any CPU that can do 16x16 multiplications. That includes:&lt;br /&gt;
* x86&lt;br /&gt;
* PowerPC&lt;br /&gt;
* ARM&lt;br /&gt;
* Blackfin&lt;br /&gt;
* TI C5x and C6x&lt;br /&gt;
* dsPIC (unsupported, unofficial port)&lt;br /&gt;
* Cell (in progress)&lt;br /&gt;
&lt;br /&gt;
...and many others&lt;br /&gt;
&lt;br /&gt;
=== Can I use Speex for 22.05 kHz, 44.1 kHz or 48 kHz signals? ===&lt;br /&gt;
&lt;br /&gt;
Yes, but you must resample the signal to a supported sample rate before encoding. Speex is optimised for 8 kHz and 16 kHz and it can (your mileage may vary) encode 32 kHz files as well. Anything else is unsupported and tends to be heavily sub-optimal. You might as well use Vorbis instead. Note that Speex includes a resampler module as of version 1.2beta2. Refer to the section called Resampler in the Speex documentation.&lt;br /&gt;
&lt;br /&gt;
=== Should I use version 1.0.x or 1.2? ===&lt;br /&gt;
While currently 1.2 is marked as beta, the author believes 1.2 is vastly superior and more stable than the 1.0.x series regarding compression and API performance.  As such, it is recommended to use version 1.2, even though it is marked as beta.&lt;br /&gt;
&lt;br /&gt;
== Technical ==&lt;br /&gt;
&lt;br /&gt;
=== CELP, ACELP, what&#039;s the difference? ===&lt;br /&gt;
&lt;br /&gt;
CELP stands for &amp;quot;Code Excited Linear Prediction&amp;quot;, while ACELP stands for &amp;quot;Algebraic Code Excited Linear Prediction&amp;quot;. That means ACELP is a CELP technique that uses an algebraic codebook represented as a sum of unit pulses, thus making the codebook search much more efficient. This technique was invented at the University of Sherbrooke and is now one of the most widely used form of CELP. Unfortunately, since it is patented, it could not be used in Speex.&lt;br /&gt;
&lt;br /&gt;
=== Where can I get information about how Speex works? ===&lt;br /&gt;
&lt;br /&gt;
There is not (yet) a complete description of the algorithm (except for the source code itself). However, several aspects are documented either in the [http://speex.org/docs/ manual] or in the paper [http://people.xiph.org/~jm/papers/aes120_speex_vorbis.pdf Improved Noise Weighting in CELP Coding of Speech &amp;amp;mdash; Applying the Vorbis Psychoacoustic Model To Speex].&lt;br /&gt;
&lt;br /&gt;
[[Category:Speex]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Speex_FAQ&amp;diff=16583</id>
		<title>Speex FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Speex_FAQ&amp;diff=16583"/>
		<updated>2017-06-08T14:34:48Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* Can Speex pass V.9x modem signals correctly? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== General ==&lt;br /&gt;
&lt;br /&gt;
=== Why do we need [[Speex]]? [[Vorbis]] is open source and patent-free.  ===&lt;br /&gt;
&lt;br /&gt;
[[Vorbis]] is a great project but its goals are not the same as Speex. Vorbis is mostly aimed at compressing music and audio in general, while Speex targets speech only. For that reason, Speex can achieve much better results than Vorbis on speech (typically 2-4 times higher compression at equal quality).&lt;br /&gt;
&lt;br /&gt;
=== Isn&#039;t there an open source implementation of the [https://en.wikipedia.org/wiki/Full_Rate GSM-FR] codec? Why is Speex necessary? ===&lt;br /&gt;
&lt;br /&gt;
First of all, it&#039;s not clear whether [https://en.wikipedia.org/wiki/Full_Rate GSM-FR] is covered by a Philips patent (see http://kbs.cs.tu-berlin.de/~jutta/toast.html). Also, GSM-FR offers mediocre quality at a relatively high bit-rate, while Speex can offer equivalent quality at almost half the bit-rate. Last but not least, Speex offers a wide range of bit-rates and sampling rates, while GSM-FR is limited to 8 kHz speech at 13 kbps.&lt;br /&gt;
&lt;br /&gt;
=== Ogg, Vorbis, Speex, what&#039;s the difference? ===&lt;br /&gt;
&lt;br /&gt;
[[Ogg]] is a &#039;&#039;&#039;container&#039;&#039;&#039; format for holding multimedia data (audio, video, subtitles, etc.).&lt;br /&gt;
&lt;br /&gt;
[[Vorbis]] is an &#039;&#039;&#039;audio codec&#039;&#039;&#039; that uses Ogg to store its bit-streams as files, hence the name &#039;&#039;&#039;Ogg Vorbis&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Speex]] is a &#039;&#039;&#039;speech codec&#039;&#039;&#039;, that also uses the Ogg format to store its bit-streams as files,&lt;br /&gt;
so technically they would be &#039;&#039;&#039;Ogg Speex&#039;&#039;&#039; files. However, most people refer to them just as Speex files.&lt;br /&gt;
&lt;br /&gt;
One difference Speex has with Vorbis, is that Speex is less tied to Ogg.&lt;br /&gt;
Actually, if you want to use Speex for Voice over IP (VoIP), you don&#039;t need to use an Ogg container at all.&lt;br /&gt;
&lt;br /&gt;
=== What&#039;s the extension for Speex files? ===&lt;br /&gt;
&lt;br /&gt;
Speex files tend to have the &#039;&#039;&#039;.spx&#039;&#039;&#039; extension. Note that the Speex tools (speexenc, speexdec) do not rely on the file extension at all, so any extension will work.&lt;br /&gt;
&lt;br /&gt;
=== Can I use Speex for compressing music? ===&lt;br /&gt;
&lt;br /&gt;
You can, but you&#039;ll be better off compressing with Vorbis when it comes to music.&lt;br /&gt;
Just like Vorbis is not really adapted to speech, Speex is really not adapted for music.&lt;br /&gt;
&lt;br /&gt;
=== I converted some MP3s to Speex and the quality is bad. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
This is called &#039;&#039;&#039;[https://en.wikipedia.org/wiki/Transcoding transcoding]&#039;&#039;&#039; (converting from one lossy format to another) and it will always result in much poorer quality than the original MP3.&lt;br /&gt;
&lt;br /&gt;
Avoid transcoding speech, unless you have a &#039;&#039;really&#039;&#039; good reason to do so (e.g. you need a smaller file size).&lt;br /&gt;
You should also avoid &#039;&#039;&#039;tandeming&#039;&#039;&#039; (self-transcoding). I.e. if you decode a Speex file and re-encode it again at the same bit-rate, you &#039;&#039;will&#039;&#039; lose quality.&lt;br /&gt;
&lt;br /&gt;
=== How does Speex compare to other proprietary codecs? ===&lt;br /&gt;
&lt;br /&gt;
It&#039;s hard to give precise figures since no formal listening tests have been performed yet. All I can say is that in terms of quality, Speex competes on the same ground as other proprietary codecs (not necessarily the best, but not the worst either).&lt;br /&gt;
&lt;br /&gt;
Speex also has many features that are not present in most other codecs. These include variable bit-rate (VBR), integration of narrowband and wideband, as well as stereo support. Of course, another area where Speex is really hard to beat is the quality/price ratio. Unlike many very expensive codecs, Speex is free and anyone may distribute or modify it at will.&lt;br /&gt;
&lt;br /&gt;
=== Can Speex pass [https://en.wikipedia.org/wiki/Dual-tone_multi-frequency_signaling DTMF] signals correctly? ===&lt;br /&gt;
&lt;br /&gt;
I guess it all depends on the bit-rate used. Though no formal testing has yet been performed, I&#039;d say it works correctly at 8 kbps and above. Make sure you don&#039;t use the lowest complexity (see SPEEX_SET_COMPLEXITY or --comp option), as it causes significant noise.&lt;br /&gt;
&lt;br /&gt;
=== Can Speex pass [https://en.wikipedia.org/wiki/V.90_(recommendation) V.90]/[https://en.wikipedia.org/wiki/V.92 V.92] modem signals correctly? ===&lt;br /&gt;
&lt;br /&gt;
If it could do that I&#039;d be very rich by now :-) No it cannot, as that would break fundamental laws of information theory.&lt;br /&gt;
&lt;br /&gt;
=== Does Speex have anything to do with the University of Sherbrooke? ===&lt;br /&gt;
&lt;br /&gt;
No.&lt;br /&gt;
&lt;br /&gt;
I wrote Speex while pursuing my Ph.D. at the University of Sherbrooke (2002-2005) in mobile robotics. Although I did my master with the Sherbrooke speech coding group (in speech enhancement, not coding), I was no longer associated with them when developing Speex. Furthermore, Speex does not make use of any code or proprietary technology developed in the Sherbrooke speech coding group. &lt;br /&gt;
&lt;br /&gt;
=== When will the next version of Speex be released? ===&lt;br /&gt;
&lt;br /&gt;
Speex has been superseded by the [[Opus]] codec, so probably no more versions of Speex will be released by Xiph. However, since the code is open-source, you are welcome to make your own additions to Speex as you please.&lt;br /&gt;
&lt;br /&gt;
=== How can I help if I don&#039;t know about speech processing? ===&lt;br /&gt;
&lt;br /&gt;
There&#039;s always &amp;quot;semi-technical&amp;quot; work to do. The documentation can be improved, and so can this FAQ.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
&lt;br /&gt;
=== Under what license is Speex released? ===&lt;br /&gt;
&lt;br /&gt;
As of version 1.0 beta 1, Speex is released under the revised (3-clause) BSD license. This license is one of the most permissive open source licenses.&lt;br /&gt;
&lt;br /&gt;
=== Am I allowed to use Speex in commercial software? ===&lt;br /&gt;
&lt;br /&gt;
Yes. As long as you comply with the license. This basically means you have to keep the copyright notice and you can&#039;t use our name to promote your product without authorization.&lt;br /&gt;
&lt;br /&gt;
=== Do I have to release source code if I use Speex in a proprietary application? ===&lt;br /&gt;
&lt;br /&gt;
No. The BSD license does &#039;&#039;&#039;not&#039;&#039;&#039; require you to release any source code. It is however &#039;&#039;&#039;appreciated&#039;&#039;&#039; (but not required) if you contribute back useful changes you make to Speex. This is generally also in your interest because it means you get maintenance of that code for free (i.e. no need to merge again in newer versions).&lt;br /&gt;
&lt;br /&gt;
== Using libspeex ==&lt;br /&gt;
&lt;br /&gt;
=== Does Speex run on Windows? ===&lt;br /&gt;
&lt;br /&gt;
Compilation on Windows has been supported since version 0.8.0. There are also several front-ends available from the website.&lt;br /&gt;
&lt;br /&gt;
=== Why is encoding so slow compared to decoding? ===&lt;br /&gt;
&lt;br /&gt;
For most kinds of compression, encoding is inherently slower than decoding. In the case of Speex, encoding consists of finding, for each vector of 5 to 10 samples, the entry that matches the best within a codebook consisting of 16 to 256 entries. On the other hand, at decoding all that needs to be done is look up the right entry in the codebook using the encoded index. Since a lookup is much faster than a search, the decoder works much faster than the encoder.&lt;br /&gt;
&lt;br /&gt;
=== Why is Speex so slow on my iPaq (or insert any platform without an FPU)? ===&lt;br /&gt;
&lt;br /&gt;
You probably didn&#039;t build Speex with the fixed-point option (--enable-fixed-point). Even if you did, not all modes have been ported to use fixed-point arithmetic, so the code may be slowed down by a few float operations left (e.g. in the wideband mode).&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m getting unusual background noise (hiss) when using libspeex in my application. How do I fix that? ===&lt;br /&gt;
&lt;br /&gt;
One of the causes could be scaling of the input speech. Speex expects signals to have a +-32767 (signed short) dynamic range. If the dynamic range of your signals is too small (e.g. +-1.0), you will suffer important quantization noise. A good target is to have a dynamic range around +=8000 which is large enough, but small enough to make sure there&#039;s no clipping when converting back to signed short.&lt;br /&gt;
&lt;br /&gt;
=== I get very distorted speech when using libspeex in my application. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
There are many possible causes for that. One of them is errors in the way the bits are manipulated. Another possible cause is the use of the same encoder or decoder state for more than one audio stream (channel), which produces strange effects with the filter memories. If the input speech has an amplitude close to +-32767, it is possible that at decoding, the amplitude be a bit higher than that, causing clipping when saving as 16-bit PCM.&lt;br /&gt;
&lt;br /&gt;
=== Can Speex run on fixed-point processors or DSPs? ===&lt;br /&gt;
&lt;br /&gt;
Yes. You can compile Speex for fixed-point CPUs by passing the --enable-fixed-point option to the configure script or defining FIXED_POINT. &lt;br /&gt;
&lt;br /&gt;
=== What architectures are supported? ===&lt;br /&gt;
&lt;br /&gt;
Speex is designed to run on pretty much any CPU that can do 16x16 multiplications. That includes:&lt;br /&gt;
* x86&lt;br /&gt;
* PowerPC&lt;br /&gt;
* ARM&lt;br /&gt;
* Blackfin&lt;br /&gt;
* TI C5x and C6x&lt;br /&gt;
* dsPIC (unsupported, unofficial port)&lt;br /&gt;
* Cell (in progress)&lt;br /&gt;
&lt;br /&gt;
...and many others&lt;br /&gt;
&lt;br /&gt;
=== Can I use Speex for 22.05 kHz, 44.1 kHz or 48 kHz signals? ===&lt;br /&gt;
&lt;br /&gt;
Yes, but you must resample the signal to a supported sample rate before encoding. Speex is optimised for 8 kHz and 16 kHz and it can (your mileage may vary) encode 32 kHz files as well. Anything else is unsupported and tends to be heavily sub-optimal. You might as well use Vorbis instead. Note that Speex includes a resampler module as of version 1.2beta2. Refer to the section called Resampler in the Speex documentation.&lt;br /&gt;
&lt;br /&gt;
=== Should I use version 1.0.x or 1.2? ===&lt;br /&gt;
While currently 1.2 is marked as beta, the author believes 1.2 is vastly superior and more stable than the 1.0.x series regarding compression and API performance.  As such, it is recommended to use version 1.2, even though it is marked as beta.&lt;br /&gt;
&lt;br /&gt;
== Technical ==&lt;br /&gt;
&lt;br /&gt;
=== CELP, ACELP, what&#039;s the difference? ===&lt;br /&gt;
&lt;br /&gt;
CELP stands for &amp;quot;Code Excited Linear Prediction&amp;quot;, while ACELP stands for &amp;quot;Algebraic Code Excited Linear Prediction&amp;quot;. That means ACELP is a CELP technique that uses an algebraic codebook represented as a sum of unit pulses, thus making the codebook search much more efficient. This technique was invented at the University of Sherbrooke and is now one of the most widely used form of CELP. Unfortunately, since it is patented, it could not be used in Speex.&lt;br /&gt;
&lt;br /&gt;
=== Where can I get information about how Speex works? ===&lt;br /&gt;
&lt;br /&gt;
There is not (yet) a complete description of the algorithm (except for the source code itself). However, several aspects are documented either in the [http://speex.org/docs/ manual] or in the paper [http://people.xiph.org/~jm/papers/aes120_speex_vorbis.pdf Improved Noise Weighting in CELP Coding of Speech &amp;amp;mdash; Applying the Vorbis Psychoacoustic Model To Speex].&lt;br /&gt;
&lt;br /&gt;
[[Category:Speex]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Speex_FAQ&amp;diff=16582</id>
		<title>Speex FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Speex_FAQ&amp;diff=16582"/>
		<updated>2017-06-08T14:08:55Z</updated>

		<summary type="html">&lt;p&gt;MrZeus: /* I converted some MP3s to Speex and the quality is bad. What&amp;#039;s wrong? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== General ==&lt;br /&gt;
&lt;br /&gt;
=== Why do we need [[Speex]]? [[Vorbis]] is open source and patent-free.  ===&lt;br /&gt;
&lt;br /&gt;
[[Vorbis]] is a great project but its goals are not the same as Speex. Vorbis is mostly aimed at compressing music and audio in general, while Speex targets speech only. For that reason, Speex can achieve much better results than Vorbis on speech (typically 2-4 times higher compression at equal quality).&lt;br /&gt;
&lt;br /&gt;
=== Isn&#039;t there an open source implementation of the [https://en.wikipedia.org/wiki/Full_Rate GSM-FR] codec? Why is Speex necessary? ===&lt;br /&gt;
&lt;br /&gt;
First of all, it&#039;s not clear whether [https://en.wikipedia.org/wiki/Full_Rate GSM-FR] is covered by a Philips patent (see http://kbs.cs.tu-berlin.de/~jutta/toast.html). Also, GSM-FR offers mediocre quality at a relatively high bit-rate, while Speex can offer equivalent quality at almost half the bit-rate. Last but not least, Speex offers a wide range of bit-rates and sampling rates, while GSM-FR is limited to 8 kHz speech at 13 kbps.&lt;br /&gt;
&lt;br /&gt;
=== Ogg, Vorbis, Speex, what&#039;s the difference? ===&lt;br /&gt;
&lt;br /&gt;
[[Ogg]] is a &#039;&#039;&#039;container&#039;&#039;&#039; format for holding multimedia data (audio, video, subtitles, etc.).&lt;br /&gt;
&lt;br /&gt;
[[Vorbis]] is an &#039;&#039;&#039;audio codec&#039;&#039;&#039; that uses Ogg to store its bit-streams as files, hence the name &#039;&#039;&#039;Ogg Vorbis&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Speex]] is a &#039;&#039;&#039;speech codec&#039;&#039;&#039;, that also uses the Ogg format to store its bit-streams as files,&lt;br /&gt;
so technically they would be &#039;&#039;&#039;Ogg Speex&#039;&#039;&#039; files. However, most people refer to them just as Speex files.&lt;br /&gt;
&lt;br /&gt;
One difference Speex has with Vorbis, is that Speex is less tied to Ogg.&lt;br /&gt;
Actually, if you want to use Speex for Voice over IP (VoIP), you don&#039;t need to use an Ogg container at all.&lt;br /&gt;
&lt;br /&gt;
=== What&#039;s the extension for Speex files? ===&lt;br /&gt;
&lt;br /&gt;
Speex files tend to have the &#039;&#039;&#039;.spx&#039;&#039;&#039; extension. Note that the Speex tools (speexenc, speexdec) do not rely on the file extension at all, so any extension will work.&lt;br /&gt;
&lt;br /&gt;
=== Can I use Speex for compressing music? ===&lt;br /&gt;
&lt;br /&gt;
You can, but you&#039;ll be better off compressing with Vorbis when it comes to music.&lt;br /&gt;
Just like Vorbis is not really adapted to speech, Speex is really not adapted for music.&lt;br /&gt;
&lt;br /&gt;
=== I converted some MP3s to Speex and the quality is bad. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
This is called &#039;&#039;&#039;[https://en.wikipedia.org/wiki/Transcoding transcoding]&#039;&#039;&#039; (converting from one lossy format to another) and it will always result in much poorer quality than the original MP3.&lt;br /&gt;
&lt;br /&gt;
Avoid transcoding speech, unless you have a &#039;&#039;really&#039;&#039; good reason to do so (e.g. you need a smaller file size).&lt;br /&gt;
You should also avoid &#039;&#039;&#039;tandeming&#039;&#039;&#039; (self-transcoding). I.e. if you decode a Speex file and re-encode it again at the same bit-rate, you &#039;&#039;will&#039;&#039; lose quality.&lt;br /&gt;
&lt;br /&gt;
=== How does Speex compare to other proprietary codecs? ===&lt;br /&gt;
&lt;br /&gt;
It&#039;s hard to give precise figures since no formal listening tests have been performed yet. All I can say is that in terms of quality, Speex competes on the same ground as other proprietary codecs (not necessarily the best, but not the worst either).&lt;br /&gt;
&lt;br /&gt;
Speex also has many features that are not present in most other codecs. These include variable bit-rate (VBR), integration of narrowband and wideband, as well as stereo support. Of course, another area where Speex is really hard to beat is the quality/price ratio. Unlike many very expensive codecs, Speex is free and anyone may distribute or modify it at will.&lt;br /&gt;
&lt;br /&gt;
=== Can Speex pass [https://en.wikipedia.org/wiki/Dual-tone_multi-frequency_signaling DTMF] signals correctly? ===&lt;br /&gt;
&lt;br /&gt;
I guess it all depends on the bit-rate used. Though no formal testing has yet been performed, I&#039;d say it works correctly at 8 kbps and above. Make sure you don&#039;t use the lowest complexity (see SPEEX_SET_COMPLEXITY or --comp option), as it causes significant noise.&lt;br /&gt;
&lt;br /&gt;
=== Can Speex pass V.9x modem signals correctly? ===&lt;br /&gt;
&lt;br /&gt;
If I could do that I&#039;d be very rich by now :-) No it cannot, as that would break fundamental laws of information theory.&lt;br /&gt;
&lt;br /&gt;
=== Does Speex have anything to do with the University of Sherbrooke? ===&lt;br /&gt;
&lt;br /&gt;
No.&lt;br /&gt;
&lt;br /&gt;
I wrote Speex while pursuing my Ph.D. at the University of Sherbrooke (2002-2005) in mobile robotics. Although I did my master with the Sherbrooke speech coding group (in speech enhancement, not coding), I was no longer associated with them when developing Speex. Furthermore, Speex does not make use of any code or proprietary technology developed in the Sherbrooke speech coding group. &lt;br /&gt;
&lt;br /&gt;
=== When will the next version of Speex be released? ===&lt;br /&gt;
&lt;br /&gt;
Speex has been superseded by the [[Opus]] codec, so probably no more versions of Speex will be released by Xiph. However, since the code is open-source, you are welcome to make your own additions to Speex as you please.&lt;br /&gt;
&lt;br /&gt;
=== How can I help if I don&#039;t know about speech processing? ===&lt;br /&gt;
&lt;br /&gt;
There&#039;s always &amp;quot;semi-technical&amp;quot; work to do. The documentation can be improved, and so can this FAQ.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
&lt;br /&gt;
=== Under what license is Speex released? ===&lt;br /&gt;
&lt;br /&gt;
As of version 1.0 beta 1, Speex is released under the revised (3-clause) BSD license. This license is one of the most permissive open source licenses.&lt;br /&gt;
&lt;br /&gt;
=== Am I allowed to use Speex in commercial software? ===&lt;br /&gt;
&lt;br /&gt;
Yes. As long as you comply with the license. This basically means you have to keep the copyright notice and you can&#039;t use our name to promote your product without authorization.&lt;br /&gt;
&lt;br /&gt;
=== Do I have to release source code if I use Speex in a proprietary application? ===&lt;br /&gt;
&lt;br /&gt;
No. The BSD license does &#039;&#039;&#039;not&#039;&#039;&#039; require you to release any source code. It is however &#039;&#039;&#039;appreciated&#039;&#039;&#039; (but not required) if you contribute back useful changes you make to Speex. This is generally also in your interest because it means you get maintenance of that code for free (i.e. no need to merge again in newer versions).&lt;br /&gt;
&lt;br /&gt;
== Using libspeex ==&lt;br /&gt;
&lt;br /&gt;
=== Does Speex run on Windows? ===&lt;br /&gt;
&lt;br /&gt;
Compilation on Windows has been supported since version 0.8.0. There are also several front-ends available from the website.&lt;br /&gt;
&lt;br /&gt;
=== Why is encoding so slow compared to decoding? ===&lt;br /&gt;
&lt;br /&gt;
For most kinds of compression, encoding is inherently slower than decoding. In the case of Speex, encoding consists of finding, for each vector of 5 to 10 samples, the entry that matches the best within a codebook consisting of 16 to 256 entries. On the other hand, at decoding all that needs to be done is look up the right entry in the codebook using the encoded index. Since a lookup is much faster than a search, the decoder works much faster than the encoder.&lt;br /&gt;
&lt;br /&gt;
=== Why is Speex so slow on my iPaq (or insert any platform without an FPU)? ===&lt;br /&gt;
&lt;br /&gt;
You probably didn&#039;t build Speex with the fixed-point option (--enable-fixed-point). Even if you did, not all modes have been ported to use fixed-point arithmetic, so the code may be slowed down by a few float operations left (e.g. in the wideband mode).&lt;br /&gt;
&lt;br /&gt;
=== I&#039;m getting unusual background noise (hiss) when using libspeex in my application. How do I fix that? ===&lt;br /&gt;
&lt;br /&gt;
One of the causes could be scaling of the input speech. Speex expects signals to have a +-32767 (signed short) dynamic range. If the dynamic range of your signals is too small (e.g. +-1.0), you will suffer important quantization noise. A good target is to have a dynamic range around +=8000 which is large enough, but small enough to make sure there&#039;s no clipping when converting back to signed short.&lt;br /&gt;
&lt;br /&gt;
=== I get very distorted speech when using libspeex in my application. What&#039;s wrong? ===&lt;br /&gt;
&lt;br /&gt;
There are many possible causes for that. One of them is errors in the way the bits are manipulated. Another possible cause is the use of the same encoder or decoder state for more than one audio stream (channel), which produces strange effects with the filter memories. If the input speech has an amplitude close to +-32767, it is possible that at decoding, the amplitude be a bit higher than that, causing clipping when saving as 16-bit PCM.&lt;br /&gt;
&lt;br /&gt;
=== Can Speex run on fixed-point processors or DSPs? ===&lt;br /&gt;
&lt;br /&gt;
Yes. You can compile Speex for fixed-point CPUs by passing the --enable-fixed-point option to the configure script or defining FIXED_POINT. &lt;br /&gt;
&lt;br /&gt;
=== What architectures are supported? ===&lt;br /&gt;
&lt;br /&gt;
Speex is designed to run on pretty much any CPU that can do 16x16 multiplications. That includes:&lt;br /&gt;
* x86&lt;br /&gt;
* PowerPC&lt;br /&gt;
* ARM&lt;br /&gt;
* Blackfin&lt;br /&gt;
* TI C5x and C6x&lt;br /&gt;
* dsPIC (unsupported, unofficial port)&lt;br /&gt;
* Cell (in progress)&lt;br /&gt;
&lt;br /&gt;
...and many others&lt;br /&gt;
&lt;br /&gt;
=== Can I use Speex for 22.05 kHz, 44.1 kHz or 48 kHz signals? ===&lt;br /&gt;
&lt;br /&gt;
Yes, but you must resample the signal to a supported sample rate before encoding. Speex is optimised for 8 kHz and 16 kHz and it can (your mileage may vary) encode 32 kHz files as well. Anything else is unsupported and tends to be heavily sub-optimal. You might as well use Vorbis instead. Note that Speex includes a resampler module as of version 1.2beta2. Refer to the section called Resampler in the Speex documentation.&lt;br /&gt;
&lt;br /&gt;
=== Should I use version 1.0.x or 1.2? ===&lt;br /&gt;
While currently 1.2 is marked as beta, the author believes 1.2 is vastly superior and more stable than the 1.0.x series regarding compression and API performance.  As such, it is recommended to use version 1.2, even though it is marked as beta.&lt;br /&gt;
&lt;br /&gt;
== Technical ==&lt;br /&gt;
&lt;br /&gt;
=== CELP, ACELP, what&#039;s the difference? ===&lt;br /&gt;
&lt;br /&gt;
CELP stands for &amp;quot;Code Excited Linear Prediction&amp;quot;, while ACELP stands for &amp;quot;Algebraic Code Excited Linear Prediction&amp;quot;. That means ACELP is a CELP technique that uses an algebraic codebook represented as a sum of unit pulses, thus making the codebook search much more efficient. This technique was invented at the University of Sherbrooke and is now one of the most widely used form of CELP. Unfortunately, since it is patented, it could not be used in Speex.&lt;br /&gt;
&lt;br /&gt;
=== Where can I get information about how Speex works? ===&lt;br /&gt;
&lt;br /&gt;
There is not (yet) a complete description of the algorithm (except for the source code itself). However, several aspects are documented either in the [http://speex.org/docs/ manual] or in the paper [http://people.xiph.org/~jm/papers/aes120_speex_vorbis.pdf Improved Noise Weighting in CELP Coding of Speech &amp;amp;mdash; Applying the Vorbis Psychoacoustic Model To Speex].&lt;br /&gt;
&lt;br /&gt;
[[Category:Speex]]&lt;/div&gt;</summary>
		<author><name>MrZeus</name></author>
	</entry>
</feed>