mpg321
command-line MP3 player, a free clone of mpg123
TLDR
SYNOPSIS
mpg321 [-w output.wav] [-g gain] [-z] [-q] [options] files
DESCRIPTION
mpg321 is a command-line MP3 player, a free clone of mpg123. It decodes and plays MPEG audio files using the libmad library.
The player supports local files, playlists, and HTTP streams. Shuffle mode randomizes playback order. Loop mode repeats tracks or playlists.
WAV output decodes MP3 to uncompressed audio, useful for burning CDs or converting formats. Combined with pipes, it can feed audio to other programs.
The remote control mode accepts commands on stdin, enabling integration with front-end applications. Commands control playback, seeking, and volume.
Gain adjustment scales the audio output. Values above 100 amplify and may cause clipping. The setting helps normalize volume across tracks.
PARAMETERS
-w FILE
Output to WAV file instead of playing.-g GAIN
Audio gain as percentage (default 100, higher values amplify).-z
Shuffle playlist.-q, --quiet
Quiet mode.--loop N
Loop playback N times.-@ FILE
Read playlist from file.-o DRIVER
Audio output driver.-a DEVICE
Audio device.-b SIZE
Buffer size in kilobytes.-r
Use remote control interface.-s
Output to stdout (for piping).-v
Verbose output.
CAVEATS
Decodes MPEG audio only (layers 1, 2, and 3) -- no other formats. Some HTTP streams may not work. No gapless playback. The project is largely unmaintained; mpg123 is now the preferred alternative.
HISTORY
mpg321 was created by Joe Drew in 2001 as a free replacement for mpg123 during a time when mpg123's license was unclear. It used the libmad decoder which was clearly free software. When mpg123 became LGPL, both players continued development.

