mad123(1)

NAME
mad123 - play MPEG audio files

SYNOPSIS
mad123 [-cq] [-b size] [-f device] [-p playlistfile] [file ...]

DESCRIPTION
mad123 is a command line MPEG audio files player using Robert Leslie's “libmad” fixed-point MP3 decoder library. mad123 is not meant to be a serious replacement for the ubiquitous mpg123(1) program. Instead, it is merely an experiment in using libmad.

At the time mad123 was written, a couple of things set it apart from the command line player supplied with libmad, madplay(1):

-   Support for URL style pathnames.

-   The audio output is double-buffered (currently about 10 seconds worth at 44100Hz sample rate). This means mad123 is much less susceptible to network/CPU loading compared to madplay(1).

-   An intelligent `read-ahead' algorithm can be used to pre-buffer large chunks of the input MPEG audio stream.

-   Simple keyboard controls.

-   Ctrl-C behaves like it does for mpg123(1).

-   mad123 can be installed setuid-root (don't worry, it drops privs very early on) so that it can adjust the scheduling priorities of its two (sometimes three) processes to be even less susceptible to jitter. (The third process is used when the MP3 stream is being read from an URL).

OPTIONS
The following options are available:

-b size
    Allocate a size bytes buffer which will be used to read-ahead large chunks of the file at a time. The file will be played even when only a small amount of data has been read in, but when the buffer fills, no more data will be read until the buffer has drained to 'nearly' empty. This behaviour is useful when playing files over a congested network or when you'd like to spin down a laptop drive for as long as possible.

-c  Enable keyboard controls. Currently, the following keys are recognised:

    n   Skip to the next track.
    b   Skip to the previous track.
    r   Rewind to the start of the current track.
    p   Pause.
    q   Quit.

-f device
    Set the audio device to be device. The default is /dev/sound. You can also specify which of the supported audio backends to use by pre-pending the device with its name followed by a colon. For example: sun:/dev/sound selects the default Sun-compatible backend, and pcm:foo.raw write raw PCM samples to the file named foo.raw. pcm:- causes raw PCM samples to be written to standard output.

    In addition to the Sun backend, mad123 also supports an Analog Real-Time Synthesizer (aRts) backend. This is particularly useful when running mad123 under KDE3, for example. To use the aRts backend, use the following audio device: arts:mad123. The text following the colon is passed directly to aRts, and will show up in aRts Control's Audio Manager status display. Note: support for aRts is experimental, and is not compiled in by default.

-p playlistfile
    Use the contents of playlistfile to specify the list of mp3 files to be played. Mp3 files specified on the command line are ignored if this option is present.

-q  Be quiet.

EXAMPLES
Play all MP3 files from the current directory, enable keyboard controls and set the read-ahead buffer to 2 MB:

    mad123 -c -b 0x200000 *.mp3

Play an MP3 stream from an URL, set the read-ahead buffer to 512 kB, be quiet:

    mad123 -q -b 0x80000 http://a.server/mp3s/thrash.mp3

NOTES
A read-ahead buffer smaller than 100 kB is ineffective.

Using the aRts backend renders the PCM output buffer more or less redundant, So don't expect perfect jitter-free playback.

SEE ALSO
madplay(1), mpg123(1)

AUTHORS
The mad123 program was written by Steve Woodford <mad123@mctavish.co.uk>. This manual page was written by Lubomir Sedlacik <salo@NetBSD.org>.

BUGS
There are very few command line options.
Many more buffer parameters should be tweakable on the command line.
Only the Artist and Title ID3 tags are shown, if available.