Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
mpg123-oss(1)
Edit
PageHistory
Diff
Info
LikePages
mpg123 !!!mpg123 NAME SYNOPSIS DESCRIPTION OPTIONS OPERANDS HTTP SUPPORT INTERRUPT SEE ALSO NOTES BUGS AUTHORS ---- !!NAME mpg123 - play audio MPEG 1.0/2.0 file (layers 1, 2 and 3) !!SYNOPSIS __mpg123__ [[ __-tscvqy01m24wEC__ ] [[ __-b__ ''size'' ] [[ __-k__ ''num'' ] [[ __-n__ ''num'' ] [[ __-f__ ''factor'' ] [[ __-r__ ''rate'' ] [[ __-g__ ''gain'' ] [[ __-a__ ''dev'' ] [[ __-o s__ | __-o h__ | __-o l__ ] [[ __-d__ ''n'' ] [[ __-h__ ''n'' ] [[ __-w__ ''file'' ] [[ __-p__ ''proxy'' ] [[ __-@__ ''file'' ] ''file'' ... | ''URL'' ... | __-__ !!DESCRIPTION __mpg123__ reads one or more ''file''s (or standard input if ``-'' is specified) or ''URL''s and plays them on the audio device (default) or outputs them to stdout. ''file''/''URL'' is assumed to be an MPEG-1/2 audio bit stream. !!OPTIONS __mpg123__ options may be either the traditional POSIX one letter options, or the GNU style long options. POSIX style options start with a single ``-'', while GNU long options start with ``--''. __-t__, __--test__ Test mode. The audio stream is decoded, but no output occurs. __-s__, __--stdout__ The decoded audio samples are written to standard output, instead of playing them through the audio device. This option must be used if your audio hardware is not supported by __mpg123__. The output format is raw (headerless) linear PCM audio data, 16 bit, stereo, host byte order. __-c__, __--check__ Check for filter range violations, and report them for each frame if any occur. __-C__, __--control__ Enable control keys. By default use 's' to stop, 'p' to pause, 'f' to jump forward to the next song, 'b' to jump back to the beginning of the song, ',' to rewind, '.' to fast forward, and 'q' to quit. __-v__, __--verbose__ Increase the verbosity level. For example, displays the frame numbers during decoding. __-q__, __--quiet__ Quiet. Suppress diagnostic messages. __-y__, __--resync__ Try to resync and continue decoding if an error occurs in the input file. Also try to recover from certain broken headers. Useful if you have a broken MPEG file, on which __mpg123__ normally gives up saying `Illegal header'. Be careful: Broken locations in MPEG files might cause sharp, loud pops or clicks, which might damage your speakers if played too loud. __-0__, __--single0__; __-1__, __--single1__ Decode only channel 0 (left) or channel 1 (right), respectively. These options are available for stereo MPEG streams only. __-m__, __--singlemix__ Mix both channels. This option is available for stereo MPEG layer-3 streams only. It takes less CPU time than full stereo decoding. __-2__, __--2to1__; __-4__, __--4to1__ Performs a downsampling of ratio 2:1 (22 kHz) or 4:1 (11 kHz) on the output stream, respectively. Saves some CPU cycles, but at least the 4:1 ratio sounds ugly. __-b__ ''size'', __--buffer__ ''size'' Use an audio output buffer of ''size'' Kbytes. This is useful to bypass short periods of heavy system activity, which would normally cause the audio output to be interrupted. You should specify a buffer size of at least 1024 (i.e. 1 Mb, which equals about 6 seconds of audio data) or more; less than about 300 does not make much sense. The default is 0, which turns buffering off. __-k__ ''num'', __--skip__ ''num'' Skip first ''num'' frames. By default the decoding starts at the first frame. __-n__ ''num'', __--frames__ ''num'' Decode only ''num'' frames. By default the complete stream is decoded. __-f__ ''factor'', __--scale__ ''factor'' Change scale factor (default: 32768). __-r__ ''rate'', __--rate__ ''rate'' Set sample rate (default: automatic). You may want to change this if you need a constant bitrate independed of the mpeg stream rate. mpg123 automagically converts the rate. You should then combine this with --stereo or --mono. __-g__ ''gain'', __--gain__ ''gain'' Set audio hardware output gain (default: don't change). __-a__ ''dev'', __--audiodevice__ ''dev'' Specify the audio device to use. The default is system-dependent (usually /dev/audio or /dev/dsp). Use this option if you have multiple audio devices and the default is not what you want. __-o s__, __--speaker__ Direct audio output to the speaker. __-o h__, __--headphones__ Direct audio output to the headphone connector. __-o l__, __--lineout__ Direct audio output to the line-out connector. __-d__ ''n'', __--doublespeed__ ''n'' Only play every ''n'''th frame. This will cause the MPEG stream to be played ''n'' times faster, which can be used for special effects. Can also be combined with the __--halfspeed__ option to play 3 out of 4 frames etc. Don't expect great sound quality when using this option. __-h__ ''n'', __--halfspeed__ ''n'' Play each frame ''n'' times. This will cause the MPEG stream to be played at ''1''/''n'''th speed (n times slower), which can be used for special effects. Can also be combined with the __--doublespeed__ option to double every third frame or things like that. Don't expect great sound quality when using this option. __-w__ ''file'', __--wav__ Write output as WAV file. This will cause the MPEG stream to be decoded and saved as file ''file'' , or standard output if ''-'' is used as file name. You can also use ''--au'' and ''--cdr'' for AU and CDR format, respectively. __-p__ ''URL'' | __none__, __--proxy__ ''URL'' | __none__ The specified ''proxy'' will be used for HTTP requests. It should be specified as full URL (``http://host.domain:port/''), but the ``http://'' prefix, the port number and the trailing slash are optional (the default port is 80). Specifying __none__ means not to use any proxy, and to retrieve files directly from the respective servers. See also the ``HTTP SUPPORT'' section. __-u__ ''auth'', __--auth__ ''auth'' HTTP authentication to use when recieving files via HTTP. The format used is user:password. __-@__ ''file'', __--list__ ''file'' Read filenames and/or URLs of MPEG audio streams from the specified ''file'' in addition to the ones specified on the command line (if any). Note that ''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 __-@__ option can be used (if more than one is specified, only the last one will be recognized). __--au__ ''file'' Does not play the MPEG file but writes it to ''file'' in SUN audio format. If - is used as the filename, the AU file is written to stdout. __--cdr__ ''file'' Does not play the MPEG file but writes it to ''file'' as a CDR file. If - is used as the filename, the CDR file is written to stdout. __-z__, __--shuffle__ Shuffle play. Randomly shuffles the order of files specified on the command line, or in the list file. __-Z__, __--random__ Continuous random play. Keeps picking a random file from the command line or the play list. Unlike shuffle play above, random play never ends, and plays individual songs more than once. __--stereo__ Force stereo output __--reopen__ Forces reopen of the audiodevice after ever song __--8bit__ Forces 8bit output __-E__ ''file'', __--equalizer__ Enables equalization, taken from ''file'' __-T__, __--realtime__ Tries to gain realtime priority. This option usually requires root privileges to have any effect. __--aggressive__ Tries to get higher priority __--title__ In an xterm, or rxvt, change the window's title to the name of song currently playing. __--help, --longhelp__ Shows usage instructions !!OPERANDS The following operands are supported: ''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 ''URL'' (see next section). !!HTTP SUPPORT In addition to reading MPEG audio streams from ordinary files and from the standard input, __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, __mpg123__ attempts to open an HTTP connection to the server in order to retrieve that file to decode and play it. It is often useful to retrieve files through a WWW cache or so-called proxy. To accomplish this, __mpg123__ examines the environment for variables named __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 __-p__ command line option (see the ``OPTIONS'' section). Specifying __-p none__ will enforce contacting the server directly without using any proxy, even if one of the above environment variables is set. 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__ 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 lynx(1)) and then play them from there. If authentication is needed to access the file it can be specified with the __-u user:pass__. !!INTERRUPT You can abort __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). 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. !!SEE ALSO lynx(1), sox(1), intro(1) !!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 __-singlemix__ option to decode mono only, which reduces the CPU load somewhat for layer-3 streams. See also the __-2__ and __-4__ options. If everything else fails, use the __-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 sox(1) to convert the output to an audio format suitable for your audio player. Also note that __mpg123__ always generates 16 bit stereo data (if one of the __-single__* options is used, two identical stereo channels are generated). If your hardware requires some other format, for example 8 bit mono, you also have to use a converter such as sox(1). If your system is generally fast enough to decode in realtime, but there are sometimes periods of heavy system load (such as cronjobs, users logging in remotely, starting of ``big'' programs etc.) causing the audio output to be interrupted, then you should use the __-b__ option to use a buffer of at least 1000 Kbytes. !!BUGS Known bugs and limitations: MPEG-2, Layer 1 and 2 not tested. May not work. (Layer 3 should work.) Free format streams are not supported. Layer-1 support is not heavily tested. No CRC error checking is performed. There is currently no support for audio hardware on DEC Digital Unix, Ultrix and IBM AIX, therefore the __-s__ option has to be used on those platforms. !!AUTHORS Main author: Michael Hipp Uses code (or at least ideas) from: MPEG Software Simulation Group (Base package) Philipp Knirsch Tobias Bading Jeff Tsay Thomas Woerner (SGI Audio) Damien Clermonte Oliver Fromme Internet references: http://www.mpg123.org ----
One page links to
mpg123-oss(1)
:
Man1m
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.