安裝 ogg 轉 mp3 工具程式

因為在 CentOS 5.0 內已經安裝有 Sound Juicer 可以將音樂 CD 抓成 WAV 或 ogg 格式, 但是沒有預設可以轉成 mp3 或將 ogg 轉成 mp3 的工具, 經過 Google 的找尋知道有個 ogg2mp3.pl 的工具 Script 可以達成這樣的工作, 但是需要一些相配合的工具程式協同作業, 所以整理一下安裝的過程..

  • 作業系統 : CentOS 5.0 x86_64
yum install -y vorbis-tools

cd /tmp

wget http://nchc.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz
tar -zxvf lame-3.97.tar.gz
cd lame-3.97
./configure
make
make install

cd /tmp
wget http://nekohako.xware.cx/id3tool/id3tool-1.2a.tar.gz
tar -zxvf id3tool-1.2a.tar.gz
cd id3tool-1.2a
./configure
make
make install

cd /usr/local/bin
wget http://www.igso.net/share/nkb/ogg2mp3.pl
chmod a+x ogg2mp3.pl
  • 只要指定有 ogg 格式音樂檔案的目錄, 就會轉出 mp3 檔在相同目錄內.
  • 例如 /data/cdrip/testcd1/ 內有 1.ogg 2.ogg 3.ogg 檔
  • 1. 分別轉 ogg → mp3 (在 /data/cdrip/testcd1/ 目錄內轉出 1.mp3 2.mp3 3.mp3)
ogg2mp3.pl /data/cdrip/testcd1/*.ogg
  • 2. 合併轉 ogg → mp3 (在 /data/cdrip/ 目錄內轉出 1.ogg + 2.ogg + 3.ogg 的 testcd1.mp3)
ogg2mp3.pl /data/cdrip/testcd1
  • tech/ogg2mp3.txt
  • 上一次變更: 2008/08/21 07:32
  • jonathan