为了压缩一个软件煞费苦心,最终还是没有找到一个不要钱的gui工具,郁闷之余,另辟思路,何不采用linux的命令行工具去压缩啊,于是在网上找到了这个工具lame
首先当然是用 homebrew 来安装lame
dangchengchengdeMacBook-Pro:js dangchengcheng$ brew install lame
==> Downloading https://homebrew.bintray.com/bottles/lame-3.99.5.yosemite.bottle.1.tar.gz
######################################################################## 100.0%
==> Pouring lame-3.99.5.yosemite.bottle.1.tar.gz
linux 可以 用 apt-get install lame 或 yum install lame 来安装
安装成功了
其实压缩音频文件无非是降低采样率,所以lame大部分情况下都会用-b这个参数去压缩音频
dangchengchengdeMacBook-Pro:img dangchengcheng$ lame -b 32 music2.mp3 music4.mp3
LAME 3.99.5 64bits (http://lame.sf.net)
Resampling: input 44.1 kHz output 16 kHz
Using polyphase lowpass filter, transition band: 5484 Hz - 5677 Hz
Encoding music2.mp3 to music4.mp3
Encoding as 16 kHz j-stereo MPEG-2 Layer III (16x) 32 kbps qval=3
Frame | CPU time/estim | REAL time/estim | play/CPU | ETA
7273/7295 (100%)| 0:03/ 0:03| 0:04/ 0:04| 74.073x| 0:00
-------------------------------------------------------------------------------------------------------------
kbps LR MS % long switch short %
32.0 3.3 96.7 91.2 5.0 3.8
ReplayGain: -8.9dB
dangchengchengdeMacBook-Pro:img dangchengcheng$
最后压缩的结果还是很满意的 ,从4.2M压到了1.1M