爲了壓縮一個軟件煞費苦心,最終仍是沒有找到一個不要錢的gui工具,鬱悶之餘,另闢思路,何不採用linux的命令行工具去壓縮啊,因而在網上找到了這個工具lamelinux
首先固然是用 homebrew 來安裝lame 工具
dangchengchengdeMacBook-Pro:js dangchengcheng$ brew install lameui
==> Downloading https://homebrew.bintray.com/bottles/lame-3.99.5.yosemite.bottle.1.tar.gzspa
######################################################################## 100.0%.net
==> Pouring lame-3.99.5.yosemite.bottle.1.tar.gz命令行
linux 能夠 用 apt-get install lame 或 yum install lame 來安裝homebrew
安裝成功了get
其實壓縮音頻文件無非是下降採樣率,因此lame大部分狀況下都會用-b這個參數去壓縮音頻input
dangchengchengdeMacBook-Pro:img dangchengcheng$ lame -b 32 music2.mp3 music4.mp3 it
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