oggdec(1)

πŸ’– oggdec β€” the girlies' guide to un-squishing your Vorbis files πŸ’–

okay so welcome to oggdec(1), part of the Vorbis Tools family πŸŽ€ this is the page where we learn how to turn Ogg Vorbis into boring-but-useful PCM audio. grab a snack, bestie, we're decoding πŸ“


✨ NAME ✨

oggdec β€” simple decoder, Ogg Vorbis file to PCM audio file (Wave or RAW).


✨ SYNOPSIS ✨

oggdec [ -Qhv ] [ -b bits_per_sample ] [ -e endianness ] [ -R ] [ -s
signedness ] [ -o outputfile ] file ...

✨ DESCRIPTION ✨

so basically oggdec takes your Ogg Vorbis files and decodes them into PCM-encoded ("uncompressed") audio files β€” either Wave or RAW format. it's giving decompression era πŸ’…

for each input file, oggdec writes to a filename based on the input filename, but with the extension changed to .wav or .raw as appropriate. no cap, it just handles the naming for you 🫢

if the input file is specified as -, then oggdec will read from stdin, and write to stdout unless an output filename is specified. likewise, an output filename of - will cause output to be to stdout. pipes? iconic. πŸ¦‹

Writing Wave format to stdout is a bad idea. Wave requires a seekable medium for the header to be rewritten after all the data is written out; stdout is not seekable. so like… don't do that, bestie 😭 it literally cannot work.

✨ OPTIONS ✨

  • -Q, --quiet β€” suppresses program output. shhh 🀫 no yapping.
  • -h, --help β€” print help message. your little built-in bestie.
  • -V, --version β€” display version information.
  • -b n, --bits=n β€” bits per sample. valid values are 8 or 16. that's it, that's the whole list πŸ”₯
  • -e n, --endian=n β€” set endianness for 16-bit output. 0 (default) is little-endian (Intel byte order). 1 is big-endian (sane byte order). yes the manpage really did say "sane byte order," we stan a petty legend πŸ’€
  • -R, --raw β€” output in raw format. if not specified, writes Wave file (RIFF headers).
  • -s n, --sign=n β€” set signedness for output. 0 for unsigned, 1 (default) for signed.
  • -o filename, --output=filename β€” write output to specified filename. this option is only valid if one input [file] is specified, or if raw mode is used. don't get cute with it πŸ’…

✨ EXAMPLES ✨

πŸŽ€ decode a file enabler.ogg to enabler.wav as little-endian signed 16-bit (default options):

oggdec enabler.ogg

πŸŽ€ decode a file enabler.ogg to enabler.raw as headerless little-endian signed 16-bit:

oggdec --raw enabler.ogg

πŸŽ€ decode enabler.ogg to enabler.crazymonkey as unsigned 8-bit:

oggdec -b 8 -s 0 -o enabler.crazymonkey enabler.ogg
not the .crazymonkey extension 😭 the manpage said it, not me. we respect the lore.

πŸŽ€ decode enabler.ogg to enabler.raw as big-endian signed 16-bit (any of the following):

oggdec -R -e 1 -b 16 enabler.ogg
oggdec -R -e 1 -b 16 -o enabler.raw - < enabler.ogg
oggdec -R -e 1 -b 16 - < enabler.ogg > enabler.raw

three whole ways to do the same thing, and every single one ate ✨

πŸŽ€ mass decoding (foo.ogg to foo.wav, bar.ogg to bar.wav, quux.ogg to quux.wav, etc.):

oggdec *.ogg

the glob is doing all the heavy lifting and honestly? main character energy πŸ‘‘


✨ AUTHORS ✨

πŸ’œ Program Authors

Michael Smith <msmith@xiph.org>

πŸ’œ Manpage Authors

Frederick Lee <phaethon@linux.ucla.edu>, assisted by a few million monkeys armed with keyboards in irc://irc.openprojects.net/#vorbis

a few million monkeys armed with keyboards β€” the most honest author credit in the entire Unix manual canon, periodt πŸ’βŒ¨οΈ

✨ SEE ALSO ✨

ogg123(1), oggenc(1), vorbiscomment(1), flac(1), speexdec(1)

go read those too, they're all in the same friend group 🌸


okay that's the whole page bestie!! this was brought to you by the Xiph.Org Foundation, dated 2008 September 9 πŸ’– mwah, go decode something, you've got this πŸŽ€βœ¨πŸ¦‹