README
1ABOUT MPG321
2------------
3
4mpg321 is a Free replacement for mpg123, a very popular command-line mp3
5player. mpg123 is used for frontends, as an mp3 player and as an mp3 to
6wave file decoder (primarily for use with CD-recording software.) In all
7of these capacities, mpg321 can be used as a drop-in replacement for
8mpg123.
9
10mpg321 is a project conceived and written by Joe Drew <hoserhead@woot.net>.
11It uses code from the MAD distribution by Rob Leslie; XMMS; and plaympeg
12from the SMPEG distribution. mpg321 is licensed under the GNU General
13Public License version 2, as documented in the 'COPYING' file.
14
15WHY MPG321?
16-----------
17
18mpg123 is very popular because of its relative simplicity and its general
19facility. It is very good at what it does. It is, however, under a non-free
20license: you can't incorporate its code into your own without getting
21special permission, and commercial entities also need special permission
22just to use it.
23
24Being a Free Software advocate, I saw a deficiency in the dependency many
25people had on mpg123. Therefore, I created mpg321, and as more features
26of mpg123 are implemented, it becomes less and less likely that anyone
27will need mpg123 for anything any more.
28
29INSTALLING MPG321
30-----------------
31
32Please read the document 'INSTALL' to find mpg321's dependencies and
33configuration, compilation and installation instructions.
34
35mpg321 has been tested on Debian GNU/Linux (x86), as well as Sun Solaris
36(UltraSparc). It is also available from several BSD vendors, and may be
37included in other Linux distributions. Any problems encountered on any
38system, though, should be reported to the author.
39
40GETTING INVOLVED/INFORMED
41-------------------------
42
43If you like mpg321, please donate to the Electronic Freedom Foundation (EFF).
44They help ensure that software for any purpose can continue to be written
45legally. Find out more information at http://www.eff.org .
46
47To be informed of any new releases of mpg321, please subscribe to the
48mpg321-announce mailing list: send an email with 'subscribe' in the body or
49subject to mpg321-announce-request@lists.sourceforge.net, or visit
50http://lists.sourceforge.net/lists/listinfo/mpg321-announce .
51
52There are a number of tasks that are still on-going with the develompent
53of mpg321. If you're interested, please read the TODO and HACKING files.
54Also, always feel free to e-mail me, Joe Drew <hoserhead@woot.net>.
55
56There is also a sourceforge project for mpg321:
57http://sourceforge.net/projects/mpg321
58
59HISTORY OF MPG321
60-----------------
61
62`mpg321' started long ago (sometime in 1999) as a wrapper script for
63the mpg123 frontend of the media player FreeAmp. It was contributed
64to the Debian package of FreeAmp, and for several revisions was
65included as 'mpg123.freeamp.' (This script has since been removed.)
66
67mpg123.freeamp didn't work very well, and was limited by FreeAmp's
68implementation of the mpg123 frontend, but it worked for what I needed
69it to do: play music from the command-line without needing mpg123
70installed.
71
72Early in 2001, I decided that a real alternative to mpg123 was needed,
73and started looking around for a good mp3 decoding library. I came
74across SMPEG, which was written by Loki Software, and based on SDL.
75It was very simple programatically and handled most everything that
76was needed. mpg321 was born, and it did all the simple things that
77were required of it.
78
79SMPEG, however, required SDL for output, which in turn required many
80other libraries. This was a very sub-optimal arrangement. So, in 2001,
81I performed what amounted to almost a full rewrite of mpg321, porting
82it to Rob Leslie's MAD MPEG audio decoder library. I chose MAD because
83it provides very high-quality output, and also because it operates entirely
84with fixed point (integer) instructions.
85
86At the same time, I also switched to the Ogg Vorbis (Xiphophorous) project
87libao for all audio output.
88
89That's pretty much where mpg321 stands right now. There are still
90unimplemented features, and undoubtedly still bugs. But it works well
91for many people, and it liberates one more dependency people had on
92non-Free software. That's worth it, to me.
93
README.remote
1mpg321 now implements mpg123's 'Remote Control' interface, via option
2-R. This is useful if, for example, you're writing a frontend to mpg321
3which needs a consitent, reliable interface to control playback.
4
5The Remote Control Interface has a small quirk, consistent with that of
6mpg123: you must specify a dummy argument on the command-line. That
7is to say, running `mpg321 -R' will bring up the usage message; running
8`mpg321 -R abcd' (or anything else in place of 'abcd') will start the
9Remote Control Interface.
10
11Once you're running with the Remote Control Interface, there are
12several commands you can use:
13
14COMMANDS:
15--------
16(All commands can be shortened to first character only)
17
18LOAD <file>
19
20Loads and starts playing <file>.
21
22JUMP [+-]<frames>
23If '+' or '-' is specified, jumps <frames> frames forward, or backwards,
24respectively, in the the mp3 file. If neither is specifies, jumps to
25absolute frame <frames> in the mp3 file.
26
27PAUSE
28Pauses the playback of the mp3 file; if already paused, restarts playback.
29
30QUIT
31Quits mpg321.
32
33There are also several outputs possible:
34
35OUTPUT:
36------
37
38@R MPG123
39mpg123 tagline. Output at startup.
40
41@I mp3-filename
42Prints out the filename of the mp3 file, minus the extension. Happens after
43an mp3 file has been loaded.
44
45@S <a> <b> <c> <d> <e> <f> <g> <h> <i> <j> <k> <l>
46Outputs information about the mp3 file after loading.
47<a>: version of the mp3 file. Currently always 1.0 with madlib, but don't
48 depend on it, particularly if you intend portability to mpg123 as well.
49 Float/string.
50<b>: layer: 1, 2, or 3. Integer.
51<c>: Samplerate. Integer.
52<d>: Mode string. String.
53<e>: Mode extension. Integer.
54<f>: Bytes per frame (estimate, particularly if the stream is VBR). Integer.
55<g>: Number of channels (1 or 2, usually). Integer.
56<h>: Is stream copyrighted? (1 or 0). Integer.
57<i>: Is stream CRC protected? (1 or 0). Integer.
58<j>: Emphasis. Integer.
59<k>: Bitrate, in kbps. (i.e., 128.) Integer.
60<l>: Extension. Integer.
61
62@F <current-frame> <frames-remaining> <current-time> <time-remaining>
63Frame decoding status updates (once per frame).
64Current-frame and frames-remaining are integers; current-time and
65time-remaining floating point numbers with two decimal places.
66
67@S {0, 1, 2}
68Stop/pause status.
690 - playing has stopped. When 'STOP' is entered, or the mp3 file is finished.
701 - Playing is paused. Enter 'PAUSE' or 'P' to continue.
712 - Playing has begun again.
72