<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>鬼の领地 &#187; 音频</title>
	<atom:link href="http://blog.upsuper.org/tag/%e9%9f%b3%e9%a2%91/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.upsuper.org</link>
	<description>the place where there are some ghost appearing...</description>
	<lastBuildDate>Thu, 17 Jun 2010 08:12:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>小巧精致，无与伦比——HE-AAC，低比特率之王</title>
		<link>http://blog.upsuper.org/compact-sophisticated-unparalleled-he-aac-king-of-low-bit-rate/</link>
		<comments>http://blog.upsuper.org/compact-sophisticated-unparalleled-he-aac-king-of-low-bit-rate/#comments</comments>
		<pubDate>Sat, 30 Aug 2008 12:57:41 +0000</pubDate>
		<dc:creator>upsuper</dc:creator>
				<category><![CDATA[探究学习]]></category>
		<category><![CDATA[AAC]]></category>
		<category><![CDATA[MP3]]></category>
		<category><![CDATA[音频]]></category>

		<guid isPermaLink="false">http://blog.upsuper.org/?p=586</guid>
		<description><![CDATA[那天为了把一首歌弄到手机里（话说我的 Nokia 6111 空间很小的说），因为看到一个帖子，说 HE-AAC 十分好，就想试试，没想到压出来的东西和同体积的 MP3 的音质简直不是一个数量级的……根本不需要什么专业级的音箱或者耳机，更不用你有专业级的耳朵，随便听一听就知道到底是什么差别了！
下面做个实验，同样的无损音源。这里使用的编码器：MP3 采用 LAME 编码器（传输中音质最好的 MP3 编码器），HE-AAC 采用 Nero AAC 编码器。
下面是测试用指令：

1
2
3
lame -b 32 Dango.wav Dango.mp3
neroAacEnc -he -cbr 32000 -if Dango.wav -of Dango.aac
neroAacEnc -he -br 32000 -2pass -if Dango.wav -of Dango2.aac

下面是编码的几项数据，并附测试文件下载：


格式
编码
文件大小
下载


编码器
参数
耗时


APE
无损参考音源
4.3 MB
下载


MP3
LAME
-b 32
0.463s
154.0 KB
下载


AAC
Nero
-he -cbr 32000
0.894s
160.3 KB
下载


AAC
Nero
-he -br 32000 -2pass
1.842s
167.8 KB
下载


其中 MP3 的 -b 32 参数表示采用 CBR (平均比特率) 32kbps (约 [...]]]></description>
			<content:encoded><![CDATA[<p>那天为了把一首歌弄到手机里（话说我的 Nokia 6111 空间很小的说），因为看到<a href="http://blog.csdn.net/zgqjymx/archive/2008/05/07/2406388.aspx" target="_blank">一个帖子</a>，说 HE-AAC 十分好，就想试试，没想到压出来的东西和同体积的 MP3 的音质简直不是一个数量级的……根本不需要什么专业级的音箱或者耳机，更不用你有专业级的耳朵，随便听一听就知道到底是什么差别了！</p>
<p>下面做个实验，同样的无损音源。这里使用的编码器：MP3 采用 <a href="http://lame.sourceforge.net/index.php" target="_blank">LAME</a> 编码器（传输中音质最好的 MP3 编码器），HE-AAC 采用 <a href="http://www.nero.com/chs/nero-aac-codec.html" target="_blank">Nero AAC</a> 编码器。</p>
<p>下面是测试用指令：</p>

<div class="wp_codebox"><table><tr id="p5862"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p586code2"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">lame</span> <span style="color: #660033;">-b</span> <span style="color: #000000;">32</span> Dango.wav Dango.mp3
neroAacEnc <span style="color: #660033;">-he</span> <span style="color: #660033;">-cbr</span> <span style="color: #000000;">32000</span> <span style="color: #660033;">-if</span> Dango.wav <span style="color: #660033;">-of</span> Dango.aac
neroAacEnc <span style="color: #660033;">-he</span> <span style="color: #660033;">-br</span> <span style="color: #000000;">32000</span> <span style="color: #660033;">-2pass</span> <span style="color: #660033;">-if</span> Dango.wav <span style="color: #660033;">-of</span> Dango2.aac</pre></td></tr></table></div>

<p>下面是编码的几项数据，并附测试文件下载：</p>
<table border="1">
<tr>
<th rowspan="2">格式</th>
<th colspan="3">编码</th>
<th rowspan="2">文件大小</th>
<th rowspan="2">下载</th>
</tr>
<tr>
<th>编码器</th>
<th>参数</th>
<th>耗时</th>
</tr>
<tr>
<td>APE</td>
<td colspan="3">无损参考音源</td>
<td>4.3 MB</td>
<td><a href="http://down.upsuper.org/for-he-aac/Dango.ape">下载</a></td>
</tr>
<tr>
<td>MP3</td>
<td>LAME</td>
<td>-b 32</td>
<td>0.463s</td>
<td>154.0 KB</td>
<td><a href="http://down.upsuper.org/for-he-aac/Dango.mp3">下载</a></td>
</tr>
<tr>
<td>AAC</td>
<td>Nero</td>
<td>-he -cbr 32000</td>
<td>0.894s</td>
<td>160.3 KB</td>
<td><a href="http://down.upsuper.org/for-he-aac/Dango.aac">下载</a></td>
</tr>
<tr>
<td>AAC</td>
<td>Nero</td>
<td>-he -br 32000 -2pass</td>
<td>1.842s</td>
<td>167.8 KB</td>
<td><a href="http://down.upsuper.org/for-he-aac/Dango2.aac">下载</a></td>
</tr>
</table>
<p>其中 MP3 的 -b 32 参数表示采用 CBR (平均比特率) 32kbps (约 0.25 MB/min)；AAC 的 -he 参数表示使用 HE 方式编码 (即编码为我们要的 HE-AAC)，而 -cbr 32000 也表示采用 CBR 32kbps 编码。至于下面还有一个 -2pass 表示二次编码模式，据说可以获得更好的音质 (我没听出来……)。</p>
<p>其他的我不多说了，自己听一听就知道差距多大了……虽然 AAC 的编码时间较 MP3 稍长（似乎有 2 倍？），但编码出的音质绝对不在一个级别！</p>
<p>在 Windows 下现在也可以很容易地将音乐文件压缩为 HE-AAC 了，具体参考网络上的例子，我也不多阐述了（况且我也不用 Windows……）。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.upsuper.org/compact-sophisticated-unparalleled-he-aac-king-of-low-bit-rate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://down.upsuper.org/for-he-aac/Dango.mp3" length="157680" type="audio/mpeg" />
		</item>
		<item>
		<title>Ubuntu之旅（十）</title>
		<link>http://blog.upsuper.org/ubuntu-trip-10/</link>
		<comments>http://blog.upsuper.org/ubuntu-trip-10/#comments</comments>
		<pubDate>Tue, 29 Jul 2008 02:49:48 +0000</pubDate>
		<dc:creator>upsuper</dc:creator>
				<category><![CDATA[探究学习]]></category>
		<category><![CDATA[gtk]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[音频]]></category>

		<guid isPermaLink="false">http://blog.upsuper.org/?p=459</guid>
		<description><![CDATA[这次是隔了好久了，因为已经很好的融入了 Ubuntu，似乎没什么好写的了，不过还是有可以写的。

今天解决了两个小问题，一个是开机出现“Unable to set system clock”的问题，虽无大碍，不过总觉得看了不爽。在参考了 Ubuntu 论坛上的一个帖子，用 root 权限修改 /etc/init.d/hwclock.sh 文件：

31
HWCLOCKPARS=

改为：

31
HWCLOCKPARS=--directisa

就解决了。
另一个是在使用了 Blubuntu 主题后，每次用命令行启动什么 GTK 程序的时候都会出现：

1
/usr/share/themes/Blubuntu/gtk-2.0/gtkrc:169: Clearlooks configuration option &#34;progressbarstyle&#34; is not supported and will be ignored.

在网上查找了一下，发现一种方法，就是编辑 /usr/share/themes/Blubuntu/gtk-2.0/gtkrc 文件

167
engine &#34;clearlooks&#34;

改为

167
engine &#34;ubuntulooks&#34;

看过去是没有问题了。但是很快问题就出现了！
我运行 Firefox，发现进度条变了！我不是很喜欢那种进度条风格，因此最后决定将第 167 行注释掉……反正本来是被忽略的，注释掉也无所谓。重启 Firefox，进度条恢复。
另外就是我的藏歌，最近开始大规模的整为 aac 的格式，也稍微说一下吧。
这次的转换应该说是相当严格的，基本上都是采用无损音源（APE 或 FLAC）。对于整个的 APE 和 FLAC，我采取的方法是 shntool 分割，再用音频魔方转换，至于单个的就直接转咯……然后就是 Tag，应为 EasyTag 很会死……莫名其妙的……就换了 Ex Falso 好像是可以用 apt 安装的，这个软件也很好用，就不详述了，仅作推荐。不过还要说的是，这个软件仍然是不支持 .aac 扩展名，看起来 .m4a [...]]]></description>
			<content:encoded><![CDATA[<p>这次是隔了好久了，因为已经很好的融入了 Ubuntu，似乎没什么好写的了，不过还是有可以写的。<br />
<span id="more-459"></span><br />
今天解决了两个小问题，一个是开机出现“Unable to set system clock”的问题，虽无大碍，不过总觉得看了不爽。在参考了 <a href="http://ubuntuforums.org/showthread.php?t=594031" target="_blank">Ubuntu 论坛上的一个帖子</a>，用 root 权限修改 /etc/init.d/hwclock.sh 文件：</p>

<div class="wp_codebox"><table><tr id="p4599"><td class="line_numbers"><pre>31
</pre></td><td class="code" id="p459code9"><pre class="sh" style="font-family:monospace;">HWCLOCKPARS=</pre></td></tr></table></div>

<p>改为：</p>

<div class="wp_codebox"><table><tr id="p45910"><td class="line_numbers"><pre>31
</pre></td><td class="code" id="p459code10"><pre class="sh" style="font-family:monospace;">HWCLOCKPARS=--directisa</pre></td></tr></table></div>

<p>就解决了。</p>
<p>另一个是在使用了 Blubuntu 主题后，每次用命令行启动什么 GTK 程序的时候都会出现：</p>

<div class="wp_codebox"><table><tr id="p45911"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p459code11"><pre class="text" style="font-family:monospace;">/usr/share/themes/Blubuntu/gtk-2.0/gtkrc:169: Clearlooks configuration option &quot;progressbarstyle&quot; is not supported and will be ignored.</pre></td></tr></table></div>

<p>在网上查找了一下，发现一种方法，就是编辑 /usr/share/themes/Blubuntu/gtk-2.0/gtkrc 文件</p>

<div class="wp_codebox"><table><tr id="p45912"><td class="line_numbers"><pre>167
</pre></td><td class="code" id="p459code12"><pre class="text" style="font-family:monospace;">engine &quot;clearlooks&quot;</pre></td></tr></table></div>

<p>改为</p>

<div class="wp_codebox"><table><tr id="p45913"><td class="line_numbers"><pre>167
</pre></td><td class="code" id="p459code13"><pre class="text" style="font-family:monospace;">engine &quot;ubuntulooks&quot;</pre></td></tr></table></div>

<p>看过去是没有问题了。但是很快问题就出现了！</p>
<p>我运行 Firefox，发现进度条变了！我不是很喜欢那种进度条风格，因此最后决定将第 167 行注释掉……反正本来是被忽略的，注释掉也无所谓。重启 Firefox，进度条恢复。</p>
<p>另外就是我的藏歌，最近开始大规模的整为 aac 的格式，也稍微说一下吧。</p>
<p>这次的转换应该说是相当严格的，基本上都是采用无损音源（APE 或 FLAC）。对于整个的 APE 和 FLAC，我采取的方法是 shntool 分割，再用音频魔方转换，至于单个的就直接转咯……然后就是 Tag，应为 EasyTag 很会死……莫名其妙的……就换了 Ex Falso 好像是可以用 apt 安装的，这个软件也很好用，就不详述了，仅作推荐。不过还要说的是，这个软件仍然是不支持 .aac 扩展名，看起来 .m4a 才是王道……</p>
<p>因为又解决一个小问题，所以过来补充一下。今天转一个 APE 的时候 shntool 提示：</p>

<div class="wp_codebox"><table><tr id="p45914"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p459code14"><pre class="text" style="font-family:monospace;">shntool [split]: error: value not in bytes, m:ss, m:ss.ff, or m:ss.nnn format: []</pre></td></tr></table></div>

<p>不知道怎么回事，搜索到一个<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=97695" target="_blank">同样的问题</a>没有人解答（后来我去解答了……），又发现一个 <a href="http://iwool.wordpress.com/2008/05/21/convert-ape-to-flac-and-split-by-cue-on-ubuntu-804/" target="_blank">Wordpress.com 里的博客</a>，里面说，如果遇到这种情况，检查你的 cue，建议在第一行加上 REM。我在 cue 的第一行加入了一个 REM DATE 2004，再用 shntool 就可以了 _-b 怎么会有这种要求……</p>
<p>再加一个……今天又遇到一个同样错误的，结果是去掉了第一行的 REM DATE 2004 就可以了……看来以后 REM 行可增增减减试试看……最后感叹一下……shntool 这是什么软件啊！！！</p>
<p>另外就是 tor 的速度慢得惊人……同样在那个博客里看到了一个软件 JAP……很好很强大……这软件速度极快，稍微推荐一下，比 tor 快多了……</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.upsuper.org/ubuntu-trip-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu下实战切割ape</title>
		<link>http://blog.upsuper.org/actual-combat-spliting-ape-under-ubuntu/</link>
		<comments>http://blog.upsuper.org/actual-combat-spliting-ape-under-ubuntu/#comments</comments>
		<pubDate>Mon, 21 Jul 2008 00:48:56 +0000</pubDate>
		<dc:creator>upsuper</dc:creator>
				<category><![CDATA[雕虫小技]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[音频]]></category>

		<guid isPermaLink="false">http://blog.upsuper.org/?p=283</guid>
		<description><![CDATA[虽然其实并不难，不过还是想写一写，以备以后忘记掉……
这个其实我从昨晚就开始研究了，不过没研究出个所以然来。不过知道了一件事，那就是如何用 Audacious 播放带 cue 的 ape。似乎要把首选项里音频下的格式检测里的两项全部去掉，而且我根据惯例把 cue 转成了 UTF-8 的。

今天早上找到了这么一篇文章：ubuntu 下基本命令行方式刻录 ape 和 flac 全记录。文章的最后提到切割的方法：

1
cuebreakpoints -i cue CDImage.cue&#124;shnsplit CDImage.ape

我先是试了一下，马上提示没有安装 cuetools，至于 shnsplit，我昨晚就安装好了 shntool，所以没有提示吧。这些都是可以通过 apt 直接安装的，这里也不多说了。安装好以后，再执行，提示：

1
2
3
4
5
6
shnsplit: warning: failed to read data from input file using format: [ape]
shnsplit:          + you may not have permission to read file: [CDImage.ape]
shnsplit:  [...]]]></description>
			<content:encoded><![CDATA[<p>虽然其实并不难，不过还是想写一写，以备以后忘记掉……</p>
<p>这个其实我从昨晚就开始研究了，不过没研究出个所以然来。不过知道了一件事，那就是如何用 Audacious 播放带 cue 的 ape。似乎要把首选项里音频下的格式检测里的两项全部去掉，而且我根据惯例把 cue 转成了 UTF-8 的。<br />
<span id="more-283"></span><br />
今天早上找到了这么一篇文章：<a href="http://hi.baidu.com/tomshi/blog/item/365d09fa9cbef19758ee9052.html" target="_blank">ubuntu 下基本命令行方式刻录 ape 和 flac 全记录</a>。文章的最后提到切割的方法：</p>

<div class="wp_codebox"><table><tr id="p28318"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p283code18"><pre class="bash" style="font-family:monospace;">cuebreakpoints <span style="color: #660033;">-i</span> cue CDImage.cue<span style="color: #000000; font-weight: bold;">|</span>shnsplit CDImage.ape</pre></td></tr></table></div>

<p>我先是试了一下，马上提示没有安装 cuetools，至于 shnsplit，我昨晚就安装好了 shntool，所以没有提示吧。这些都是可以通过 apt 直接安装的，这里也不多说了。安装好以后，再执行，提示：</p>

<div class="wp_codebox"><table><tr id="p28319"><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code" id="p283code19"><pre class="text" style="font-family:monospace;">shnsplit: warning: failed to read data from input file using format: [ape]
shnsplit:          + you may not have permission to read file: [CDImage.ape]
shnsplit:          + arguments may be incorrect for decoder: [mac]
shnsplit:          + verify that the decoder is installed and in your PATH
shnsplit:          + this file may be unsupported, truncated or corrupt
shnsplit: error: cannot continue due to error(s) shown above</pre></td></tr></table></div>

<p>怎么这么麻烦……又去找那个解码器，试了半天才发现源上根本没有那些玩意……最后在 Ubuntu 中文论坛上的一个帖子里发现了几个解码器：<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=19211">[分享] monkeys-audio package</a>。下载下三个解码器后，要先安装 libmac2 和  libmac-dev 最后安装 monkeys-audio，不然好像依赖关系不能满足。这个安装就很简单了咯，直接双击就可以了。</p>
<p>接下去终于可以用上面的命令分割了，只不过分割成的文件都是形如 split-track??.wav 的样子，又是不带标签的 wav，看得我很不爽……因为这意味着我要一个一个加标签改文件名！</p>
<p>不过不小心又在<a href="http://hi.baidu.com/onleadzzwen/blog/item/437960d5593cf9c051da4b80.html" target="_blank">这个帖子</a>看到了一种方法，很高兴，就把刚才生成的 wav 全部被我删掉了。</p>
<p>现在好了，只要用下面这个命令：</p>

<div class="wp_codebox"><table><tr id="p28320"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p283code20"><pre class="bash" style="font-family:monospace;">shntool <span style="color: #c20cb9; font-weight: bold;">split</span> <span style="color: #660033;">-f</span> CDImage.cue <span style="color: #660033;">-t</span> <span style="color: #ff0000;">'%n.%t'</span> <span style="color: #660033;">-o</span> wav CDImage.ape</pre></td></tr></table></div>

<p>就可以直接把分割后的文件按照 cue 中的轨道信息写文件名了！原文中 -o 后面是 flac，不过我反正最后要转成 aac，而 shntool 又不支持 aac，干脆转成 wav，一会儿用 audio-convert-mod 转的时候还不用解码。稍微注意一下，因为我一开始用的就是 UTF-8 的 cue，如果遇到奇怪的问题可以先试试把 cue 转成 UTF-8 的，因为网络上的貌似大多是 GB2313 的。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.upsuper.org/actual-combat-spliting-ape-under-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu之旅（九）</title>
		<link>http://blog.upsuper.org/ubuntu-trip-9/</link>
		<comments>http://blog.upsuper.org/ubuntu-trip-9/#comments</comments>
		<pubDate>Sat, 19 Jul 2008 15:03:40 +0000</pubDate>
		<dc:creator>upsuper</dc:creator>
				<category><![CDATA[探究学习]]></category>
		<category><![CDATA[AAC]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[正则表达式]]></category>
		<category><![CDATA[音乐]]></category>
		<category><![CDATA[音频]]></category>

		<guid isPermaLink="false">http://blog.upsuper.org/?p=197</guid>
		<description><![CDATA[很久没继续，因为前一段时间迷恋 CLANNAD + 信息组培训……
话说这次因为要收新歌，所以研究了一下 Ubuntu 下的音频相关，发现了一个不错的小工具 Audio-convert-mod 音频魔方，安装有一点不同，参见上一篇日志。
安装好以后发现我不得不放弃以前收集时采用的 wma 格式，因为 Linux 下似乎很难找到转为 wma 的方法（虽然最后还是被我找到了，见此处，不过不想采用），而且经过网上一番查找对比，最终选定了 AAC 格式作为新一批的收录标准格式。AAC 的优点我在这里就不多阐述了，反正好像 wma 和 mp3 和它是没得比的，唯独就是 mpc 需要考量。
完成了标准格式的选定，我还需要符合我收藏标准的标签和文件命名方式。标签方面，用 Audacious 不能修改 AAC 的标签，而传说中强大的 Kid3 修改后，就不能播放了……今天下午刚刚发现一个很好的软件 EasyTAG （可直接用 apt 安装），声称支持 AAC。不过弄了半天一直不能现实出 .aac 的文件。开始以为是没有安装依赖的 libmp4v2，不过安装了还是没有。在官方的手册上看了一会儿，突然发现那里面只提到用 mpeg4ip 以兼容 mp4！！！我把扩展名改为 .mp4，EasyTAG 可以找到了，修改后重命名回去也可以正常播放。成功了哈~

最后是关于命名的问题。我的命名一向是“轨道编号-歌曲名”的方式命名的，但是网上下载的歌曲却多是“轨道编号.歌曲名”的。以前在 Windows 下用一个叫做拖把更名器的东西，还是很好用的。于是就在想 Linux 下有没有这样的东西呢？经过查找，发现了 rename 这个命令。这个命令支持 Perl 的正则表达式，因此功能变得十分强大，比如我的问题只要

1
rename 's/(\d{2})\.(.*)/$1\-$2/' *

就可以了。其中

1
s/(\d{2})\.(.*)/$1\-$2/

就是 Perl 的正则表达式，具体的使用方法可以参看Perl正则表达式详解，不过要特别注意的是，rename 推荐使用“$1”、“$2”这样的形式代替“\1”、“\2”，这似乎和 [...]]]></description>
			<content:encoded><![CDATA[<p>很久没继续，因为前一段时间迷恋 CLANNAD + 信息组培训……</p>
<p>话说这次因为要收新歌，所以研究了一下 Ubuntu 下的音频相关，发现了一个不错的小工具 Audio-convert-mod 音频魔方，安装有一点不同，参见<a href="http://blog.upsuper.org/installation-of-audio-convert-mod/">上一篇日志</a>。</p>
<p>安装好以后发现我不得不放弃以前收集时采用的 wma 格式，因为 Linux 下似乎很难找到转为 wma 的方法（虽然最后还是被我找到了，见<a href="http://semson.blogspot.com/2008/05/linux-audoi-wma.html" target="_blank">此处</a>，不过不想采用），而且经过网上一番查找对比，最终选定了 AAC 格式作为新一批的收录标准格式。AAC 的优点我在这里就不多阐述了，反正好像 wma 和 mp3 和它是没得比的，唯独就是 mpc 需要考量。</p>
<p>完成了标准格式的选定，我还需要符合我收藏标准的标签和文件命名方式。标签方面，用 Audacious 不能修改 AAC 的标签，而传说中强大的 Kid3 修改后，就不能播放了……今天下午刚刚发现一个很好的软件 EasyTAG （可直接用 apt 安装），声称支持 AAC。不过弄了半天一直不能现实出 .aac 的文件。开始以为是没有安装依赖的 libmp4v2，不过安装了还是没有。在官方的手册上看了一会儿，突然发现那里面只提到用 mpeg4ip 以兼容 mp4！！！我把扩展名改为 .mp4，EasyTAG 可以找到了，修改后重命名回去也可以正常播放。成功了哈~<br />
<span id="more-197"></span><br />
最后是关于命名的问题。我的命名一向是“轨道编号-歌曲名”的方式命名的，但是网上下载的歌曲却多是“轨道编号.歌曲名”的。以前在 Windows 下用一个叫做拖把更名器的东西，还是很好用的。于是就在想 Linux 下有没有这样的东西呢？经过查找，发现了 rename 这个命令。这个命令支持 Perl 的正则表达式，因此功能变得十分强大，比如我的问题只要</p>

<div class="wp_codebox"><table><tr id="p19723"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p197code23"><pre class="bash" style="font-family:monospace;">rename <span style="color: #ff0000;">'s/(\d{2})\.(.*)/$1\-$2/'</span> <span style="color: #000000; font-weight: bold;">*</span></pre></td></tr></table></div>

<p>就可以了。其中</p>

<div class="wp_codebox"><table><tr id="p19724"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p197code24"><pre class="regular" style="font-family:monospace;">s/(\d{2})\.(.*)/$1\-$2/</pre></td></tr></table></div>

<p>就是 Perl 的正则表达式，具体的使用方法可以参看<a href="http://blog.csdn.net/dreamnear/archive/2007/11/08/1872965.aspx" target="_blank">Perl正则表达式详解</a>，不过要特别注意的是，rename 推荐使用“$1”、“$2”这样的形式代替“\1”、“\2”，这似乎和 Perl 不大一样？</p>
<p>后面的 * 就是尝试对每一个文件重命名咯，很简单的。不过正则表达式可能要学一点时间，另外推荐我看的正则表达式的教程：<a href="http://unibetter.com/deerchao/zhengzhe-biaodashi-jiaocheng-se.htm" target="_blank">正则表达式30分钟入门教程</a>，写得比较不错，虽然和 Perl 的有些许不同，不过大同小异，学学也无妨。况且这个写得比较容易入门的说~</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.upsuper.org/ubuntu-trip-9/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
