2 tooLAME - an optimized mpeg 1/2 layer 2 audio encoder
3 Copyright (C) 2002, 2003 Michael Cheng [mikecheng at NOT planckenergy.com] remove the NOT
4 http://www.planckenergy.com/
6 All changes to the ISO source are licensed under the LGPL
7 (see LGPL.txt for details)
9 tooLAME is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Lesser General Public
11 License as published by the Free Software Foundation; either
12 version 2.1 of the License, or (at your option) any later version.
14 tooLAME is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Lesser General Public License for more details.
19 You should have received a copy of the GNU Lesser General Public
20 License along with tooLAME; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 tooLAME is an optimized Mpeg Audio 1/2 Layer 2 encoder. It is based heavily on
30 - improvement to algorithms as part of the LAME project (www.sulaco.org/mp3)
31 - work by myself and other contributors (see CONTRIBUTORS)
38 at least change the architecture type (ARCH) to suit your machine.
45 ./toolame [options] <input> <output>
48 tooLAME parses AIFF and WAV files for file info
49 raw PCM is assumed if no header is found
53 file is automatically renamed from *.* to *.mp2
58 if inputting raw PCM sound, you must specify the sample rate
59 default sample rate is 44.1khz.
62 downmix from stereo to mono
63 if the incoming file is stereo, combine the audio into
67 force byte-swapping of the input. (current endian detection is dodgy,
68 so if toolame produces only noise, use -x )
71 swap the LR channels of a stereo file
75 the encoding mode (default 'j')
82 which psy model to use (default '1')
83 Different models for the psychoacoustics
88 For 48/44.1/32kHz default = 192
89 For 24/22.05/16kHz default = 96
93 The higher the number the better the quality.
94 Useful range -10 to 10.
95 See README.VBR for details.
100 fast mode turns off calculation of the psychoacoustic model.
101 Instead a set of default values are assumed
104 quick mode calculates the psy model every 'num' frames.
108 de-emphasis (default 'n')
116 force padding bits off
120 'talkativity' setting. 0 = no message. 3 = too much information
122 *********************
124 *********************
129 This will encode sound.wav to sound.mp2 using the default bitrate of 192 kbps
130 and using the default psychoacoustic model (model 1)
133 toolame -p 2 -v 5 sound.wav newfile.mp2
135 Encode sound.wav to newfile.mp2 using psychoacoustic model 2 and encoding
136 with variable bitrate. The high value of the "-v" argument means that
137 the encoding will tend to favour higher bitrates.
140 toolame -p 2 -v -5 sound.wav newfile.mp2
142 Same as example above, except that the negative value of the "-v" argument
143 means that the lower bitrates will be favoured over the higher ones.
146 cat sound.pcm | toolame -s 22050 -f -b 96 - newfile.mp2
148 Toolame is encoding from stdin at a bitrate of 96kbps and is using the
149 'fast' mode which means that no psychoacoustic modelling is done.The
150 input file is raw pcm so the sample rate needs to be specified (22050Hz)
153 *********************
155 *********************
158 LAME specific contributions
159 fht routines from Ron Mayer <mayer at acuson.com>
160 fht tweaking by Mathew Hendry <math at vissci.com>
161 window_subband & filter_subband from LAME circa v3.30
162 (multiple LAME authors)
163 (before Takehiro's window/filter/mdct combination)
165 Oliver Lietz <lietz at nanocosmos.de>
166 Tables now included in the exe! (yay! :)
168 Patrick de Smet <pds at telin.rug.ac.be>
169 scale_factor calc speedup.
170 subband_quantization speedup
172 Federico Grau <grauf at rfa.org>
173 Bill Eldridge <bill at hk.rfa.org>
174 option for "no padding"
176 Nick Burch <gagravarr at SoftHome.net>
180 Phillipe Jouguet <philippe.jouguet at vdldiffusion.com>
182 spelling, LSF using psyII, WAVE reading
184 Henrik Herranen - leopold at vlsi.fi
187 Andreas Neukoetter - anti at webhome.de
188 (verbosity patch '-t' switch for transcode plugin)
190 Sami Sallinen - sami.sallinen at g-cluster.com
191 (filter_subband loop unroll
192 psycho_i fix for "% 1408" calcs)
194 Mike Cheng <mikecheng at NOT planckenergy.com> (remove the NOT)
197 *********************
199 *********************
200 (Specifically LayerII Papers)
202 Kumar, M & Zubair, M., A high performance software implementation of mpeg audio
203 encoder, 1996, ICASSP Conf Proceedings (I think)
205 Fischer, K.A., Calculation of the psychoacoustic simultaneous masked threshold
206 based on MPEG/Audio Encoder Model One, ICSI Technical Report, 1997
207 ftp://ftp.icsi.berkeley.edu/pub/real/kyrill/PsychoMpegOne.tar.Z
209 Hyen-O et al, New Implementation techniques of a real-time mpeg-2 audio encoding
210 system. p2287, ICASSP 99.
212 Imai, T., et al, MPEG-1 Audio real-time encoding system, IEEE Trans on Consumer
213 Electronics, v44, n3 1998. p888
215 Teh, D., et al, Efficient bit allocation algorithm for ISO/MPEG audio encoder,
216 Electronics Letters, v34, n8, p721
218 Murphy, C & Anandakumar, K, Real-time MPEG-1 audio coding and decoding on a DSP
219 Chip, IEEE Trans on Consumer Electronics, v43, n1, 1997 p40
221 Hans, M & Bhaskaran, V., A compliant MPEG-1 layer II audio decoder with 16-B
222 arithmetic operations, IEEE Signal Proc Letters v4 n5 1997 p121
224 [mikecheng at NOT planckenergy.com] remove the NOT