USAGE 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968
  1. % lame [options] inputfile [outputfile]
  2. inputfile and/or outputfile can be "-", which means stdin/stdout.
  3. For more options, just type:
  4. % lame --help or lame --longhelp
  5. Note: The HTML documentation is more complete than this text file.
  6. =======================================================================
  7. Constant Bitrate Examples:
  8. =======================================================================
  9. fixed bit rate jstereo 128 kbps encoding:
  10. % lame -b128 sample.wav sample.mp3
  11. Use highest quality mode, slowest:
  12. % lame -q0 -b128 sample.wav sample.mp3
  13. Use fast encode, low quality (no noise shaping)
  14. % lame -f -b128 sample.wav sample.mp3
  15. =======================================================================
  16. Variable Bitrate Examples:
  17. =======================================================================
  18. LAME has two types of variable bitrate: ABR and VBR.
  19. ABR is the type of variable bitrate encoding usually found in other
  20. MP3 encoders, Vorbis and AAC. The number of bits is determined by
  21. some metric (like perceptual entropy, or just the number of bits
  22. needed for a certain set of encoding tables), and it is not based on
  23. computing the actual encoding/quantization error. ABR should always
  24. give results equal or better than CBR:
  25. ABR: (--abr <x> means encode with an average bitrate of around x kbps)
  26. % lame --abr 128 sample.wav sample.mp3
  27. Another way to enable abr is:
  28. % lame --preset 128 sample.wav sample.mp3
  29. VBR is a true variable bitrate mode which bases the number of bits for
  30. each frame on the measured quantization error relative to the
  31. estimated allowed masking. The value 0 is the highest quality, which
  32. creates bigger files, and the lowest is 9.999, which creates the smallest
  33. files. Decimal values can be specified, like: 4.51.
  34. The resulting filesizes depend on the input material. On typical music
  35. you can expect -V5 resulting in files averaging 132 kbps, -V2 averaging
  36. 200 kbps.
  37. Variable Bitrate (VBR): (use -V n to adjust quality/filesize)
  38. % lame -V2 sample.wav sample.mp3
  39. =======================================================================
  40. Low Bitrates
  41. =======================================================================
  42. At lower bitrates, (like 24 kbps per channel), it is recommended that
  43. you use a 16 kHz sampling rate combined with lowpass filtering. LAME,
  44. as well as commercial encoders (FhG, Xing) will do this automatically.
  45. However, if you feel there is too much (or not enough) lowpass
  46. filtering, you may need to try different values of the lowpass cutoff
  47. and passband width (--resample, --lowpass and --lowpass-width options).
  48. =======================================================================
  49. Streaming Example
  50. =======================================================================
  51. % cat inputfile | lame [options] - - > output
  52. =======================================================================
  53. Scripts are included (in the 'misc' subdirectory)
  54. to run lame on multiple files:
  55. bash script: mlame Run "mlame -?" for instructions.
  56. sh script: auenc Run auenc for instructions
  57. sh script: mugeco.sh
  58. Perl script which will re-encode mp3 files and preserve id3 tags:
  59. lameid3.pl
  60. Windows scripts:
  61. lame4dos.bat
  62. Lame.vbs (and an HTML frontend: LameGUI.html)
  63. =======================================================================
  64. options guide:
  65. =======================================================================
  66. These options are explained in detail below.
  67. By default, LAME accepts a PCM audio sample inside a .WAV container as the
  68. input file, in 8, 16, 24 and 32 bits integer and in IEEE FLOAT.
  69. If it is compiled with libsndfile, then it also supports the extra formats
  70. that the library supports.
  71. There is also support for raw PCM data and piped input
  72. Input options:
  73. --scale <arg> multiply PCM input by <arg>
  74. --scale-l <arg> scale channel 0 (left) input (multiply PCM data) by <arg>
  75. --scale-r <arg> scale channel 1 (right) input (multiply PCM data) by <arg>
  76. --gain number apply Gain adjustment in decibels, range -20.0 to +12.0.
  77. --swap-channel Swap Left and Right input channels
  78. --mp1input input file is an MPEG 1 Layer I file. decode on the fly
  79. --mp2input input file is an MPEG 1 Layer II file. decode on the fly
  80. --mp3input input file is an MPEG 1 Layer III file. decode on the fly
  81. --nogap <file1> <file2> <...>
  82. gapless encoding for a set of contiguous files
  83. --nogapout <dir>
  84. output dir for gapless encoding (must precede --nogap)
  85. --nogaptags allow the use of VBR tags in gapless encoding
  86. --out-dir path If no explicit output file is specified, a file will be
  87. written at given path. Ignored when using piped/streamed input
  88. Input options for raw PCM:
  89. -r read the input file as a raw (headerless) PCM stream
  90. -s n input sampling frequency in kHz (Default 44.1Khz)
  91. --signed input is signed (default)
  92. --unsigned input is unsigned
  93. --bitwidth w input bit width is w (default 16)
  94. -x swap bytes of input file
  95. --little-endian input is little-endian (default)
  96. --big-endian input is big-endian
  97. -a downmix stereo file to mono file for mono encoding.
  98. Needed with raw input for the -mm mode to do the downmix.
  99. Resampling and filtering:
  100. --lowpass Frequency(kHz), lowpass filter cutoff above freq.
  101. Range [0.001..50]kHz or [50..50000]Hz
  102. --lowpass-width
  103. Frequency(kHz), lowpass window width.
  104. Range [0.001..16]kHz or [16..50000]Hz
  105. (See further restriction in the detailed explanation)
  106. --highpass Frequency(kHz), highpass filter cutoff below freq.
  107. Range [0.001..16]kHz or [16..50000]Hz
  108. (See further restriction in the detailed explanation)
  109. --highpass-width
  110. Frequency(kHz), highpass window width
  111. (See further restriction in the detailed explanation)
  112. --resample n Sampling frequency of output file(kHz)
  113. Default=automatic depending on settings like bitrate.
  114. Operational:
  115. --preset type Enables some preconfigured settings. Check below for each
  116. of the valid values
  117. --decode assume input file is an mp3 file, and decode to wav.
  118. --decode-mp3delay samples
  119. Set the encoder delay to use to decode the input .mp3 file
  120. -t disable writing of WAV header when using --decode
  121. (decode to raw pcm, native endian format (use -x to swap))
  122. -m m/s/j/f/a mode selection
  123. -q n Internal algorithm quality setting 0..9.
  124. 0 = slowest algorithms, but potentially highest quality
  125. 9 = faster algorithms, very poor quality
  126. Default is 3. Read the differences between VBR and CBR below.
  127. -h same as -q2
  128. -f same as -q7
  129. --priority <type>
  130. sets the process priority (Windows and OS/2-specific):
  131. 0,1 = Low priority (IDLE_PRIORITY_CLASS)
  132. 2 = normal priority (NORMAL_PRIORITY_CLASS, defaul
  133. 3,4 = High priority (HIGH_PRIORITY_CLASS))
  134. Note: Calling '--priority' without a parameter will set it to 0.
  135. Constant Bit Rate (CBR)
  136. -b n set bitrate (8, 16, 24, ..., 320)
  137. --freeformat produce a free format bitstream. User must also specify
  138. a bitrate with -b, between 8 and 640 kbps.
  139. Variable Bit Rate (VBR)
  140. -v VBR ( alias of -V 4 )
  141. --vbr-old use old variable bitrate (VBR) routine
  142. --vbr-new use new variable bitrate (VBR) routine (default)
  143. -V n VBR quality setting (0=highest quality, 9.999=lowest)
  144. -b n specify a minimum allowed bitrate (8,16,24,...,320)
  145. -B n specify a maximum allowed bitrate (8,16,24,...,320)
  146. -F strictly enforce minimum bitrate
  147. -t disable VBR informational tag
  148. --nohist disable display of VBR bitrate histogram
  149. --abr n specify average bitrate desired
  150. MP3 header/stream options:
  151. -e n/5/c de-emphasis
  152. -p add CRC error protection
  153. -c mark the encoded file as copyrighted
  154. -o mark the encoded file as a copy
  155. -S don't print progress report, VBR histogram
  156. --strictly-enforce-ISO comply as much as possible to ISO MPEG spec
  157. --replaygain-fast compute RG fast but slightly inaccurately (default)
  158. --replaygain-accurate compute RG more accurately and find the peak sample
  159. --noreplaygain disable ReplayGain analysis
  160. --clipdetect enable --replaygain-accurate and print a message whether
  161. clipping occurs and how far the waveform is from full scale
  162. ID3 tagging:
  163. --tt <title> audio/song title (max 30 chars for version 1 tag)
  164. --ta <artist> audio/song artist (max 30 chars for version 1 tag)
  165. --tl <album> audio/song album (max 30 chars for version 1 tag)
  166. --ty <year> audio/song year of issue (1 to 9999)
  167. --tc <comment> user-defined text (max 30 chars for v1 tag, 28 for v1.1)
  168. --tn <track[/total]>
  169. audio/song track number (1 to 255, creates v1.1 tag.
  170. adding a total force a version 2 tag)
  171. --tg <genre> audio/song genre (name or number in list)
  172. --ti <file> audio/song albumArt (jpeg/png/gif file, v2.3 tag)
  173. --tv <id=value> user-defined frame specified by id and value (v2.3 tag)
  174. --add-id3v2 force addition of version 2 tag
  175. --id3v1-only add only a version 1 tag
  176. --id3v2-only add only a version 2 tag
  177. --id3v2-utf16 add following options in unicode text encoding
  178. --id3v2-latin1 add following options in latin-1 text encoding
  179. --space-id3v1 pad version 1 tag with spaces instead of nulls
  180. --pad-id3v2 same as '--pad-id3v2-size 128'
  181. --pad-id3v2-size <num>
  182. adds version 2 tag, pad with extra <num> bytes
  183. --genre-list print alphabetically sorted ID3 genre list and exit
  184. --ignore-tag-errors
  185. ignore errors in values passed for tags
  186. Note: A version 2 tag will NOT be added unless one of the input fields
  187. won't fit in a version 1 tag (e.g. the title string is longer than 30
  188. characters), or the '--add-id3v2' or '--id3v2-only' options are used,
  189. or output is redirected to stdout.
  190. Verbosity:
  191. --disptime secs Print progress report every secs seconds
  192. --nohist Disable VBR histogram display
  193. --silent Don't print anything on screen
  194. --quiet Don't print anything on screen
  195. --verbose Print a lot of useful information
  196. --version Print License information
  197. --license Print License information
  198. --help Shows the common list of switches.
  199. Add id3 or dev to get help for a specified topic
  200. --usage Shows the common list of switches.
  201. Add id3 or dev to get help for a specified topic
  202. --longhelp Shows the complete list of switches
  203. =======================================================================
  204. Detailed description of all options in alphabetical order
  205. =======================================================================
  206. =======================================================================
  207. Downmix
  208. =======================================================================
  209. -a
  210. mix the stereo input file to mono and encode as mono.
  211. This option is only needed in the case of raw PCM stereo input
  212. (because LAME cannot determine the number of channels in the input file).
  213. To encode a stereo (RAW) PCM input file as mono, use "lame -m m -a"
  214. For WAV and AIFF input files, using "-m m" will always produce a
  215. mono .mp3 file from both mono and stereo input.
  216. =======================================================================
  217. Average bitrate encoding (aka Safe VBR)
  218. =======================================================================
  219. --abr n
  220. turns on encoding with a targeted average bitrate of n kbps, allowing
  221. to use frames of different sizes. The allowed range of n is 8...320
  222. kbps, you can use any integer value within that range.
  223. =======================================================================
  224. Use version 2 of the ID3 tag standard
  225. =======================================================================
  226. --add-id3v2 Force addition of version 2 tag
  227. Tells LAME to add the tag information as id3v2. This implies adding both,
  228. a version 1 and a version 2 tag, if the values fit on a version 1 tag.
  229. See --id3v1-only and --id3v2-only if you want a more fine-grained control.
  230. =======================================================================
  231. Bitrate
  232. =======================================================================
  233. -b n
  234. MPEG-1 layer III sample frequencies (kHz): 32 48 44.1
  235. bitrates (kbps): 32 40 48 56 64 80 96 112 128 160 192 224 256 320
  236. MPEG-2 layer III sample frequencies (kHz): 16 24 22.05
  237. bitrates (kbps): 8 16 24 32 40 48 56 64 80 96 112 128 144 160
  238. MPEG-2.5 layer III sample frequencies (kHz): 8 12 11.025
  239. bitrates (kbps): 8 16 24 32 40 48 56 64
  240. The bitrate to be used. Default is 128kbps in MPEG1 (64 for mono),
  241. 64kbps in MPEG2 (32 for mono) and 32kbps in MPEG2.5 (16 for mono).
  242. When used with variable bitrate encodings (VBR), -b specifies the
  243. minimum bitrate to use. This is useful only if you need to circumvent
  244. a buggy hardware device with strange bitrate constrains.
  245. =======================================================================
  246. Max bitrate
  247. =======================================================================
  248. -B n
  249. see also option "-b" for allowed bitrates.
  250. Maximum allowed bitrate when using VBR/ABR.
  251. Using -B is NOT RECOMMENDED. A 128 kbps CBR bitstream, because of the
  252. bit reservoir, can actually have frames which use as many bits as a
  253. 320 kbps frame. ABR/VBR modes minimize the use of the bit reservoir, and
  254. thus need to allow 320 kbps frames to get the same flexability as CBR
  255. streams. This is useful only if you need to circumvent a buggy hardware
  256. device with strange bitrate constrains.
  257. =======================================================================
  258. Endianess, big.
  259. =======================================================================
  260. --big-endian Set the byte order to big-endian.
  261. This switch tells LAME that the RAW pcm input is encoded in big-endian
  262. instead of little-endian.
  263. =======================================================================
  264. Sample bit with
  265. =======================================================================
  266. --bitwidth Sets the bitwidth value
  267. With RAW pcm input, this switch lets you specify the bitwidth of the same
  268. (8 bits, 16 bits...)
  269. =======================================================================
  270. Copyright
  271. =======================================================================
  272. -c
  273. flag the encoded file as copyrighted
  274. =======================================================================
  275. Clipping detection
  276. =======================================================================
  277. --clipdetect
  278. Enable --replaygain-accurate and print a message whether clipping
  279. occurs and how far in dB the waveform is from full scale.
  280. This option is not usable if the MP3 decoder was _explicitly_ disabled
  281. in the build of LAME.
  282. See also: --replaygain-accurate
  283. =======================================================================
  284. MPEG audio decode capability
  285. =======================================================================
  286. --decode
  287. This uses LAME's HIP decoder to decode an MP3 file (layers 1, 2 and 3) to
  288. a wav file.
  289. If -t is used (disable wav header), LAME will output
  290. raw pcm in native endian format (use -x to swap bytes).
  291. This option is not usable if the MP3 decoder was _explicitly_ disabled
  292. in the build of LAME.
  293. HIP stands for Hip Isn't a Player and is based off of Michael Hipp's mpglib 0.2a
  294. =======================================================================
  295. MPEG audio decode capability
  296. =======================================================================
  297. --decode-mp3delay x Indicate a different encoder delay for decoding
  298. When decoding an mp3 file, LAME automatically corrects for the start delay
  299. that the encoder had to put into it. This setting lets you specify a different
  300. delay than LAME's own one, so that it is possible to compensate for the delay
  301. of mp3's generated with other encoders.
  302. =======================================================================
  303. De-emphasis
  304. =======================================================================
  305. -e n/5/c
  306. n = (none, default)
  307. 5 = 0/15 microseconds
  308. c = CCITT j.17
  309. All this does is set a flag in the bitstream. If you have a PCM
  310. input file where one of the above types of (obsolete) emphasis has
  311. been applied, you can set this flag in LAME. Then the mp3 decoder
  312. should de-emphasize the output during playback, although most
  313. decoders ignore this flag.
  314. A better solution would be to apply the de-emphasis with a standalone
  315. utility before encoding, and then encode without -e.
  316. =======================================================================
  317. Strictly enforce VBR minimum bitrate
  318. =======================================================================
  319. -F
  320. strictly enforce VBR minimum bitrate. Without this option, passages of
  321. analog silence will be encoded at the minimum bitrate possible (32 or 8,
  322. depending on MPEG version).
  323. =======================================================================
  324. Free format bitstreams
  325. =======================================================================
  326. --freeformat
  327. LAME will produce a fixed bitrate, free format bitstream. User must
  328. specify the desired bitrate in kbps, which can be any integer between
  329. 8 and 640.
  330. Not supported by most decoders. Complient decoders (of which there
  331. are few) are only required to support up to 320 kbps.
  332. Decoders known to handle free format:
  333. supports up to
  334. mpg123 640 kbps
  335. MAD 640 kbps
  336. "lame --decode" 640 kbps
  337. l3dec 310 kbps
  338. =======================================================================
  339. Gain
  340. =======================================================================
  341. --gain Apply gain in decibels.
  342. Apply Gain adjustment in decibels, range -20.0 to +12.0. 0dBFS means no
  343. amplification.
  344. =======================================================================
  345. High pass filter
  346. =======================================================================
  347. --highpass number Use a highpass filter when encoding
  348. Enables a highpass filter of the specified frequency when encoding the source.
  349. Range [0.001..50]kHz or [50..50000]Hz.
  350. This is usually not required, and the gains are usually minimal. May be useful
  351. to remove an interference signal on 50Hz or 60Hz, or a DC offset.
  352. (default: disabled)
  353. Note: The current implementation has a minimum highpass frequency of
  354. (67.5/62)% of the sample rate (I.e. 481Hz at 44Khz).
  355. =======================================================================
  356. High pass filter
  357. =======================================================================
  358. --highpass-width width Set the width of the decaying curve.
  359. Specify the width in Hz of the decaying curve of the highpass.
  360. Range [16..50000]Hz
  361. The minimum (and default) width is 75% of a band's width (which is 1/64th of
  362. the sample rate).
  363. Note: See the remark in the --highpass command above.
  364. =======================================================================
  365. ID3 tag modes
  366. =======================================================================
  367. --id3v1-only Disable the use of id3v2.
  368. Put it before any tag setting.
  369. This setting tells LAME to use ID3 v1 tag only, and not create an ID3v2
  370. even if it thinks it should.
  371. --id3v2-only Disable the user ov id3v1.
  372. Put it before any tag setting.
  373. This setting tells LAME to use ID3 v2 tag only. An ID3 v1 tag would not
  374. be written.
  375. --ignore-tag-errors Ignore tag information errors
  376. Put it before any tag setting.
  377. This tells lame to ignore the tag information it sees as erroneous and
  378. continue encoding without those. Without this setting, errors are reported
  379. and encoding does not start.
  380. =======================================================================
  381. Endianess. little
  382. =======================================================================
  383. --little-endian Set the byte order to little-endian.
  384. This switch tells LAME that the RAW pcm input is encoded in little-endian.
  385. It is the default setting.
  386. =======================================================================
  387. Low pass filter
  388. =======================================================================
  389. --lowpass number Use a lowpass filter when encoding
  390. Enables a lowpass filter of the specified frequency when encoding the source.
  391. Range [0.001..50]kHz or [50..50000]Hz
  392. Using a lowpass filter helps reducing the amount of data to encode. This is
  393. important in MP3 due to a limitation in very high frequencies (>16Khz).
  394. The default value depends on the target bitrate/quality. It is not recommended
  395. to change it as a general basis.
  396. --lowpass-width width Set the width of the decaying curve.
  397. Specify the width in Hz of the decaying curve of the lowpass.
  398. Range [0.001..16]kHz or [16..50000]Hz
  399. The lowpass is in the center of this curve. The minimum (and default) width
  400. is 75% of a band's width (which is 1/64th of the sample rate).
  401. =======================================================================
  402. Modes:
  403. =======================================================================
  404. -m m mono
  405. -m l get only the left channel of a stereo signal for a mono output
  406. -m r get only the right channel of a stereo signal for a mono output
  407. -m s (forced) L/R stereo
  408. -m j joint stereo
  409. -m f forced mid/side stereo
  410. -m d dual (independent) channels. Its purpose was meant for dual language
  411. streams where only one of them should be decoded.
  412. Most decoders just decode them as a stereo stream.
  413. -m a Currently, a synonym of m j. (In older releases it selected
  414. different modes depending on the bitrate)
  415. MONO is the default mode for mono input files. If "-m m" is specified
  416. for a stereo input file, the two channels will be averaged into a mono
  417. signal. (Note: See comments about the -a switch for RAW PCM streams)
  418. (FORCED) L/R STEREO encodes the left and the right signals independently,
  419. and gives more or less bits to each, depending on the currently available.
  420. JOINT STEREO is the default mode of encoding.
  421. jstereo means the encoder can use (on a frame by frame basis) either
  422. L/R stereo or mid/side stereo. In mid/side stereo, the mid(L+R) and side(L-R)
  423. channels are encoded, and more bits are allocated to the mid channel
  424. than the side channel. When there isn't too much stereo separation, this
  425. effectively increases the bandwidth, so having higher quality with the same
  426. amount of bits.
  427. Using mid/side stereo inappropriately can result in audible
  428. compression artifacts. Too much switching between mid/side and L/R
  429. stereo can also sound bad. To determine when to switch to mid/side
  430. stereo, LAME uses a much more sophisticated algorithm than that
  431. described in the ISO documentation.
  432. FORCED MID/SIDE STEREO forces all frames to be encoded mid/side stereo. It
  433. should only be used if you are sure every frame of the input file
  434. has very little stereo seperation.
  435. DUAL CHANNEL mode is similar to encode the left and right as two mono signals.
  436. Its purpose was meant for Dual language streams where only one of them should
  437. be decoded. Most decoders just decode them as a stereo stream
  438. INTENSITY STEREO
  439. Not supported.
  440. =======================================================================
  441. MP3 input file
  442. =======================================================================
  443. --mp1input --mp2input --mp3input MPEG layer I, II or III input file
  444. Assume the input file is a MP1/2/3 file. LAME will decode the input file
  445. before re-encoding it. Since MP3 is a lossy format, this is not recommended
  446. in general. But it is useful for creating low bitrate mp3s from high bitrate
  447. mp3s. If the filename ends in ".mp3" LAME will assume it is an MP3. For
  448. stdin or MP3 files which dont end in .mp3 you need to use this switch.
  449. =======================================================================
  450. No Gap (continuous audio) encoding of multiple files
  451. =======================================================================
  452. --nogap file1 file2 [...] Encodes multiple continuous files.
  453. Encodes multiple files (ordered by position) which are meant to be played
  454. gaplessly.
  455. By default, LAME will encode the files with accurate length, but the first
  456. and last frame may contain a few erroneous samples for signals that don't
  457. fade-in/out (as is the case of continuous playback).
  458. This setting solves that by using the samples from the next/previous file to
  459. compute the encoding.
  460. --nogapout dir Specify a directory for the output of the files encoded
  461. with --nogap
  462. This setting should precede --nogap, and is used to specify the alternate
  463. directory where to store the encoded files. The default one is the input file
  464. directory.
  465. --nogaptags Enables the use of VBR tags with files encoded with --nogap
  466. Tells LAME to put VBR tags to encoded files if they are encoded in VBR or ABR
  467. modes. Else, using the --nogap option doesn't generate it.
  468. =======================================================================
  469. Disable historgram display
  470. =======================================================================
  471. --nohist
  472. By default, LAME will display a bitrate histogram while producing
  473. VBR mp3 files. This will disable that feature.
  474. =======================================================================
  475. Disable ReplayGain analysis
  476. =======================================================================
  477. --noreplaygain
  478. By default ReplayGain analysis is enabled. This switch disables it.
  479. See also: --replaygain-accurate, --replaygain-fast
  480. =======================================================================
  481. Non-original
  482. =======================================================================
  483. -o
  484. mark the encoded file as a copy
  485. =======================================================================
  486. CRC error protection
  487. =======================================================================
  488. -p
  489. Turn on CRC error protection.
  490. It will add a cyclic redundancy check (CRC) code in each frame, allowing
  491. to detect transmission errors that could occur on the MP3 stream. However,
  492. it takes 16 bits per frame that would otherwise be used for encoding, and
  493. therefore will slightly reduce the sound quality.
  494. =======================================================================
  495. ID3 V2 padding
  496. =======================================================================
  497. --pad-id3v2 Pad ID3v2 tag.
  498. Pads the ID3v2 tag with extra 128bytes to allow it to expand.
  499. =======================================================================
  500. Preset system.
  501. =======================================================================
  502. --preset x Enable one of the presets
  503. Setting Meaning
  504. --preset medium -V 5
  505. --preset standard -V 2
  506. --preset extreme -V 0
  507. --preset insane -b 320
  508. --preset fast xxx In versions older than LAME 3.98, "fast" was needed to
  509. enable the vbr-new routine. It is no longer needed.
  510. --preset number --abr number
  511. --preset cbr number -b number
  512. Old compatibility settings. Meaningless
  513. --preset phone -b 16 -m m
  514. --preset phon+ /
  515. lw / mw-eu -b 24 -m m
  516. --preset mw-us -b 40 -m m
  517. --preset voice -b 56 -m m
  518. --preset fm / radio -b 112
  519. --preset hifi -b 160
  520. --preset cd -b 192
  521. --preset studio -b 256
  522. =======================================================================
  523. Windows and OS/2 process priority control
  524. =======================================================================
  525. --priority <type>
  526. (Windows and OS/2 only)
  527. Sets the process priority for LAME while running under Windows or IBM OS/2.
  528. This can be very useful to avoid the system becoming slow and/or unresponsive.
  529. By setting LAME to run in a lower priority, you leave more time for the system
  530. to update basic processing (drawing windows, polling keyboard/mouse, etc). The
  531. impact in LAME's performance is minimal if you use priority 0 to 2.
  532. The valid parameters are:
  533. 0 = Low priority (IDLE, delta = 0)
  534. 1 = Medium priority (IDLE, delta = +31)
  535. 2 = Regular priority (REGULAR, delta = -31)
  536. 3 = High priority (REGULAR, delta = 0)
  537. 4 = Maximum priority (REGULAR, delta = +31)
  538. Note that if you call '--priority' without a parameter, priority 0 will be
  539. assumed.
  540. =======================================================================
  541. Algorithm quality selection
  542. =======================================================================
  543. -q n
  544. Bitrate is of course the main influence on quality. The higher the bitrate,
  545. the higher the quality. But for a given bitrate, we have a choice of algorithms
  546. to determine the best scalefactors and Huffman coding (noise shaping).
  547. For CBR, ABR and --vbr-old modes, the following table applies
  548. -q 0 Use the best algorithms (Best Huffman coding search, full outer
  549. loop, and the highest precision of several parameters).
  550. -q 1 to -q 4 Similar to -q 0 without the full outer loop and decreasing
  551. precision of parameters the further from q0. -q 3 is the default
  552. -q 5 and -q 6 Same as -q 7, but enables noise shaping and increases subblock
  553. gain
  554. -q 7 to -q 9 Same as -f. Very fast, OK quality. Psychoacoustics are used for
  555. pre-echo and mid/side stereo, but no noise-shaping is done.
  556. For the default VBR mode since LAME 3.98, the following table applies
  557. -q 0 to -q 4 include all features of the other modes and additionally use
  558. the best search when applying Huffman coding.
  559. -q 5 and -q 6 include all features of -q7, calculate and consider actual
  560. quantisation noise, and additionally enable subblock gain.
  561. -q 7 to -q 9 This level uses a psymodel but does not calculate quantisation
  562. noise when encoding: it takes a quick guess.
  563. =======================================================================
  564. Input file is raw pcm
  565. =======================================================================
  566. -r
  567. Assume the input file is raw pcm. Sampling rate and mono/stereo/jstereo
  568. must be specified on the command line. Without -r, LAME will perform
  569. several fseek()'s on the input file looking for WAV and AIFF headers.
  570. Not supported if LAME is compiled to use LIBSNDFILE.
  571. =======================================================================
  572. Slightly more accurate ReplayGain analysis and finding the peak sample
  573. =======================================================================
  574. --replaygain-accurate
  575. Compute "Radio" ReplayGain on the decoded data stream. Find the peak sample
  576. by decoding on the fly the encoded data stream and store it in the file.
  577. ReplayGain analysis does _not_ affect the content of a compressed data
  578. stream itself, it is a value stored in the header of a sound file.
  579. Information on the purpose of ReplayGain and the algorithms used is
  580. available from http://www.replaygain.org/
  581. By default, LAME performs ReplayGain analysis on the input data (after
  582. the user-specified volume scaling). This behaviour might give slightly
  583. inaccurate results because the data on the output of a lossy
  584. compression/decompression sequence differs from the initial input data.
  585. When --replaygain-accurate is specified the mp3 stream gets decoded on
  586. the fly and the analysis is performed on the decoded data stream.
  587. Although theoretically this method gives more accurate results, it has
  588. several disadvantages:
  589. * tests have shown that the difference between the ReplayGain values
  590. computed on the input data and decoded data is usually no greater
  591. than 0.5dB, although the minimum volume difference the human ear
  592. can perceive is about 1.0dB
  593. * decoding on the fly significantly slows down the encoding process
  594. The apparent advantage is that:
  595. * with --replaygain-accurate the peak sample is determined and
  596. stored in the file. The knowledge of the peak sample can be useful
  597. to decoders (players) to prevent a negative effect called 'clipping'
  598. that introduces distortion into sound.
  599. Only the "Radio" ReplayGain value is computed. It is stored in the LAME tag.
  600. The analysis is performed with the reference volume equal to 89dB.
  601. Note: the reference volume has been changed from 83dB on transition from
  602. version 3.95 to 3.95.1.
  603. This option is not usable if the MP3 decoder was _explicitly_ disabled
  604. in the build of LAME. (Note: if LAME is compiled without the MP3 decoder,
  605. ReplayGain analysis is performed on the input data after user-specified
  606. volume scaling).
  607. See also: --replaygain-fast, --noreplaygain, --clipdetect
  608. =======================================================================
  609. Fast ReplayGain analysis
  610. =======================================================================
  611. --replaygain-fast
  612. Compute "Radio" ReplayGain of the input data stream after user-specified
  613. volume scaling and/or resampling.
  614. ReplayGain analysis does _not_ affect the content of a compressed data
  615. stream itself, it is a value stored in the header of a sound file.
  616. Information on the purpose of ReplayGain and the algorithms used is
  617. available from http://www.replaygain.org/
  618. Only the "Radio" ReplayGain value is computed. It is stored in the LAME tag.
  619. The analysis is performed with the reference volume equal to 89dB.
  620. Note: the reference volume has been changed from 83dB on transition
  621. from version 3.95 to 3.95.1.
  622. This switch is enabled by default.
  623. See also: --replaygain-accurate, --noreplaygain
  624. =======================================================================
  625. Output sampling frequency in kHz
  626. =======================================================================
  627. --resample n
  628. where n = 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48. The values as Hz
  629. instead of Khz are also supported. Else, the value will be ignored.
  630. Output sampling frequency. Resample the input if necessary.
  631. If not specified, LAME may sometimes resample automatically
  632. when faced with extreme compression conditions (like encoding
  633. a 44.1 kHz input file at 32 kbps). To disable this automatic
  634. resampling, you have to use --resamle to set the output samplerate
  635. equal to the input samplerate. In that case, LAME will not
  636. perform any extra computations.
  637. =======================================================================
  638. Sampling frequency in kHz (for input RAW PCM)
  639. =======================================================================
  640. -s n
  641. where n = sampling rate in kHz.
  642. Required for raw PCM input files. Otherwise it will be determined
  643. from the header information in the input file.
  644. LAME will automatically resample the input file to one of the
  645. supported MP3 samplerates if necessary.
  646. =======================================================================
  647. Silent operation
  648. =======================================================================
  649. -S
  650. don't print progress report
  651. =======================================================================
  652. Scale
  653. =======================================================================
  654. --scale <arg>
  655. Scales input by <arg>. This just multiplies the PCM data
  656. (after it has been converted to floating point) by <arg>.
  657. <arg> > 1: increase volume
  658. <arg> = 1: no effect
  659. <arg> < 1: reduce volume
  660. Use with care, since most MP3 decoders will truncate data
  661. which decodes to values greater than 32768.
  662. =======================================================================
  663. Strict ISO complience
  664. =======================================================================
  665. --strictly-enforce-ISO
  666. With this option, LAME will enforce the 7680 bit limitation on
  667. total frame size. This results in many wasted bits for
  668. high bitrate encodings.
  669. =======================================================================
  670. Disable VBR tag/WAV header
  671. =======================================================================
  672. -t
  673. This setting has two different uses:
  674. When encoding to VBR, this setting disables writing the VBR Tag (also
  675. known as XING tag). This tag is embedded by default in the frame 0 of
  676. MP3 file. It allows VBR aware players to accurately seek and compute playing
  677. times in such files.
  678. When decoding MP3 to WAV using --decode, this flag will disable writing the
  679. WAV header. The output will be raw pcm, native endian format. Use -x to swap
  680. bytes.
  681. =======================================================================
  682. VBR quality setting
  683. =======================================================================
  684. -V n Enable VBR encoding
  685. Encodes using the VBR algorithm, at the indicated quality.
  686. 0=highest quality, bigger files. 9.999=lowest quality, smaller files.
  687. Decimal values can be specified, like: 4.51
  688. On average, the resulting bitrates are as follows:
  689. Setting Average bitrate (kbps)
  690. 0 245
  691. 2 190
  692. 3 175
  693. 4 165
  694. 5 130
  695. Using -V 7 or higher (lower quality) is not recommended.
  696. ABR usually produces better results.
  697. =======================================================================
  698. Swap bytes
  699. =======================================================================
  700. -x
  701. swap bytes in the input file (and output file when using --decode).
  702. For sorting out little endian/big endian type problems. If your encodings
  703. sound like static, try this first.
  704. =======================================================================
  705. Ignore scalefactor band 21
  706. =======================================================================
  707. -Y Ignore noise in sbf21, like CBR mode does
  708. Allows -V2, -V1 and -V0 to not encode the highest frequencies accurately,
  709. if doing so causes disproportional increases in bitrate.
  710. This is the same that CBR and ABR modes do.
  711. Due to the design of the MP3 format, to keep precision in the last scalefactor
  712. band, an encoder needs to increase the precision in all the bands (not only in
  713. this one).
  714. The consequence is an increase of bitrate (+60kbps in some cases) compared to
  715. not keeping that precision. Generally, this band should allow for distortions,
  716. so using this switch shouldn't cause harm.