Linux Command Directory
This directory of Linux commands is from Linux in a Nutshell, 5th Edition.
Click on any of the 687 commands below to get a description and list of available options. All links in the command summaries point to the online version of the book on Safari Bookshelf.
mpg321 [options] filempg123 [options] file
Command-line MP3 players, often used as backends for GUI music players. The files played may be local files or URLs. mpg321 and mpg123 behave the same way, except that mpg123 lacks the option --skip-printing-frames.
Name the type of audio device you are using. Valid types are oss (Open Sound System), sun (Sun audio system), alsa (Advanced Linux Sound Architecture), alsa09 (ALSA, version 0.9), esd (Enlightened Sound Daemon), and arts (Analog Real-Time Synthesizer).
Name the actual device (e.g., /dev/sound/dsp1) you are using. This option is ignored if you have chosen -o arts. For esd running on remote systems, you must specify the host, and for alsa, you must specify the card and device (default is 0:0).
Set the volume (gain) to an integer between 1 and 100.
Do not play the first n frames of the file or stream.
Play only the first n frames of the file or stream.
Specify a playlist file. The format of filename is just a list of filenames, one file per line, to be played.
Shuffle the files in the playlist and any files supplied on the command line, and play the list once. Each file will be played once.
Each time one file is finished playing, choose a new file at random. Files may be played more than once, and mpg321 will continue playing songs at random until it is stopped.
Verbose mode. Display additional information about the file, including ID3 tags and time played/time remaining.
Mostly useful for developers, this option uses stdout instead of an audio device for its output. The output is 16-bit PCM, little-endian data.
Instead of playing the song, write the output to the .wav file you specify. Choosing - as the filename sends the WAV data to stdout. This option is usually used with the --cdr option.
Write to a CDR file. Choosing - as the filename sends the data to stdout.
Instead of playing the file, write the output to the .au file you specify. Choosing - as the filename sends the data to stdout.
Test mode. Do not play or write any data.
Quiet mode. This still plays the file, but does not display any data about the file or about mpg321.
Operate in "remote control" mode, allowing seek and pause. This option is useful almost exclusively for developers of graphical frontends for mpg321.
Play in stereo. If audio is mono, send two identical streams as stereo output.
Aggressive mode takes a higher priority in the system if possible. It requires root access because it can preempt processes owned by other users.
Save CPU cycles by displaying a status update only once every n frames. This option is not available in mpg123.
Display usage information and exit.
Display the version of mpg321 and exit.