mpg321
command-line MP3 player, a free clone of mpg123
TLDR
Play MP3 file
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 may cause clipping. The setting helps normalize volume across tracks.
PARAMETERS
-w FILE
Output to WAV file instead of playing.-g GAIN
Audio gain (0-100).-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
MP3 only - no other formats. Some streams may not work. Audio quality limited by libmad decoder. No gapless playback.
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.
