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 ] [ --scale ] [ -s serial ] [ -o output_file  ]  [
14       -n pattern ] [ -c extra_comment ] [ -a artist ] [ -t title ] [ -l album
15       ] [ -G genre ] [ -L lyrics file ] [ -Y  language-string  ]  input_files
16       ...
17
18

DESCRIPTION

20       oggenc reads audio data in either raw, Wave, or AIFF format and encodes
21       it into an Ogg Vorbis stream.  oggenc may also  read  audio  data  from
22       FLAC  and  Ogg  FLAC files depending upon compile-time options.  If the
23       input file "-" is specified, audio data is read from stdin and the Vor‐
24       bis  stream  is written to stdout unless the -o option is used to redi‐
25       rect the output.  By default, disk files are output to Ogg Vorbis files
26       of the same name, with the extension changed to ".ogg" or ".oga".  This
27       naming convention can be overridden by the -o option (in  the  case  of
28       one  file) or the -n option (in the case of several files). Finally, if
29       none of these are available, the output  filename  will  be  the  input
30       filename  with  the  extension (that part after the final dot) replaced
31       with ogg, so file.wav will become file.ogg.
32       Optionally, lyrics may be embedded in the Ogg file, if Kate support was
33       compiled in.
34       Note  that  some old players mail fail to play streams with more than a
35       single Vorbis stream (the so called "Vorbis I" simple profile).
36
37

OPTIONS

39       -h, --help
40              Show command help.
41
42       -V, --version
43              Show the version number.
44
45       -r, --raw
46              Assume input data is raw little-endian audio data with no header
47              information.  If  other  options  are not specified, defaults to
48              44.1kHz stereo 16 bit. See next three options for how to  change
49              this.
50
51       -B n, --raw-bits=n
52              Sets raw mode input sample size in bits. Default is 16.
53
54       -C n, --raw-chan=n
55              Sets raw mode input number of channels. Default is 2.
56
57       -R n, --raw-rate=n
58              Sets raw mode input samplerate. Default is 44100.
59
60       --raw-endianness n
61              Sets raw mode endianness to big endian (1) or little endian (0).
62              Default is little endian.
63
64       --utf8
65              Informs oggenc that the Vorbis Comments are already  encoded  as
66              UTF-8.  Useful in situations where the shell is using some other
67              encoding.
68
69       -k, --skeleton
70              Add a Skeleton  bitstream.   Important  if  the  output  Ogg  is
71              intended  to  carry multiplexed or chained streams.  Output file
72              uses .oga as file extension.
73
74       --ignorelength
75              Support for Wave files over 4 GB and stdin data streams.
76
77       -Q, --quiet
78              Quiet mode.  No messages are displayed.
79
80       -b n, --bitrate=n
81              Sets target bitrate to n (in kb/s). The encoder will attempt  to
82              encode at approximately this bitrate. By default, this remains a
83              VBR encoding. See  the  --managed  option  to  force  a  managed
84              bitrate encoding at the selected bitrate.
85
86       -m n, --min-bitrate=n
87              Sets  minimum bitrate to n (in kb/s). Enables bitrate management
88              mode (see --managed).
89
90       -M n, --max-bitrate=n
91              Sets maximum bitrate to n (in kb/s). Enables bitrate  management
92              mode (see --managed).
93
94       --managed
95              Set  bitrate  management  mode.  This  turns  off the normal VBR
96              encoding, but allows hard or  soft  bitrate  constraints  to  be
97              enforced  by the encoder. This mode is much slower, and may also
98              be lower quality. It is primarily useful for creating files  for
99              streaming.
100
101       -q n, --quality=n
102              Sets  encoding  quality to n, between -1 (very low) and 10 (very
103              high). This is the default mode of  operation,  with  a  default
104              quality  level  of  3. Fractional quality levels such as 2.5 are
105              permitted. Using this option allows the  encoder  to  select  an
106              appropriate bitrate based on your desired quality level.
107
108       --resample n
109              Resample input to the given sample rate (in Hz) before encoding.
110              Primarily useful for downsampling for lower-bitrate encoding.
111
112       --downmix
113              Downmix input from stereo to mono (has no effect  on  non-stereo
114              streams). Useful for lower-bitrate encoding.
115
116       --scale
117              Input scaling factor (helps with clipping inputs).
118
119       --advanced-encode-option optionname=value
120              Sets  an  advanced  option. See the Advanced Options section for
121              details.
122
123       -s, --serial
124              Forces a specific serial number in the output  stream.  This  is
125              primarily useful for testing.
126
127       --discard-comments
128              Prevents  comments  in FLAC and Ogg FLAC files from being copied
129              to the output Ogg Vorbis file.
130
131       -o output_file, --output=output_file
132              Write the Ogg Vorbis stream to output_file (only valid if a sin‐
133              gle input file is specified).
134
135
136       -n pattern, --names=pattern
137              Produce  filenames  as  this string, with %g, %a, %l, %n, %t, %d
138              replaced by genre, artist, album, track number, title, and date,
139              respectively  (see below for specifying these). Also, %% gives a
140              literal %.
141
142       -X, --name-remove=s
143              Remove the specified characters from parameters to the -n format
144              string. This is useful to ensure legal filenames are generated.
145
146       -P, --name-replace=s
147              Replace  characters removed by --name-remove with the characters
148              specified. If this string  is  shorter  than  the  --name-remove
149              list,  or  is  not  specified,  the  extra  characters  are just
150              removed. The default settings for this option, and the -X option
151              above,  are  platform specific (and chosen to ensure legal file‐
152              names are generated for each platform).
153
154
155       -c comment, --comment comment
156              Add the string comment as an extra comment.  This  may  be  used
157              multiple  times,  and all instances will be added to each of the
158              input files specified.  The  argument  should  be  in  the  form
159              "tag=value".
160
161
162       -a artist, --artist artist
163              Set the artist comment field in the comments to artist.
164
165
166       -G genre, --genre genre
167              Set the genre comment field in the comments to genre.
168
169
170       -d date, --date date
171              Sets  the  date comment field to the given value. This should be
172              the date of recording.
173
174
175       -N n, --tracknum n
176              Sets the track number comment field to the given value.
177
178
179       -t title, --title title
180              Set the track title comment field to title.
181
182
183       -l album, --album album
184              Set the album comment field to album.
185
186
187       -L filename, --lyrics filename
188              Loads lyrics from filename and encodes them into a  Kate  stream
189              multiplexed with the Vorbis stream.  Lyrics may be in LRC or SRT
190              format, and should be encoded in UTF-8  or  plain  ASCII.  Other
191              encodings  may be converted using tools such as iconv or recode.
192              Alternatively, the same system as for comments will be used  for
193              conversion  between  encodings.   So called "enhanced LRC" files
194              are supported, and a simple karaoke style change will  be  saved
195              with  the  lyrics.  For  more complex karaoke setups, kateenc(1)
196              should be used instead.  When embedding lyrics, the default out‐
197              put  file  extention  is  ".oga".   Note that adding lyrics to a
198              stream will automatically enable Skeleton (see the -k option for
199              more information about Skeleton).
200
201
202       -Y language-string, --lyrics-language language-string
203              Sets the language for the corresponding lyrics file to language-
204              string.  This should be an ISO 639-1 language code  (eg,  "en"),
205              or  a  RFC 3066 language tag (eg, "en_US"), not a free form lan‐
206              guage name. Players will typically recognize this  standard  tag
207              and  display  the language name in your own language.  Note that
208              the maximum length of this tag is 15 characters.
209
210       Note that the -a, -t, -l, -L, and -Y  options  can  be  given  multiple
211       times.  They will be applied, one to each file, in the order given.  If
212       there are fewer album, title, or artist comments given than  there  are
213       input  files,  oggenc will reuse the final one for the remaining files,
214       and issue a warning in the case of repeated titles.
215
216

