Document Actions
消化 APE
上周一不留神,从 amule 下到个 500M 的 APE。本意是想要一些好听的 mp3,想下载整张专辑会郑重一些,以示对作者的尊重。没想到正规得难以消化。
挣扎了一星期,想要找一个 native 的 ape 播放器,尤其是,要正确地根据 cue 切分音轨的。未得。终于下定决心用简单的方法——转换为 mp3。
以下就是转换的方法。按时间顺序。
- 用
mac把 .ape 转成 .wav - 用
lame把 .wav 转成 .mp3 - 用
mp3splt把 mp3 根据 .cue 的音轨指示,切割成一条轨一个,并且相应地设置 id3tag
用 mac 把 .ape 转成 .wav
好了,开始干活。首先安装 mac 这个工具。网址是 http://supermmx.org/linux/mac/ :
$ rpm -qi mac
Name : mac Relocations: (not relocatable)
Version : 3.99 Vendor: Freshrpms.net
Release : 2.u4b5.fc6 Build Date: 2006年09月18日 星期一 20时32分15秒
Install Date: 2007年01月15日 星期一 02时09分03秒 Build Host: devil.freshrpms.net
Group : System Environment/Libraries Source RPM: mac-3.99-2.u4b5.fc6.src.rpm
Size : 179042 License: See License.htm
Signature : DSA/SHA1, 2006年09月19日 星期二 00时44分27秒, Key ID 692ac459e42d547b
Packager : Matthias Saou <matthias@rpmforge.net>
URL : http://supermmx.org/linux/mac/
Summary : Monkey's Audio Codec (MAC) utility and library
Description :
Monkey’s Audio is a fast and easy way to compress digital music. Unlike
traditional methods such as mp3, ogg, or lqt that permanently discard
quality to save space, Monkey’s Audio only makes perfect, bit-for-bit
copies of your music. That means it always sounds perfect – exactly the
same as the original. Even though the sound is perfect, it still saves a
lot of space.
安装完成后,运行之:
$ mac ../CDImage.ape CDImage.wav -d
--- Monkey's Audio Console Front End (v 3.99) (c) Matthew T. Ashland ---
Decompressing...
Progress: 100.0% (0.0 seconds remaining, 252.4 seconds total)
Success...
成功完成。现在我们拥有了一个超过 760M 的大 wav 文件。
用 lame 把 .wav 转成 .mp3
现在,请跟着我安装 lame,一款著名的 mp3 压缩工具,网址是 http://lame.sourceforge.net/ :
$ rpm -qi lame
Name : lame Relocations: (not relocatable)
Version : 3.96.1 Vendor: Freshrpms.net
Release : 2.2.fc4 Build Date: 2005年04月28日 星期四 03时10分53秒
Install Date: 2005年10月31日 星期一 22时39分17秒 Build Host: python2.freshrpms.net
Group : Applications/Multimedia Source RPM: lame-3.96.1-2.2.fc4.src.rpm
Size : 1425153 License: LGPL
Signature : DSA/SHA1, 2005年06月13日 星期一 23时25分19秒, Key ID 692ac459e42d547b
Packager : Matthias Saou <matthias@rpmforge.net>
URL : http://lame.sourceforge.net/
Summary : LAME Ain't an MP3 Encoder... but it's the best of all
Description :
LAME is an educational tool to be used for learning about MP3 encoding.
The goal of the LAME project is to use the open source model to improve
the psycho acoustics, noise shaping and speed of MP3. Another goal of
the LAME project is to use these improvements for the basis of a patent
free audio compression codec for the GNU project.
安装上后就开始压缩:
$ lame CDImage.wav CDImage.mp3
LAME version 3.96.1 (http://lame.sourceforge.net/)
CPU features: MMX (ASM used), SSE, SSE2
Using polyphase lowpass filter, transition band: 17249 Hz - 17782 Hz
Encoding CDImage.wav to CDImage.mp3
Encoding as 44.1 kHz 128 kbps j-stereo MPEG-1 Layer III (11x) qval=3
Frame | CPU time/estim | REAL time/estim | play/CPU | ETA
28900/165911 (17%)| 1:36/ 9:11| 2:03/ 11:47| 7.8639x| 9:44
基本上几分钟后就好,此刻我们得到了一个大 mp3, 大小 69M,1/10于原来的大小。
用 mp3splt 来根据 .cue 切分 mp3
好了,迄今为止我们已经获得了可以播放的 mp3,这个过程毫无悬念,人人都会。而整件事情的关键其实在最后的“切分“上。一个整个CD的image不是我们想要的,我们需要一个工具可以根据 .cue 的指示切分音轨,并且,最好还能将歌曲名等 .cue 中包含的信息也写入切分完的 mp3 里。mp3splt 就是用来干这活的工具,网址 http://mp3splt.sourceforge.net/ :
$ rpm -qi mp3splt
Name : mp3splt Relocations: (not relocatable)
Version : 2.1 Vendor: Matteo Trotta
Release : 1 Build Date: 2004年10月13日 星期三 06时21分15秒
Install Date: 2007年01月15日 星期一 03时13分52秒 Build Host: localhost
Group : Applications/Multimedia Source RPM: mp3splt-2.1-1.src.rpm
Size : 116861 License: GPL
Signature : (none)
Packager : Marco Papa Manzillo <mpapamanz@users.sourceforge.net>
URL : http://mp3splt.sourceforge.net/
Summary : A Free, command-line AlbumWrapster and mp3wrap file exctractor
Description :
Mp3Splt is a command line utility to split mp3 and ogg files selecting a begin and an end time position, without decoding. It's very useful to split large mp3/ogg to make smaller files or to split entire albums to obtain original tracks. If you want to split an album, you can select split points and filenames manually or you can get them automatically from CDDB (internet or a local file) or from .cue files.
Otherwise if you have a file created either with Mp3Wrap or AlbumWrap you can extract tracks just in few seconds. Supports VBR mp3.
Mp3split is completely FREE (under GPL License) and supported by Open Source Community.
现在我们运行它。正常情况下,命令行应该这样打:
mp3splt CDImage.mp3 -c CDImage.cue
然而现在不行。因为我下载到的 .cue 里面,歌曲名称是中文,且是 GB 码,mp3splt 很“聪明”地使用其来给分割出的小 mp3 命名,结果是我得到了一堆乱码文件名(我的系统跑 UTF-8)。
我曾试过将该 .cue 文件转码为 UTF-8 再重试上述命令,结果是文件名虽然对了,然而以 UTF-8 编码的 id3v1 标签居然不被 gstreamer 认可,在 rhythmbox 里显示为乱码!(参见 gstreamer encoding )
我绝望了,决定妥协。保留 .cue 为 GB 码,确保 rhythmbox 里显示正常,然后放弃文件名,只用音轨号来命名。最后的命令行是这样的:
$ mp3splt CDImage.mp3 -c CDImage.cue -o @n
至此,我得到了17个mp3,任务顺利完成。贴图以示庆贺。

