Vorbis conversion plug-in
Overview
The Wwise Vorbis plug-in allows the support for popular perceptually audio coding format of the same name. The encoding of the Vorbis bitstream is operated by the authoring tool. The decoding of Vorbis encoded content is handled at run-time in the Sound Engine.Important note: The Vorbis format supported by Audiokinetic does not follow the standard Ogg/Vorbis file format. Do not expect media players or other standard Ogg/Vorbis tools to be able to read those streams properly.
For more general information about the Vorbis codec please refer to: http://vorbis.com/faq/
For more technical information on Vorbis codec please refer to: http://xiph.org/vorbis/doc/Vorbis_I_spec.html
Quality mode
Vorbis is by design a variable bitrate codec; a user requests a given constant quality and the encoder keeps the encoding quality constant while allowing the bitrate to vary. Note that the 'Quality' mode will always produce the most consistent encoding results as well as the highest quality for the amount of bits used, as it puts minimal encoding constraints. A single quality factor control is used for quality mode. Advanced settings are still available if desired however (although not recommended for most usages).
- Quality: A decimal float value requesting a desired quality. Wwise encoder allows quality requests in the range of -2.0 (lowest quality, smallest files) through +10.0 (highest-quality, largest files). Quality -2 is intended as an ultra-low setting in which low bitrate is much more important than quality consistency. Quality settings 0.0 and above are intended to produce consistent results at all times.
Managed bitrate modes
Although the Vorbis codec is natively variable bitrate codec, it includes infrastructure for 'managing' the bitrate of streams by setting minimum and maximum usage constraints, as well as functionality for nudging a stream toward a desired average value. These features should only be used when there is a requirement to limit bitrate in some way (e.g. to guarantee certain bandwidth limitation for file streaming). Although the difference is usually slight, managed bitrate modes will always produce output inferior to variable bitrate encodings (given equal bitrate usage). Note that setting overly or impossibly tight bitrate management requirements can affect output quality dramatically for the worse.
Bitrate management is implemented using a bit-reservoir algorithm. The encoder has a fixed-size reservoir used as a 'savings account' in encoding. When a frame is smaller than the target rate, the unused bits go into the reservoir so that they may be used by future frames. When a frame is larger than target bitrate, it draws 'banked' bits out of the reservoir. Encoding is managed so that the reservoir never goes negative (when a maximum bitrate is specified) or fills beyond a fixed limit (when a minimum bitrate is specified). An 'average bitrate' request is used as the set-point in a long-range bitrate tracker which adjusts the encoder's aggressiveness up or down depending on whether or not frames are coming in larger or smaller than the requested average point.
The Vorbis codec supports limited ranges of valid bitrate settings depending on the sample rate of the file to encode. If the bitrate specified (average, minimum and maximum) are outside the valid ranges for the file to encode, the values will be clampled to nearest value within the valid range and a warning will be displayed in the conversion dialog specifying the actual bitrate used for encoding. Please refer to the table below to determine valid bitrates for given sample rates.
| Sample frequency (Hz) | Mono Min (kbps) | Mono Max (kbps) | Stereo Min (kbps / channel) | Stereo Max (kbps / channel) |
| 8000 | 8 | 42 | 5 | 32 |
| 10000 | 14 | 50 | 8 | 44 |
| 12000 | 14 | 50 | 8 | 44 |
| 14000 | 14 | 50 | 8 | 44 |
| 16000 | 16 | 100 | 10 | 86 |
| 18000 | 16 | 100 | 10 | 86 |
| 20000 | 22 | 90 | 14 | 86 |
| 22050 | 22 | 90 | 14 | 86 |
| 24000 | 22 | 90 | 14 | 86 |
| 28000 | 24 | 190 | 14 | 190 |
| 32000 | 24 | 190 | 14 | 190 |
| 36000 | 24 | 190 | 14 | 190 |
| 44100 | 26 | 240 | 16 | 250 |
| 48000 | 26 | 240 | 16 | 250 |
Managed bitrates can be controlled using the following parameters. Note that setting the average bitrate equal to minimum and maximum bitrate controls effectively makes a constant bitrate encoding. Again this may severly degrade audio quality but may be required for some applications.
- Maximum bitrate: The maximum allowed bitrate, set in kilo bits per second (kbps) per channel encoded. If the bitrate would otherwise rise such that oversized frames would underflow the bit-reservoir by consuming banked bits, bitrate management will force the encoder to use fewer bits per frame by encoding with a more aggressive psychoacoustic model. This setting is a hard limit; the bitstream will never be allowed, under any circumstances, to increase above the specified bitrate over the average period set by the reservoir; it may momentarily rise over if inspected on a granularity much finer than the average period across the reservoir. Normally, the encoder will conserve bits gracefully by using more aggressive psychoacoustics to shrink a frame when forced to. However, if the encoder runs out of means of gracefully shrinking a frame, it will simply take the smallest frame it can otherwise generate and truncate it to the maximum allowed length. Note that this is not an error and although it will obviously adversely affect audio quality, a Vorbis decoder will be able to decode a truncated frame into audio.
- Average bitrate: The average desired bitrate of a stream, set in kilo bits per second (kbps) per channel. Average bitrate is tracked via a reservoir like minimum and maximum bitrate, however the averaging reservior does not impose a hard limit; it is used to nudge the bitrate toward the desired average by slowly adjusting the psychoacoustic aggressiveness. As such, the reservoir size does not affect the average bitrate behavior. Because this setting alone is not used to impose hard bitrate limits, the bitrate of a stream produced using only the average bitrate constraint will track the average over time but not necessarily adhere strictly to that average for any given period. Should a strict localized average be required, average bitrate should be used along with minimum bitrate and maximum bitrate.
- Minimum bitrate: The minimum allowed bitrate, set in kilo bits per second (kbps) per channel. If the bitrate would otherwise fall such that undersized frames would overflow the bit-reservoir with unused bits, bitrate management will force the encoder to use more bits per frame by encoding with a less aggressive psychoacoustic model. This setting is a hard limit; the bitstream will never be allowed, under any circumstances, to drop below the specified bitrate over the average period set by the reservoir; it may momentarily fall under if inspected on a granularity much finer than the average period across the reservoir. Normally, the encoder will fill out undersided frames with additional useful coding information by increasing the perceived quality of the stream. If the encoder runs out of useful ways to consume more bits, it will pad frames out with zeroes.
Advanced settings
These advanced settings are available using both the managed or quality modes. It is best to leave default values for those (particularly using quality mode) for most but exceptional circumstances. Explicit aknowledge about a signal to encode (for example presence of transients, frequency content, etc.) may guide settings used here.
- Bit reservoir time: The time of the minimum/maximum bitrate tracking reservoir, set in seconds (calculates appropriate size based on nominal bitrate). The reservoir is used as a 'bit bank' to average out localized surges and dips in bitrate while providing predictable, guaranteed buffering behavior for streams to be used in situations with constrained transport bandwidth. The default setting is two seconds of average bitrate. When a single frame is larger than the maximum allowed overall bitrate, the bits are 'borrowed' from the bitrate reservoir; if the reservoir contains insufficient bits to cover the defecit, the encoder must find some way to reduce the frame size. When a frame is under the minimum limit, the surplus bits are placed into the reservoir, banking them for future use. If the reservoir is already full of banked bits, the encoder is forced to find some way to make the frame larger. If the frame size is between the minimum and maximum rates (thus implying the minimum and maximum allowed rates are different), the reservoir gravitates toward a fill point configured by the reservo