Recommended Ogg Vorbis: Difference between revisions
(273 intermediate revisions by 18 users not shown) | |||
Line 1: | Line 1: | ||
[[ | [[Image:fish_logo.png|right|]] | ||
[[ | [[Vorbis]], being a continuously developed standard, improves all the time. Plus, being an open (i.e. patent-free) standard, it has many 'third-parties' that contribute, discuss, and work to improve the project. | ||
Here you can find some guidelines on which utilities to use, and what settings will provide you with the best quality. | Here you can find some guidelines on which utilities to use, and what settings will provide you with the best quality. | ||
= History = | |||
(For a highly detailed description of Vorbis history, check out OggZealot's [http://www.hydrogenaudio.org/forums/index.php?showtopic=15274&view=findpost&p=153268 Ogg Vorbis Historic] where Monty also adds a few more details too). | |||
(Ogg) Vorbis reached version 1.0 in '''July 2002'''. It is the official [http://www.xiph.org/ Xiph.org] encoder ''(the one you get from vorbis.com)''. HA codec developer, Garf, did his own tunings, based on version 1.0 to produce GT3b1 and GT3b2. Both encoders showed improved [[pre echo]] handling for ''q'' values of ''5 to 10''. It was later judged in an internal listening test that GT3b1 was the better of the two. There was a minor bugfix update earlier that year in March, which only appeared in the CVS at Xiph.org. This consisted of very minor bug fixes, which do more to correct odd problems that may occur rather than improving quality, including ''(garbled noise output and gaps in streams)''. This was referred to as Post 1.0 CVS. Quality problems that mainly affected low bitrates were later addressed in a new bugfix ''(1.0.1)'' that was released. | |||
Post 1.0.1 CVS was released late '''December 2003''' by Monty at Xiph, and includes a true [[CBR]] template. In order to simplify the situation where we had two encoders ''(1.0.1 and GT3b1)'', OggDropXPd developer John33 merged the sources to give us GT3b2. Once the 128 kbps multiformat test was completed, Aoyumi's [[aoTuV]] Vorbis tuning was determined to be the best Vorbis encoder. After the success of aoTuV beta 2 encoder, Xiph.Org merged their tunings into the official CVS branch to produce the long-awaited Vorbis 1.1. Aoyumi's later release of '''aoTuV beta 4''' encoder as of '''November 2005''' significantly improves Vorbis' quality while increasing the compression ratio slightly. | |||
Later on, Aoyumi released '''aoTuV beta 4.5''' (later bugfixed with '''aoTuV beta 4.51''') in '''December 2005''', which improves low bit-rate quality even more. After extensive testing by Hydrogenaudio enthusiasts, aoTuV beta 4.51 is re-branded to '''aoTuV Release 1''', and it became the '''''then''''' recommended encoder of Hydrogenaudio. Aoyumi keeps tuning aoTuV. The newest aoTuV encoders are the <span style="color:red;">aoTuV Beta 5</span> releases. <span style="color:blue;">'''Peer-review by Hydrogenaudio enthusiasts finally decided in June 2007 that <span style="color:red;">aoTuV Beta 5</span> are now the recommended Vorbis encoders of Hydrogenaudio.'''</span> | |||
If you are not interested in the latest “bleeding edge” AoTuV improvements, you are welcome to use the latest release from Xiph.org '''Vorbis 1.4.0''' library (as of 2009 and later). | |||
'''Notes:''' | |||
* If you do not want to use the latest AoTuV release you are welcome to wait until the AoTuV changes get merged back into the official Vorbis mainline (This happens for almost every other release of Vorbis). | |||
* Xiph.org does not maintain the binaries, but rather provides newest updates and releases to libao, libogg, libvorbis, etc so that developers can optimize and build their own compiles'' | |||
(adapted from [http://www.hydrogenaudio.org/forums/index.php?showtopic=15049 Recommended Encoder and Settings] post compiled by QuantumKnot) | = Recommended Vorbis Encoders = | ||
''(adapted from [http://www.hydrogenaudio.org/forums/index.php?showtopic=15049 Recommended Encoder and Settings] post compiled by QuantumKnot)'' | |||
==Windows binaries== | == Windows binaries == | ||
John33's oggenc2.8 is a special version of the (Ogg) Vorbis encoder. “Features include compression from lossless files (Monkeys Audio, LPAC, FLAC, OptimFROG, WavPack and Shorten – requires presence of decoders), and the ability to specify 'padding' in the headers for subsequent insertion of Tags” (from Ogg Vorbis page at rarewares). | |||
* '''[http://rarewares.org/ogg-oggenc.php oggenc 2.88 aoTuV Beta 6.03]''' | |||
<br />If you prefer a nice drag-and-drop interface, then you can try John33's OggDropXPd (Windows only). “Features include compression from lossless files ([[Monkey's Audio]], [[LPAC]], [[FLAC]] and [[OptimFROG]]), auto-tagging, renaming of encoded files, setting of advanced encoder parameters, use of VorbisGain tags on decode, Playlist (.m3u) creation, and others” (from Ogg Vorbis page at rarewares). | |||
* '''[http://rarewares.org/ogg-oggdropxpd.php OggDropXPd v1.9.2 aoTuV Beta 6.03]''' | |||
<br />'''Note:''' If the above links do not work, then it is most likely caused by a new version of John33's utilities. In that case, go directly to [http://www.rarewares.org/ogg.php the Ogg Vorbis page at rarewares]. | |||
< | <span style="color:green;">''(OggDropXPd QuickStart guide is [[OggDropXPd|here]])''</span> | ||
== | == Mac OS/X binaries == | ||
* '''[http://www.rarewares.org/ | Users of Mac OS/X can download the following pack of tools: | ||
* '''[http://www.rarewares.org/files/ogg/vorbis-aotuv-b5.5-macosx.tar.gz Vorbis Tools (oggenc, oggdec, etc.) version 1.2.0 using aoTuV 5.5 for Mac OS/X]''' | |||
: These tools were compiled by S_O for Mac OS/X. | |||
== Linux binaries == | |||
===AoTuV builds=== | |||
These builds were compiled with the source code available from aoTuV website mentioned under 3rd party source code. Most of them are static GCC 4 compiles. The the last two versions include <code>libkate</code>, which maybe used for subtitles and some include stdin support with FLAC 1.2.1 if you want to transcode directly from the pipe to Vorbis in Linux. | |||
* '''[http:// | * '''[http://repo.or.cz/w/vorbis-lancer-gcc.git/blob/HEAD:/oggenc oggenc aoTuV beta 5 with libogg 1.1.3, FLAC read support and Lancer Optimizations (SSE) (Static GCC 4 compile)]''' | ||
: This static GCC 4 binary was compiled by The_Sven. | |||
* '''[http://www.rarewares.org/quantumknot/oggenc-aotuv451.gz oggenc aoTuV beta 4.51 and libogg 1.1.3 (Static GCC 4 compile)]''' '''<span style="color:blue;">with impulse_trigger_profile</span>''' | |||
: This static GCC 4 binary was compiled by QuantumKnot. | |||
* '''[http://artfwo.googlepages.com/oggenc-aotuvb5.bz2 oggenc aoTuV beta 5 with libogg 1.1.3 and FLAC read support (Static GCC 4 compile)]''' | |||
: This static GCC 4 binary was compiled by artfwo. | |||
'''aoTuV | * '''[http://artfwo.googlepages.com/oggenc-aotuvb5a.bz2 oggenc 1.2.0 + aoTuV Beta5.5 with libogg 1.1.3 and FLAC 1.2.1 (Static GCC 4 compile)]''' | ||
: This static GCC 4 binary was compiled by artfwo. | |||
* '''[http://artfwo.googlepages.com/oggenc-aotuvb5c.bz2 oggenc 1.3.0 + aoTuV Beta5.61 with libogg 1.1.3, FLAC 1.2.1 and Kate 0.2.8 (Static GCC 4 compile)]''' | |||
: This static GCC 4 binary was compiled by artfwo. | |||
'''aoTuV | * '''[http://artfwo.googlepages.com/oggenc-aotuvb5d.bz2 oggenc 1.3.0 + aoTuV Beta5.7 with libogg 1.1.3, FLAC 1.2.1 and Kate 0.3.0 (Static GCC 4 compile)]''' | ||
: This static GCC 4 binary was compiled by artfwo. | |||
* '''[http://artfwo.googlepages.com/oggenc-aotuvb603.bz2 oggenc 1.4.0 SVN + aoTuV Beta6.03 with libogg 1.2.0, FLAC 1.2.1 and Kate 0.3.8 (Static GCC 4 compile)]''' | |||
: This static GCC 4 binary was compiled by artfwo. | |||
'''Notes:''' | |||
* The SSE optimized compile above requires that you have git installed on your Linux distro. Git is a source code revision system. Git can be installed from the source tarballs or via a package manager i.e Synaptic in Ubuntu for instance. | |||
===Reference builds=== | |||
Compiling the latest reference build for Linux requires all dependencies have been met. These dependences include the newest versions of <code>libao, libogg, libvorbis, and vorbis-tools.</code>, which can all be downloaded from [http://www.xiph.org/ Xiph.org]. Each library should be compiled in the above order in order to satisfy each package to build the latest release of <code>vorbis-tools</code>. <code>libkate</code> is optionally included. | |||
== 3rd party source code == | |||
These are other (Ogg) Vorbis encoders that were tuned by 3rd party developers (outside of Xiph.Org). | |||
'' | * '''[http://www.geocities.jp/aoyoume/aotuv/ aoTuV (Aoyumi's Tuned Vorbis)]''' – contains modified source code written in C and downloads of binaries. | ||
: ''The source-code contains modifications mostly to the psychoacoustics model and bitrate allocation, i.e [http://trac.xiph.org/browser/trunk/vorbis/lib/psy.c#L287 psy.c] (aotuv_hf_ weighting, Line 287)'' | |||
How do I know which encoder was used to make this particular Ogg Vorbis file? | : '''aoTuV Release 1 series releases <span style="color:blue;">– The previous recommended encoders</span>''' | ||
:: These versions (re-branded from beta 4.51) are an improvement over aoTuV beta 4, which although based on libvorbis 1.1.1, give better quality at low to medium bitrates. Since beta 4, aoTuV includes a -q -2 option for the lowest bitrate. According to forum member guruboolez' latest listening test on classical music, aoTuV beta 4 performed magnificently well at -q 6!! ''(see Aoyumi's website above for more information)'' | |||
:: Many Hydrogenaudio enthusiasts report that Release 1 gives even better quality for low bit-rates. -q 1.5 works for streaming, even good enough. | |||
: '''aoTuV Beta 5 series releases <span style="color:blue;">– The recommended encoders</span>''' | |||
:: These versions are the latest tuned versions. They further improve low-bitrate encoding, without sacrificing compression. '''They are now the recommended Vorbis encoders at Hydrogenaudio.''' | |||
: See [[Compiling aoTuV]] for information on how to compile it for Linux. | |||
== Optimized binaries == | |||
These are highly optimized encoders developed by the '''[http://homepage3.nifty.com/blacksword/index_e.htm Ogg Vorbis Acceleration Project]''' codenamed [[Lancer]]. They are much faster than the standard binary builds having negligible to nearly no effects on audio quality. These include sped-up routines, i.e ''mdct.c'' | |||
'''These optimized encoders where are one point rapidly changing, as BlackSword found new ways to accelerate, and in the process uncovers new bugs. Please check the “Lancer homepage” link below for the last suite release. They have not been updated since 2006. Developers are better off building their own compiles by downloading the source code from the website above and optmizing them for different architectures. The builds on the website above use old AoTuV builds proceed with caution if you decide to use these. ''' | |||
On '''[http://homepage3.nifty.com/blacksword/index.htm Lancer homepage]''' you can find older versions of Oggenc, [[OggDropXPd]], and Dynamic Link Libraries, with optimizations for SSE, SSE2, SSE3 and multi-threading instruction sets. | |||
''Note: Output of Lancer may be slightly different from output of 'standard' aoTuV. This is due to the difference of floating-point rounding: Lancer uses 64-bit SSE instructions, in contrast to the standard aoTuV use of 80-bit FP instructions. The output difference between both binaries should not be audible at all. In fact, tests have proven that playback of Lancer's output is indistinguishable from playback of standard aoTuV output.'' | |||
Forum member The_Sven has produced an aoTuV Beta 5 binary build of Lancer (as of 2009) with optimized SSE instruction sets that has been compiled for Linux. It runs about 3x faster compared to the standard AoTuv Beta 5 build and is a 32-bit x86 binary. | |||
* '''[http://repo.or.cz/w/vorbis-lancer-gcc.git/blob/HEAD:/oggenc oggenc 1.3.0 + aoTuV Beta 5 with libogg 1.1.3, FLAC 1.2.1 (SSE optimized Linux) (Static GCC 4 compile)]''' | |||
: This static GCC 4 binary was compiled by The_Sven. | |||
= Released Binaries = | |||
How do I know which encoder was used to make this particular (Ogg) Vorbis file? | |||
Using either the ''ogginfo'' program or file info in your player, you can tell from the vendor tag: | Using either the ''ogginfo'' program or file info in your player, you can tell from the vendor tag: | ||
If you aren't interested in the latest compiles feel free to use Vorbis 1.x.x libraries. | |||
= | {| border="0" style="margin-left:2px; border:1px dotted;" cellpadding="4" cellspacing="0" | ||
|- style="background-color: #eeeeee;" | |||
! Vendor Tag !! Encoder !! Note | |||
|- | |||
| Xiphophorus libVorbis I 20000508 | |||
| '''<span style="color:blue;">1.0 Beta 1 or Beta 2 </span>''' | |||
| | |||
|- style="background-color: #eeeeee;" | |||
| Xiphophorus libVorbis I 20001031 | |||
| '''<span style="color:blue;">1.0 Beta 3 </span> | |||
| | |||
|- | |||
| Xiphophorus libVorbis I 20010225 | |||
| '''<span style="color:blue;">1.0 Beta 4 </span> | |||
| | |||
|- style="background-color: #eeeeee;" | |||
| Xiphophorus libVorbis I 20010615 | |||
| '''<span style="color:blue;">1.0 RC1 </span> | |||
| | |||
|- | |||
| Xiphophorus libVorbis I 20010813 | |||
| '''<span style="color:blue;">1.0 RC2 </span> | |||
| | |||
|- style="background-color: #eeeeee;" | |||
| Xiphophorus libVorbis I 20010816 (gtune 1) | |||
| '''<span style="color:blue;">1.0 RC2 GT1 </span> | |||
| | |||
|- | |||
| Xiphophorus libVorbis I 20011014 (GTune 2) | |||
| '''<span style="color:blue;">1.0 RC2 GT2 </span> | |||
| | |||
|- style="background-color: #eeeeee;" | |||
| Xiphophorus libVorbis I 20011217 | |||
| '''<span style="color:blue;">1.0 RC3 </span> | |||
| | |||
|- | |||
| Xiphophorus libVorbis I 20011231 | |||
| '''<span style="color:blue;">1.0 RC3 </span> | |||
| | |||
|- style="background-color: #eeeeee;" | |||
| Xiph.Org libVorbis I 20020717 | |||
| '''<span style="color:blue;">1.0 </span> | |||
| | |||
|- | |||
| Xiph.Org/Sjeng.Org libVorbis I 20020717 (GTune 3, beta 1) | |||
| '''<span style="color:blue;">GT3b1 </span> | |||
| | |||
|- style="background-color: #eeeeee;" | |||
| Xiph.Org libVorbis I 20030308 | |||
| '''<span style="color:blue;">Post 1.0 CVS </span> | |||
| | |||
|- | |||
| Xiph.Org libVorbis I 20030909 | |||
| '''<span style="color:blue;">1.0.1 </span> | |||
| | |||
|- style="background-color: #eeeeee;" | |||
| Xiph.Org/Sjeng.Org libVorbis I 20030909 (GTune 3, beta 2) EXPERIMENTAL | |||
| '''<span style="color:blue;">Experimental GT3b2 </span> | |||
| | |||
|- | |||
| Xiph.Org libVorbis I 20031230 (1.0.1) | |||
| '''<span style="color:blue;">Post 1.0.1 CVS </span> | |||
| | |||
|- style="background-color: #eeeeee;" | |||
| Xiph.Org/Sjeng.Org libVorbis I 20031230 (GTune 3, beta 2) | |||
| '''<span style="color:blue;">GT3b2 </span> | |||
| | |||
|- | |||
| AO; aoTuV b2 [20040420] (based on Xiph.Org's 1.0.1) | |||
| '''<span style="color:blue;">aoTuV Beta 2 </span> | |||
| | |||
|- style="background-color: #eeeeee;" | |||
| Xiph.Org libVorbis I 20040629 | |||
| '''<span style="color:blue;">Xiph.Org Vorbis 1.1 or Xiph.Org Vorbis 1.1 RC1 </span> | |||
| | |||
|- | |||
| Xiph.Org libVorbis I 20040920 | |||
| '''<span style="color:blue;">Xiph.Org Vorbis 1.1 with impulse_trigger_profile </span> | |||
| | |||
|- style="background-color: #eeeeee;" | |||
| AO; aoTuV b3 [20041120] (based on Xiph.Org's libVorbis) | |||
| '''<span style="color:blue;"> aoTuV Beta 3 </span> | |||
| | |||
|- | |||
| Xiph.Org libVorbis I 20050304 | |||
| '''<span style="color:blue;"> Xiph.Org Vorbis 1.1.1 or Xiph.Org Vorbis 1.1.2 </span> | |||
| | |||
|- style="background-color: #eeeeee;" | |||
| AO; aoTuV b4 [20050617] (based on Xiph.Org's libVorbis) | |||
| '''<span style="color:blue;">aoTuV Beta 4 </span> | |||
| | |||
|- | |||
| BS; Lancer [20050709] (based on aoTuV b4 [20050617]) | |||
| '''<span style="color:blue;">Lancer based on aoTuV Beta 4</span> | |||
| | |||
|- style="background-color: #eeeeee;" | |||
| AO; aoTuV b4a [20051105] (based on Xiph.Org's libVorbis) | |||
| '''<span style="color:blue;">aoTuV Beta 4.5 </span> | |||
| | |||
|- | |||
| AO; aoTuV b4b [20051117] (based on Xiph.Org's libVorbis) | |||
| '''<span style="color:blue;">aoTuV Beta 4.51 </span> | |||
| | |||
|- style="background-color: #eeeeee;" | |||
| BS; Lancer [20051121] (based on aoTuV b4b [20051117]) | |||
| '''<span style="color:blue;">Lancer based on aoTuV Beta 4.51</span> | |||
| | |||
|- | |||
| AO; aoTuV pre-beta5 [20060321] (based on Xiph.Org's libVorbis) | |||
| '''<span style="color:blue;">aoTuV Beta 5</span> | |||
| | |||
|- style="background-color: #eeeeee;" | |||
| BS; Lancer(''xxx'') [''yyyymmdd''] (based on aoTuV b4b [20051117]) | |||
| '''<span style="color:blue;">Processor-specific Lancer based on aoTuV Beta 4.51</span> | |||
| (1) | |||
|- | |||
| BS; Lancer(''xxx'') [''yyyymmdd''] (based on aoTuV Release 1 [20051117]) | |||
| '''<span style="color:blue;">Processor-specific Lancer based on aoTuV Release 1</span> | |||
| (1) | |||
|} | |||
<div style="margin-left:10px;"> | |||
(1)'' Starting 2006-05-06, BlackSword provides accelerated versions for different processors. See the [[Lancer]] page for more information. '' | |||
</div> | |||
= Recommended Encoder Settings = | |||
''Ultimately, the best -q setting will depend on your specific needs. Feel free to experiment.'' | '''This is applicable to files encoded in stereo only NOT 5.1/7.1. Refer to the table below. For best results, start at -q 2 and''' [[ABX]] '''your way up.'''<br /> | ||
''Ultimately, the best -q setting will depend on your specific needs. Feel free to experiment.'' | |||
<u>'''General Command Line Usage:'''</u> | <u>'''General Command Line Usage:'''</u> | ||
< | <span style="color:green;">'''oggenc -q <span style="color:red;">n</span> inputfile.wav '''</span> | ||
:''' | :''where'' '''<span style="color:red;">n</span>''' ''is a number from -1 to 10, fractions accepted (using comma or period, depending on where the tool is compiled)''<br />e.g. <span style="color:green;">'''oggenc -q <span style="color:red;">5</span> inputfile.wav </span>''' | ||
'' | '''Notes:''' | ||
* Most standard oggenc binaries can input lossless FLAC, WavPack, etc files as well (depending upon oggenc version) | |||
* The current oggenc and libvorbis API do not support the capabilities of "bitrate peeling". Peeling was a "proof-of-concept" idea that would reorder VQ residues by importance allowing the encoder to trim them off thus reducing the bitrate without any loss of quality. Due to the way the codebooks are structured in Vorbis I codec this is not possible and will produce suboptimal files. It will be reconsidered in theoretical working model of Vorbis II called "Ghost" someday. | |||
{| border="0" style="margin-left:50px | {| border="0" style="margin-left:50px; border:1px dotted; text-align:center;" cellpadding="5" cellspacing="0" | ||
|- style="background-color: # | |- style="background-color: #eeeeee;" | ||
! Switch !! VBR target<br>(kbit/s) !! VBR range<br>(kbit/s) !! [[Channel coupling|Channel<br>Coupling]] !! [[Noise normalization|Noise<br>Normalization]] !! Note | ! Switch !! VBR target<br />(kbit/s) !! VBR range<br />(kbit/s) !! [[Channel coupling|Channel<br />Coupling]] !! [[Noise normalization|Noise<br />Normalization]] !! Note | ||
|- | |||
| -q -2 || ~32 || ~32 – ~64 || point/lossless || yes || (1) | |||
|- style="background-color: #eeeeee;" | |||
| -q -1 || ~48 || ~48 – ~64 || point/lossless || yes || (2) | |||
|- | |||
| -q 0 || ~64 || ~64 – ~80 || point/lossless || yes || | |||
|- style="background-color: #eeeeee;" | |||
| -q 1 || ~80 || ~80 – ~96 || point/lossless || yes || (3) | |||
|- | |- | ||
| -q | | -q 2 || ~96 || ~96 – ~112 || point/lossless || yes || | ||
|- style="background-color: # | |- style="background-color: #eeeeee;" | ||
| -q | | -q 3 || ~112 || ~112 – ~128 || point/lossless || yes || | ||
|- | |- | ||
| -q | | -q 4 || ~128 || ~128 – ~160 || point/lossless || no || | ||
|- style="background-color: # | |- style="background-color: #eeeeee;" | ||
| -q | | -q 5 || ~160 || ~160 – ~192 || point/lossless || no || (4) | ||
|- | |- | ||
| -q | | -q 6 || ~192 || ~192 – ~224 || lossless || no || | ||
|- style="background-color: #eeeeee;" | |||
| -q 7 || ~224 || ~224 – ~256 || lossless || no || | |||
|- | |||
| -q 8 || ~256 || ~256 – ~320 || lossless || no || | |||
|- style="background-color: # | |- style="background-color: #eeeeee;" | ||
| -q | | -q 9 || ~320 || ~320 – ~500 || lossless || no || | ||
|- | |||
| -q | |||
|- style="background-color: # | |||
| -q | |||
|- | |- | ||
| -q 10 || ~500 || ~500 – ~1000 || lossless || no || | |||
| -q 10 || ~500 || ~500 | |||
|} | |} | ||
<div style="margin-left:30px;"> | |||
(1)'' Only supported on aoTuVb3 and newer ''<br /> | |||
(2)'' Bitrate of 48 kbit/s is only for aoTuVb3 and newer. Earlier versions and Xiph.org versions use a bitrate of 45 kbit/s ''<br /> | |||
(3)'' Reports seem to indicate that aoTuV Release 1 <span style="color:red;">-q 1</span> provides good quality for streaming ''<br /> | |||
(4)'' Most users agree <span style="color:red;">-q 5</span> achieves transparency, if the source is the original or [[lossless]]. It is not transparent in the case of [[transcoding]] from lossy source '''(strongly frowned upon)''''' | |||
= | If you need to know what '''lowpass settings''' are used for each quality level, see [http://www.hydrogenaudio.org/forums/index.php?showtopic=15049&st=160&p=357461&#entry357461 this HA thread]. ''(It is not recommended that you adjust these)'' | ||
</div> | |||
===Reducing | = Advanced Encoder Settings = | ||
=== Reducing pre-echo === | |||
'''This is applicable to all all binaries including the official mainline reference encoder and the AoTuV forks''' | |||
Generally, using the recommended settings above will give the best quality. There may be cases where Vorbis 1.x.x will fail to reproduce sharp attacks or transients in your music, causing [[pre echo]]. In which case, you can use the <span style="color:blue;">'''impulse_noisetune'''</span> advanced encode switch: | |||
: | |||
<u>'''General Command Line Usage:'''</u> | |||
<span style="color: green;">'''oggenc -q '''<span style="color:red;">n</span>''' --advanced-encode-option impulse_noisetune=<span style="color:red;">p</span> inputfile.wav'''</span> | |||
:'''where <span style="color:red;">''p''</span> is a number from 0 to -15''' | |||
:e.g. <span style="color: green;">'''oggenc -q '''<span style="color:red;">5</span>''' --advanced-encode-option impulse_noisetune=<span style="color:red;">-5</span> inputfile.wav'''</span> | |||
Note that the lower the number (toward -15) for impulse_noisetune, the higher the bitrate will fluctuate in passages of music filled with transient attacks (and the final average bitrate may be much higher than the nominal). Therefore, you should try a small value to start off (say < | Note that the lower the number (toward -15) for impulse_noisetune, the higher the bitrate will fluctuate in passages of music filled with transient attacks (and the final average bitrate may be much higher than the nominal). Therefore, you should try a small value to start off (say <span style="color:red;">'''-5'''</span>) and see if you get acceptable quality. If not, tweak it lower. | ||
===Reducing noise due to microattacks=== | === Reducing noise due to microattacks === | ||
'''This is only valid for some older Vorbis encoders that are marked as having '''<span style="color:blue;">'''impulse_trigger_profile'''</span>. | |||
''' It was considered "experimental" when it was implemented by forum member QuantumKnot in AoTuV Beta 4.51 and can still be used for experimentation purposes.''' | |||
There are certain parts of some types of music, called | There are certain parts of some types of music, called “microattacks”, where Vorbis will produce a noise (sort of like a puff of steam), which is due to inaccuracies in the block-switching algorithm ''(which can't be corrected)''. Due to the fact the attacks are so fine and close together, Vorbis doesn't switch to impulse short blocks enough, thus “smearing” the reproduction. | ||
By default (with no additional switches), Vorbis selects a different profile for block switching (lower means less switching, higher means | By default (with no additional switches), Vorbis selects a different profile for block switching (lower means less switching, higher means more switching) and the default values are shown in the table below: | ||
{| border="0" style="margin-left: 150px; color:black; border:1px dotted green; text-align:center;" cellpadding="5" cellspacing="0" | |||
{| border="0" style="margin-left: 150px; color: | |- style="background-color: #eeeeee;" | ||
|- style="background-color: # | |||
! Quality !! Profile !! !! Quality !! Profile | ! Quality !! Profile !! !! Quality !! Profile | ||
|- | |- | ||
| -1 || 0 || || 5 || 2.5 | | -1 || 0 || || 5 || 2.5 | ||
|- style="background-color: # | |- style="background-color: #eeeeee;" | ||
| 0 || 1 || || 6 || 2.7 | | 0 || 1 || || 6 || 2.7 | ||
|- | |- | ||
| 1 || 1 || || 7 || 3 | | 1 || 1 || || 7 || 3 | ||
|- style="background-color: # | |- style="background-color: #eeeeee;" | ||
| 2 || 1.5 || || 8 || 3.7 | | 2 || 1.5 || || 8 || 3.7 | ||
|- | |- | ||
| 3 || 2 || || 9 || 4 | | 3 || 2 || || 9 || 4 | ||
|- style="background-color: # | |- style="background-color: #eeeeee;" | ||
| 4 || 2 || || 10 || 4 | | 4 || 2 || || 10 || 4 | ||
|} | |} | ||
If you encounter this problem on microattacks, you may try the impulse_trigger_profile advanced encode switch, which will change (increase) the profile to your desired value. | If you encounter this problem on microattacks, you may try the impulse_trigger_profile advanced encode switch, which will change (increase) the profile to your desired value. | ||
< | <span style="color:green;">'''oggenc -q n --advanced-encode-option impulse_trigger_profile=<span style="color: red;">'''r'''</span> inputfile.wav'''</span> | ||
:''where '''< | :''where'' '''<span style="color:red;">r</span>''' ''is a number from 0 to 4, fractions accepted.'' | ||
'''Notes:''' | '''Notes:''' | ||
* There is the possibility that relaxed block switching (higher profiles) may cause other quality problems and create suboptimal Vorbis files. Please use it sparingly and with caution. If in doubt, leave impulse_trigger_profile on default ''(that is, don't use it at all)'' | * There is the possibility that relaxed block switching (higher profiles) may cause other quality problems and create suboptimal Vorbis files. Please use it sparingly and with caution. If in doubt, leave impulse_trigger_profile on default ''(that is, don't use it at all)'' | ||
* Setting the profile too high will make Vorbis switch to impulse short blocks more often, which will lead to higher bitrate fluctuations. | * Setting the profile too high will make Vorbis switch to impulse short blocks more often, which will lead to higher bitrate fluctuations. Please be conservative about how you intend to use it. | ||
* This | * This setting has no effect on reducing the level of pre-echo. It can be said to only reduce the ''likelihood'' of [[Pre echo|pre echo]], but the amount of pre-echo is tuned using the <span style="color:blue;">'''impulse_noisetune'''</span> switch instead. | ||
* You may try profiles 5 and 6 as substitutes for 3 and 4. | * You may try profiles 5 and 6 as substitutes for 3 and 4. Both Profiles 5 and 6, came from 3 and 4 in GT3b2. | ||
You can use both impulse_noisetune and impulse_trigger_profile at the same time, but you will need separate switches, e.g. | |||
<span style="color: green;">oggenc -q <b><span style="color:red;">n</span></b> --advanced-encode-option impulse_noisetune=<b><span style="color:red;">p</span></b> | |||
--advanced-encode-option impulse_trigger_profile=<b><span style="color:red;">r</span></b> inputfile.wav</span> | |||
=== Enabling and disabling Vorbis 5.1/7.1 Channel Coupling for Use in Mainline === | |||
'''This applicable to the latest reference encoder Vorbis 1.4.0 (as of March 2010 and later).''' | |||
Vorbis generally uses a mixture of very complex [[channel coupling]] modes known as "Elliptical" (Point Coupling) and "Dipole" (Phase Coupling). These models are used to reduce the bitrate while taking into account the phase angle and magnitude of waveform respectively. The Point Coupling method is used more frequently to reduce the angle at frequencies where the ear is insensitive to phase. The audio characteristics sound as though the audio image has been shifted to the center and a small amount of quantization noise has been added in akin to "white noise". | |||
There maybe times where you want to disable channel coupling so that it just uses a "lossless coupling" model with sacrificing any loss of the surround image. You can optional do this in 5.1 Vorbis in the reference encoder by typing in | |||
<span style="color: green;">'''oggenc -q <b><span style="color:red;">n</span></b> --advanced-encode-option <b><span style="color:red;">disable_coupling</span></b> inputfile.wav'''</span> | |||
'''Notes:''' | |||
* It is generally better to let the encoder use coupling whenever possible. It is NOT recommended you disable it, but if necessary it is possible to do so. | |||
=== Encoding Vorbis audio with libvorbis via FFMPEG 0.6 or above & Google's WebM Encoder === | |||
This is a "temporary hack" courtesy of the FFMPEG documentation and some command-line tweaking. The WebM encoder still poorly documents how to use libvorbis within mainline VP8 encoder. There are no presently no "known" switches at the time of this writing as to how to adjust the vorbis audio parameters within vpxenc without having to use the factory defaults that comes with the presets. If you decide to use these they cannot be adjusted. There does exist a "hack" that allows you to adjust the parameters if you are encoding with FFMPEG 0.6 or greater. This example assumes you have compiled FFMPEG 0.6 or greater from the source in Linux or Windows and have both <code>libvorbis</code> and <code>libvpx</code> enabled within ffmpeg 0.6 or better in Linux or Windows (ffmpeg will tell you so when you run the program in a terminal). | |||
'''Example: Transcoding H.264 files in standard definition or high defintion to WebM with best quality one-pass VP8 encoding and a stereo or 5.1 input surround track with Vorbis audio with -q 2 encoding in Linux''' | |||
<span style="color: green;">'''$ffmpeg -y -i /home/USER/Videos/*.mp4 -threads 0 -f webm -aspect 16:9 -vcodec libvpx -deinterlace -g 120 -level 100 -profile 0 -sameq -vb 20M <b><span style="color:red;">-acodec libvorbis -aq 2</span> /home/USER/Videos/*.webm'''</b> | |||
'''Example: Transcoding H.264 files in standard or high definition to WebM with best quality one-pass VP8 encoding and a stereo or 5.1 input surround track with Vorbis audio with -q 2 encoding in Windows''' | |||
<span style="color: green;">'''ffmpeg.exe -y -i C:\Windows\Program Files\Videos\*.mp4 -threads 0 -f webm -aspect 16:9 -vcodec libvpx -deinterlace -g 120 -level 100 -profile 0 -sameq -vb 20M <b><span style="color:red;">-acodec libvorbis -aq 2</span> C:\Windows\Program Files\Videos\*.webm '''</b> | |||
'''Notes:''' | |||
* The following snipets above are "experimental" use them with a grain of salt. In order to get best results please consult both the FFMPEG and WebM documentation to adjust and tweak the video parameters to your liking for encoding to different formats i.e an HD camera or a webcam. | |||
* The audio quality is an integer between 0 and 9, which maps from -q 0 in Vorbis corresponding to 0 in FFMPEG to a -q 10 in Vorbis corresponding to a 10 in FFMPEG. | |||
[[Category:Guides]] | |||
Latest revision as of 08:17, 14 October 2018
Vorbis, being a continuously developed standard, improves all the time. Plus, being an open (i.e. patent-free) standard, it has many 'third-parties' that contribute, discuss, and work to improve the project.
Here you can find some guidelines on which utilities to use, and what settings will provide you with the best quality.
History
(For a highly detailed description of Vorbis history, check out OggZealot's Ogg Vorbis Historic where Monty also adds a few more details too).
(Ogg) Vorbis reached version 1.0 in July 2002. It is the official Xiph.org encoder (the one you get from vorbis.com). HA codec developer, Garf, did his own tunings, based on version 1.0 to produce GT3b1 and GT3b2. Both encoders showed improved pre echo handling for q values of 5 to 10. It was later judged in an internal listening test that GT3b1 was the better of the two. There was a minor bugfix update earlier that year in March, which only appeared in the CVS at Xiph.org. This consisted of very minor bug fixes, which do more to correct odd problems that may occur rather than improving quality, including (garbled noise output and gaps in streams). This was referred to as Post 1.0 CVS. Quality problems that mainly affected low bitrates were later addressed in a new bugfix (1.0.1) that was released.
Post 1.0.1 CVS was released late December 2003 by Monty at Xiph, and includes a true CBR template. In order to simplify the situation where we had two encoders (1.0.1 and GT3b1), OggDropXPd developer John33 merged the sources to give us GT3b2. Once the 128 kbps multiformat test was completed, Aoyumi's aoTuV Vorbis tuning was determined to be the best Vorbis encoder. After the success of aoTuV beta 2 encoder, Xiph.Org merged their tunings into the official CVS branch to produce the long-awaited Vorbis 1.1. Aoyumi's later release of aoTuV beta 4 encoder as of November 2005 significantly improves Vorbis' quality while increasing the compression ratio slightly.
Later on, Aoyumi released aoTuV beta 4.5 (later bugfixed with aoTuV beta 4.51) in December 2005, which improves low bit-rate quality even more. After extensive testing by Hydrogenaudio enthusiasts, aoTuV beta 4.51 is re-branded to aoTuV Release 1, and it became the then recommended encoder of Hydrogenaudio. Aoyumi keeps tuning aoTuV. The newest aoTuV encoders are the aoTuV Beta 5 releases. Peer-review by Hydrogenaudio enthusiasts finally decided in June 2007 that aoTuV Beta 5 are now the recommended Vorbis encoders of Hydrogenaudio.
If you are not interested in the latest “bleeding edge” AoTuV improvements, you are welcome to use the latest release from Xiph.org Vorbis 1.4.0 library (as of 2009 and later).
Notes:
- If you do not want to use the latest AoTuV release you are welcome to wait until the AoTuV changes get merged back into the official Vorbis mainline (This happens for almost every other release of Vorbis).
- Xiph.org does not maintain the binaries, but rather provides newest updates and releases to libao, libogg, libvorbis, etc so that developers can optimize and build their own compiles
Recommended Vorbis Encoders
(adapted from Recommended Encoder and Settings post compiled by QuantumKnot)
Windows binaries
John33's oggenc2.8 is a special version of the (Ogg) Vorbis encoder. “Features include compression from lossless files (Monkeys Audio, LPAC, FLAC, OptimFROG, WavPack and Shorten – requires presence of decoders), and the ability to specify 'padding' in the headers for subsequent insertion of Tags” (from Ogg Vorbis page at rarewares).
If you prefer a nice drag-and-drop interface, then you can try John33's OggDropXPd (Windows only). “Features include compression from lossless files (Monkey's Audio, LPAC, FLAC and OptimFROG), auto-tagging, renaming of encoded files, setting of advanced encoder parameters, use of VorbisGain tags on decode, Playlist (.m3u) creation, and others” (from Ogg Vorbis page at rarewares).
Note: If the above links do not work, then it is most likely caused by a new version of John33's utilities. In that case, go directly to the Ogg Vorbis page at rarewares.
(OggDropXPd QuickStart guide is here)
Mac OS/X binaries
Users of Mac OS/X can download the following pack of tools:
- These tools were compiled by S_O for Mac OS/X.
Linux binaries
AoTuV builds
These builds were compiled with the source code available from aoTuV website mentioned under 3rd party source code. Most of them are static GCC 4 compiles. The the last two versions include libkate
, which maybe used for subtitles and some include stdin support with FLAC 1.2.1 if you want to transcode directly from the pipe to Vorbis in Linux.
- This static GCC 4 binary was compiled by The_Sven.
- oggenc aoTuV beta 4.51 and libogg 1.1.3 (Static GCC 4 compile) with impulse_trigger_profile
- This static GCC 4 binary was compiled by QuantumKnot.
- This static GCC 4 binary was compiled by artfwo.
- This static GCC 4 binary was compiled by artfwo.
- This static GCC 4 binary was compiled by artfwo.
- This static GCC 4 binary was compiled by artfwo.
- This static GCC 4 binary was compiled by artfwo.
Notes:
- The SSE optimized compile above requires that you have git installed on your Linux distro. Git is a source code revision system. Git can be installed from the source tarballs or via a package manager i.e Synaptic in Ubuntu for instance.
Reference builds
Compiling the latest reference build for Linux requires all dependencies have been met. These dependences include the newest versions of libao, libogg, libvorbis, and vorbis-tools.
, which can all be downloaded from Xiph.org. Each library should be compiled in the above order in order to satisfy each package to build the latest release of vorbis-tools
. libkate
is optionally included.
3rd party source code
These are other (Ogg) Vorbis encoders that were tuned by 3rd party developers (outside of Xiph.Org).
- aoTuV (Aoyumi's Tuned Vorbis) – contains modified source code written in C and downloads of binaries.
- The source-code contains modifications mostly to the psychoacoustics model and bitrate allocation, i.e psy.c (aotuv_hf_ weighting, Line 287)
- aoTuV Release 1 series releases – The previous recommended encoders
- These versions (re-branded from beta 4.51) are an improvement over aoTuV beta 4, which although based on libvorbis 1.1.1, give better quality at low to medium bitrates. Since beta 4, aoTuV includes a -q -2 option for the lowest bitrate. According to forum member guruboolez' latest listening test on classical music, aoTuV beta 4 performed magnificently well at -q 6!! (see Aoyumi's website above for more information)
- Many Hydrogenaudio enthusiasts report that Release 1 gives even better quality for low bit-rates. -q 1.5 works for streaming, even good enough.
- aoTuV Beta 5 series releases – The recommended encoders
- These versions are the latest tuned versions. They further improve low-bitrate encoding, without sacrificing compression. They are now the recommended Vorbis encoders at Hydrogenaudio.
- See Compiling aoTuV for information on how to compile it for Linux.
Optimized binaries
These are highly optimized encoders developed by the Ogg Vorbis Acceleration Project codenamed Lancer. They are much faster than the standard binary builds having negligible to nearly no effects on audio quality. These include sped-up routines, i.e mdct.c
These optimized encoders where are one point rapidly changing, as BlackSword found new ways to accelerate, and in the process uncovers new bugs. Please check the “Lancer homepage” link below for the last suite release. They have not been updated since 2006. Developers are better off building their own compiles by downloading the source code from the website above and optmizing them for different architectures. The builds on the website above use old AoTuV builds proceed with caution if you decide to use these.
On Lancer homepage you can find older versions of Oggenc, OggDropXPd, and Dynamic Link Libraries, with optimizations for SSE, SSE2, SSE3 and multi-threading instruction sets.
Note: Output of Lancer may be slightly different from output of 'standard' aoTuV. This is due to the difference of floating-point rounding: Lancer uses 64-bit SSE instructions, in contrast to the standard aoTuV use of 80-bit FP instructions. The output difference between both binaries should not be audible at all. In fact, tests have proven that playback of Lancer's output is indistinguishable from playback of standard aoTuV output.
Forum member The_Sven has produced an aoTuV Beta 5 binary build of Lancer (as of 2009) with optimized SSE instruction sets that has been compiled for Linux. It runs about 3x faster compared to the standard AoTuv Beta 5 build and is a 32-bit x86 binary.
- This static GCC 4 binary was compiled by The_Sven.
Released Binaries
How do I know which encoder was used to make this particular (Ogg) Vorbis file?
Using either the ogginfo program or file info in your player, you can tell from the vendor tag:
If you aren't interested in the latest compiles feel free to use Vorbis 1.x.x libraries.
Vendor Tag | Encoder | Note |
---|---|---|
Xiphophorus libVorbis I 20000508 | 1.0 Beta 1 or Beta 2 | |
Xiphophorus libVorbis I 20001031 | 1.0 Beta 3 | |
Xiphophorus libVorbis I 20010225 | 1.0 Beta 4 | |
Xiphophorus libVorbis I 20010615 | 1.0 RC1 | |
Xiphophorus libVorbis I 20010813 | 1.0 RC2 | |
Xiphophorus libVorbis I 20010816 (gtune 1) | 1.0 RC2 GT1 | |
Xiphophorus libVorbis I 20011014 (GTune 2) | 1.0 RC2 GT2 | |
Xiphophorus libVorbis I 20011217 | 1.0 RC3 | |
Xiphophorus libVorbis I 20011231 | 1.0 RC3 | |
Xiph.Org libVorbis I 20020717 | 1.0 | |
Xiph.Org/Sjeng.Org libVorbis I 20020717 (GTune 3, beta 1) | GT3b1 | |
Xiph.Org libVorbis I 20030308 | Post 1.0 CVS | |
Xiph.Org libVorbis I 20030909 | 1.0.1 | |
Xiph.Org/Sjeng.Org libVorbis I 20030909 (GTune 3, beta 2) EXPERIMENTAL | Experimental GT3b2 | |
Xiph.Org libVorbis I 20031230 (1.0.1) | Post 1.0.1 CVS | |
Xiph.Org/Sjeng.Org libVorbis I 20031230 (GTune 3, beta 2) | GT3b2 | |
AO; aoTuV b2 [20040420] (based on Xiph.Org's 1.0.1) | aoTuV Beta 2 | |
Xiph.Org libVorbis I 20040629 | Xiph.Org Vorbis 1.1 or Xiph.Org Vorbis 1.1 RC1 | |
Xiph.Org libVorbis I 20040920 | Xiph.Org Vorbis 1.1 with impulse_trigger_profile | |
AO; aoTuV b3 [20041120] (based on Xiph.Org's libVorbis) | aoTuV Beta 3 | |
Xiph.Org libVorbis I 20050304 | Xiph.Org Vorbis 1.1.1 or Xiph.Org Vorbis 1.1.2 | |
AO; aoTuV b4 [20050617] (based on Xiph.Org's libVorbis) | aoTuV Beta 4 | |
BS; Lancer [20050709] (based on aoTuV b4 [20050617]) | Lancer based on aoTuV Beta 4 | |
AO; aoTuV b4a [20051105] (based on Xiph.Org's libVorbis) | aoTuV Beta 4.5 | |
AO; aoTuV b4b [20051117] (based on Xiph.Org's libVorbis) | aoTuV Beta 4.51 | |
BS; Lancer [20051121] (based on aoTuV b4b [20051117]) | Lancer based on aoTuV Beta 4.51 | |
AO; aoTuV pre-beta5 [20060321] (based on Xiph.Org's libVorbis) | aoTuV Beta 5 | |
BS; Lancer(xxx) [yyyymmdd] (based on aoTuV b4b [20051117]) | Processor-specific Lancer based on aoTuV Beta 4.51 | (1) |
BS; Lancer(xxx) [yyyymmdd] (based on aoTuV Release 1 [20051117]) | Processor-specific Lancer based on aoTuV Release 1 | (1) |
(1) Starting 2006-05-06, BlackSword provides accelerated versions for different processors. See the Lancer page for more information.
Recommended Encoder Settings
This is applicable to files encoded in stereo only NOT 5.1/7.1. Refer to the table below. For best results, start at -q 2 and ABX your way up.
Ultimately, the best -q setting will depend on your specific needs. Feel free to experiment.
General Command Line Usage:
oggenc -q n inputfile.wav
- where n is a number from -1 to 10, fractions accepted (using comma or period, depending on where the tool is compiled)
e.g. oggenc -q 5 inputfile.wav
Notes:
- Most standard oggenc binaries can input lossless FLAC, WavPack, etc files as well (depending upon oggenc version)
- The current oggenc and libvorbis API do not support the capabilities of "bitrate peeling". Peeling was a "proof-of-concept" idea that would reorder VQ residues by importance allowing the encoder to trim them off thus reducing the bitrate without any loss of quality. Due to the way the codebooks are structured in Vorbis I codec this is not possible and will produce suboptimal files. It will be reconsidered in theoretical working model of Vorbis II called "Ghost" someday.
Switch | VBR target (kbit/s) |
VBR range (kbit/s) |
Channel Coupling |
Noise Normalization |
Note |
---|---|---|---|---|---|
-q -2 | ~32 | ~32 – ~64 | point/lossless | yes | (1) |
-q -1 | ~48 | ~48 – ~64 | point/lossless | yes | (2) |
-q 0 | ~64 | ~64 – ~80 | point/lossless | yes | |
-q 1 | ~80 | ~80 – ~96 | point/lossless | yes | (3) |
-q 2 | ~96 | ~96 – ~112 | point/lossless | yes | |
-q 3 | ~112 | ~112 – ~128 | point/lossless | yes | |
-q 4 | ~128 | ~128 – ~160 | point/lossless | no | |
-q 5 | ~160 | ~160 – ~192 | point/lossless | no | (4) |
-q 6 | ~192 | ~192 – ~224 | lossless | no | |
-q 7 | ~224 | ~224 – ~256 | lossless | no | |
-q 8 | ~256 | ~256 – ~320 | lossless | no | |
-q 9 | ~320 | ~320 – ~500 | lossless | no | |
-q 10 | ~500 | ~500 – ~1000 | lossless | no |
(1) Only supported on aoTuVb3 and newer
(2) Bitrate of 48 kbit/s is only for aoTuVb3 and newer. Earlier versions and Xiph.org versions use a bitrate of 45 kbit/s
(3) Reports seem to indicate that aoTuV Release 1 -q 1 provides good quality for streaming
(4) Most users agree -q 5 achieves transparency, if the source is the original or lossless. It is not transparent in the case of transcoding from lossy source (strongly frowned upon)
If you need to know what lowpass settings are used for each quality level, see this HA thread. (It is not recommended that you adjust these)
Advanced Encoder Settings
Reducing pre-echo
This is applicable to all all binaries including the official mainline reference encoder and the AoTuV forks
Generally, using the recommended settings above will give the best quality. There may be cases where Vorbis 1.x.x will fail to reproduce sharp attacks or transients in your music, causing pre echo. In which case, you can use the impulse_noisetune advanced encode switch:
General Command Line Usage:
oggenc -q n --advanced-encode-option impulse_noisetune=p inputfile.wav
- where p is a number from 0 to -15
- e.g. oggenc -q 5 --advanced-encode-option impulse_noisetune=-5 inputfile.wav
Note that the lower the number (toward -15) for impulse_noisetune, the higher the bitrate will fluctuate in passages of music filled with transient attacks (and the final average bitrate may be much higher than the nominal). Therefore, you should try a small value to start off (say -5) and see if you get acceptable quality. If not, tweak it lower.
Reducing noise due to microattacks
This is only valid for some older Vorbis encoders that are marked as having impulse_trigger_profile. It was considered "experimental" when it was implemented by forum member QuantumKnot in AoTuV Beta 4.51 and can still be used for experimentation purposes.
There are certain parts of some types of music, called “microattacks”, where Vorbis will produce a noise (sort of like a puff of steam), which is due to inaccuracies in the block-switching algorithm (which can't be corrected). Due to the fact the attacks are so fine and close together, Vorbis doesn't switch to impulse short blocks enough, thus “smearing” the reproduction.
By default (with no additional switches), Vorbis selects a different profile for block switching (lower means less switching, higher means more switching) and the default values are shown in the table below:
Quality | Profile | Quality | Profile | |
---|---|---|---|---|
-1 | 0 | 5 | 2.5 | |
0 | 1 | 6 | 2.7 | |
1 | 1 | 7 | 3 | |
2 | 1.5 | 8 | 3.7 | |
3 | 2 | 9 | 4 | |
4 | 2 | 10 | 4 |
If you encounter this problem on microattacks, you may try the impulse_trigger_profile advanced encode switch, which will change (increase) the profile to your desired value.
oggenc -q n --advanced-encode-option impulse_trigger_profile=r inputfile.wav
- where r is a number from 0 to 4, fractions accepted.
Notes:
- There is the possibility that relaxed block switching (higher profiles) may cause other quality problems and create suboptimal Vorbis files. Please use it sparingly and with caution. If in doubt, leave impulse_trigger_profile on default (that is, don't use it at all)
- Setting the profile too high will make Vorbis switch to impulse short blocks more often, which will lead to higher bitrate fluctuations. Please be conservative about how you intend to use it.
- This setting has no effect on reducing the level of pre-echo. It can be said to only reduce the likelihood of pre echo, but the amount of pre-echo is tuned using the impulse_noisetune switch instead.
- You may try profiles 5 and 6 as substitutes for 3 and 4. Both Profiles 5 and 6, came from 3 and 4 in GT3b2.
You can use both impulse_noisetune and impulse_trigger_profile at the same time, but you will need separate switches, e.g.
oggenc -q n --advanced-encode-option impulse_noisetune=p
--advanced-encode-option impulse_trigger_profile=r inputfile.wav
Enabling and disabling Vorbis 5.1/7.1 Channel Coupling for Use in Mainline
This applicable to the latest reference encoder Vorbis 1.4.0 (as of March 2010 and later).
Vorbis generally uses a mixture of very complex channel coupling modes known as "Elliptical" (Point Coupling) and "Dipole" (Phase Coupling). These models are used to reduce the bitrate while taking into account the phase angle and magnitude of waveform respectively. The Point Coupling method is used more frequently to reduce the angle at frequencies where the ear is insensitive to phase. The audio characteristics sound as though the audio image has been shifted to the center and a small amount of quantization noise has been added in akin to "white noise".
There maybe times where you want to disable channel coupling so that it just uses a "lossless coupling" model with sacrificing any loss of the surround image. You can optional do this in 5.1 Vorbis in the reference encoder by typing in
oggenc -q n --advanced-encode-option disable_coupling inputfile.wav
Notes:
- It is generally better to let the encoder use coupling whenever possible. It is NOT recommended you disable it, but if necessary it is possible to do so.
Encoding Vorbis audio with libvorbis via FFMPEG 0.6 or above & Google's WebM Encoder
This is a "temporary hack" courtesy of the FFMPEG documentation and some command-line tweaking. The WebM encoder still poorly documents how to use libvorbis within mainline VP8 encoder. There are no presently no "known" switches at the time of this writing as to how to adjust the vorbis audio parameters within vpxenc without having to use the factory defaults that comes with the presets. If you decide to use these they cannot be adjusted. There does exist a "hack" that allows you to adjust the parameters if you are encoding with FFMPEG 0.6 or greater. This example assumes you have compiled FFMPEG 0.6 or greater from the source in Linux or Windows and have both libvorbis
and libvpx
enabled within ffmpeg 0.6 or better in Linux or Windows (ffmpeg will tell you so when you run the program in a terminal).
Example: Transcoding H.264 files in standard definition or high defintion to WebM with best quality one-pass VP8 encoding and a stereo or 5.1 input surround track with Vorbis audio with -q 2 encoding in Linux
$ffmpeg -y -i /home/USER/Videos/*.mp4 -threads 0 -f webm -aspect 16:9 -vcodec libvpx -deinterlace -g 120 -level 100 -profile 0 -sameq -vb 20M -acodec libvorbis -aq 2 /home/USER/Videos/*.webm
Example: Transcoding H.264 files in standard or high definition to WebM with best quality one-pass VP8 encoding and a stereo or 5.1 input surround track with Vorbis audio with -q 2 encoding in Windows
ffmpeg.exe -y -i C:\Windows\Program Files\Videos\*.mp4 -threads 0 -f webm -aspect 16:9 -vcodec libvpx -deinterlace -g 120 -level 100 -profile 0 -sameq -vb 20M -acodec libvorbis -aq 2 C:\Windows\Program Files\Videos\*.webm
Notes:
- The following snipets above are "experimental" use them with a grain of salt. In order to get best results please consult both the FFMPEG and WebM documentation to adjust and tweak the video parameters to your liking for encoding to different formats i.e an HD camera or a webcam.
- The audio quality is an integer between 0 and 9, which maps from -q 0 in Vorbis corresponding to 0 in FFMPEG to a -q 10 in Vorbis corresponding to a 10 in FFMPEG.