LinuxDevCenter.com
oreilly.comSafari Books Online.Conferences.

advertisement


Linux in a Nutshell

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.

Buy it now, or read it online on Safari Bookshelf.



mpg321

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.

Options

-o devicetype

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).

-a device, --audiodevice device

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).

-g n, --gain n

Set the volume (gain) to an integer between 1 and 100.

-k n, --skip n

Do not play the first n frames of the file or stream.

-n n, --frames n

Play only the first n frames of the file or stream.

-@ filename, --list filename

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.

-w filename, --wav filename

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.

--cdr filename

Write to a CDR file. Choosing - as the filename sends the data to stdout.

--au filename

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.

--help, --longhelp

Display usage information and exit.

-V, --version

Display the version of mpg321 and exit.


Linux Resources
  • Linux Online
  • The Linux FAQ
  • linux.java.net
  • Linux Kernel Archives
  • Kernel Traffic
  • DistroWatch.com


  • Sponsored by: