diff options
author | Aki <please@ignore.pl> | 2021-10-01 23:46:47 +0200 |
---|---|---|
committer | Aki <please@ignore.pl> | 2021-10-01 23:46:47 +0200 |
commit | ddd76aa4e1571c8d5965709db5c3cd47a89c9a38 (patch) | |
tree | 4e07bfaebede6531a70984fdebc855bca52f394a /vorbis/doc/vorbisenc/examples.html | |
parent | 3a507e08b1d4e5970b27401a7e6517570d529400 (diff) | |
parent | c2d2c3551501110fddd78674d5435bfaa70382a3 (diff) | |
download | starshatter-ddd76aa4e1571c8d5965709db5c3cd47a89c9a38.zip starshatter-ddd76aa4e1571c8d5965709db5c3cd47a89c9a38.tar.gz starshatter-ddd76aa4e1571c8d5965709db5c3cd47a89c9a38.tar.bz2 |
Project is now built with CMake
Diffstat (limited to 'vorbis/doc/vorbisenc/examples.html')
-rw-r--r-- | vorbis/doc/vorbisenc/examples.html | 133 |
1 files changed, 133 insertions, 0 deletions
diff --git a/vorbis/doc/vorbisenc/examples.html b/vorbis/doc/vorbisenc/examples.html new file mode 100644 index 0000000..1fcc7e0 --- /dev/null +++ b/vorbis/doc/vorbisenc/examples.html @@ -0,0 +1,133 @@ +<html> + +<head> +<title>libvorbisenc - Documentation</title> +<link rel=stylesheet href="style.css" type="text/css"> +</head> + +<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff"> +<table border=0 width=100%> +<tr> +<td><p class=tiny>libvorbisenc documentation</p></td> +<td align=right><p class=tiny>libvorbisenc version 1.3.2 - 20101101</p></td> +</tr> +</table> + +<h1>Libvorbisenc Setup Examples</h1> + +VBR is always the recommended mode for Vorbis encoding when +there's no need to impose bitrate constraints. True VBR encoding will +always produce the most consistent quality output as well as the +highest quality for a the bits used. + +<p>The following code examples prepare a +<a href="../libvorbis/vorbis_info.html">vorbis_info</a> structure for encoding +use with libvorbis.<p> + +<h2>Example: encoding using a VBR quality mode</h2> + +<table border=0 width=100% color=black cellspacing=0 cellpadding=7> +<tr bgcolor=#cccccc><td><pre><b> + vorbis_info_init(&vi); + + /********************************************************************* + Encoding using a VBR quality mode. The usable range is -.1 + (lowest quality, smallest file) to 1.0 (highest quality, largest file). + Example quality mode .4: 44kHz stereo coupled, roughly 128kbps VBR + *********************************************************************/ + + ret = vorbis_encode_init_vbr(&vi,2,44100,.4); + + /********************************************************************* + do not continue if setup failed; this can happen if we ask for a + mode that libVorbis does not support (eg, too low a quality mode, etc, + will return 'OV_EIMPL') + *********************************************************************/ + + if(ret) exit(1); +</b></pre></td></tr></table> + +<h2>Example: encoding using average bitrate (ABR)</h2> + +<table border=0 width=100% color=black cellspacing=0 cellpadding=7> +<tr bgcolor=#cccccc><td><pre><b> + vorbis_info_init(&vi); + + /********************************************************************* + Encoding using an average bitrate mode (ABR). + example: 44kHz stereo coupled, average 128kbps ABR + *********************************************************************/ + + ret = vorbis_encode_init(&vi,2,44100,-1,128000,-1); + + /********************************************************************* + do not continue if setup failed; this can happen if we ask for a + mode that libVorbis does not support (eg, too low a bitrate, etc, + will return 'OV_EIMPL') + *********************************************************************/ + + if(ret) exit(1); +</b></pre></td></tr></table> + +<h2>Example: encoding using constant bitrate (CBR)</h2> + +<table border=0 width=100% color=black cellspacing=0 cellpadding=7> +<tr bgcolor=#cccccc><td><pre><b> + vorbis_info_init(&vi); + + /********************************************************************* + Encoding using a constant bitrate mode (CBR). + example: 44kHz stereo coupled, average 128kbps CBR + *********************************************************************/ + + ret = vorbis_encode_init(&vi,2,44100,128000,128000,128000); + + /********************************************************************* + do not continue if setup failed; this can happen if we ask for a + mode that libVorbis does not support (eg, too low a bitrate, etc, + will return 'OV_EIMPL') + *********************************************************************/ + + if(ret) exit(1); +</b></pre></td></tr></table> + +<h2>Example: encoding using VBR selected by approximate bitrate</h2> + +<table border=0 width=100% color=black cellspacing=0 cellpadding=7> +<tr bgcolor=#cccccc><td><pre><b> + vorbis_info_init(&vi); + + /********************************************************************* + Encode using a quality mode, but select that quality mode by asking for + an approximate bitrate. This is not ABR, it is true VBR, but selected + using the bitrate interface, and then turning bitrate management off: + *********************************************************************/ + + ret = ( vorbis_encode_setup_managed(&vi,2,44100,-1,128000,-1) || + vorbis_encode_ctl(&vi,OV_ECTL_RATEMANAGE2_SET,NULL) || + vorbis_encode_setup_init(&vi)); + + /********************************************************************* + do not continue if setup failed; this can happen if we ask for a + mode that libVorbis does not support (eg, too low a bitrate, etc, + will return 'OV_EIMPL') + *********************************************************************/ + + if(ret) exit(1); +</b></pre></td></tr></table> + +<br><br> +<hr noshade> +<table border=0 width=100%> +<tr valign=top> +<td><p class=tiny>copyright © 2000-2010 Xiph.Org</p></td> +<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/">Ogg Vorbis</a></p></td> +</tr><tr> +<td><p class=tiny>libvorbisenc documentation</p></td> +<td align=right><p class=tiny>libvorbisenc version 1.3.2 - 20101101</p></td> +</tr> +</table> + +</body> + +</html> |