并且填写Id3v2的tag.其中一些具体的参数可以在shnsplit里面调节.里面都添加了相应的注释与提示.
其实不单只可以转换mp3,还可以转换成其它格式,比如分轨的flac与ape.
不过按道理来说320KBps的已经无法听出与CD的音质差异了吧.
保存为convert2mp3,使用方法如:
convert2mp3 flac sample.cue sample.flac
#!/bin/bash
# require:
# shntool,cuetools,eyeD3
#Get the filenames
filetype="1" # ape or flac cuefile="2"
bigfile="3" #Other variables tracks=(cueprint -d '%N' "cuefile") #Output general file information cueprint -d '%P - %T\n' "cuefile"
echo "Total number of tracks: " "tracks" #Split this bitch directly into MP3 files cust='cust ext=mp3 lame -h -V0 -b 320 --vbr-new - %f' # change quality here namestring="%p-%a-%n-%t" # performer - album - tracknumber - title shnsplit -i "filetype" -f "cuefile" -o "cust" -t "namestring" "bigfile"
#ID3 tag MP3 files
i=1
while [ i -le tracks ]; do
artist[i]=(cueprint -ni -t '%P' "cuefile")
album[i]=(cueprint -ni -t '%T' "cuefile")
tracknum[i]=(cueprint -ni -t '%02n' "cuefile")
title[i]=(cueprint -ni -t '%t' "cuefile")
f="{artist[$i]}"-"{album[i]}"-"{tracknum[i]}"-"{title[i]}".mp3 eyeD3 --no-color --set-encoding=utf8 -a "{artist[i]}" -A "{album[i]}" -n "{tracknum[i]}" -t "{title[i]}" "f"
i=[i+1]
done
</code># require:
# shntool,cuetools,eyeD3
#Get the filenames
filetype="1" # ape or flac cuefile="2"
bigfile="3" #Other variables tracks=(cueprint -d '%N' "cuefile") #Output general file information cueprint -d '%P - %T\n' "cuefile"
echo "Total number of tracks: " "tracks" #Split this bitch directly into MP3 files cust='cust ext=mp3 lame -h -V0 -b 320 --vbr-new - %f' # change quality here namestring="%p-%a-%n-%t" # performer - album - tracknumber - title shnsplit -i "filetype" -f "cuefile" -o "cust" -t "namestring" "bigfile"
#ID3 tag MP3 files
i=1
while [ i -le tracks ]; do
artist[i]=(cueprint -ni -t '%P' "cuefile")
album[i]=(cueprint -ni -t '%T' "cuefile")
tracknum[i]=(cueprint -ni -t '%02n' "cuefile")
title[i]=(cueprint -ni -t '%t' "cuefile")
f="{artist[$i]}"-"{album[i]}"-"{tracknum[i]}"-"{title[i]}".mp3 eyeD3 --no-color --set-encoding=utf8 -a "{artist[i]}" -A "{album[i]}" -n "{tracknum[i]}" -t "{title[i]}" "f"
i=[i+1]
done
主要参考资料:
2 comments:
没看懂,那代码怎么用?用什么工具呀?
@sisea
你好. 那些代碼是linux 操作系統上的tools.
windows下面也有類似的批處理工具,不過核心還是依賴lame這個工具 :)
Post a Comment