1oggenc(1)                        Vorbis Tools                        oggenc(1)
2
3
4

NAME

6       oggenc - encode audio into the Ogg Vorbis format
7
8

SYNOPSIS

10       oggenc  [  -hrQ ] [ -B raw input sample size ] [ -C raw input number of
11       channels ] [ -R raw input samplerate ] [ -b nominal bitrate ] [ -m min‐
12       imum  bitrate ] [ -M maximum bitrate ] [ -q quality ] [ --resample fre‐
13       quency ] [ --downmix ] [ -s serial ] [ -o output_file ] [ -n pattern  ]
14       [ -c extra_comment ] [ -a artist ] [ -t title ] [ -l album ] [ -G genre
15       ] input_files ...
16
17

DESCRIPTION

19       oggenc reads audio data in either raw, WAV, or AIFF format and  encodes
20       it  into  an  Ogg  Vorbis stream.  oggenc may also read audio data from
21       FLAC and Ogg FLAC files depending upon compile-time  options.   If  the
22       input file "-" is specified, audio data is read from stdin and the Vor‐
23       bis stream is written to stdout unless the -o option is used  to  redi‐
24       rect the output.  By default, disk files are output to Ogg Vorbis files
25       of the same name, with the extension changed to  ".ogg".   This  naming
26       convention can be overridden by the -o option (in the case of one file)
27       or the -n option (in the case of several files). Finally,  if  none  of
28       these  are  available,  the  output filename will be the input filename
29       with the extension (that part after the final dot) replaced  with  ogg,
30       so file.wav will become file.ogg
31
32

OPTIONS

34       -h, --help
35              Show command help.
36
37       -v, --version
38              Show the version number.
39
40       -r, --raw
41              Assume input data is raw little-endian audio data with no header
42              information. If other options are  not  specified,  defaults  to
43              44.1kHz  stereo 16 bit. See next three options for how to change
44              this.
45
46       -B n, --raw-bits=n
47              Sets raw mode input sample size in bits. Default is 16.
48
49       -C n, --raw-chan=n
50              Sets raw mode input number of channels. Default is 2.
51
52       -R n, --raw-rate=n
53              Sets raw mode input samplerate. Default is 44100.
54
55       --raw-endianness n
56              Sets raw mode endianness to big endian (1) or little endian (0).
57              Default is little endian.
58
59       -Q, --quiet
60              Quiet mode.  No messages are displayed.
61
62       -b n, --bitrate=n
63              Sets  target bitrate to n (in kb/s). The encoder will attempt to
64              encode at approximately this bitrate. By default, this remains a
65              VBR  encoding.  See  the  --managed  option  to  force a managed
66              bitrate encoding at the selected bitrate.
67
68       -m n, --min-bitrate=n
69              Sets minimum bitrate to n (in kb/s). Enables bitrate  management
70              mode (see --managed).
71
72       -M n, --max-bitrate=n
73              Sets  maximum bitrate to n (in kb/s). Enables bitrate management
74              mode (see --managed).
75
76       --managed
77              Set bitrate management mode.  This  turns  off  the  normal  VBR
78              encoding,  but  allows  hard  or  soft bitrate constraints to be
79              enforced by the encoder. This mode is much slower, and may  also
80              be  lower quality. It is primarily useful for creating files for
81              streaming.
82
83       -q n, --quality=n
84              Sets encoding quality to n, between -1 (very low) and  10  (very
85              high).  This  is  the  default mode of operation, with a default
86              quality level of 3. Fractional quality levels such  as  2.5  are
87              permitted.  Using  this  option  allows the encoder to select an
88              appropriate bitrate based on your desired quality level.
89
90       --resample n
91              Resample input to the given sample rate (in Hz) before encoding.
92              Primarily useful for downsampling for lower-bitrate encoding.
93
94       --downmix
95              Downmix  input  from stereo to mono (has no effect on non-stereo
96              streams). Useful for lower-bitrate encoding.
97
98       --advanced-encode-option optionname=value
99              Sets an advanced option. See the Advanced  Options  section  for
100              details.
101
102       -s, --serial
103              Forces  a  specific  serial number in the output stream. This is
104              primarily useful for testing.
105
106       --discard-comments
107              Prevents comments in FLAC and Ogg FLAC files from  being  copied
108              to the output Ogg Vorbis file.
109
110       -o output_file, --output=output_file
111              Write the Ogg Vorbis stream to output_file (only valid if a sin‐
112              gle input file is specified).
113
114
115       -n pattern, --names=pattern
116              Produce filenames as this string, with %g, %a, %l,  %n,  %t,  %d
117              replaced by genre, artist, album, track number, title, and date,
118              respectively (see below for specifying these). Also, %% gives  a
119              literal %.
120
121       -X, --name-remove=s
122              Remove the specified characters from parameters to the -n format
123              string. This is useful to ensure legal filenames are generated.
124
125       -P, --name-replace=s
126              Replace characters removed by --name-remove with the  characters
127              specified.  If  this  string  is  shorter than the --name-remove
128              list, or  is  not  specified,  the  extra  characters  are  just
129              removed. The default settings for this option, and the -X option
130              above, are platform specific (and chosen to ensure  legal  file‐
131              names are generated for each platform).
132
133
134       -c comment, --comment comment
135              Add  the  string  comment as an extra comment.  This may be used
136              multiple times, and all instances will be added to each  of  the
137              input  files  specified.  The  argument  should  be  in the form
138              "tag=value".
139
140
141       -a artist, --artist artist
142              Set the artist comment field in the comments to artist.
143
144
145       -G genre, --genre genre
146              Set the genre comment field in the comments to genre.
147
148
149       -d date, --date date
150              Sets the date comment field to the given value. This  should  be
151              the date of recording.
152
153
154       -N n, --tracknum n
155              Sets the track number comment field to the given value.
156
157
158       -t title, --title title
159              Set the track title comment field to title.
160
161
162       -l album, --album album
163              Set the album comment field to album.
164
165       Note that the -a, -t, and -l options can be given multiple times.  They
166       will be applied, one to each file, in the order given.   If  there  are
167       fewer  album,  title,  or  artist  comments  given than there are input
168       files, oggenc will reuse the final one for  the  remaining  files,  and
169       issue a warning in the case of repeated titles.
170
171

