ogg123(1)

✨ ogg123 ✨

okay bestie, welcome to the ogg123 manual page, straight outta Vorbis Tools, manual section 1. this is the girl who plays your Ogg and FLAC files and she does NOT miss. grab a snack, this one's a long read πŸ“


🌸 NAME 🌸

ogg123 β€” plays Ogg, and FLAC files πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

ogg123 [ -vqrzZVh ] [ -k seconds ] [ -x nth ] [ -y ntimes ] [ -b
buffer_size ] [ -d driver [ -o option:value ] [ -f filename ] ] file ...
| directory ...  | URL ...

πŸ’… DESCRIPTION πŸ’…

so. ogg123 reads Ogg/Vorbis, Ogg/Speex, Ogg/Opus, Ogg/FLAC, and native FLAC audio files and decodes them to whatever devices you told it about on the command line. it's giving ✨decoder era✨

by default ogg123 writes to the standard sound device, no cap β€” but honestly? output can be sent to any number of devices. she's versatile like that πŸ’…

files can be read from the file system, or URLs can be streamed via HTTP. and if you hand her a directory? she plays all of the files in it or its subdirectories. she's thorough, she's committed, she's the moment πŸ‘‘


🫢 OPTIONS 🫢

here's the whole menu, bestie. every single one. no skipping, we don't do that here πŸ’–

  • --audio-buffer n β€” use an output audio buffer of approximately n kilobytes.
  • -@ playlist, --list playlist β€” play all of the files named in the file playlist. the playlist should have one filename, directory name, or URL per line. blank lines are permitted. directories get treated exactly the same way as they would on the command line.
  • -b n, --buffer n β€” use an input buffer of approximately n kilobytes. HTTP-only option.
  • -p n, --prebuffer n β€” prebuffer n percent of the input buffer. playback won't begin until this prebuffer is complete. HTTP-only option.
  • -d device, --device device β€” specify output device. see the DEVICES section for a list of devices. any number of devices may be specified πŸ”₯
  • -f filename, --file filename β€” specify output file for a file device previously specified with --device. the filename - writes to standard out. if the file already exists, ogg123 will overwrite it. (yes, just like that. no warning, no mercy.)
  • -h, --help β€” show command help.
  • -k n, --skip n β€” skip the first n seconds. n may also be in minutes:seconds or hours:minutes:seconds form.
  • -K n, --end n β€” stops playing n seconds from the start of the stream. n may also have the same format as used in the --skip option.
  • -o option[:value], --device-option option[:value] β€” sets the option option to value for the preceding device. see DEVICES for a list of valid options for each device.
  • -q, --quiet β€” quiet mode. no messages are displayed. 🀫
  • -V, --version β€” display version information.
  • -v, --verbose β€” increase verbosity.
  • -x n, --nth β€” play every nth decoded block. has the effect of playing audio at n times faster than normal speed.
  • -y n, --ntimes β€” repeat every played block n times. has the effect of playing audio n times slower than normal speed. may be used with -x for interesting fractional speeds πŸ‘€
  • -r, --repeat β€” repeat playlist indefinitely.
  • -z, --shuffle β€” play files in pseudo-random order.
  • -Z, --random β€” play files in pseudo-random order forever. periodt.

πŸ¦‹ DEVICES πŸ¦‹

ogg123 supports a whole variety of audio output devices through libao. only the devices supported by the target platform will actually be available, so don't come for her if your fav isn't there πŸ™ˆ

the -f option may only be used with devices that write to files. that's the rule, bestie.

πŸ’– Options supported by all devices

  • debug β€” turn on debugging output [if any] for a chosen driver.
  • matrix:value β€” force a specific output channel ordering for a given device. value is a comma separated list of AO style channel names, eg, L,R,C,LFE,BL,BR,SL,SR.
  • verbose β€” turn on verbose output for a chosen driver. the -v option will also set the driver verbose option.
  • quiet β€” force chosen driver to be completely silent. even errors will not produce any output. -q will also set the driver quiet option.

🌸 aixs

AIX live output driver. options:

  • dev:value β€” set AIX output device to value.

⭐ alsa

Advanced Linux Sound Architecture live output driver. options:

  • buffer_time:value β€” override the default hardware buffer size (in milliseconds).
  • dev:value β€” ALSA device label to use. examples include "hw:0" for the first soundcard and "hw:1" for the second. the alsa driver normally chooses one of "surround71", "surround51", "surround40" or "default" automatically depending on number of output channels. for more information, see http://alsa.opensrc.org/ALSA+device+labels
  • period_time:value β€” override the default hardware period size (in microseconds).
  • period_time:value β€” override the default hardware period size (in microseconds).
ngl she said it twice. that's just how the page is, we don't gatekeep πŸ’€
  • use_mmap:value β€” value is set to "yes" or "no" to override the compiled-in default to use or not use mmap device access. in the past, some buggy alsa drivers have behaved better when not using mmap access at the penalty of slightly higher CPU usage.

πŸ’œ arts

aRts Sound Daemon live output driver. options:

  • multi:value β€” value is set to "yes" or "no" to allow opening the aRts playback device for multiply concurrent playback. although the driver works properly in multi mode, it is known to occasionally crash the aRts server itself 😭 default behavior is "no".

πŸŽ€ au

Sun audio file output. writes the audio samples in AU format. the AU format supports writing to unseekable files like standard out. in such circumstances, the AU header will specify the sample format, but not the length of the recording.


🧚 esd

Enlightened Sound Daemon live output. options:

  • host:value β€” value specifies the hostname where esd is running. this can include a port number after a colon, as in "whizbang.com:555". (Default = localhost)
  • client_name:value β€” sets the client name for the new audio stream. defaults to "libao client".

