55
18
outputs them to stdout.
57
20
is assumed to be an MPEG-1/2 audio bit stream.
22
The following operands are supported:
25
The path name(s) of one or more input files. They must be
26
valid MPEG-1/2 audio layer-1, -2 or -3 bit streams.
27
If a dash ``\-'' is specified, MPEG data will
28
be read from the standard input. Furthermore, any name
29
starting with ``http://'' is recognized as
60
34
options may be either the traditional POSIX one letter options,
61
35
or the GNU style long options. POSIX style options start with a
62
36
single ``\-'', while GNU long options start with ``\-\^\-''.
64
.BR \-t ", " \-\^\-test
65
Test mode. The audio stream is decoded, but no output occurs.
37
Option arguments (if needed) follow separated by whitespace (not ``='').
40
\fB\-k \fInum\fR, \fB\-\^\-skip \fInum
43
frames. By default the decoding starts at the first frame.
45
\fB\-n \fInum\fR, \fB\-\^\-frames \fInum
48
frames. By default the complete stream is decoded.
50
.BR \-y ", " \-\^\-resync
51
Do NOT try to resync and continuing decoding if an error occurs in
52
the input file. Normally,
54
tries top keep the playback alive at all costs, including skipping invalid material and searching new header when something goes wrong.
55
With this switch you can make it bail out on data errors
56
(and perhaps spare your ears a bad time). Note that this switch may either disappear
57
in future or its meaning be revised since it now does the opposite of what it
60
\fB\-p \fIURL \fR| \fBnone\fR, \fB\-\^\-proxy \fIURL \fR| \fBnone
63
will be used for HTTP requests. It
64
should be specified as full URL (``http://host.domain:port/''),
65
but the ``http://'' prefix, the port number and the trailing
66
slash are optional (the default port is 80). Specifying
68
means not to use any proxy, and to retrieve files directly
69
from the respective servers. See also the
70
``HTTP SUPPORT'' section.
72
\fB\-u \fIauth\fR, \fB\-\^\-auth \fIauth
73
HTTP authentication to use when recieving files via HTTP.
74
The format used is user:password.
76
\fB\-@ \fIfile\fR, \fB\-\^\-list \fIfile
77
Read filenames and/or URLs of MPEG audio streams from the specified
79
in addition to the ones specified on the command line (if any).
82
can be either an ordinary file, a dash ``\-'' to indicate that
83
a list of filenames/URLs is to be read from the standard input,
84
or an URL pointing to a an appropriate list file. Note: only
87
option can be used (if more than one is specified, only the
88
last one will be recognized).
90
\fB\-l \fIn\fR, \fB\-\^\-listentry \fIn
91
Of the playlist, play specified entry only.
93
is the number of entry starting at 1. A value of 0 is the default and means playling the whole list, a negative value means showing of the list of titles with their numbers...
95
.BR \-z ", " \-\^\-shuffle
96
Shuffle play. Randomly shuffles the order of files specified on the command
97
line, or in the list file.
99
.BR \-Z ", " \-\-random
100
Continuous random play. Keeps picking a random file from the command line
101
or the play list. Unlike shuffle play above, random play never ends, and
102
plays individual songs more than once.
104
.SH OUTPUT and PROCESSING OPTIONS
106
\fB\-a \fIdev\fR, \fB\-\^\-audiodevice \fIdev
107
Specify the audio device to use. The default is
108
system-dependent (usually /dev/audio or /dev/dsp).
109
Use this option if you have multiple audio devices and
110
the default is not what you want.
67
112
.BR \-s ", " \-\^\-stdout
68
113
The decoded audio samples are written to standard output,
70
115
option must be used if your audio hardware is not supported
73
The output format is raw (headerless) linear PCM audio data,
74
16 bit, stereo, host byte order.
76
.BR \-c ", " \-\^\-check
77
Check for filter range violations, and report them for each frame
80
.BR \-v ", " \-\^\-verbose
81
Increase the verbosity level. For example, displays the frame
82
numbers during decoding.
84
.BR \-q ", " \-\^\-quiet
85
Quiet. Suppress diagnostic messages.
87
.BR \-y ", " \-\^\-resync
88
Try to resync and continue decoding if an error occurs in
89
the input file. Also try to recover from certain broken
90
headers. Useful if you have a broken MPEG file, on which
92
normally gives up saying `Illegal header'. Be careful:
93
Broken locations in MPEG files might cause sharp, loud pops or
94
clicks, which might damage your speakers if played too loud.
118
The output format per default is raw (headerless) linear PCM audio data,
119
16 bit, stereo, host byte order (you can force mono or 8bit).
121
\fB\-w \fIfile\fR, \fB\-\^\-wav
122
Write output as WAV file. This will cause the MPEG stream to be decoded
125
, or standard output if
127
is used as file name. You can also use
131
for AU and CDR format, respectively.
134
Does not play the MPEG file but writes it to
136
in SUN audio format. If \- is used as the filename, the AU file is
140
Does not play the MPEG file but writes it to
142
as a CDR file. If \- is used as the filename, the CDR file is written
146
Forces reopen of the audiodevice after ever song
148
\fB\-g \fIgain\fR, \fB\-\^\-gain \fIgain
149
Set audio hardware output gain (default: don't change).
151
\fB\-f \fIfactor\fR, \fB\-\^\-scale \fIfactor
152
Change scale factor (default: 32768).
154
.BR \-\-rva-mix, \-\-rva-radio
155
Enable RVA (relative volume adjustment) using the values stored for ReplayGain radio mode / mix mode with all tracks roughly equal loudness.
156
The first valid information found in ID3V2 Tags (Comment named RVA or the RVA2 frame) or ReplayGain header in Lame/Info Tag is used.
158
.BR \-\-rva-album, \-\-rva-audiophile
159
Enable RVA (relative volume adjustment) using the values stored for ReplayGain audiophile mode / album mode with usually the effect of adjusting album loudness but keeping relative loudness inside album.
160
The first valid information found in ID3V2 Tags (Comment named RVA_ALBUM or the RVA2 frame) or ReplayGain header in Lame/Info Tag is used.
96
162
.BR \-0 ", " \-\^\-single0 "; " \-1 ", " \-\^\-single1
97
163
Decode only channel 0 (left) or channel 1 (right),
98
164
respectively. These options are available for
99
165
stereo MPEG streams only.
101
.BR \-m ", " \-\^\-singlemix
102
Mix both channels. This option is available for
103
stereo MPEG layer-3 streams only. It takes less
167
.BR \-m ", " \-\^\-mono ", " \-\^\-mix ", " \-\^\-singlemix
168
Mix both channels / decode mono. It takes less
104
169
CPU time than full stereo decoding.
106
.BR \-2 ", " \-\^\-2to1 "; " \-4 ", " \-\^\-4to1
107
Performs a downsampling of ratio 2:1 (22 kHz) or 4:1 (11 kHz)
108
on the output stream, respectively. Saves some CPU cycles, but
109
at least the 4:1 ratio sounds ugly.
111
\fB\-b \fIsize\fR, \fB\-\^\-buffer \fIsize
112
Use an audio output buffer of
114
Kbytes. This is useful to bypass short periods of heavy
115
system activity, which would normally cause the audio output
117
You should specify a buffer size of at least 1024
118
(i.e. 1 Mb, which equals about 6 seconds of audio data) or more;
119
less than about 300 does not make much sense. The default is 0,
120
which turns buffering off.
122
\fB\-k \fInum\fR, \fB\-\^\-skip \fInum
125
frames. By default the decoding starts at the first frame.
127
\fB\-n \fInum\fR, \fB\-\^\-frames \fInum
130
frames. By default the complete stream is decoded.
132
\fB\-f \fIfactor\fR, \fB\-\^\-scale \fIfactor
133
Change scale factor (default: 32768).
135
174
\fB\-r \fIrate\fR, \fB\-\^\-rate \fIrate
136
175
Set sample rate (default: automatic). You may want to
137
176
change this if you need a constant bitrate independed of
138
177
the mpeg stream rate. mpg123 automagically converts the
139
178
rate. You should then combine this with \-\-stereo or \-\-mono.
142
\fB\-g \fIgain\fR, \fB\-\^\-gain \fIgain
143
Set audio hardware output gain (default: don't change).
145
\fB\-a \fIdev\fR, \fB\-\^\-audiodevice \fIdev
146
Specify the audio device to use. The default is
147
system-dependent (usually /dev/audio or /dev/dsp).
148
Use this option if you have multiple audio devices and
149
the default is not what you want.
151
.BR "\-o s" ", " \-\^\-speaker
152
Direct audio output to the speaker.
154
.BR "\-o h" ", " \-\^\-headphones
155
Direct audio output to the headphone connector.
157
.BR "\-o l" ", " \-\^\-lineout
158
Direct audio output to the line-out connector.
180
.BR \-2 ", " \-\^\-2to1 "; " \-4 ", " \-\^\-4to1
181
Performs a downsampling of ratio 2:1 (22 kHz) or 4:1 (11 kHz)
182
on the output stream, respectively. Saves some CPU cycles, but
183
at least the 4:1 ratio sounds ugly.
160
188
\fB\-d \fIn\fR, \fB\-\^\-doublespeed \fIn
181
209
option to double every third frame or things like that.
182
210
Don't expect great sound quality when using this option.
184
\fB\-p \fIURL \fR| \fBnone\fR, \fB\-\^\-proxy \fIURL \fR| \fBnone
187
will be used for HTTP requests. It
188
should be specified as full URL (``http://host.domain:port/''),
189
but the ``http://'' prefix, the port number and the trailing
190
slash are optional (the default port is 80). Specifying
192
means not to use any proxy, and to retrieve files directly
193
from the respective servers. See also the
194
``HTTP SUPPORT'' section.
196
\fB\-u \fIauth\fR, \fB\-\^\-auth \fIauth
197
HTTP authentication to use when recieving files via HTTP.
198
The format used is user:password.
200
\fB\-@ \fIfile\fR, \fB\-\^\-list \fIfile
201
Read filenames and/or URLs of MPEG audio streams from the specified
203
in addition to the ones specified on the command line (if any).
206
can be either an ordinary file, a dash ``\-'' to indicate that
207
a list of filenames/URLs is to be read from the standard input,
208
or an URL pointing to a an appropriate list file. Note: only
211
option can be used (if more than one is specified, only the
212
last one will be recognized).
214
.BR \-z ", " \-\^\-shuffle
215
Shuffle play. Randomly shuffles the files specified on the command line
216
and in the list file.
222
Forces reopen of the audiodevice after ever song
227
.BR \-Z ", " \-\-random
230
The following operands are supported:
233
The path name(s) of one or more input files. They must be
234
valid MPEG-1/2 audio layer-1, -2 or -3 bit streams.
235
If a dash ``\-'' is specified, MPEG data will
236
be read from the standard input. Furthermore, any name
237
starting with ``http://'' is recognized as
212
\fB\-E \fIfile\fR, \fB\-\^\-equalizer
213
Enables equalization, taken from
215
The file needs to contain 32 lines of data, additional comment lines may
218
Each data line consists of two floating-point entries, separated by
219
whitespace. They specify the multipliers for left and right channel of
220
a certain frequency band, respectively. The first line corresponds to the
221
lowest, the 32nd to the highest frequency band.
222
Note that you can control the equalizer interactively with the generic control interface.
224
.BR "\-o h" ", " \-\^\-headphones
225
Direct audio output to the headphone connector (some hardware only; AIX, HP, SUN).
227
.BR "\-o s" ", " \-\^\-speaker
228
Direct audio output to the speaker (some hardware only; AIX, HP, SUN).
230
.BR "\-o l" ", " \-\^\-lineout
231
Direct audio output to the line-out connector (some hardware only; AIX, HP, SUN).
233
\fB\-b \fIsize\fR, \fB\-\^\-buffer \fIsize
234
Use an audio output buffer of
236
Kbytes. This is useful to bypass short periods of heavy
237
system activity, which would normally cause the audio output
239
You should specify a buffer size of at least 1024
240
(i.e. 1 Mb, which equals about 6 seconds of audio data) or more;
241
less than about 300 does not make much sense. The default is 0,
242
which turns buffering off.
247
.BR \-t ", " \-\^\-test
248
Test mode. The audio stream is decoded, but no output occurs.
250
.BR \-c ", " \-\^\-check
251
Check for filter range violations (clipping), and report them for each frame
254
.BR \-v ", " \-\^\-verbose
255
Increase the verbosity level. For example, displays the frame
256
numbers during decoding.
258
.BR \-q ", " \-\^\-quiet
259
Quiet. Suppress diagnostic messages.
261
.BR \-C ", " \-\^\-control
262
Enable terminal control keys. By default use 's' to stop, 'p' to
263
pause, 'f' to jump forward to the next song, 'b' to jump back to the
264
beginning of the song, ',' to rewind, '.' to fast forward, and 'q' to quit.
267
In an xterm, or rxvt (compatible, TERM environment variable is examined), change the window's title to the name of song currently
270
.BR \-R ", " \-\^\-remote
271
Activate generic control interface.
273
will then read and execute commands from stdin. Basic usage is ``load <filename> '' to play some file and the obvious ``pause'', ``command.
274
``jump <frame>'' will jump/seek to a given point (MPEG frame number).
275
Issue ``help'' to get a full list of commands and syntax.
277
.BR \-\^\-remote\-err
278
Print responses for generic control mode to stderr, not stdout.
279
That is extremely useful when you want to grab the audio via
281
... (in future, that may be automatically triggered when you specify
286
Tries to get higher priority
288
.BR \-T ", " \-\-realtime
289
Tries to gain realtime priority. This option usually requires root
290
privileges to have any effect.
292
.BR \-? ", " \-\^\-help
293
Shows short usage instructions.
296
Shows long usage instructions.
299
Print the version string.
241
301
In addition to reading MPEG audio streams from ordinary
242
302
files and from the standard input,
244
304
supports retrieval of MPEG audio files via the HTTP protocol,
245
305
which is used in the World Wide Web (WWW). Such files are
246
specified using a so-called URL (universal resource
247
location), which starts with ``http://''. When a file with
306
specified using a so-called URL, which starts with ``http://''. When a file with
248
307
that prefix is encountered,
250
309
attempts to open an HTTP connection to the server in order to
276
335
connection is generally not fast enough to retrieve MPEG
277
336
audio files in realtime, you can first download the files
278
337
to your local harddisk (e.g. using
280
339
and then play them from there.
282
341
If authentication is needed to access the file it can be
283
342
specified with the
284
343
.BR "\-u user:pass".
345
When in terminal control mode, you can quit via pressing the q key,
346
while any time you can abort
288
at any time by pressing Ctrl-C. If you are playing multiple
289
files, this will stop the current file and begin playing the
290
next one. If you want to abort playing immediately instead
291
of skipping to the next file, press Ctrl-C twice in short
292
succession (within about one second).
348
by pressing Ctrl-C. If not in terminal control mode, this will
349
skip to the next file (if any). If you want to abort playing immediately
350
in that case, press Ctrl-C twice in short succession (within about one second).
294
Note that the result of pressing Ctrl-C might not be audible
352
Note that the result of quitting
354
pressing Ctrl-C might not be audible
295
355
immediately, due to audio data buffering in the audio device.
296
356
This delay is system dependent, but it is usually not more
297
357
than one or two seconds.
303
362
MPEG audio decoding requires a good deal of CPU performance,
304
363
especially layer-3. To decode it in realtime, you should
305
364
have at least a Pentium, Alpha, SuperSparc or equivalent
306
365
processor. You can also use the
308
367
option to decode mono only, which reduces the CPU load
309
368
somewhat for layer-3 streams. See also the
310
369
.BR \-2 " and " \-4
336
385
audio output to be interrupted, then you should use
339
option to use a buffer of at least 1000 Kbytes.
388
option to use a buffer of reasonable size (at least 1000 Kbytes).
342
Known bugs and limitations:
344
MPEG-2, Layer 1 and 2 not tested. May not work. (Layer 3 should work.)
346
Free format streams are not supported.
348
Layer-1 support is not heavily tested.
391
MPEG-2.5 could be supported with some work but is highly untested and disabled in the source code (MPEG-2.5 frames are detected and skipped).
393
Mostly MPEG-1 layer 2 and 3 are tested in real life, other variants may be buggy.
394
Please report any issues and provide test files to help fixing them.
396
Free format streams are not supported, but they could be (there is some code).
350
398
No CRC error checking is performed.
352
There is currently no support for audio hardware on
353
DEC Digital Unix, Ultrix and IBM AIX, therefore the
355
option has to be used on those platforms.
400
Some platforms lack audio hardware support; you may be able to use the
402
switch to feed the decoded data to a program that can play it on your audio device.
403
Notably, this includes Tru64 with MME, but you should be able to install and use OSS there (it perhaps will perform better as MME would anyway).
408
Thomas Orgis <maintainer@mpg123.org>, <thomas@orgis.org>
360
Michael Hipp <hippm@informatik.uni-tuebingen.de>
362
Uses code (or at least ideas) from:
364
MPEG Software Simulation Group (Base package)
366
Philipp Knirsch <phil@mpik-tueb.mpg.de> (DCT36/manual unroll)
368
Tobias Bading <bading@cs.tu-berlin.de> (subband synthesis)
370
Jeff Tsay <ctsay@pasteur.eecs.berkeley.edu> (DCT36)
372
Thomas Woerner (SGI Audio)
374
Damien Clermonte <clermond@esiee.fr> (HP-UX audio fixes)
376
Oliver Fromme <oliver.fromme@heim3.tu-clausthal.de>
380
http://www.sfs.nphil.uni-tuebingen.de/~hipp/mpg123.html
382
http://www.heim3.tu-clausthal.de/~olli/mpg123/
384
(includes information about the mpg123 mailing list)
386
The latest version is also available from here:
388
ftp.tu-clausthal.de:/pub/unix/audio/mpg123
390
http://ftp.tu-clausthal.de/pub/unix/audio/mpg123
416
Uses code or ideas from various people, see the AUTHORS file accompanying the source code.
420
is licensed under the GNU Lesser/Library General Public License, LGPL, version 2.1 . There is in fact only one source code file being exclusivly under GPL version 2, not LGPL: the old alsa output driver that most likely is not even compiled into your binary.
422
http://www.mpg123.org
424
http://sourceforge.net/projects/mpg123