ADVANCED ENCODER OPTIONS

218       Oggenc allows you to set a number of advanced encoder options using the
219       --advanced-encode-option  option.  These are intended for very advanced
220       users only, and should be approached with caution.  They  may  signifi‐
221       cantly degrade audio quality if misused. Not all these options are cur‐
222       rently documented.
223
224
225       lowpass_frequency=N
226              Set the lowpass frequency to N kHz.
227
228
229       impulse_noisetune=N
230              Set a noise floor bias N (range from -15.  to  0.)  for  impulse
231              blocks.   A  negative  bias instructs the encoder to pay special
232              attention to the crispness of transients in the  encoded  audio.
233              The tradeoff for better transient response is a higher bitrate.
234
235
236       bitrate_hard_max=N
237              Set  the allowed bitrate maximum for the encoded file to N kilo‐
238              bits per second.  This bitrate may be exceeded only  when  there
239              is  spare  bits  in  the  bit reservoir; if the bit reservoir is
240              exhausted, frames will be held under this value.   This  setting
241              must be used with --managed to have any effect.
242
243
244       bitrate_hard_min=N
245              Set  the allowed bitrate minimum for the encoded file to N kilo‐
246              bits per second.  This bitrate may be underrun only when the bit
247              reservoir is not full; if the bit reservoir is full, frames will
248              be held over this value; if it impossible to add bits  construc‐
249              tively, the frame will be padded with zeroes.  This setting must
250              be used with --managed to have any effect.
251
252
253       bit_reservoir_bits=N
254              Set the total size of the bit reservoir to N bits;  the  default
255              size  of  the  reservoir  is equal to the nominal number of bits
256              coded in one second (eg, a nominal 128kbps file will have a  bit
257              reservoir  of 128000 bits by default).  This option must be used
258              with --managed to have any effect and affects only  minimum  and
259              maximum  bitrate  management.   Average bitrate encoding with no
260              hard bitrate boundaries does not use a bit reservoir.
261
262
263       bit_reservoir_bias=N
264              Set the behavior bias of the bit reservoir (range:  0.  to  1.).
265              When set closer to 0, the bitrate manager attempts to hoard bits
266              for future use in sudden bitrate increases (biasing toward  bet‐
267              ter  transient reproduction).  When set closer to 1, the bitrate
268              manager neglects transients in favor using bits  for  homogenous
269              passages.   In the middle, the manager uses a balanced approach.
270              The default setting is .2, thus biasing  slightly  toward  tran‐
271              sient reproduction.
272
273
274       bitrate_average=N
275              Set  the  average bitrate for the file to N kilobits per second.
276              When used without hard minimum or maximum  limits,  this  option
277              selects  reservoirless  Average  Bit  Rate  encoding,  where the
278              encoder attempts to  perfectly  track  a  desired  bitrate,  but
279              imposes no strict momentary fluctuation limits.  When used along
280              with a minimum or maximum limit, the average bitrate still  sets
281              the  average  overall  bitrate of the file, but will work within
282              the bounds set by the bit reservoir.   When  the  min,  max  and
283              average  bitrates  are  identical,  oggenc produces Constant Bit
284              Rate Vorbis data.
285
286
287       bitrate_average_damping=N
288              Set the reaction time for the average bitrate tracker to N  sec‐
289              onds.   This  number represents the fastest reaction the bitrate
290              tracker is allowed to make to hold the bitrate to  the  selected
291              average.  The faster the reaction time, the less momentary fluc‐
292              tuation in the bitrate but (generally)  the  lower  quality  the
293              audio  output.  The slower the reaction time, the larger the ABR
294              fluctuations, but (generally) the better the audio.   When  used
295              along  with  min  or  max  bitrate  limits, this option directly
296              affects how deep and how quickly the encoder will dip  into  its
297              bit reservoir; the higher the number, the more demand on the bit
298              reservoir.
299
300              The setting must be greater than zero and the  useful  range  is
301              approximately .05 to 10.  The default is .75 seconds.
302
303
304       disable_coupling
305              Disable  use  of channel coupling for multichannel encoding.  At
306              present, the encoder will normally use channel coupling to  fur‐
307              ther  increase  compression  with  stereo  and  5.1 inputs. This
308              option forces the encoder to encode each channel fully  indepen‐
309              dently using neither lossy nor lossless coupling.
310
311

