78
85
reads audio data in either raw, WAV, or AIFF format and encodes it into an
79
Ogg Vorbis stream. If the input file "-" is specified, audio data is
88
may also read audio data from FLAC and Ogg FLAC files depending upon compile-time options. If the input file "-" is specified, audio data is
82
91
and the Vorbis stream is written to
86
95
option is used to redirect the output. By default, disk files are
87
96
output to Ogg Vorbis files of the same name, with the extension
88
97
changed to ".ogg". This naming convention can be overridden by the
90
99
option (in the case of one file) or the
92
option (in the case of several files).
101
option (in the case of several files). Finally, if none of these
102
are available, the output filename will be the input filename with the
103
extension (that part after the final dot) replaced with ogg, so file.wav
96
108
Show command help.
98
Assume input data is raw little-endian audio data with no
110
Assume input data is raw little\-endian audio data with no
99
111
header information. If other options are not specified, defaults to 44.1kHz
100
112
stereo 16 bit. See next three options for how to change this.
101
.IP "-B n, --raw-bits=n"
102
Sets raw input sample size in bits. Default is 16.
103
.IP "-C n, --raw-chan=n"
104
Sets raw input number of channels. Default is 2.
105
.IP "-R n, --raw-rate=n"
106
Sets raw input samplerate. Default is 44100.
113
.IP "\-B n, \-\-raw\-bits=n"
114
Sets raw mode input sample size in bits. Default is 16.
115
.IP "\-C n, \-\-raw\-chan=n"
116
Sets raw mode input number of channels. Default is 2.
117
.IP "\-R n, \-\-raw\-rate=n"
118
Sets raw mode input samplerate. Default is 44100.
119
.IP "\-\-raw\-endianness n
120
Sets raw mode endianness to big endian (1) or little endian (0). Default is
108
123
Quiet mode. No messages are displayed.
109
.IP "-b n, --bitrate=n"
124
.IP "\-b n, \-\-bitrate=n"
110
125
Sets encoding to the bitrate closest to n (in kb/s).
111
.IP "-m n, --min-bitrate=n"
126
.IP "\-m n, \-\-min\-bitrate=n"
112
127
Sets minimum bitrate to n (in kb/s).
113
.IP "-M n, --max-bitrate=n"
128
.IP "\-M n, \-\-max\-bitrate=n"
114
129
Sets maximum bitrate to n (in kb/s).
115
.IP "-q n, --quality=n"
116
Sets encoding quality to n, between 0 (low) and 10 (high). This is the default mode of operation.
131
Set bitrate management mode. This turns off the normal VBR encoding, but allows
132
hard or soft bitrate constraints to be enforced by the encoder. This mode is
133
much slower, and may also be lower quality. It is primarily useful for creating
135
.IP "\-q n, \-\-quality=n"
136
Sets encoding quality to n, between \-1 (low) and 10 (high). This is the default mode of operation, with a default quality level of 3. Fractional quality levels such as 2.5 are permitted. Normal quality range is 0 \- 10.
138
Resample input to the given sample rate (in Hz) before encoding. Primarily
139
useful for downsampling for lower\-bitrate encoding.
141
Downmix input from stereo to mono (has no effect on non\-stereo streams). Useful
142
for lower\-bitrate encoding.
143
.IP "\-\-advanced\-encode\-option optionname=value"
144
Sets an advanced option. See the Advanced Options section for details.
145
.IP "\-s, \-\-serial"
118
146
Forces a specific serial number in the output stream. This is primarily useful for testing.
119
.IP "-o output_file, --output=output_file"
147
.IP "\-\-discard\-comments"
148
Prevents comments in FLAC and Ogg FLAC files from being copied to the
149
output Ogg Vorbis file.
150
.IP "\-o output_file, \-\-output=output_file"
120
151
Write the Ogg Vorbis stream to
121
.I output_file (only valid if a single input file is specified)
123
.IP "-n pattern, --names=pattern"
124
Produce filenames as this string, with %a, %t, %l, %G replaced by artist,
125
title, album respectively (see below for specifying these). Also, %%
128
.IP "-c comment, --comment comment"
153
(only valid if a single input file is specified).
155
.IP "\-n pattern, \-\-names=pattern"
156
Produce filenames as this string, with %g, %a, %l, %n, %t, %d replaced by
157
genre, artist, album, track number, title, and date, respectively (see below
158
for specifying these). Also, %% gives a literal %.
160
.IP "\-c comment, \-\-comment comment"
131
163
as an extra comment. This may be used multiple times, and all
132
instances will be added to each of the input files specified.
164
instances will be added to each of the input files specified. The argument
165
should be in the form "tag=value".
134
.IP "-a artist, --artist artist"
167
.IP "\-a artist, \-\-artist artist"
135
168
Set the artist comment field in the comments to
138
.IP "-G genre, --genre genre"
171
.IP "\-G genre, \-\-genre genre"
139
172
Set the genre comment field in the comments to
142
.IP "-d date, --date date"
175
.IP "\-d date, \-\-date date"
143
176
Sets the date comment field to the given value. This should be the date of recording.
145
.IP "-N n, --tracknum n"
178
.IP "\-N n, \-\-tracknum n"
146
179
Sets the track number comment field to the given value.
148
.IP "-t title, --title title"
181
.IP "\-t title, \-\-title title"
149
182
Set the track title comment field to
152
.IP "-l album, --album album"
185
.IP "\-l album, \-\-album album"
153
186
Set the album comment field to
157
Note that the \fB-a\fR, \fB-t\fR, and \fB-l\fR options can be given
190
Note that the \fB\-a\fR, \fB\-t\fR, and \fB\-l\fR options can be given
158
191
multiple times. They will be applied, one to each file, in the order
159
192
given. If there are fewer album, title, or artist comments given than
160
193
there are input files,
173
222
Specifying an output filename:
175
oggenc somefile.wav -o out.ogg
179
Specifying a high-quality encoding averaging 256 kbps.
181
oggenc infile.wav -b 256 out.ogg
185
Specifying a maximum and average bitrate.
187
oggenc infile.wav -b 128 -M 160 out.ogg
224
oggenc somefile.wav \-o out.ogg
228
Specifying a high\-quality encoding averaging 256 kbps (but still VBR).
230
oggenc infile.wav \-b 256 out.ogg
234
Specifying a maximum and average bitrate, and enforcing these.
236
oggenc infile.wav \-\-managed \-b 128 \-M 160 out.ogg
191
240
Specifying quality rather than bitrate (to a very high quality mode)
193
oggenc infile.wav -q 9 out.ogg
242
oggenc infile.wav \-q 6 out.ogg
246
Downsampling and downmixing to 11 kHz mono before encoding.
248
oggenc \-\-resample 11025 \-\-downmix infile.wav \-q 1 out.ogg
197
252
Adding some info about the track:
199
oggenc somefile.wav -t "The track title" -a "artist who performed this" -l
201
"OTHERFIELD=contents of some other field not explictly supported"
254
oggenc somefile.wav \-t "The track title" \-a "artist who performed this" \-l
256
"OTHERFIELD=contents of some other field not explicitly supported"
205
260
This encodes the three files, each with the
206
261
same artist/album tag, but with different title tags on each one. The
207
string given as an argument to -n is used to generate filenames, as shown
262
string given as an argument to \-n is used to generate filenames, as shown
208
263
in the section above. This example gives filenames
209
like "The Tea Party - Touch.ogg":
264
like "The Tea Party \- Touch.ogg":
211
oggenc -b 192 -a "The Tea Party" -l "Triptych" -t "Touch" track01.wav -t
212
"Underground" track02.wav -t "Great Big Lie" track03.wav -n "%a - %t.ogg"
266
oggenc \-b 192 \-a "The Tea Party" \-l "Triptych" \-t "Touch" track01.wav \-t
267
"Underground" track02.wav \-t "Great Big Lie" track03.wav \-n "%a \- %t.ogg"
216
271
Encoding from stdin, to stdout (you can also use the various tagging
217
options, like -t, -a, -l, etc.):
272
options, like \-t, \-a, \-l, etc.):