lame.1 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101
  1. .TH lame 1 "December 08, 2013" "LAME 3.99" "LAME audio compressor"
  2. .SH NAME
  3. lame \- create mp3 audio files
  4. .SH SYNOPSIS
  5. lame [options] <infile> <outfile>
  6. .SH DESCRIPTION
  7. .PP
  8. LAME is a program which can be used to create compressed audio files.
  9. (Lame ain't an MP3 encoder).
  10. These audio files can be played back by popular MP3 players such as
  11. mpg123 or madplay.
  12. To read from stdin, use "\-" for <infile>.
  13. To write to stdout, use "\-" for <outfile>.
  14. .SH OPTIONS
  15. Input options:
  16. .TP
  17. .B \-r
  18. Assume the input file is raw pcm.
  19. Sampling rate and mono/stereo/jstereo must be specified on the command line.
  20. For each stereo sample, LAME expects the input data to be ordered left channel
  21. first, then right channel. By default, LAME expects them to be signed integers
  22. with a bitwidth of 16 and stored in little-endian.
  23. Without
  24. .B \-r,
  25. LAME will perform several
  26. .I fseek()'s
  27. on the input file looking for WAV and AIFF headers.
  28. .br
  29. Might not be available on your release.
  30. .TP
  31. .B \-x
  32. Swap bytes in the input file (or output file when using
  33. .B \-\-decode).
  34. .br
  35. For sorting out little endian/big endian type problems.
  36. If your encodings sounds like static,
  37. try this first.
  38. .br
  39. Without using
  40. .B \-x,
  41. LAME will treat input file as native endian.
  42. .TP
  43. .BI \-s " sfreq"
  44. .I sfreq
  45. = 8/11.025/12/16/22.05/24/32/44.1/48
  46. Required only for raw PCM input files.
  47. Otherwise it will be determined from the header of the input file.
  48. LAME will automatically resample the input file to one of the supported
  49. MP3 samplerates if necessary.
  50. .TP
  51. .BI \-\-bitwidth " n"
  52. Input bit width per sample.
  53. .br
  54. .I n
  55. = 8, 16, 24, 32 (default 16)
  56. Required only for raw PCM input files.
  57. Otherwise it will be determined from the header of the input file.
  58. .TP
  59. .BI \-\-signed
  60. Instructs LAME that the samples from the input are signed (the default
  61. for 16, 24 and 32 bits raw pcm data).
  62. Required only for raw PCM input files.
  63. .TP
  64. .BI \-\-unsigned
  65. Instructs LAME that the samples from the input are unsigned (the default
  66. for 8 bits raw pcm data, where 0x80 is zero).
  67. Required only for raw PCM input files
  68. and only available at bitwidth 8.
  69. .TP
  70. .BI \-\-little-endian
  71. Instructs LAME that the samples from the input are in little-endian form.
  72. Required only for raw PCM input files.
  73. .TP
  74. .BI \-\-big-endian
  75. Instructs LAME that the samples from the input are in big-endian form.
  76. Required only for raw PCM input files.
  77. .TP
  78. .B \-\-mp1input
  79. Assume the input file is a MPEG Layer I (ie MP1) file.
  80. .br
  81. If the filename ends in ".mp1" LAME will assume it is a MPEG Layer I file.
  82. For stdin or Layer I files which do not end in .mp1 you need to use
  83. this switch.
  84. .TP
  85. .B \-\-mp2input
  86. Assume the input file is a MPEG Layer II (ie MP2) file.
  87. .br
  88. If the filename ends in ".mp2" LAME will assume it is a MPEG Layer II file.
  89. For stdin or Layer II files which do not end in .mp2 you need to use
  90. this switch.
  91. .TP
  92. .B \-\-mp3input
  93. Assume the input file is a MP3 file.
  94. .br
  95. Useful for downsampling from one mp3 to another.
  96. As an example,
  97. it can be useful for streaming through an IceCast server.
  98. .br
  99. If the filename ends in ".mp3" LAME will assume it is an MP3.
  100. For stdin or MP3 files which do not end in .mp3 you need to use this switch.
  101. .TP
  102. .BI \-\-nogap " file1 file2 ..."
  103. gapless encoding for a set of contiguous files
  104. .TP
  105. .BI \-\-nogapout " dir"
  106. output dir for gapless encoding (must precede \-\-nogap)
  107. .TP
  108. .BI \-\-out-dir " dir"
  109. If no explicit output file is specified, a file will be written at given path.
  110. Ignored when using piped/streamed input
  111. .PP
  112. Operational options:
  113. .TP
  114. .BI \-m " mode"
  115. .I mode
  116. = s, j, f, d, m, l, r
  117. Joint-stereo is the default mode for stereo files.
  118. .B (s)imple stereo (Forced LR)
  119. .br
  120. In this mode,
  121. the encoder makes no use of potentially existing correlations between
  122. the two input channels.
  123. It can,
  124. however,
  125. negotiate the bit demand between both channel,
  126. i.e. give one channel more bits if the other contains silence or needs
  127. less bits because of a lower complexity.
  128. .B (j)oint stereo
  129. .br
  130. In this mode,
  131. the encoder can use (on a frame by frame basis) either L/R stereo or mid/side stereo.
  132. In mid/side stereo,
  133. the mid (L+R) and side (L-R) channels are encoded,
  134. and more bits are allocated to the mid channel than the side channel.
  135. When there isn't too much stereo separation, this effectively increases the bandwidth,
  136. so having higher quality with the same amount of bits.
  137. Using mid/side stereo inappropriately can result in audible compression artifacts.
  138. Too much switching between mid/side and regular stereo can also sound bad.
  139. To determine when to switch to mid/side stereo,
  140. LAME uses a much more sophisticated algorithm than the one described in the ISO documentation.
  141. .B (f)orced MS stereo
  142. .br
  143. Forces all frames to be encoded with mid/side stereo. It should be used only if you are sure that every frame of the input file has very little stereo separation.
  144. .B (d)ual channel
  145. .br
  146. In this mode,
  147. the 2 channels will be totally independently encoded.
  148. Each channel will have exactly half of the bitrate.
  149. This mode is designed for applications like dual languages
  150. encoding (for example: English in one channel and French in the other).
  151. Using this encoding mode for regular stereo files will result in a
  152. lower quality encoding.
  153. .B (m)ono
  154. .br
  155. The input will be encoded as a mono signal.
  156. If it was a stereo signal,
  157. it will be downsampled to mono.
  158. The downmix is calculated as the sum of the left and right channel,
  159. attenuated by 6 dB.
  160. Also note that, if using a stereo RAW PCM stream, you need to use the -a parameter.
  161. .B (l)eft channel only
  162. .br
  163. The input will be encoded as a mono signal.
  164. If it was a stereo signal,
  165. the left channel will be encoded only.
  166. .B (r)ight channel only
  167. .br
  168. The input will be encoded as a mono signal.
  169. If it was a stereo signal,
  170. the right channel will be encoded only.
  171. .TP
  172. .B \-a
  173. Mix the stereo input file to mono and encode as mono.
  174. .br
  175. The downmix is calculated as the sum of the left and right channel,
  176. attenuated by 6 dB.
  177. This option is only needed in the case of raw PCM stereo input
  178. (because LAME cannot determine the number of channels in the input file).
  179. To encode a stereo RAW PCM input file as mono,
  180. use
  181. .B lame \-a \-m m
  182. For WAV and AIFF input files,
  183. using
  184. .B \-m m
  185. will always produce a mono .mp3 file from both mono and stereo input.
  186. .TP
  187. .B \-\-freeformat
  188. Produces a free format bitstream.
  189. With this option,
  190. you can use
  191. .B \-b
  192. with any bitrate higher than 8 kbps.
  193. However,
  194. even if an mp3 decoder is required to support free bitrates at
  195. least up to 320 kbps,
  196. many players are unable to deal with it.
  197. Tests have shown that the following decoders support free format:
  198. .br
  199. .B in_mpg123
  200. up to 560 kbps
  201. .br
  202. .B l3dec
  203. up to 310 kbps
  204. .br
  205. .B LAME
  206. up to 640 kbps
  207. .br
  208. .B MAD
  209. up to 640 kbps
  210. .TP
  211. .B \-\-decode
  212. Uses LAME for decoding to a wav file.
  213. The input file can be any input type supported by encoding,
  214. including layer II files.
  215. LAME uses a fork of mpglib known as HIP for decoding.
  216. If
  217. .B \-t
  218. is used (disable wav header),
  219. LAME will output raw pcm in native endian format.
  220. You can use
  221. .B \-x
  222. to swap bytes order.
  223. This option is not usable if the MP3 decoder was
  224. .B explicitly
  225. disabled in the build of LAME.
  226. .TP
  227. .BI \-t
  228. Disable writing of the INFO Tag on encoding.
  229. .br
  230. This tag is embedded in frame 0 of the MP3 file.
  231. It includes some information about the encoding options of the file,
  232. and in VBR it lets VBR aware players correctly seek and compute
  233. playing times of VBR files.
  234. When
  235. .B \-\-decode
  236. is specified (decode to WAV),
  237. this flag will disable writing of the WAV header.
  238. The output will be raw pcm,
  239. native endian format.
  240. Use
  241. .B \-x
  242. to swap bytes.
  243. .TP
  244. .BI \-\-comp " arg"
  245. Instead of choosing bitrate,
  246. using this option,
  247. user can choose compression ratio to achieve.
  248. .TP
  249. .BI \-\-scale " n"
  250. .PD 0
  251. .TP
  252. .BI \-\-scale\-l " n"
  253. .TP
  254. .BI \-\-scale\-r " n"
  255. Scales input (every channel, only left channel or only right channel) by
  256. .I n.
  257. This just multiplies the PCM data (after it has been converted to floating
  258. point) by
  259. .I n.
  260. .I n
  261. > 1: increase volume
  262. .br
  263. .I n
  264. = 1: no effect
  265. .br
  266. .I n
  267. < 1: reduce volume
  268. Use with care,
  269. since most MP3 decoders will truncate data which decodes to values
  270. greater than 32768.
  271. .PD
  272. .TP
  273. .B \-\-replaygain\-fast
  274. Compute ReplayGain fast but slightly inaccurately.
  275. This computes "Radio" ReplayGain on the input data stream after
  276. user\(hyspecified volume\(hyscaling and/or resampling.
  277. The ReplayGain analysis does
  278. .I not
  279. affect the content of a compressed data stream itself,
  280. it is a value stored in the header of a sound file.
  281. Information on the purpose of ReplayGain and the algorithms used is
  282. available from
  283. .B http://www.replaygain.org/.
  284. Only the "RadioGain" Replaygain value is computed,
  285. it is stored in the LAME tag.
  286. The analysis is performed with the reference
  287. volume equal to 89dB.
  288. Note: the reference volume has been changed from 83dB on transition from
  289. version 3.95 to 3.95.1.
  290. This switch is enabled by default.
  291. See also:
  292. .B \-\-replaygain\-accurate, \-\-noreplaygain
  293. .TP
  294. .B \-\-replaygain\-accurate
  295. Compute ReplayGain more accurately and find the peak sample.
  296. This computes "Radio" ReplayGain on the decoded data stream,
  297. finds the peak sample by decoding on the fly the encoded data stream and stores it in the file.
  298. The ReplayGain analysis does
  299. .I not
  300. affect the content of a compressed data stream itself,
  301. it is a value stored in the header of a sound file.
  302. Information on the purpose of ReplayGain and the algorithms used is
  303. available from
  304. .B http://www.replaygain.org/.
  305. By default, LAME performs ReplayGain analysis on the input data
  306. (after the user\(hyspecified volume scaling).
  307. This behavior might give slightly inaccurate results
  308. because the data on the output of a lossy compression/decompression sequence
  309. differs from the initial input data.
  310. When
  311. .B \-\-replaygain-accurate
  312. is specified the mp3 stream gets decoded on the fly and the analysis is
  313. performed on the decoded data stream.
  314. Although theoretically this method gives more accurate results,
  315. it has several disadvantages:
  316. .RS 8
  317. .IP "*" 4
  318. tests have shown that the difference between the ReplayGain values computed
  319. on the input data and decoded data is usually not greater than 0.5dB,
  320. although the minimum volume difference the human ear can perceive is
  321. about 1.0dB
  322. .IP "*" 4
  323. decoding on the fly significantly slows down the encoding process
  324. .RE
  325. .RS 7
  326. The apparent advantage is that:
  327. .RE
  328. .RS 8
  329. .IP "*" 4
  330. with
  331. .B \-\-replaygain-accurate
  332. the real peak sample is determined and stored in the file.
  333. The knowledge of the peak sample can be useful to decoders (players)
  334. to prevent a negative effect called 'clipping' that introduces distortion
  335. into the sound.
  336. .RE
  337. .RS 7
  338. Only the "RadioGain" ReplayGain value is computed,
  339. it is stored in the LAME tag.
  340. The analysis is performed with the reference
  341. volume equal to 89dB.
  342. Note: the reference volume has been changed from 83dB on transition from
  343. version 3.95 to 3.95.1.
  344. This option is not usable if the MP3 decoder was
  345. .B explicitly
  346. disabled in the build of LAME.
  347. (Note: if LAME is compiled without the MP3 decoder,
  348. ReplayGain analysis is performed on the input data after user-specified
  349. volume scaling).
  350. See also:
  351. .B \-\-replaygain-fast, \-\-noreplaygain \-\-clipdetect
  352. .RE
  353. .TP
  354. .B \-\-noreplaygain
  355. Disable ReplayGain analysis.
  356. By default ReplayGain analysis is enabled. This switch disables it.
  357. See also:
  358. .B \-\-replaygain-fast, \-\-replaygain-accurate
  359. .TP
  360. .B \-\-clipdetect
  361. Clipping detection.
  362. Enable
  363. .B \-\-replaygain-accurate
  364. and print a message whether clipping occurs and how far in dB the waveform
  365. is from full scale.
  366. This option is not usable if the MP3 decoder was
  367. .B explicitly
  368. disabled in the build of LAME.
  369. See also:
  370. .B \-\-replaygain-accurate
  371. .TP
  372. .B \-\-preset " type | [cbr] kbps"
  373. Use one of the built-in presets.
  374. Have a look at the PRESETS section below.
  375. .B \-\-preset help
  376. gives more infos about the the used options in these presets.
  377. .TP
  378. .B \-\-noasm " type"
  379. Disable specific assembly optimizations (
  380. .B mmx
  381. /
  382. .B 3dnow
  383. /
  384. .B sse
  385. ).
  386. Quality will not increase, only speed will be reduced.
  387. If you have problems running Lame on a Cyrix/Via processor,
  388. disabling mmx optimizations might solve your problem.
  389. .PP
  390. Verbosity:
  391. .TP
  392. .BI \-\-disptime " n"
  393. Set the delay in seconds between two display updates.
  394. .TP
  395. .B \-\-nohist
  396. By default,
  397. LAME will display a bitrate histogram while producing VBR mp3 files.
  398. This will disable that feature.
  399. .br
  400. Histogram display might not be available on your release.
  401. .TP
  402. .B -S
  403. .PD 0
  404. .TP
  405. .B \-\-silent
  406. .TP
  407. .B \-\-quiet
  408. Do not print anything on the screen.
  409. .PD
  410. .TP
  411. .B \-\-verbose
  412. Print a lot of information on the screen.
  413. .TP
  414. .B \-\-help
  415. Display a list of available options.
  416. .PP
  417. Noise shaping & psycho acoustic algorithms:
  418. .TP
  419. .BI -q " qual"
  420. 0 <=
  421. .I qual
  422. <= 9
  423. Bitrate is of course the main influence on quality.
  424. The higher the bitrate,
  425. the higher the quality.
  426. But for a given bitrate,
  427. we have a choice of algorithms to determine the best scalefactors
  428. and Huffman encoding (noise shaping).
  429. For CBR and ABR, the following table applies:
  430. .B -q 0:
  431. .br
  432. Use the best algorithms (Best Huffman coding search, full outer loop, and the highest precision of several parameters).
  433. .B -q 1 to q 4:
  434. .br
  435. Similar to -q 0 without the full outer loop and decreasing precision of parameters the further from q0. -q 3 is the default.
  436. .B -q 5 and -q 6:
  437. .br
  438. Same as -q 7, but enables noise shaping and increases subblock gain
  439. .B -q 7 to -q 9:
  440. .br
  441. Same as -f. Very fast, OK quality. Psychoacoustics are used for pre-echo and mid/side stereo, but no noise-shaping is done.
  442. For the default VBR mode since LAME 3.98, the following table applies :
  443. .B -q 0 to -q 4:
  444. .br
  445. include all features of the other modes and additionally use the best search when applying Huffman coding.
  446. .B -q 5 and -q 6:
  447. .br
  448. include all features of -q7, calculate and consider actual quantisation noise, and additionally enable subblock gain.
  449. .B -q 7 to -q 9
  450. .br
  451. This level uses a psymodel but does not calculate quantisation noise when encoding: it takes a quick guess.
  452. .TP
  453. .B -h
  454. Alias of
  455. .B -q 2
  456. .TP
  457. .B -f
  458. Alias of
  459. .B -q 7
  460. .PP
  461. CBR (constant bitrate, the default) options:
  462. .TP
  463. .BI -b " n"
  464. For MPEG-1 (sampling frequencies of 32, 44.1 and 48 kHz)
  465. .br
  466. .I n
  467. = 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320
  468. For MPEG-2 (sampling frequencies of 16, 22.05 and 24 kHz)
  469. .br
  470. .I n
  471. = 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160
  472. For MPEG-2.5 (sampling frequencies of 8, 11.025 and 12 kHz)
  473. .br
  474. .I n
  475. = 8, 16, 24, 32, 40, 48, 56, 64
  476. Default is 128 for MPEG1 and 64 for MPEG2 and 32 for MPEG2.5
  477. (64, 32 and 16 respectively in case of mono).
  478. .TP
  479. .BI \-\-cbr
  480. enforce use of constant bitrate. Used to disable VBR or ABR encoding even if their settings
  481. are enabled.
  482. .PP
  483. ABR (average bitrate) options:
  484. .TP
  485. .BI \-\-abr " n"
  486. Turns on encoding with a targeted average bitrate of n kbits,
  487. allowing to use frames of different sizes.
  488. The allowed range of
  489. .I n
  490. is 8 - 310,
  491. you can use any integer value within that range.
  492. It can be combined with the
  493. .B -b
  494. and
  495. .B -B
  496. switches like:
  497. .B lame \-\-abr
  498. .I 123
  499. .B -b
  500. .I 64
  501. .B -B
  502. .I 192 a.wav a.mp3
  503. which would limit the allowed frame sizes between 64 and 192 kbits.
  504. The use of
  505. .B -B
  506. is NOT RECOMMENDED.
  507. A 128 kbps CBR bitstream,
  508. because of the bit reservoir,
  509. can actually have frames which use as many bits as a 320 kbps frame.
  510. VBR modes minimize the use of the bit reservoir,
  511. and thus need to allow 320 kbps frames to get the same flexibility
  512. as CBR streams.
  513. .PP
  514. VBR (variable bitrate) options:
  515. .TP
  516. .B -v
  517. use variable bitrate
  518. .B (\-\-vbr-new)
  519. .TP
  520. .B \-\-vbr-old
  521. Invokes the oldest,
  522. most tested VBR algorithm.
  523. It produces very good quality files,
  524. though is not very fast.
  525. This has,
  526. up through v3.89,
  527. been considered the "workhorse" VBR algorithm.
  528. .TP
  529. .B \-\-vbr-new
  530. Invokes the newest VBR algorithm.
  531. During the development of version 3.90,
  532. considerable tuning was done on this algorithm,
  533. and it is now considered to be on par with the original
  534. .B \-\-vbr-old.
  535. It has the added advantage of being very fast (over twice as fast as
  536. .B \-\-vbr-old
  537. ). This is the default since 3.98.
  538. .TP
  539. .BI -V " n"
  540. 0 <=
  541. .I n
  542. <= 9.999
  543. .br
  544. Enable VBR (Variable BitRate) and specifies the value of VBR quality
  545. (default = 4). Decimal values can be specified, like 4.51.
  546. .br
  547. 0 = highest quality.
  548. .PP
  549. ABR and VBR options:
  550. .TP
  551. .BI -b " bitrate"
  552. For MPEG-1 (sampling frequencies of 32, 44.1 and 48 kHz)
  553. .br
  554. .I n
  555. = 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320
  556. For MPEG-2 (sampling frequencies of 16, 22.05 and 24 kHz)
  557. .br
  558. .I n
  559. = 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160
  560. For MPEG-2.5 (sampling frequencies of 8, 11.025 and 12 kHz)
  561. .br
  562. .I n
  563. = 8, 16, 24, 32, 40, 48, 56, 64
  564. Specifies the minimum bitrate to be used.
  565. However,
  566. in order to avoid wasted space,
  567. the smallest frame size available will be used during silences.
  568. .TP
  569. .BI -B " bitrate"
  570. For MPEG-1 (sampling frequencies of 32, 44.1 and 48 kHz)
  571. .br
  572. .I n
  573. = 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320
  574. For MPEG-2 (sampling frequencies of 16, 22.05 and 24 kHz)
  575. .br
  576. .I n
  577. = 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160
  578. For MPEG-2.5 (sampling frequencies of 8, 11.025 and 12 kHz)
  579. .br
  580. .I n
  581. = 8, 16, 24, 32, 40, 48, 56, 64
  582. Specifies the maximum allowed bitrate.
  583. Note: If you own an mp3 hardware player build upon a MAS 3503 chip,
  584. you must set maximum bitrate to no more than 224 kpbs.
  585. .TP
  586. .B -F
  587. Strictly enforce the
  588. .B -b
  589. option.
  590. .br
  591. This is mainly for use with hardware players that do not support low
  592. bitrate mp3.
  593. Without this option,
  594. the minimum bitrate will be ignored for passages of analog silence,
  595. i.e. when the music level is below the absolute threshold of
  596. human hearing (ATH).
  597. .PP
  598. Experimental options:
  599. .TP
  600. .BI -X " n"
  601. 0 <=
  602. .I n
  603. <= 7
  604. When LAME searches for a "good" quantization,
  605. it has to compare the actual one with the best one found so far.
  606. The comparison says which one is better,
  607. the best so far or the actual.
  608. The
  609. .B -X
  610. parameter selects between different approaches to make this decision,
  611. .B -X0
  612. being the default mode:
  613. .B -X0
  614. .br
  615. The criteria are (in order of importance):
  616. .br
  617. * less distorted scalefactor bands
  618. .br
  619. * the sum of noise over the thresholds is lower
  620. .br
  621. * the total noise is lower
  622. .B -X1
  623. .br
  624. The actual is better if the maximum noise over all scalefactor bands is
  625. less than the best so far.
  626. .B -X2
  627. .br
  628. The actual is better if the total sum of noise is lower than the best so
  629. far.
  630. .B -X3
  631. .br
  632. The actual is better if the total sum of noise is lower than the best so
  633. far and the maximum noise over all scalefactor bands is less than the
  634. best so far plus 2dB.
  635. .B -X4
  636. .br
  637. Not yet documented.
  638. .B -X5
  639. .br
  640. The criteria are (in order of importance):
  641. .br
  642. * the sum of noise over the thresholds is lower
  643. .br
  644. * the total sum of noise is lower
  645. .B -X6
  646. .br
  647. The criteria are (in order of importance):
  648. .br
  649. * the sum of noise over the thresholds is lower
  650. .br
  651. * the maximum noise over all scalefactor bands is lower
  652. .br
  653. * the total sum of noise is lower
  654. .B -X7
  655. .br
  656. The criteria are:
  657. .br
  658. * less distorted scalefactor bands
  659. .br
  660. or
  661. .br
  662. * the sum of noise over the thresholds is lower
  663. .TP
  664. .B -Y
  665. lets LAME ignore noise in sfb21, like in CBR
  666. .PP
  667. MP3 header/stream options:
  668. .TP
  669. .BI -e " emp"
  670. .I emp
  671. = n, 5, c
  672. n = (none, default)
  673. .br
  674. 5 = 0/15 microseconds
  675. .br
  676. c = citt j.17
  677. All this does is set a flag in the bitstream.
  678. If you have a PCM input file where one of the above types of
  679. (obsolete) emphasis has been applied,
  680. you can set this flag in LAME.
  681. Then the mp3 decoder should de-emphasize the output during playback,
  682. although most decoders ignore this flag.
  683. A better solution would be to apply the de-emphasis with a standalone
  684. utility before encoding,
  685. and then encode without
  686. .B -e.
  687. .TP
  688. .B -c
  689. Mark the encoded file as being copyrighted.
  690. .TP
  691. .B -o
  692. Mark the encoded file as being a copy.
  693. .TP
  694. .B -p
  695. Turn on CRC error protection.
  696. .br
  697. It will add a cyclic redundancy check (CRC) code in each frame,
  698. allowing to detect transmission errors that could occur on the
  699. MP3 stream.
  700. However,
  701. it takes 16 bits per frame that would otherwise be used for encoding,
  702. and then will slightly reduce the sound quality.
  703. .TP
  704. .B \-\-nores
  705. Disable the bit reservoir.
  706. Each frame will then become independent from previous ones,
  707. but the quality will be lower.
  708. .TP
  709. .B \-\-strictly-enforce-ISO
  710. With this option,
  711. LAME will enforce the 7680 bit limitation on total frame size.
  712. .br
  713. This results in many wasted bits for high bitrate encodings but will
  714. ensure strict ISO compatibility.
  715. This compatibility might be important for hardware players.
  716. .PP
  717. Filter options:
  718. .TP
  719. .BI \-\-lowpass " freq"
  720. Set a lowpass filtering frequency in kHz.
  721. Frequencies above the specified one will be cutoff.
  722. .TP
  723. .BI \-\-lowpass-width " freq"
  724. Set the width of the lowpass filter.
  725. The default value is 15% of the lowpass frequency.
  726. .TP
  727. .BI \-\-highpass " freq"
  728. Set an highpass filtering frequency in kHz.
  729. Frequencies below the specified one will be cutoff.
  730. .TP
  731. .BI \-\-highpass-width " freq"
  732. Set the width of the highpass filter in kHz.
  733. The default value is 15% of the highpass frequency.
  734. .TP
  735. .BI \-\-resample " sfreq"
  736. .I sfreq
  737. = 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48
  738. .br
  739. Select output sampling frequency (only supported for encoding).
  740. .br
  741. If not specified,
  742. LAME will automatically resample the input when using high compression ratios.
  743. .PP
  744. ID3 tag options:
  745. .TP
  746. .BI \-\-tt " title"
  747. audio/song title (max 30 chars for version 1 tag)
  748. .TP
  749. .BI \-\-ta " artist"
  750. audio/song artist (max 30 chars for version 1 tag)
  751. .TP
  752. .BI \-\-tl " album"
  753. audio/song album (max 30 chars for version 1 tag)
  754. .TP
  755. .BI \-\-ty " year"
  756. audio/song year of issue (1 to 9999)
  757. .TP
  758. .BI \-\-tc " comment"
  759. user-defined text (max 30 chars for v1 tag, 28 for v1.1)
  760. .TP
  761. .BI \-\-tn " track[/total]"
  762. audio/song track number and (optionally) the total number of tracks on
  763. the original recording. (track and total each 1 to 255. Providing
  764. just the track number creates v1.1 tag, providing a total forces v2.0).
  765. .TP
  766. .BI \-\-tg " genre"
  767. audio/song genre (name or number in list)
  768. .TP
  769. .BI \-\-tv " id=value"
  770. Text or URL frame specified by id and value (v2.3 tag). User defined frame. Syntax: \-\-tv "TXXX=description=content"
  771. .TP
  772. .B \-\-add-id3v2
  773. force addition of version 2 tag
  774. .TP
  775. .B \-\-id3v1-only
  776. add only a version 1 tag
  777. .TP
  778. .B \-\-id3v2-only
  779. add only a version 2 tag
  780. .TP
  781. .B \-\-id3v2-latin1
  782. add following options in ISO-8859-1 text encoding.
  783. .TP
  784. .B \-\-id3v2-utf16
  785. add following options in unicode text encoding.
  786. .TP
  787. .B \-\-space-id3v1
  788. pad version 1 tag with spaces instead of nulls
  789. .TP
  790. .B \-\-pad-id3v2
  791. same as \-\-pad-id3v2-size 128
  792. .TP
  793. .B \-\-pad-id3v2-size "num"
  794. adds version 2 tag, pad with extra "num" bytes
  795. .TP
  796. .B \-\-genre-list
  797. print alphabetically sorted ID3 genre list and exit
  798. .TP
  799. .B \-\-ignore-tag-errors
  800. ignore errors in values passed for tags, use defaults in case an error occurs
  801. .PP
  802. Analysis options:
  803. .TP
  804. .B \-g
  805. run graphical analysis on <infile>.
  806. <infile> can also be a .mp3 file.
  807. (This feature is a compile time option.
  808. Your binary may for speed reasons be compiled without this.)
  809. .SH ID3 TAGS
  810. LAME is able to embed ID3 v1,
  811. v1.1 or v2 tags inside the encoded MP3 file.
  812. This allows to have some useful information about the music track
  813. included inside the file.
  814. Those data can be read by most MP3 players.
  815. Lame will smartly choose which tags to use.
  816. It will add ID3 v2 tags only if the input comments won't fit in v1
  817. or v1.1 tags,
  818. i.e. if they are more than 30 characters.
  819. In this case,
  820. both v1 and v2 tags will be added,
  821. to ensure reading of tags by MP3 players which are unable to read ID3 v2 tags.
  822. .SH ENCODING MODES
  823. LAME is able to encode your music using one of its 3 encoding modes:
  824. constant bitrate (CBR), average bitrate (ABR) and variable bitrate (VBR).
  825. .TP
  826. .B Constant Bitrate (CBR)
  827. This is the default encoding mode,
  828. and also the most basic.
  829. In this mode,
  830. the bitrate will be the same for the whole file.
  831. It means that each part of your mp3 file will be using the same
  832. number of bits.
  833. The musical passage being a difficult one to encode or an easy one,
  834. the encoder will use the same bitrate,
  835. so the quality of your mp3 is variable.
  836. Complex parts will be of a lower quality than the easiest ones.
  837. The main advantage is that the final files size won't change and
  838. can be accurately predicted.
  839. .TP
  840. .B Average Bitrate (ABR)
  841. In this mode,
  842. you choose the encoder will maintain an average bitrate while using
  843. higher bitrates for the parts of your music that need more bits.
  844. The result will be of higher quality than CBR encoding but the
  845. average file size will remain predictable,
  846. so this mode is highly recommended over CBR.
  847. This encoding mode is similar to what is referred as vbr in AAC or
  848. Liquid Audio (2 other compression technologies).
  849. .TP
  850. .B Variable bitrate (VBR)
  851. In this mode,
  852. you choose the desired quality on a scale from 9 (lowest
  853. quality/biggest distortion) to 0 (highest quality/lowest distortion).
  854. Then encoder tries to maintain the given quality in the whole file by
  855. choosing the optimal number of bits to spend for each part of your music.
  856. The main advantage is that you are able to specify the quality level that
  857. you want to reach,
  858. but the inconvenient is that the final file size is totally unpredictable.
  859. .SH PRESETS
  860. The
  861. .B \-\-preset
  862. switches are aliases over LAME settings.
  863. To activate these presets:
  864. .PP
  865. For VBR modes (generally highest quality):
  866. .TP
  867. .B \-\-preset medium
  868. This preset should provide near transparency to most people on most music.
  869. .TP
  870. .B \-\-preset standard
  871. This preset should generally be transparent to most people on most music and
  872. is already quite high in quality.
  873. .TP
  874. .B \-\-preset extreme
  875. If you have extremely good hearing and similar equipment,
  876. this preset will generally provide slightly higher quality than the
  877. .B standard
  878. mode.
  879. .PP
  880. For CBR 320kbps (highest quality possible from the
  881. .B \-\-preset
  882. switches):
  883. .TP
  884. .B \-\-preset insane
  885. This preset will usually be overkill for most people and most situations,
  886. but if you must have the absolute highest quality with no regard to filesize,
  887. this is the way to go.
  888. .PP
  889. For ABR modes (high quality per given bitrate but not as high as VBR):
  890. .TP
  891. .B \-\-preset " kbps"
  892. Using this preset will usually give you good quality at a specified bitrate.
  893. Depending on the bitrate entered,
  894. this preset will determine the optimal settings for that particular situation.
  895. While this approach works,
  896. it is not nearly as flexible as VBR,
  897. and usually will not attain the same level of quality as VBR at higher bitrates.
  898. .TP
  899. .B cbr
  900. If you use the ABR mode (read above) with a significant bitrate such as 80,
  901. 96,
  902. 112,
  903. 128,
  904. 160,
  905. 192,
  906. 224,
  907. 256,
  908. 320,
  909. you can use the
  910. .B \-\-preset cbr " kbps"
  911. option to force CBR mode encoding instead of the standard ABR mode.
  912. ABR does provide higher quality but CBR may be useful in situations such as when
  913. streaming an MP3 over the Internet may be important.
  914. .SH EXAMPLES
  915. .LP
  916. Fixed bit rate jstereo 128kbs encoding:
  917. .IP
  918. .B lame \-b
  919. .I 128 sample.wav sample.mp3
  920. .LP
  921. Fixed bit rate jstereo 128 kbps encoding, highest quality:
  922. .IP
  923. .B lame \-q 0 \-b
  924. .I 128 sample.wav sample.mp3
  925. .LP
  926. To disable joint stereo encoding (slightly faster,
  927. but less quality at bitrates <= 128 kbps):
  928. .IP
  929. .B lame \-m
  930. .I s sample.wav sample.mp3
  931. .LP
  932. Variable bitrate (use \-V n to adjust quality/filesize):
  933. .IP
  934. .B lame \-V
  935. .I 2 sample.wav sample.mp3
  936. .LP
  937. Streaming mono 22.05 kHz raw pcm, 24 kbps output:
  938. .IP
  939. .B cat
  940. .I inputfile
  941. .B | lame \-r \-m
  942. .I m
  943. .B \-b
  944. .I 24
  945. .B \-s
  946. .I 22.05 \- \-
  947. .B >
  948. .I output
  949. .LP
  950. Streaming mono 44.1 kHz raw pcm,
  951. with downsampling to 22.05 kHz:
  952. .IP
  953. .B cat
  954. .I inputfile
  955. .B | lame \-r \-m
  956. .I m
  957. .B \-b
  958. .I 24
  959. .B \-\-resample
  960. .I 22.05 \- \-
  961. .B >
  962. .I output
  963. .LP
  964. Encode with the
  965. .B standard
  966. preset:
  967. .IP
  968. .B lame \-\-preset standard
  969. .I sample.wav sample.mp3
  970. .SH BUGS
  971. .PP
  972. Probably there are some.
  973. .SH SEE ALSO
  974. .BR mpg123 (1) ,
  975. .BR madplay (1) ,
  976. .BR sox (1)
  977. .SH AUTHORS
  978. .nf
  979. LAME originally developed by Mike Cheng and now maintained by
  980. Mark Taylor, and the LAME team.
  981. GPSYCHO psycho-acoustic model by Mark Taylor.
  982. (See http://www.mp3dev.org/).
  983. mpglib by Michael Hipp
  984. Manual page by William Schelter, Nils Faerber, Alexander Leidinger,
  985. and Rog\['e]rio Brito.
  986. .\" Local Variables:
  987. .\" mode: nroff
  988. .\" End: