🖥️lame

➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the lame command with important options and switches using examples.

▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁

#  ██╗      █████╗ ███╗   ███╗███████╗
#  ██║     ██╔══██╗████╗ ████║██╔════╝
#  ██║     ███████║██╔████╔██║█████╗  
#  ██║     ██╔══██║██║╚██╔╝██║██╔══╝  
#  ███████╗██║  ██║██║ ╚═╝ ██║███████╗
#  ╚══════╝╚═╝  ╚═╝╚═╝     ╚═╝╚══════╝

# Minimal example of converting a wave file to MP3
lame input.wav output.mp3

# Re-encode existing MP3 to 64 kbps MP3
lame -b 64 original.mp3 new.mp3

# Encode with variable bitrate (quality=2) 
# 0 <= quality <= 9  (default = 4).  0 = highest quality
lame -V2 original.wav compressed.mp3

# More interesting options
# -m m: save as mono
# -m s: save as stereo
# -m j: save as joint stereo (exploits inter-channel correlation
#       more than regular stereo)
# -q 2: quality tweaking: the lower the value, the better the 
#       quality, but the slower the algorithm. Default is 5.
#
# By default, lame uses constant bit rate (CBR) encoding. 
# You can also use average bit rate (ABR) encoding, 
# e.g. for an average bit rate of 123 kbps:
lame --abr 123 input.wav output.mp3

# Variable (VBR) encoding, e.g. between 32 kbps and 192 kbps:
lame -v -b 32 -B 192 input.wav output.mp3

# Recode all wav files in all subdirectories
find . -type d -exec sh -c '(cd {} && for i in *.wav; do lame -h -b 128 "$i" "`basename "$i" .wav`".mp3; done)' ';' 
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░