CUE 分割

出自 Arch Linux 中文维基

這篇文章描述了如何利用CUE文件的元數據來分割音頻文件。

安裝[編輯 | 編輯原始碼]

需要 shntoolAUR 以分割音頻文件。 對於ISO內的CD鏡像或其它原始數據則需要 bchunk

原生支持WAV格式的輸入與輸出。對於其它格式則需要對應的編解碼器如 flacmacwavpack

標記音頻文件則需要其它軟件 cuetoolsmp3infovorbis-tools

分割[編輯 | 編輯原始碼]

使用 shnsplit 命令分割 .wav 文件:

$ shnsplit -f file.cue file.wav

使用 bchunk 命令分割 .bin 文件並轉換為 .wav 格式:

$ bchunk -v -w file.bin file.cue out

輸出文件名可利用 -t 進行格式化 (%p 藝術家, %a 專輯, %t 標題, 以及 %n 軌數):

$ shnsplit -f file.cue -t "%n %t" file.wav

shnsplit 支持許多無損格式(參見 shntool(1))。 以 .flac 格式為例:

$ shnsplit -f file.cue -o flac file.flac

輸出格式,包括編碼器,可用 -o 命令指定 (參見 shntool(1)):

$ shnsplit -f file.cue -o "flac flac -s -8 -o %f -" file.flac

可用 shntool -a 命令查看 shntool 原生支持的格式和編碼器。如果沒有原生支持,可以手動指定。例如輸出ogg格式:

$ shnsplit -f file.cue -o "cust ext=ogg oggenc -b 192 -o %f -" file.ape

標記[編輯 | 編輯原始碼]

需要 cuetools 來運行 cuetag.sh

可以用以下命令複製 .cue 的元數據至 .mp3 文件。

$ cuetag.sh file.cue *.mp3

或指定某些文件:

$ cuetag.sh file.cue track01.mp3 track02.mp3 track03.mp3 track04.mp3

cuetag.sh 支持 .mp3 文件的 id3 標籤和 .ogg.flac 文件的 vorbis 標籤。

替代[編輯 | 編輯原始碼]

References[編輯 | 編輯原始碼]