• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

examples/H10-Dec-2021-870630

ACCURACYH A D10-Dec-2021269 32

BENCHMARKINGH A D10-Dec-20214.5 KiB11181

BUGSH A D10-Dec-2021164 42

CONTACTH A D10-Dec-2021650 189

LARGEFILEH A D10-Dec-20213.4 KiB8365

LICENSEH A D10-Dec-2021957 2320

Makemodule.amH A D10-Dec-2021646 3028

PATENTSH A D10-Dec-20213.1 KiB4025

README.3DNOWH A D10-Dec-20212.3 KiB5751

README.gainH A D10-Dec-20219.3 KiB172119

README.remoteH A D10-Dec-20218.3 KiB251169

ROAD_TO_LGPLH A D10-Dec-20218.5 KiB271207

THANKSH A D10-Dec-2021727 1410

TODOH A D10-Dec-2021245 97

doxy_examples.cH A D10-Dec-20211,014 220

doxyfoot.xhtmlH A D10-Dec-202140 20

doxygen.confH A D10-Dec-20211.1 KiB5441

doxyhead.xhtmlH A D10-Dec-20211.3 KiB1916

README.3DNOW

1************************************************************************
2* 3DNow! support by KIMURA Takuhiro   <kim@hannah.ipc.miyakyo-u.ac.jp> *
3*                                     <kim@comtec.co.jp>               *
4*                             (http://hannah.ipc.miyakyo-u.ac.jp/kim/) *
5*                   Syuuhei Kashiyama <squash@mb.kcom.ne.jp>           *
6*                             (http://user.ecc.u-tokyo.ac.jp/~g810370/)*
7************************************************************************
8
9-----------------------------
10What's new in patch for 0.59r
11-----------------------------
12- 3DNow! optimized decode routine (decode_3dnow.s,dct36_3dnow.s ;
13  these code based Syuuhei Kashiyama's 3DNow! patch for mpg123-0.59o)
14- 3DNow! optimized equalizer (equalizer_3dnow.s ; do_equalizer() only)
15- target "linux-3dnow-alsa" "linux-3dnow-esd" added (untested)
16- automatic detect 3DNow! support CPU from CPUFLAGS (getcpuflags.s)
17  (i.e. use floating-pointer decode routine if your CPU isn't support
18   3DNow! or MMX instructions)
19
20-------------
21Added options
22-------------
23"--test-3dnow"  : display result of autodetect and exit
24"--force-3dnow" : force use of 3DNow! optimized decoder
25 (it will cause SIGILL if your CPU isn't support 3DNow! or MMX
26  instructions)
27"--no-3dnow"    : force use of floating-pointer decoder
28
29-----------
30How to make
31-----------
32[1] To make 3DNow! optimized mpg123,you need binutils-2.9.1.0.15 or later.
33 You can find the most recent binutils (2.9.1.0.25 until 23.Jun.1999) at
34  - kernel.org (and mirrors) : /pub/linux/devel/gcc/
35  - http://hannah.ipc.miyakyo-u.ac.jp/kim/Linux/binutils/
36    (Takuhiro's local copy)
37 etc.
38[2] Type "make linux-3dnow" (OSS)
39      or "make linux-3dnow-alsa" (ALSA).
40[3] Enjoy!
41
42------------------
43Precompiled binary
44------------------
45You can get precompiled binary of mpg123 (with 3DNow! support) from
46 http://hannah.ipc.miyakyo-u.ac.jp/kim/Linux/mpg123/
47
48----------
49References
50----------
51Useful sources of information on optimizing 3DNow! code include:
52- AMD 3DNow! Technology Manual (Publication #21928)
53     English:  http://www.amd.com/K6/k6docs/pdf/21928d.pdf
54    (Japanese: http://www.amd.com/japan/K6/k6docs/j21928c.pdf)
55- AMD-K6-2 Processor Code Optimization Application Note (Publication #21924)
56     English:	http://www.amd.com/K6/k6docs/pdf/21924b.pdf
57

README.gain

1Thomas Orgis on RVA, Gain and Pain
2
3
4Ok, so I'm going to add RVA/ReplayGain support... the problem there is not to read these valus from ID3 or Lame, not even to do the adjustment itself.
5The problem is more to figure out how to interpret the dB values one gets there.
6
7Main players in the field of relative volume adjustment / soft gain (without modifying actual audio data):
8
9http://www1.cs.columbia.edu/~cvaill/normalize/
10	...writing RVA2 ID3v2tags for dB offset to user target amplitude, default being -12dB(FS)
11http://www.replaygain.org/
12	...store the difference to reference of 83dB(SPL) ... somewhere
13
14Both calculate some running RMS and do statistics with this - the main difference is the potentially different target level.
15Also both know two basic types of adjustment: Per track to make all tracks sound at the same sevel (track / radio) and the one with default meaning to keep the loudness relations over albums (batch / audiophile).
16
17dB can mean many things and also the raw value of a PCM sample doesn't equal directly to loudness (power of a wave != amplitude).
18
19So that says the ReplayGain about applying the adjustment:
20
21	scale=10.^(replay_gain/20);
22
23luckily, this is the same that I worked out on my own for the normalize RVA values in my mixplayer script:
24
25	return 10**($s/20);
26
27I'll take that interpretaion of dB -> linear scale factor for samples for granted, then.
28
29The replay_gain value is meant in the standard to represent the offset to 83dB(SPL - depending on your amplifier...), having in mind that actual most wanted average playback level should be 83dB(SPL) (defined by movie ppl as the loudness of a -20dB(FS) signal, leaving room for louder stuff).
30But then there is the proposal to add 6dB preamp for pop music - am I judging music types with mpg123??
31These 6dB are in fact the real world since lots of programs use 89dB(SPL...) as reference.
32Thus, lame since 3.95.1 (according to MADplay's Rob Leslie who discussed with Lame ppl, verified in 3.96 source) stores the adjustment to 89dB.
33To make that all sound the same, one should add 6bB to lame <3.95.1 ReplayGain values and use later ones verbatim - achieving 89dB everytime, whatever that may mean in reality out of my speakers (my Marantz' volume knob doesn't have a scale at all - be it dB or percent;-).
34
35A funny aspect of this 6dB issue is to tell lame 3.95.1 from lame 3.95
36
37As for normalize... the desired playback level is essentially undefined. Ignoring that and realizing that mpg123 has no way to determine real world sound power anyway, one has to just take the provided dB values and apply with the formula above.
38The user is responsible for providing files with his desired settings... for that reason I also won't follow the ReplayGain demand/suggestion that a player should apply an average of gains of previous tracks if the current one lacks a setting.
39
40So, well. Considering that ReplayGain (at least the radio one) being stored by current lame on encoding, I suppose that if there are RVA2 values in ID3v2 tags, these were added by a conscious user act and are overriding the ReplayGain ones.
41
42I already read ReplayGain entries in Lame tag... should add ID3v2 parsing. Especially since the lame tag is ambignous because of the 6dB issue... I cannot distinguish 3.95.1 from 3.95 by reading the tag - frick!
43But wait... 6dB?
44
45[thomas@thorvas /home/thomas-data/mpg123-neu/lame-3.96.1]$ frontend/lame --cbr -T /mnt/knecht_mp3/music/covenant/2006_skyshaper/03-happy_man.mp3 ../testfiles/happy_man_lame-3.96.1.mp3
46ID3v2 found. Be aware that the ID3 tag is currently lost when transcoding.
47LAME version 3.96.1 (http://lame.sourceforge.net/)
48Using polyphase lowpass filter, transition band: 17249 Hz - 17782 Hz
49Encoding /mnt/knecht_mp3/music/covenant/2006_skyshaper/03-happy_man.mp3
50      to ../testfiles/happy_man_lame-3.96.1.mp3
51Encoding as 44.1 kHz 128 kbps j-stereo MPEG-1 Layer III (11x) qval=3
52    Frame          |  CPU time/estim | REAL time/estim | play/CPU |    ETA
53  6371/6374  (100%)|    1:41/    1:41|    1:47/    1:47|   1.6353x|    0:00
54average: 128.0 kbps   LR: 754 (11.83%)   MS: 5620 (88.17%)
55
56Writing LAME Tag...done
57ReplayGain: -7.4dB
58revmethod = 1
59encoder padding: 1728
60
61[thomas@thorvas /home/thomas-data/mpg123-neu/lame-3.95.1]$ frontend/lame --cbr -T /mnt/knecht_mp3/music/covenant/2006_skyshaper/03-happy_man.mp3 ../testfiles/happy_man.mp3
62ID3v2 found. Be aware that the ID3 tag is currently lost when transcoding.
63LAME version 3.95  (http://www.mp3dev.org/)
64Using polyphase lowpass  filter, transition band: 17249 Hz - 17782 Hz
65Encoding /mnt/knecht_mp3/music/covenant/2006_skyshaper/03-happy_man.mp3
66      to ../testfiles/happy_man.mp3
67Encoding as 44.1 kHz 128 kbps j-stereo MPEG-1 Layer III (11x) qval=3
68    Frame          |  CPU time/estim | REAL time/estim | play/CPU |    ETA
69  6371/6374  (100%)|    1:36/    1:36|    1:48/    1:48|   1.7289x|    0:00
70average: 128.0 kbps   LR: 759 (11.91%)   MS: 5615 (88.09%)
71
72Writing LAME Tag...done
73ReplayGain: -7.4dB
74
75[thomas@thorvas /home/thomas-data/mpg123-neu/lame-3.95]$ frontend/lame --cbr -T /mnt/knecht_mp3/music/covenant/2006_skyshaper/03-happy_man.mp3 ../testfiles/happy_man_lame-3.95.mp3
76ID3v2 found. Be aware that the ID3 tag is currently lost when transcoding.
77LAME version 3.95  (http://www.mp3dev.org/)
78Using polyphase lowpass  filter, transition band: 17249 Hz - 17782 Hz
79Encoding /mnt/knecht_mp3/music/covenant/2006_skyshaper/03-happy_man.mp3
80      to ../testfiles/happy_man_lame-3.95.mp3
81Encoding as 44.1 kHz 128 kbps j-stereo MPEG-1 Layer III (11x) qval=3
82    Frame          |  CPU time/estim | REAL time/estim | play/CPU |    ETA
83  6371/6374  (100%)|    1:37/    1:37|    1:43/    1:43|   1.7041x|    0:00
84average: 128.0 kbps   LR: 759 (11.91%)   MS: 5615 (88.09%)
85
86Writing LAME Tag...done
87ReplayGain: -13.4dB
88
89
90Together with the gain values read from tags:
91
923.96.1:	-1.0dB	(claimed -7.4dB)
933.95:	-1.0dB	(claimed -7.4dB)
943.95:	-0.6dB	(claimed -13.4dB)
95
96So, the difference of 6dB shows in the values lame prints on the command line... but the lame tags only have 0.4dB difference and are much lower anyway - do I parse them correctly?
97
98Opinion of normalize of these files: -2dB. Great. I guess the -1 is what lame really meant, then...
99
100
101Storage places
102==============
103
104Points 1, 2 and 4 implemented to some respect.
105
106
1071. Lame/Info tag
108
109supposedly in format according to the proposed standard - but I yet have to verify if Lame really does this.
110see http://gabriel.mp3-tech.org/mp3infotag.html
111
112
1132. ID3v2 RVA2 frame(s)
114
115Normalize does that. Rare is the software reading that.
116I've never seen those frames since id3v2 -l doesn't know them.
117
118
1193. APE tags
120
121Gah, another Tag format. Foobar2000 uses this as default.
122It's getting real-hy messy folks
123
124
1254. Per convention in ID3 tags
126
127Well, I myself once used the ID3v1 comment field for storing the mix rva value (textual) ... but that is a tad too unspecific.
128I then also used user-defined ID3v2 comments like that:
129
130[thomas@thorvas /home/thomas-data/mpg123-neu/svn/trunk]$ id3v2 -l /mnt/knecht_mp3/music/underworld/second_toughest_in_the_infants/02-banstyle_sappys_curry.mp3
131id3v1 tag info for /mnt/knecht_mp3/music/underworld/second_toughest_in_the_infants/02-banstyle_sappys_curry.mp3:
132Title  : banstyle  sappys curry          Artist: underworld
133Album  : second toughest in the infants  Year: 0   , Genre: Other (12)
134Comment: Created by Grip                 Track: 2
135id3v2 tag info for /mnt/knecht_mp3/music/underworld/second_toughest_in_the_infants/02-banstyle_sappys_curry.mp3:
136TYER (Year): 0
137TRCK (Track number/Position in set): 2
138COMM (Comments): (ID3v1 Comment)[XXX]: Created by Grip
139TCON (Content type): Other (12)
140TPE1 (Lead performer(s)/Soloist(s)): underworld
141TALB (Album/Movie/Show title): second toughest in the infants
142TIT2 (Title/songname/content description): banstyle  sappys curry
143COMM (Comments): (RVA)[]: 4.3291
144COMM (Comments): (RVA_ALBUM)[]: 3.666101
145
146That still doesn't look like a bad Idea to me. Not bothering with byte ordering and whatnot. Just atof(id3v2_comm_rva).
147One could still add dB, though.
148
149Another convention is (rockbox mailinglist, not checked myself) used by Foobar:
150
151TXXX (User defined text information): (replaygain_track_gain): -7.17 dB
152TXXX (User defined text information): (replaygain_track_peak): 1.057122
153TXXX (User defined text information): (replaygain_album_gain): -6.53 dB
154TXXX (User defined text information): (replaygain_album_peak): 1.107456
155
156So what are custom comment fields for when there are also custom text fields? They look very similar to me.
157
158
1595. Leave the haunted music file alone and store metadata externally.
160
161That's the only sane way for stuff like album art... and it's the way I do it in my music archive. the wrapper script reads the adjustment values and then sets an adjusted volume.
162That's fine for my mixing daemon that manupulates the pcm data anyway, but it would be nice to have this functionality in the minimalist console mode. too.
163Even more since it can be done without additional cpu power during decoding (well, one-time set up of the decode tables is needed for every track) similar to the equalizer.
164I could simply start with text files with lines like
165
166RVA_MIX: 3.4dB
167RVA_ALBUM: 1.7dB
168
169Prob here is that the effort to open and parse that extra file may hinder gapless decoding between tracks...
170Well, one could parse all metadata files for a list of tracks before playback starts.
171But all this won't work for streams via stdin (hm, one could argue if the stream needs RVA at all).
172

README.remote

1Control interface to generic frontends
2
3The generic remote interface allows frontends to easily control
4mpg123 by commands through stdin/stdout. To start the generic
5remote interface, start mpg123 with parameter -R.
6
7In case of a frontend that starts mpg123 with the -s option to read the audio from stdout, the --remote-err option is automatically activated to send responses to stderr so that stdout stays clean for audio.
8
9(Still the case?)
10As an example it's used by IRMP3, a tool that allows you to
11control mpg123 with a standard infrared remote control. See
12http://www.fasta.fh-dortmund.de/users/andy/irmp3/ for more
13information.
14
15You can also specify --fifo <path> to create a named pipe at <path> and listen on that for commands instead stdin.
16That way, you can deliberately control mpg123 by echoing into the named pipe from any terminal / program.
17The command respones are still sent to standard out or standard error (depending on -s or --remote-err switches).
18
19
20COMMAND CODES
21-------------
22
23You can get this info via the control command "help".
24
25
26HELP/H: command listing (LONG/SHORT forms), command case insensitve
27
28LOAD/L <trackname>: load and start playing resource <trackname>
29
30LOADPAUSED/LP <trackname>: load but do not start playing resource <trackname>
31
32LOADLIST/LL <entry> <url>: load a playlist from given <url>, and display its entries, optionally load and play one of these specificed by the integer <entry> (<0: just list, 0: play last track, >0:play track with that position in list)
33
34PAUSE/P: pause playback
35
36STOP/S: stop playback (closes file)
37
38JUMP/J <frame>|<+offset>|<-offset>|<[+|-]seconds>s: jump to mpeg frame <frame> or change position by offset, same in seconds if number followed by "s"
39
40VOLUME/V <percent>: set volume in % (0..100...); float value
41
42MUTE: turn on software mute in output
43
44UNMUTE: turn off software mute in output
45
46RVA off|(mix|radio)|(album|audiophile): set rva mode
47
48EQ/E <channel> <band> <value>: set equalizer value for frequency band 0 to 31 on channel 1 (left) or 2 (right) or 3 (both)
49
50EQFILE <filename>: load EQ settings from a file
51
52SHOWEQ: show all equalizer settings (as <channel> <band> <value> lines in a SHOWEQ block (like TAG))
53
54SEEK/K <sample>|<+offset>|<-offset>: jump to output sample position <samples> or change position by offset
55
56SCAN: scan through the file, building seek index
57
58SAMPLE: print out the sample position and total number of samples
59
60FORMAT: print out sampling rate in Hz and channel count
61
62SEQ <bass> <mid> <treble>: simple eq setting...
63
64PITCH <[+|-]value>: adjust playback speed (+0.01 is 1 % faster)
65
66SILENCE: be silent during playback (meaning silence in text form)
67
68STATE: Print auxiliary state info in several lines (just try it to see what info is there).
69
70TAG/T: Print all available (ID3) tag info, for ID3v2 that gives output of all collected text fields, using the ID3v2.3/4 4-character names. NOTE: ID3v2 data will be deleted on non-forward seeks.
71
72   The output is multiple lines, begin marked by "@T {", end by "@T }".
73
74   ID3v1 data is like in the @I info lines (see below), just with "@T" in front.
75
76   An ID3v2 data field is introduced via ([ ... ] means optional):
77
78    @T ID3v2.<NAME>[ [lang(<LANG>)] desc(<description>)]:
79
80   The lines of data follow with "=" prefixed:
81
82    @T =<one line of content in UTF-8 encoding>
83
84meaning of the @S stream info:
85
86S <mpeg-version> <layer> <sampling freq> <mode(stereo/mono/...)> <mode_ext> <framesize> <stereo> <copyright> <error_protected> <emphasis> <bitrate> <extension> <vbr(0/1=yes/no)>
87
88The @I lines after loading a track give some ID3 info, the format:
89
90     @I ID3:artist  album  year  comment genretext
91    where artist,album and comment are exactly 30 characters each, year is 4 characters, genre text unspecified.
92    You will encounter "@I ID3.genre:<number>" and "@I ID3.track:<number>".
93    Then, there is an excerpt of ID3v2 info in the structure
94     @I ID3v2.title:Blabla bla Bla
95    for every line of the "title" data field. Likewise for other fields (author, album, etc).
96
97
98RESPONSE CODES
99--------------
100
101Note: mpg123 returns errors on stderr, so your frontend should
102      look not only at stdout but also at stderr for responses.
103      It is a good idea to use --remote-err and just look at stderr.
104
105@R MPG123 (ThOr) v7
106	Startup version message. Everything after MPG123 is auxilliary information about behaviour and command support, ID3v2 tag support is new in v3.
107
108@I ID3:<a><b><c>
109	Status message after loading a song (ID3 song info)
110	a = title (exactly 30 chars)
111	b = artist (exactly 30 chars)
112	c = album (exactly 30 chars)
113	d = year (exactly 4 chars)
114	e = comment (exactly 30 chars)
115	f = genre (string)
116
117@I ID3.genre:<number>
118@I ID3.track:<number>
119	Optional lines with additional ID3v1 info (if present): Genre ID and track number in set.
120
121@I ID3v2.title:<text>
122	After loading a track with ID3v2 info, such lines occur for every line of the "title" data field and likewise for other fields (author, album, etc).
123
124Since version 9, ID3 info is wrapped in
125
126@I {
127...
128@I }
129
130to guide parsers.
131
132@I <a>
133			Status message after loading a song (no ID3 song info)
134			a = filename without path and extension
135
136@I LISTENTRY <n>: <url>
137	printout of playlists loaded with LOADLIST
138
139Since version 9, list printout is wrapped in
140
141@I {
142...
143@I }
144
145to help parsers decide if they got the whole list.
146
147@S <a> <b> ...
148	Stream info at beginning of playback, meaning
149	S <mpeg-version> <layer> <sampling freq> <mode(stereo/mono/...)> <mode_ext> <framesize> <stereo> <copyright> <error_protected> <emphasis> <bitrate> <extension> <vbr(0/1=yes/no)>
150
151@S <a> <b> <c> <d> <e> <f> <g> <h> <i> <j> <k> <l>
152	Status message after loading a song (stream info)
153	a = mpeg type (string)
154	b = layer (int)
155	c = sampling frequency (int)
156	d = mode (string)
157	e = mode extension (int)
158	f = framesize (int)
159	g = stereo (int)
160	h = copyright (int)
161	i = error protection (int)
162	j = emphasis (int)
163	k = bitrate (int)
164	l = extension (int)
165
166@F <a> <b> <c> <d>
167	Status message during playing (frame info)
168	a = framecount (int)
169	b = frames left this song (int)
170	c = seconds (float)
171	d = seconds left (float)
172
173@P <a>
174	Playing status
175	a = 0: playing stopped
176	a = 1: playing paused
177	a = 2: playing unpaused
178
179@E <a>
180	An error occured
181	Errors may be also reported by mpg123 through
182	stderr (without @E)
183	a = error message (string)
184
185@J <n>
186	Jumped to frame n.
187
188@RVA <mode>
189	Switched to specified RVA mode.
190
191@V <volume>%
192	Set volume to specified value (float, percent).
193
194@<x> : <y> : <z>
195	Set equalizer value z for band y of channel x.
196
197@bass: <b> mid: <m> treble: <t>
198	Set simple equalizer control for bass, mid, treble.
199
200@T <response from TAG command>
201	The output is multiple lines, begin marked by "@T {", end by "@T }".
202	ID3v1 data is like in the @I info lines, just with "@T" in front.
203	An ID3v2 data field is introduced via ([ ... ] means optional):
204		@T ID3v2.<NAME>[ [lang(<LANG>)] desc(<description>)]:
205	The lines of data follow with "=" prefixed:
206		@T =<one line of content in UTF-8 encoding>
207
208
209EQUALIZER CONTROL (History)
210---------------------------
211
212WARNING: The interpretation of the command arguments changed. The channel is either 1 or 2 or 3 (left, right, both).
213It used to be 0 or 1 for left or right but the change slipped through during libmpg123 work and now it is a fact.
214Sorry.
215
216Cold Feet Audio Patch for MPG123
217
21810.07.2002
219
220This is a dirty little hack to enable the equalizer in mpg123's
221generic_control interface.  It works like this, there are two
222different channels on the equalizer and 32 frequencys.
223
224The hack just enables mpg123's built in equalizer to run real-time.
225We haven't built in any capability to save the eq, you're frontend
226will have to handle that part, and init the eq on the startup of
227mpg123.
228
229K, it works like this:
230
231#./mpg123 -R -  <---- This command will start mpg123 in 'frontend' mode.
232
233If you want to send it some eq values you'd send it:
234eq X Y V[ENTER]
235
236X = The channel.  It can be either 0 or 1.  I haven't put any error checking
237    in, so it probably wouldn't be a good idea to go out of bounds. (integer)
238Y = This is the frequency, it can be 0 to 31.  0 being closer to treble and
239    31 being closer to bass. (integer)
240V = The raw value of your equalizer setting.  I've found that the values work
241    best between 0.00 and 3.00.  When mpg123 starts up, all of them are set
242    to 1.00.
243
244OK, have fun!  If you have any questions or found some bugs, please contact
245nutcase@dtmf.org
246
247Thanks,
248nut
249
250Note by Thomas Orgis: The contact appears to be dead.
251