Audio-Play-MPG123

 view release on metacpan or  search on metacpan

mpg123/mpg123.1  view on Meta::CPAN

in addition to the ones specified on the command line (if any).
Note that
.I file
can be either an ordinary file, a dash ``\-'' to indicate that
a list of filenames/URLs is to be read from the standard input,
or an URL pointing to a an appropriate list file.  Note: only
one
.B \-@
option can be used (if more than one is specified, only the
last one will be recognized).
.TP
.BR \-z ", " \-\^\-shuffle
Shuffle play.  Randomly shuffles the files specified on the command line
and in the list file.
.TP
.BR \-\-stereo
Force stereo output
.TP
.BR \-\-reopen
Forces reopen of the audiodevice after ever song
.TP
.BR \-\-8bit
Forces 8bit output
.TP
.BR \-w ", " \-\-wav " " \fIfile
Write the song using the WAV format to the specified
.I file 
Instead of a real filename you can use a dash ``\-'' to indicate that
the data is to be written to standard out.
.TP
.BR \-Z ", " \-\-random
Full random play
.SH OPERANDS
The following operands are supported:
.TP 8
.IR file (s)
The path name(s) of one or more input files.  They must be
valid MPEG-1/2 audio layer-1, -2 or -3 bit streams.
If a dash ``\-'' is specified, MPEG data will
be read from the standard input.  Furthermore, any name
starting with ``http://'' is recognized as
.I URL
(see next section).
.SH HTTP SUPPORT
In addition to reading MPEG audio streams from ordinary
files and from the standard input,
.B mpg123
supports retrieval of MPEG audio files via the HTTP protocol, 
which is used in the World Wide Web (WWW).  Such files are
specified using a so-called URL (universal resource
location), which starts with ``http://''.  When a file with
that prefix is encountered,
.B mpg123
attempts to open an HTTP connection to the server in order to
retrieve that file to decode and play it.
.P
It is often useful to retrieve files through a WWW cache or
so-called proxy.  To accomplish this,
.B mpg123
examines the environment for variables named
.BR MP3_HTTP_PROXY ", " http_proxy " and " HTTP_PROXY ,
in this order.  The value of the first one that is set will
be used as proxy specification.  To override this, you can
use the
.B \-p
command line option (see the ``OPTIONS'' section).  Specifying
.B "\-p none"
will enforce contacting the server directly without using
any proxy, even if one of the above environment variables
is set.
.P
Note that, in order to play MPEG audio files from a WWW
server, it is necessary that the connection to that server
is fast enough.  For example, a 128 kbit/s MPEG file
requires the network connection to be at least 128 kbit/s
(16 kbyte/s) plus protocol overhead.  If you suffer from
short network outages, you should try the
.B \-b
option (buffer) to bypass such outages.  If your network
connection is generally not fast enough to retrieve MPEG
audio files in realtime, you can first download the files
to your local harddisk (e.g. using
.BR lynx (1))
and then play them from there.
.P
If authentication is needed to access the file it can be
specified with the 
.BR "\-u user:pass".
.SH INTERRUPT
You can abort
.B mpg123
at any time by pressing Ctrl-C.  If you are playing multiple
files, this will stop the current file and begin playing the
next one.  If you want to abort playing immediately instead
of skipping to the next file, press Ctrl-C twice in short
succession (within about one second).
.P
Note that the result of pressing Ctrl-C might not be audible
immediately, due to audio data buffering in the audio device.
This delay is system dependent, but it is usually not more
than one or two seconds.
.SH "SEE ALSO"
.BR lynx (1),
.BR sox (1),
.BR intro (1)
.SH NOTES
MPEG audio decoding requires a good deal of CPU performance,
especially layer-3.  To decode it in realtime, you should
have at least a Pentium, Alpha, SuperSparc or equivalent
processor.  You can also use the
.B -singlemix
option to decode mono only, which reduces the CPU load
somewhat for layer-3 streams.  See also the
.BR \-2 " and " \-4
options.
.P
If everything else fails, use the
.B \-s
option to decode to standard output, direct it into a file
and then use an appropriate utility to play that file.
You might have to use a tool such as



( run in 1.144 second using v1.01-cache-2.11-cpan-ff9377addf4 )