1
**********************************************************************
2
* MPEG 1.0/2.0 _AUDIO_ PLAYER, V0.59n *
4
* (full?) MPEG 1.0/2.0, Layer 1,2 and 3 support *
5
* Layer-3 realtime only with a 'fast' machine *
6
* Since April 97, 128kbit j-stereo should work on a 486DX4-120. *
7
* With 2:1 down-sampling or using the downmix-mode even a 486DX2-66 *
8
* should play such a stream in realtime! *
10
* I still claim to have the fastest MPEG Audio Player for UNIX ;) *
11
**********************************************************************
13
Please read first the important information in the COPYING file.
16
Michael Hipp (email: hippm@informatik.uni-tuebingen.de)
17
Oliver Fromme <oliver.fromme@heim3.tu-clausthal.de>
18
(several enhancements, man pages, Makefile, FreeBSD port, License, etc.)
20
Uses code (or at least ideas) from:
21
MPEG Software Simulation Group: reference decoder package
22
Tobias Bading: idea for DCT64 in subband synthesis from maplay package
23
Jeff Tsay and Mikko Tommila: MDCT36 from maplay package
24
Philipp Knirsch <phil@mpik-tueb.mpg.de>: DCT36/manual unroll idea
25
Thomas Woerner <..> (SGI Audio)
26
Damien Clermonte <..> (HP-UX audio fixes)
27
Niclas Lindstrom <nil@wineasy.se>: OS2 port
28
Stefan Bieschewski <stb@acm.org>: Pentium optimizations, decode_i586.s
29
Martin Denn <mdenn@unix-ag.uni-kl.de>: NAS port
30
Niklas Beisert <nbeisert@physik.tu-muenchen.de> MPEG 2.5 tables
31
<mycroft@NetBSD.ORG> and <augustss@cs.chalmers.se>: NetBSD
32
Kevin Brintnall <kbrint@visi.com> BSD patch
33
Tony Million: win32 port
34
Steven Tiger Lang: advanced shuffle
35
Henrik P Johnson: HTTP auth patch
36
Eric B. Mitchell: esd port
37
Ryan R. Prosser <prosser@geocities.com> esd port for Solaris
38
Daniel Kobras <daniel.kobras@student.uni-tuebingen.de>: lot of (DK)-bugfixes
41
current distribution site for new test versions is:
42
http://www-ti.informatik.uni-tuebingen.de/~hippm/mpg123.html
44
here's Oliver Fromme's mpg123 page:
46
(includes information about the mpg123 mailing list)
48
and you can get the latest release from here:
49
ftp.tu-clausthal.de:/pub/unix/audio/mpg123
50
http://ftp.tu-clausthal.de/pub/unix/audio/mpg123
52
------------------------------------------------------------------------
54
This version plays a layer3,112Kbit/s,J-Stereo stream on my AMD 5x86/133Mhz
55
with about 66% CPU load. (on the console, NO X11)
56
If your machine isn't fast enough you may try the downsampling
57
feature (--2to1 and --4to1 options)
58
Playing in '--singlemix' (stero reduced to mono) also saves some
59
CPU cycles, though the whole code is optimized for 'full' stereo playing.
61
'Benchmarks': (+/- 2%)
62
----------------------
63
(AMD 486/133MHZ,ASUS SP3G,256KB cache,DIRTY-TAG installed,(BusLogic SCSI))
64
(Layer3, 112Kbit/s, Joint-Stereo stream (partially MS stereo, no I-stereo))
65
(Compiled with: -DI386_ASSEM -DREAL_IS_FLOAT -DLINUX -Wall -O2 -m486
66
-fomit-frame-pointer -funroll-all-loops -finline-functions -ffast-math)
68
full quality: (stero) 66% (-> may work on 486DX4-100)
69
(singlemix) 38% (-> should work on 486DX2-66)
70
2:1 downsampling: (stereo) 48%
71
(singlemix) 30% (-> should work on 486DX-50)
73
---------------------------------------------------------------------
76
This isn't a new player. It's a fully rewritten version originally based
77
on the mpegaudio (FHG-version) package. The DCT algorithm in the
78
synthesis filter is a rewritten version of the DCT first seen in the maplay
79
package, which was written by Tobias Bading (bading@cs.tu-berlin.de). The
80
rewrite was neccassary, because the GPL may not allow this copyright mix.
81
The mpegaudio package was written by various people from the MPEG/audio
82
software simulation group. The maplay is under GPL .. You can find the
83
original source code and the mpegaudio package on: ftp.tnt.uni-hannover.de.
85
Especially layer3.c common.c and mpg123.h is based on the dist10 package.
86
The code is fullly rewritten but I'm using sometimes the
87
same variable names or similar function names as in the
90
In the current layer3.c I'm using a DCT36 first seen in Jeff Tsay's
91
(ctsay@pasteur.eecs.berkeley.edu) maplay 1.2+ package. His code is
92
under GPL .. I also tried the enhancement from Mikko Tommila. His
93
code is also in layer3.c (but it's disabled at the moment, because
94
it was slightly slower than the unrolled 9 point DCT (at least on
95
_my_ system)). Theoretically it should be faster. You may try it on
98
The output can converted to different audio formats and
99
rates. Currently, only (very simple) audiosupport for
100
the most common computer systems. It's possible
101
to build a 'generic' version which needs an external
102
audio player for playing.
104
I have tested the program with a lot of teststreams, but it's very
105
likely, that there are still a few bugs.
107
Playing MP3s coming with MIMEType "audio/x-mpegurl"
108
---------------------------------------------------
109
For netscape navigator:
110
Go: Preferencs->Navigator->Applications
111
Click 'NEW' Button and fill in the form:
112
Description: MP3 Playlist
113
MIMEType: audio/x-mpegurl
115
Click the 'Application' button below and add a
118
xterm -e mpg123 -@ %s
119
in the application field. Press OK. That's all.
122
NAS notes: (from Martin Denn)
123
-----------------------------
124
you may wanna play with the following defines: (from audio.c)
125
NAS_SOUND_PORT_DURATION
126
NAS_SOUND_LOW_WATER_MARK
127
Change them to optimize the player for your environment. For slow
128
networks a proven config is:
129
#define NAS_SOUND_PORT_DURATION 10 /* seconds */
130
#define NAS_SOUND_LOW_WATER_MARK 75 /* percent */
132
Pentium optimization notes:
133
---------------------------
134
The ASM optimaztions are especially for Intel Pentium FPUs.
135
On other processorts the egcs compiler optimiazation
140
You need a new 'as'. ie. the 'as' from binutils-2.9.1.0.19a.
141
If you donļæ½t have a suitable ļæ½asļæ½, you may wanna try to _copy_ the
142
files dct64_3dnow.o and decode_3dnow.o from the precompiled/
143
directory to the base mpg123 source path and try to compile
145
A funny side-effect of the 3dnow optimizations is, that now the
146
-2 and -4 downsampling is a little slower than full quality, because
147
the 3dnow optimization is only enabled for full quality decoding.
148
3dnow only works with -DREAL_IS_FLOAT.
154
----------------------------------------------------------------------------
157
I'm also working (but not at the moment) on a DSP port for this package.
158
A first testversion of the _LAYER-2_ part is finished and seems
159
to work in realtime with my 20MHZ ADSP-2115
161
----------------------------------------------------------------------------
163
Copyrights (c) 1995,1996,1997 of all changes/modifications and
164
of the new code by Michael Hipp. All rights reserved.
165
Copyrights (c) 1997 of several enhancements by Oliver Fromme.
166
See the packages 'maplay 1.2(+)' and 'mpegaudio' for their copy-policies.
167
Copyrights (c) 1997 of the OS2 specific parts by Niclas Lindstrom
171
layer 3 i-stereo not heavily tested
172
btw: I'm looking for i-stereo teststreams .. maybe you could send me a few
173
Layer 1 not heavily tested
175
no 'free format streams'
176
no clean audio interface
177
MPEG 2.0, Layer1 and Layer2 not tested (and probably will not work)
178
MPEG 2.0, Layer3 not heavily tested .. may has bugs.
182
If you need an mp3 frame re(assembler) and stream debug tool you should
183
have a look at the mp3asm program on Olli's mpg123 page.(http://mpg.123.org)
185
some interessting patent information:
186
-------------------------------------
187
http://www.iis.fhg.de/amm/legal/
190
******************************************************************************
192
* This is software with ABSOLUTELY NO WARRANTY.
193
* Use it at your OWN RISK. It's possible to damage e.g. hardware or your hearing
194
* due to a bug or for other reasons.
196
* I do not warrant that the program is free of infringement of any third-party
199
******************************************************************************
1
* * * * * * * * * * * * * * * * * * * * * * * * * * * *
2
* mpg123 - MPEG 1.0/2.0/2.5 audio player *
3
* README for version 0.60, dated at 22.08.2006 *
5
* ...still the fastest MPEG audio player for UNIX ;) *
6
* * * * * * * * * * * * * * * * * * * * * * * * * * * *
7
(This file has very long lines - die-hard terminal nostalgists can be satisfied by `fmt -s -w 75 < README | less`. I think it's better to let the reader's preference rule than to preformat the stuff to some arbitrary width.)
12
For building/installation info see INSTALL.
14
The mpg123 project was started by Michel Hipp and is now being maintained by Thomas Orgis and Nicholas J. Humfrey, who intitated the Sourceforge project.
15
The source code contains contributions from quite a few people - see AUTHORS for more info.
16
It is Open Source software licensed mostly under the LGPL with some parts restricted to GPL. See COPYING for details.
17
As for every mp3 player, some of mpg123's functionality may be covered by patents in a country where these are valid. See PATENTS for details.
19
Project's official website URL is
22
(or http://mpg123.orgis.org as fallback address if there is a problem with the DNS forwarding)
24
for the traditional hope page and
26
http://sourceforge.net/projects/mpg123
28
for sourceforge.net based services like download mirrors, mailing lists and bug/feature trackers.
29
Please use the sourceforge download mirrors when possible to minimize load on the mpg123.org server.
34
This is a console based decoder/player for mono/stereo mpeg audio files, probably more familiar as MP3 or MP2 files.
35
It's focus is speed. We still need some low-end benchmarks for the current version, but playback should be possible even on i486 CPUs. There is hand-optimized assembly code for i586, MMX and 3DNow! instructions, while generic code runs on a variety of different platforms and CPUs.
36
It can play MPEG1.0/2.0 layer I, II, II (1, 2, 3;-) files (VBR files are fine, too) and produce output on a number of different ways: raw data to stdout and different sound systems depending on your platform (see INSTALL).
37
Most tested are Linux on x86 and Alpha/AXP and MacOSX on ppc as the environments the current developers work in.
38
We are always thankful for user reports on success (and failure) on any platform!
45
mpg123-devel@lists.sourceforge.net
46
mpg123-users@lists.sourceforge.net
55
3.1 Simple Console Usage
57
Mpg123 is a console program - normally it just plays a list of files you specify on command line and that's it. See the included manpage or
61
on command line syntax/options. I encourage you to check out the --gapless and --rva-album/--rva-mix options:-)
63
In the simple "mpg123 file1.mp3 file2.mp3" mode, the only thing you can do to interact is to press Ctrl+C to skip to next track or end the whole playback if pressing it twice.
65
Note that this Ctrl+C behaviour is special to this mode; when any of the following is activated, Ctrl+C will just kill the program like you would expect normally (this changed from earlier versions).
67
3.2 Advanced Console Usage
69
You can specify the option -C to enable a terminal control interface enabling to influence playback on current title/playlist by pressing some key:
71
'b' to seek back to beginning of track
72
'f' to skip to nest track
73
'p' for pause (actually, looping current chunk)
74
's' to stop/restart playback (the usual "pause" function...)
82
'h' for printout of current key bindings
84
You can change these bindings to key to your liking by modifying term.h .
86
Note: This interface needs not to be available on _every_ platform/build.
88
3.3 Control Interface for Frontends
90
There used to be several interfaces for frontends left over from that past, but only one of them remains for the present and future:
92
The Generic Control Interface
94
It contains of communication of textual messages via standard input to mpg123 and responses to standard output unless the -s switch for output of audio data on stdout is used - then the responses come via stderr.
96
See doc/README.control for usage.
101
mpg123 is fast. Any faster software player is probably based on some hacked mpg123;-)
102
This is the case with current MPlayer, wich includes mpg123-based code in its mp3lib.
103
There are some nice assembler optimizations (SSE, for example) that may make mplayer a faster mp3 decoder in cases where these are applicable - we are preparing to incorporate these into the mpg123 player to make it the fastest mp3 player under all circumstances.
108
http://www.underbit.com/resources/mpeg/audio/compliance/
110
states mpg123-0.59r as being fully ISO/IEC 11172-3 compilant. Meaning: It decodes as it should. While I didn't verify the test I can confirm that the sound of mpg123 is fine enough for my ears;-)
112
I don't know which decoding routine they tested, I guess the pentium-optimized one. Depending on the chosen optimization, the output may vary slightly. At least the MMX assembler optimization is known to deviate in output by +/-1 (rarely +/-2).
113
This means +/- for the 16-bit integer sample value ranging over ca. +/-32000. This deviation may turn into hearable distortion for very low-amplitude sound, as shown in example files on
115
http://dither123.dyndns.org
119
A looooong time ago (mid-90s), Michael Hipp wrote some initial mpg123 and made it _the_ Unix console mp3 player in the following years.
121
This is the historic description:
123
This isn't a new player. It's a fully rewritten version originally based
124
on the mpegaudio (FHG-version) package. The DCT algorithm in the
125
synthesis filter is a rewritten version of the DCT first seen in the maplay
126
package, which was written by Tobias Bading (bading@cs.tu-berlin.de). The
127
rewrite was neccassary, because the GPL may not allow this copyright mix.
128
The mpegaudio package was written by various people from the MPEG/audio
129
software simulation group. The maplay is under GPL .. You can find the
130
original source code and the mpegaudio package on: ftp.tnt.uni-hannover.de.
132
Especially layer3.c common.c and mpg123.h is based on the dist10 package.
133
The code is fullly rewritten but I'm using sometimes the
134
same variable names or similar function names as in the
137
In the current layer3.c I'm using a DCT36 first seen in Jeff Tsay's
138
(ctsay@pasteur.eecs.berkeley.edu) maplay 1.2+ package. His code is
139
under GPL .. I also tried the enhancement from Mikko Tommila. His
140
code is also in layer3.c (but it's disabled at the moment, because
141
it was slightly slower than the unrolled 9 point DCT (at least on
142
_my_ system)). Theoretically it should be faster. You may try it on
145
Well, that's how it started...
146
Official development ceased due to the typical lack-of-time syndrome around 2002 and the free-floating patches began to seize the day.
148
But before that, Michael wrote or rewrote the essential code; others contributed their bits.
151
Code is copyrighted by Michael Hipp, who made it free software under the terms of the LGPL 2.1.
153
Please see doc/ROAD_TO_LGPL, COPYING and AUTHORS for details on that. Note that the only notable legacy non-LGPL file was the old alsa output that didn't work with alsa 0.9/1.0 anymore.
154
Also, there has been a libao output in the betas 0.60 for a short period. Libao being generally problematic for us because of its GPL license, this output is not distributed anymore in the release packages. There is now a new, LGPLed alsa output that made both the old alsa and libao obsolete for our purposes.
155
So, the distributed mpg123 releases actually only contains LGPL code, but you get the other files from our subversion repository if you checkout the trunk / version tags.
157
There has been quite some confusion about the licensing and "freeness" of mpg123 in the past.
158
The initial "free for private use, ask me when you want to do something commercial" license caused some people to avoid mpg123 and even to write a replacement mimicking the interface but using a different decoding engine - what was not actively developed for too long but entered the "free" software sections.
160
The Debian (non-free section) and Gentoo distributions cared about the last stable and the last development release of mpg123 over the years with mainly applying security fixes. Thanks go to the distribution maintainers for not letting it alone to bitrot over the years.
162
Thomas Orgis started to hack on mpg123 in 2004 while working on his personal audio experience with mixplayd and later DerMixD, utilizing the generic control interface. In Feb 2005, he crammed control interface improvements together with Debian's r19 fixes and released the personal fork/patch named mpg123-thor.
163
Little later that year, Nicholas J. Humphrey independently created the sourceforge project and released an autotooled 0.59r under official GPL flag with Debian and MacOSX fixes.
164
In the beginning of 2006, Thomas finally decided that he could work "officially" on mpg123 and contacted Michael Hipp for taking over maintainership.
165
Michael was all-positive about letting mpg123 really live again (and perhaps see version 1.0 some time;-) and also pointed at the sourceforge project that didn't see much activity since the initial release.
166
A lot of emails and some weeks later there was the two-developer team of Nicholas and Thomas working on merging their mpg123 variants as well as adding some features and fixes to let it shine again.
168
And there we are now...