🌈 irix

IRIX live output audio driver.


πŸ“ macosx

MacOS X 'AUHAL' live output driver. this driver supports MacOS X 10.5 and later (10.4 and earlier uses an earlier, incompatible interface). options:

  • buffer_time:value β€” set the hardware buffer size to the equivalent of value milliseconds.

✨ nas

Network Audio Server live output driver. options:

  • buf_size:value β€” set size of audio buffer on server in bytes.
  • host:value β€” set location of NAS server; see nas(1) for format.

πŸ’€ null

Null driver. all audio data is discarded. (Note: audio data is not written to /dev/null !) you could use this driver to test raw decoding speed without output overhead.


πŸ‘‘ oss

Open Sound System driver for Linux and FreeBSD, versions 2, 3 and 4. options:

  • dsp:value β€” DSP device for soundcard. defaults to /dev/dsp.

πŸ’– pulse

Pulseaudio live audio sound driver. options:

  • server:value β€” specifies location of remote or alternate Pulseaudio server.
  • sink:value β€” specifies a non-default Pulseaudio sink for audio stream.

πŸ¦‹ raw

Raw file output. writes raw audio samples to a file. options:

  • byteorder:value β€” chooses big endian ("big"), little endian ("little"), or native ("native") byte order. default is native order.

πŸ”₯ roar

RoarAudio Daemon live output driver. options:

  • server:value, host:value β€” specifies location of remote RoarAudio server to use.
  • id:value, dev:value β€” specifies a non-default mixer within a RoarAudio server for audio stream.
  • role:value β€” sets the role setting for the audio stream.
  • client_name:value β€” sets the client name for the new audio stream. defaults to "libao client".

🌸 sndio

OpenBSD SNDIO live output driver. options:

  • dev:value β€” specifies audio device to use for playback.

⭐ sun

Sun Audio live output driver for NetBSD, OpenBSD, and Solaris. options:

  • dev:value β€” audio device for soundcard. defaults to /dev/audio.

πŸŽ€ wav

WAV file output. writes the sound data to disk in uncompressed form. if multiple files are played, all of them will be concatenated into the same WAV file. WAV files cannot be written to unseekable files, such as standard out. use the AU format instead.


πŸ’œ wmm

Windows MultiMedia live output driver for Win98 and later. options:

  • dev:value β€” selects audio device to use for playback by device name.
  • id:value β€” selects audio device to use for playback by device id (card number).

🌈 EXAMPLES 🌈

the ogg123 command line is fairly flexible, perhaps confusingly so (she's just like that πŸ’…). here are some sample command lines and an explanation of what they do.

Play on the default soundcard:

ogg123 test.ogg

Play all of the files in the directory ~/music and its subdirectories.

ogg123 ~/music

Play a file using the OSS driver:

ogg123 -d oss test.ogg

Pass the "dsp" option to the OSS driver:

ogg123 -d oss -o dsp:/dev/mydsp

Use the ESD driver

ogg123 -d esd test.ogg

Use the WAV driver with the output file, "test.wav":

ogg123 -d wav -f test.wav test.ogg

Listen to a file while you write it to a WAV file:

ogg123 -d oss -d wav -f test.wav test.ogg

Note that options apply to the device declared to the left:

ogg123 -d oss -o dsp:/dev/mydsp -d raw -f test2.raw -o
byteorder:big test.ogg

Stress test your harddrive:

ogg123 -d oss -d wav -f 1.wav -d wav -f 2.wav -d wav -f 3.wav -d
wav -f 4.wav -d wav -f 5.wav test.ogg

Create an echo effect with esd and a slow computer:

ogg123 -d esd -d esd test.ogg

πŸ’œ INTERRUPT πŸ’œ

you can abort ogg123 at any time by pressing Ctrl-C. if you're playing multiple files, this will stop the current file and begin playing the next one. if you want to abort playing immediately instead of skipping to the next file, press Ctrl-C within the first second of the playback of a new file. ⚑

note that the result of pressing Ctrl-C might not be audible immediately, due to audio data buffering in the audio device. this delay is system dependent, but it is usually not more than one or two seconds. she's not ignoring you, she's just buffering πŸ₯Ί

✨ FILES ✨

  • /etc/libao.conf β€” the system-wide glow-up spot πŸ’… you can use this to set the default output device for every libao program on the machine. One config to rule them all, no cap.
  • ~/.libao β€” the per-user config file, aka your personal little corner of the universe πŸŽ€ it overrides the system wide output device settings, so whatever you put here wins. your vibes, your rules.

πŸ’€ BUGS πŸ’€

ngl there's one thing you gotta know about, bestie, and it's giving chaos:

Piped WAV files may cause strange behavior in other programs. 😭

why, you ask? because WAV files store the data length in the header. however, the output driver does not know the length when it writes the header, and there is literally no value that means "length unknown". it's a whole situation. πŸ™ˆ

So if you need to use ogg123 in a pipe, use the raw or au output driver instead. that's the move. periodt.

πŸ‘‘ AUTHORS πŸ‘‘

Program Authors:

  • Kenneth Arnold <kcarnold-xiph@arnoldnet.net>
  • Stan Seibert <volsung@xiph.org>

Manpage Author:

  • Stan Seibert <volsung@xiph.org>

iconic legends, honestly. we stan. 🫢


🌈 SEE ALSO 🌈

go read those too, iykyk ✨


okay bestie that's the whole page!! πŸŽ€ this lil masterpiece came from the Xiph.Org Foundation, dated 2010 March 24, and it's the ogg123(1) manpage β€” go forth and play your oggs, you absolute main character πŸ’– πŸ¦‹ 🌸