Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux基礎 >> 關於Linux

用 shntool 搭配 cue 在 Linux 分割無損音樂

APE 與 FLAC 都是無損格式,音質遠勝 MP3。若你下載的是整張專輯的單一檔案,就需要靠 cue 標記來切分成一首首的曲子。以下示範在 Linux 下用 shntool 完成分割與轉換。

安裝工具

sudo apt-get install flac shntool

接著建議用 gedit 把 cue 檔另存為 UTF-8 編碼,否則容易出現亂碼。

分割 FLAC

shntool split -t "%n.%p-%t" -f xxx.cue -o flac xxx.flac -d output

參數說明:-d 指定輸出目錄(不指定則存在當前目錄);-t 指定檔名格式,其中 %n 是音軌號、%p 是演奏者/藝術家、%t 是標題。

分割 APE

shntool split -t "%n.%p-%t" -f xxx.cue -o ape xxx.ape -d output

分割並同時轉換

shnsplit -f CDImage.cue -i ape -t '%t' -o flac CDImage.a

各參數:-f 後接保存分段資訊的 cue 檔;-i 為輸入格式(可為 ape、wav、flac 等);-t 指定輸出檔名,%t 表示用 cue 中的標題命名;-o flac 表示輸出為 FLAC。

單純轉換格式

shnconv -i ape -o flac xxx.ape
shnconv -i flac -o ape xxx.flac

另外也可直接搭配 flac 解碼再編碼,例如 flac temp.wav example.flac 這類用法。

Copyright © Linux教程網 All Rights Reserved