TWOLAME(1) | TWOLAME(1) |
NAME
twolame - an optimised MPEG Audio Layer 2 (MP2) encoder
SYNOPSIS
twolame [options] <infile> [outfile]
DESCRIPTION
TwoLAME is an optimised MPEG Audio Layer 2 (MP2) encoder based on tooLAME by Mike Cheng, which in turn is based upon the ISO dist10 code and portions of LAME. Encoding is performed by the libtwolame library backend.
OPTIONS
Input File
twolame uses libsndfile for reading the input sound file, so the input file can be in any format supported by libsndfile. To read raw PCM audio from STDIN, then use - as the input filename.
Output File
If no output filename is specified, then suffix of the input filename is automatically changed to .mp2. To write the encoded audio to STDOUT then use - as the output filename.
Input Options
-r, --raw-input
-x, --byte-swap
-s, --samplerate <int>
--samplesize <int>
-N, --channels <int>
-g, --swap-channels
--scale <float>
--scale-l <float>
--scale-r <float>
Output Options
-m, --mode <char>
-a, --downmix
-b, --bitrate <int>
------------------------------ Sample Rate Mono Stereo ------------------------------ 48000 96 192 44100 96 192 32000 80 160 24000 48 96 22050 48 96 16000 32 64 ------------------------------
-P, --psyc-mode <int>
-v, --vbr
-V, --vbr-level <float>
-l, --ath <float>
-q, --quick <int>
-S, --single-frame
Miscellaneous Options
-c, --copyright
-o, --non-original
--original
-p, --protect
-d, --padding
-R, --reserve <int>
-e, --deemphasis <char>
-E, --energy
Verbosity Options
-t, --talkativity <int>
--quiet
--brief
--verbose
RETURN CODES
If encoding completes successfully, then twolame will return 0. However if encoding is not successful, then it will return one of the following codes.
EXAMPLES
This will encode sound.wav to sound.mp2 using the default constant bitrate of 192 kbps and using the default psycho-acoustic model (model 3):
twolame sound.wav
Constant bitrate of 160kbps and joint stereo encoding, saved to file sound_160.mp2:
twolame -b 160 -m j sound.aiff sound_160.mp2
Encode sound.wav to newfile.mp2 using psycho-acoustic model 2 and encoding with variable bitrate:
twolame -P 2 -v sound.wav newfile.mp2
Same as example above, except that the negative value of the "-V" argument means that the lower bitrates will be favoured over the higher ones:
twolame -P 2 -V -5 sound.wav newfile.mp2
Resample audio file using sox and pipe straight through twolame:
sox sound_11025.aiff -t raw -r 16000 | twolame -r -s 16000 - - > out.mp2
AUTHORS
The twolame frontend was (re)written by Nicholas J Humfrey. The libtwolame library is based on toolame by Mike Cheng. For a full list of authors, please see the AUTHORS file.
RESOURCES
TwoLAME web site: http://www.twolame.org/
SEE ALSO
lame(1), mpg123(1), madplay(1), sox(1)
COPYING
Copyright © 2004-2018 The TwoLAME Project. Free use of this software is granted under the terms of the GNU Lesser General Public License (LGPL).
AUTHOR
Nicholas J Humfrey <njh@aelius.com>
10/11/2019 |