ADVANCED ENCODER OPTIONS

173       Oggenc allows you to set a number of advanced encoder options using the
174       --advanced-encode-option option. These are intended for  very  advanced
175       users  only,  and  should be approached with caution. They may signifi‐
176       cantly degrade audio quality if misused. Not all these options are cur‐
177       rently documented.
178
179
180       lowpass_frequency=N
181              Set the lowpass frequency to N kHz.
182
183
184       impulse_noisetune=N
185              Set  a  noise  floor  bias N (range from -15. to 0.) for impulse
186              blocks.  A negative bias instructs the encoder  to  pay  special
187              attention  to  the crispness of transients in the encoded audio.
188              The tradeoff for better transient response is a higher bitrate.
189
190
191       bitrate_hard_max=N
192              Set the allowed bitrate maximum for the encoded file to  N  bits
193              per  second.   This  bitrate  may be exceeded only when there is
194              spare bits in  the  bit  reservoir;  if  the  bit  reservoir  is
195              exhausted,  frames  will be held under this value.  This setting
196              must be used with --managed to have any effect.
197
198
199       bitrate_hard_min=N
200              Set the allowed bitrate minimum for the encoded file to  N  bits
201              per  second.   This  bitrate  may  be underrun only when the bit
202              reservoir is not full; if the bit reservoir is full, frames will
203              be  held over this value; if it impossible to add bits construc‐
204              tively, the frame will be padded with zeroes.  This setting must
205              be used with --managed to have any effect.
206
207
208       bit_reservoir_bits=N
209              Set  the  total size of the bit reservoir to N bits; the default
210              size of the reservoir is equal to the  nominal  number  of  bits
211              coded  in one second (eg, a nominal 128kbps file will have a bit
212              reservoir of 128000 bits by default).  This option must be  used
213              with  --managed  to have any effect and affects only minimum and
214              maximum bitrate management.  Average bitrate  encoding  with  no
215              hard bitrate boundaries does not use a bit reservoir.
216
217
218       bit_reservoir_bias=N
219              Set  the  behavior  bias of the bit reservoir (range: 0. to 1.).
220              When set closer to 0, the bitrate manager attempts to hoard bits
221              for  future use in sudden bitrate increases (biasing toward bet‐
222              ter transient reproduction).  When set closer to 1, the  bitrate
223              manager  neglects  transients in favor using bits for homogenous
224              passages.  In the middle, the manager uses a balanced  approach.
225              The  default  setting  is .2, thus biasing slightly toward tran‐
226              sient reproduction.
227
228
229       bitrate_average=N
230              Set the average bitrate for the file to N bits per second.  When
231              used without hard minimum or maximum limits, this option selects
232              reservoirless Average  Bit  Rate  encoding,  where  the  encoder
233              attempts  to  perfectly  track a desired bitrate, but imposes no
234              strict momentary fluctuation limits.  When  used  along  with  a
235              minimum  or  maximum  limit,  the average bitrate still sets the
236              average overall bitrate of the file, but will  work  within  the
237              bounds  set by the bit reservoir.  When the min, max and average
238              bitrates are identical, oggenc produces Constant Bit Rate Vorbis
239              data.
240
241
242       bitrate_average_damping=N
243              Set  the reaction time for the average bitrate tracker to N sec‐
244              onds.  This number represents the fastest reaction  the  bitrate
245              tracker  is  allowed to make to hold the bitrate to the selected
246              average.  The faster the reaction time, the less momentary fluc‐
247              tuation  in  the  bitrate  but (generally) the lower quality the
248              audio output.  The slower the reaction time, the larger the  ABR
249              fluctuations,  but  (generally) the better the audio.  When used
250              along with min or  max  bitrate  limits,  this  option  directly
251              affects  how  deep and how quickly the encoder will dip into its
252              bit reservoir; the higher the number, the more demand on the bit
253              reservoir.
254
255              The  setting  must  be greater than zero and the useful range is
256              approximately .05 to 10.  The default is .75 seconds.
257
258

