oggenc(1)
๐ธ oggenc โ the Vorbis Tools manual, but make it cute ๐ธ
okay bestie, sit down, hydrate, because this is the oggenc(1) page from Vorbis Tools and it is a whole personality. it's long, so we're doing it in parts. part 1 is right here. let's go ๐
โจ NAME โจ
oggenc โ encode audio into the Ogg Vorbis format ๐งโจ
๐ฆ SYNOPSIS ๐ฆ
oggenc [ -hrQ ] [ -B raw input sample size ] [ -C raw input number of
channels ] [ -R raw input samplerate ] [ -b nominal bitrate ] [ -m
minimum bitrate ] [ -M maximum bitrate ] [ -q quality ] [ --resample
frequency ] [ --downmix ] [ -s serial ] [ -o output_file ] [ -n pattern
] [ -c extra_comment ] [ -a artist ] [ -t title ] [ -l album ] [ -G
genre ] [ -L lyrics file ] [ -Y language-string ] input_files ...
๐ DESCRIPTION ๐
so what does oggenc actually do, you ask? it reads audio data in either raw, Wave, or AIFF format and encodes it into an Ogg Vorbis stream. iconic behavior, no notes.
it may also read audio data from FLAC and Ogg FLAC files, but only depending on compile-time options โ so that's a "depends how it was built" situation, iykyk. ๐
if you pass the input file "-", the audio data gets read from stdin, and the Vorbis stream gets written to stdout โ unless you use the -o option to redirect the output somewhere else. very "pipes are a lifestyle" of it.
by default, disk files are output to Ogg Vorbis files of the same name, with the extension changed to ".ogg" or ".oga". this naming convention can be overridden by the -o option (when there's one file) or the -n option (when there are several files). and finally โ if none of these are available โ the output filename will be the input filename with the extension (that part after the final dot) replaced with ogg, so file.wav will become file.ogg. math is math. ๐งฎโจ
optionally, lyrics may be embedded in the Ogg file, if Kate support was compiled in. ๐ค
โ ๏ธ heads up: note that some old players may fail to play streams with more than a single Vorbis stream (the so called "Vorbis I" simple profile). lowkey tragic but that's the lore. ๐
๐ OPTIONS ๐
-h,--helpโ show command help. the classic "help me help you" ๐-V,--versionโ show the version number. โจ-r,--rawโ assume the input data is raw little-endian audio data with no header information. if you don't specify other options, it defaults to 44.1kHz stereo 16 bit. the next three options are how you change all that. ๐๏ธ-B n,--raw-bits=nโ sets raw mode input sample size in bits. default is16.-C n,--raw-chan=nโ sets raw mode input number of channels. default is2.-R n,--raw-rate=nโ sets raw mode input samplerate. default is44100.--raw-endianness nโ sets raw mode endianness to big endian (1) or little endian (0). default is little endian.--utf8โ tellsoggencthat the Vorbis Comments are already encoded as UTF-8. super useful in situations where the shell is using some other encoding. ๐-k,--skeletonโ add a Skeleton bitstream. important if the output Ogg is intended to carry multiplexed or chained streams. the output file uses.ogaas its file extension. ๐ฆด--ignorelengthโ support for Wave files over 4 GB and stdin data streams. big file energy fr fr.-Q,--quietโ quiet mode. no messages are displayed. silence is golden, periodt. ๐คซ-b n,--bitrate=nโ sets target bitrate ton(in kb/s). the encoder will attempt to encode at approximately this bitrate. by default, this remains a VBR encoding. see the--managedoption to force a managed bitrate encoding at the selected bitrate. ๐-m n,--min-bitrate=nโ sets minimum bitrate ton(in kb/s). enables bitrate management mode (see--managed).-M n,--max-bitrate=nโ sets maximum bitrate ton(in kb/s). enables bitrate management mode (see--managed).--managedโ set bitrate management mode. this turns off the normal VBR encoding, but allows hard or soft bitrate constraints to be enforced by the encoder. this mode is much slower, and may also be lower quality. it's primarily useful for creating files for streaming. so like, use it on purpose, not by accident ๐-q n,--quality=nโ sets encoding quality ton, between-1(very low) and10(very high). this is the default mode of operation, with a default quality level of3. fractional quality levels such as2.5are permitted. using this option lets the encoder select an appropriate bitrate based on your desired quality level. ๐--resample nโ resample input to the given sample rate (in Hz) before encoding. primarily useful for downsampling for lower-bitrate encoding. ๐--downmixโ downmix input from stereo to mono (has no effect on non-stereo streams). useful for lower-bitrate encoding. ๐งโก๏ธ๐ต--advanced-encode-option optionname=valueโ sets an advanced option. see the Advanced Options section for details. (yes, that's a whole other section, stay tuned ๐)-s,--serialโ forces a specific serial number in the output stream. this is primarily useful for testing. ๐ข--discard-commentsโ prevents comments in FLAC and Ogg FLAC files from being copied to the output Ogg Vorbis file. bye bye metadata ๐ซถ-o output_file,--output=output_fileโ write the Ogg Vorbis stream tooutput_file(only valid if a single input file is specified). one file in, one file out, that's the rule ๐-n pattern,--names=patternโ produce filenames as this string, with%g,%a,%l,%n,%t,%dreplaced by genre, artist, album, track number, title, and date, respectively (see below for specifying these). also,%%gives a literal%. cute little template language fr fr. โจ-X,--name-remove=sโ remove the specified characters from parameters to the-nformat string. this is useful to ensure legal filenames are generated. ๐งน-P,--name-replace=sโ replace characters removed by--name-removewith the characters specified. if this string is shorter than the--name-removelist, or is not specified, the extra characters are just removed. the default settings for this option, and the-Xoption above, are platform specific (and chosen to ensure legal filenames are generated for each platform). ๐ซถ-c comment,--comment commentโ add the stringcommentas an extra comment. this may be used multiple times, and all instances will be added to each of the input files specified. the argument should be in the form"tag=value". ๐ฌ-a artist,--artist artistโ set the artist comment field in the comments toartist.-G genre,--genre genreโ set the genre comment field in the comments togenre.-d date,--date dateโ sets the date comment field to the given value. this should be the date of recording. ๐-N n,--tracknum nโ sets the track number comment field to the given value.-t title,--title titleโ set the track title comment field totitle.-l album,--album albumโ set the album comment field toalbum. ๐ฟ-L filename,--lyrics filenameโ loads lyrics fromfilenameand encodes them into a Kate stream multiplexed with the Vorbis stream. lyrics may be in LRC or SRT format, and should be encoded in UTF-8 or plain ASCII. other encodings may be converted using tools such asiconvorrecode. alternatively, the same system as for comments will be used for conversion between encodings. so called "enhanced LRC" files are supported, and a simple karaoke style change will be saved with the lyrics. for more complex karaoke setups,kateenc(1)should be used instead. when embedding lyrics, the default output file extension is".oga". ๐คโจ
note that adding lyrics to a stream will automatically enable Skeleton (see the -k option for more information about Skeleton). ๐ฆด
-Y language-string,--lyrics-language language-stringโ sets the language for the corresponding lyrics file tolanguage-string. this should be an ISO 639-1 language code (eg,"en"), or a RFC 3066 language tag (eg,"en_US"), not a free form language name. players will typically recognize this standard tag and display the language name in your own language. ๐
note that the maximum length of this tag is 15 characters.
and one more thing before we move on, bestie โ ๐ข
note that the -a, -t, -l, -L, and -Y options can be given multiple times. they will be applied, one to each file, in the order given. if there are fewer album, title, or artist comments given than there are input files, oggenc will reuse the final one for the remaining files, and issue a warning in the case of repeated titles. โ ๏ธ
โจ ADVANCED ENCODER OPTIONS โจ
okay bestie, so oggenc lets you set a bunch of advanced encoder options using the --advanced-encode-option option. these are for very advanced users only, and you should approach them with caution. they may significantly degrade audio quality if misused. not all of these options are currently documented. iykyk ๐
lowpass_frequency=Nโ sets the lowpass frequency to N kHz. simple. iconic. โจimpulse_noisetune=Nโ sets a noise floor bias N (range from-15.to0.) for impulse blocks. a negative bias tells the encoder to pay special attention to the crispness of transients in the encoded audio. the tradeoff for better transient response is a higher bitrate. ngl that's the vibe. ๐bitrate_hard_max=Nโ sets the allowed bitrate maximum for the encoded file to N kilobits per second. this bitrate may be exceeded only when there is spare bits in the bit reservoir; if the bit reservoir is exhausted, frames will be held under this value. this setting must be used with--managedto have any effect. periodt ๐bitrate_hard_min=Nโ sets the allowed bitrate minimum for the encoded file to N kilobits per second. this bitrate may be underrun only when the bit reservoir is not full; if the bit reservoir is full, frames will be held over this value; if it's impossible to add bits constructively, the frame will be padded with zeroes. this setting must be used with--managedto have any effect. the way that bit reservoir works, fr fr. ๐ธbit_reservoir_bits=Nโ sets the total size of the bit reservoir to N bits; the default size of the reservoir is equal to the nominal number of bits coded in one second (eg, a nominal128kbpsfile will have a bit reservoir of128000bits by default). this option must be used with--managedto have any effect and affects only minimum and maximum bitrate management. average bitrate encoding with no hard bitrate boundaries does not use a bit reservoir. lowkey important. ๐ฆbit_reservoir_bias=Nโ sets the behavior bias of the bit reservoir (range:0.to1.). when set closer to0, the bitrate manager attempts to hoard bits for future use in sudden bitrate increases (biasing toward better transient reproduction). when set closer to1, the bitrate manager neglects transients in favor of using bits for homogenous passages. in the middle, the manager uses a balanced approach. the default setting is.2, thus biasing slightly toward transient reproduction. balanced queen ๐bitrate_average=Nโ sets the average bitrate for the file to N kilobits per second. when used without hard minimum or maximum limits, this option selects reservoirless Average Bit Rate encoding, where the encoder attempts to perfectly track a desired bitrate, but imposes no strict momentary fluctuation limits. when used along with a minimum or maximum limit, the average bitrate still sets the average overall bitrate of the file, but will work within the bounds set by the bit reservoir. when the min, max and average bitrates are identical,oggencproduces Constant Bit Rate Vorbis data. iconic โจbitrate_average_damping=Nโ sets the reaction time for the average bitrate tracker to N seconds. this number represents the fastest reaction the bitrate tracker is allowed to make to hold the bitrate to the selected average. the faster the reaction time, the less momentary fluctuation in the bitrate but (generally) the lower quality the audio output. the slower the reaction time, the larger the ABR fluctuations, but (generally) the better the audio. when used along with min or max bitrate limits, this option directly affects how deep and how quickly the encoder will dip into its bit reservoir; the higher the number, the more demand on the bit reservoir.
the setting must be greater than zero and the useful range is approximately .05 to 10. the default is .75 seconds. no cap ๐
disable_couplingโ disables use of channel coupling for multichannel encoding. at present, the encoder will normally use channel coupling to further increase compression with stereo and 5.1 inputs. this option forces the encoder to encode each channel fully independently using neither lossy nor lossless coupling. main character energy ๐
๐ EXAMPLES ๐
okay bestie, here are the examples. slay โจ
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 -o out.ogg
Specifying a maximum and average bitrate, and enforcing these:
oggenc infile.wav --managed -b 128 -M 160 -o out.ogg
Specifying quality rather than bitrate (to a very high quality mode):
oggenc infile.wav -q 6 -o out.ogg
Downsampling and downmixing to 11 kHz mono before encoding:
oggenc --resample 11025 --downmix infile.wav -q 1 -o 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 explicitly supported"
Adding embedded lyrics:
oggenc somefile.wav --lyrics lyrics.lrc --lyrics-language en -o out.oga
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 -
๐ AUTHORS ๐
- Program Author:
Michael Smith <msmith@xiph.org> - Manpage Author:
Stan Seibert <indigo@aztec.asu.edu>
๐ญ BUGS ๐ญ
reading type 3 Wave files (floating point samples) probably doesn't work other than on Intel (or other 32 bit, little endian machines). the way that is so specific, bestie. ๐
๐ซถ SEE ALSO ๐ซถ
and that's the tea, bestie. this iconic page is from the Xiph.Org Foundation, dated 2008 October 05, and it's for oggenc(1). slay. ๐
โจ
๐ฆ where this page comes from
- alpine 3.24: vorbis-tools-doc 1.4.3-r2 ยท GPL-2.0-only
- arch rolling: vorbis-tools 1.4.3-1 ยท GPL2
- debian bookworm: vorbis-tools 1.4.2-1+b1
- debian trixie: vorbis-tools 1.4.3-1
- epel 10: vorbis-tools 1:1.4.2-14.el10_1 ยท GPL-2.0-only
- epel 9: vorbis-tools 1:1.4.2-10.el9 ยท GPLv2
- fedora 43: vorbis-tools 1:1.4.3-3.fc43 ยท GPL-2.0-only
- fedora 43: vorbis-tools 1:1.4.3-4.fc43 ยท GPL-2.0-only
- fedora 44: vorbis-tools 1:1.4.3-4.fc44 ยท GPL-2.0-only
- fedora 44: vorbis-tools 1:1.4.3-5.fc44 ยท GPL-2.0-only
- nixos 26.05: vorbis-tools 1.4.3
- nixpkgs unstable: vorbis-tools 1.4.3
- opensuse-leap 16.0: vorbis-tools 1.4.2-bp160.2.1 ยท GPL-2.0-only
- opensuse-leap 16.0: vorbis-tools 1.4.2-bp160.2.1 ยท GPL-2.0-only
- opensuse-leap 16.0: vorbis-tools 1.4.2-bp160.2.1 ยท GPL-2.0-only
- opensuse-leap 16.0: vorbis-tools 1.4.2-bp160.2.1 ยท GPL-2.0-only
- ubuntu jammy: vorbis-tools 1.4.2-1
- ubuntu noble: vorbis-tools 1.4.2-2
- ubuntu questing: vorbis-tools 1.4.3-1
- ubuntu resolute: vorbis-tools 1.4.3-1build1
- ubuntu stonking: vorbis-tools 1.4.3-1build1
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms