Simplest version. Produces output as somefile.ogg:
oggenc somefile.wav
Specifying an output filename:
oggenc somefile.wav -o out.ogg
Specifying a high-quality encoding averaging 256 kbps (but still VBR).
oggenc infile.wav -b 256 out.ogg
Specifying a maximum and average bitrate, and enforcing these.
oggenc infile.wav --managed -b 128 -M 160 out.ogg
Specifying quality rather than bitrate (to a very high quality mode)
oggenc infile.wav -q 6 out.ogg
Downsampling and downmixing to 11 kHz mono before encoding.
oggenc --resample 11025 --downmix infile.wav -q 1 out.ogg
Adding some info about the track:
oggenc somefile.wav -t "The track title" -a "artist who performed this" -l
"name of album" -c
"OTHERFIELD=contents of some other field not explictly supported"
This encodes the three files, each with the
same artist/album tag, but with different title tags on each one. The
string given as an argument to -n is used to generate filenames, as shown
in the section above. This example gives filenames
like "The Tea Party - Touch.ogg":
oggenc -b 192 -a "The Tea Party" -l "Triptych" -t "Touch" track01.wav -t
"Underground" track02.wav -t "Great Big Lie" track03.wav -n "%a - %t.ogg"
Encoding from stdin, to stdout (you can also use the various tagging
options, like -t, -a, -l, etc.):
oggenc -