EXAMPLES

260       Simplest version. Produces output as somefile.ogg:
261              oggenc somefile.wav
262
263       Specifying an output filename:
264              oggenc somefile.wav -o out.ogg
265
266       Specifying a high-quality encoding averaging 256 kbps (but still VBR).
267              oggenc infile.wav -b 256 out.ogg
268
269       Specifying a maximum and average bitrate, and enforcing these.
270              oggenc infile.wav --managed -b 128 -M 160 out.ogg
271
272       Specifying quality rather than bitrate (to a very high quality mode)
273              oggenc infile.wav -q 6 out.ogg
274
275       Downsampling and downmixing to 11 kHz mono before encoding.
276              oggenc --resample 11025 --downmix infile.wav -q 1 out.ogg
277
278       Adding some info about the track:
279              oggenc somefile.wav -t "The track title"  -a  "artist  who  per‐
280              formed  this" -l "name of album" -c "OTHERFIELD=contents of some
281              other field not explicitly supported"
282
283       This encodes the three files, each with the same artist/album tag,  but
284       with  different title tags on each one. The string given as an argument
285       to -n is used to generate filenames, as shown  in  the  section  above.
286       This example gives filenames like "The Tea Party - Touch.ogg":
287              oggenc  -b  192  -a  "The  Tea  Party"  -l "Triptych" -t "Touch"
288              track01.wav -t "Underground"  track02.wav  -t  "Great  Big  Lie"
289              track03.wav -n "%a - %t.ogg"
290
291       Encoding  from  stdin,  to stdout (you can also use the various tagging
292       options, like -t, -a, -l, etc.):
293              oggenc -
294

AUTHORS

296       Program Author:
297              Michael Smith <msmith@xiph.org>
298
299
300       Manpage Author:
301              Stan Seibert <indigo@aztec.asu.edu>
302
303

BUGS

305       Reading type 3 wav files (floating point samples) probably doesn't work
306       other than on intel (or other 32 bit, little endian machines).
307
308

SEE ALSO

310       vorbiscomment(1), ogg123(1), flac(1), speexenc(1), ffmpeg2theora(1)
311
312
313
314Xiph.Org Foundation              2005 March 3                        oggenc(1)
Impressum