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.
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.
Options
-odevicetype
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).
-adevice, --audiodevicedevice
Name the actual device (e.g., /dev/sound/dsp1) you are using. This option is ignored if you have chosen -oarts. 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).
-gn, --gainn
Set the volume (gain) to an integer between 1 and 100.
-kn, --skipn
Do not play the first n frames of the file or stream.
-nn, --framesn
Play only the first n frames of the file or stream.
-@filename, --listfilename
Specify a playlist file. The format of filename is just a list of filenames, one file per line, to be played.
-z, --shuffle
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.
-Z, --random
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.
-v, --verbose
Verbose mode. Display additional information about the file, including ID3 tags and time played/time remaining.
-s, --stdout
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.
-wfilename, --wavfilename
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.
--cdrfilename
Write to a CDR file. Choosing - as the filename sends the data to stdout.
--aufilename
Instead of playing the file, write the output to the .au file you specify. Choosing - as the filename sends the data to stdout.
-t, --test
Test mode. Do not play or write any data.
-q, --quiet
Quiet mode. This still plays the file, but does not display any data about the file or about mpg321.
-R
Operate in "remote control" mode, allowing seek and pause. This option is useful almost exclusively for developers of graphical frontends for mpg321.
--stereo
Play in stereo. If audio is mono, send two identical streams as stereo output.
--aggressive
Aggressive mode takes a higher priority in the system if possible. It requires root access because it can preempt processes owned by other users.
--skip-printing-frames=n
Save CPU cycles by displaying a status update only once every n frames. This option is not available in mpg123.