EXAMPLES

313       Simplest version. Produces output as somefile.ogg:
314              oggenc somefile.wav
315
316       Specifying an output filename:
317              oggenc somefile.wav -o out.ogg
318
319       Specifying a high-quality encoding averaging 256 kbps (but still VBR):
320              oggenc infile.wav -b 256 -o out.ogg
321
322       Specifying a maximum and average bitrate, and enforcing these:
323              oggenc infile.wav --managed -b 128 -M 160 -o out.ogg
324
325       Specifying quality rather than bitrate (to a very high quality mode):
326              oggenc infile.wav -q 6 -o out.ogg
327
328       Downsampling and downmixing to 11 kHz mono before encoding:
329              oggenc --resample 11025 --downmix infile.wav -q 1 -o out.ogg
330
331       Adding some info about the track:
332              oggenc  somefile.wav  -t  "The  track title" -a "artist who per‐
333              formed this" -l "name of album" -c "OTHERFIELD=contents of  some
334              other field not explicitly supported"
335
336       Adding embedded lyrics:
337              oggenc  somefile.wav --lyrics lyrics.lrc --lyrics-language en -o
338              out.oga
339
340       This encodes the three files, each with the same artist/album tag,  but
341       with  different title tags on each one. The string given as an argument
342       to -n is used to generate filenames, as shown  in  the  section  above.
343       This example gives filenames like "The Tea Party - Touch.ogg":
344              oggenc  -b  192  -a  "The  Tea  Party"  -l "Triptych" -t "Touch"
345              track01.wav -t "Underground"  track02.wav  -t  "Great  Big  Lie"
346              track03.wav -n "%a - %t.ogg"
347
348       Encoding  from  stdin,  to stdout (you can also use the various tagging
349       options, like -t, -a, -l, etc.):
350              oggenc -
351

AUTHORS

353       Program Author:
354              Michael Smith <msmith@xiph.org>
355
356
357       Manpage Author:
358              Stan Seibert <indigo@aztec.asu.edu>
359
360

BUGS

362       Reading type 3 Wave files (floating  point  samples)  probably  doesn't
363       work other than on Intel (or other 32 bit, little endian machines).
364
365

SEE ALSO

367       vorbiscomment(1),  ogg123(1),  oggdec(1),  flac(1),  speexenc(1),  ffm‐
368       peg2theora(1), kateenc(1)
369
370
371
372Xiph.Org Foundation             2008 October 05                      oggenc(1)
Impressum