Nov 282009
http://ubuntuforums.org/showthread.php?p=6879960#post6879960
Requirements: Having the executables mac, lame and id3v2 installed.
I haven’t done it myself yet, but this seems to be a nice and quick way to do a conversion and set the ID3 tags in the newly created MP3:
#!/bin/bash
echo "Artist name?"
a= read a
echo "Name of album?"
A= read A
echo "genre?"
g= read g
echo "year?"
y= read y
for f in *.ape; do mac "$f" "${f%.ape}.wav" -d; done
mkdir "$a"'-'"$A"
for f in *.wav; do lame --vbr-new -V2 --replaygain-accurate -q 2 "$f" ./"$a"'-'"$A"/"${f%.wav}.mp3"; done
rm *.wav
cd ./"$a"'-'"$A"
for f in *.mp3; do id3v2 "$f" -t "${f%.mp3}" -a "$a" -A "$A" -y "$y" -g "$g"; done
example usage:
doug@doug-desktop:~/Music/Jackson Browne/Late For The Sky$ ~/ape2mp3
Artist name?
Jackson Browne
Name of album?
Late for The Sky
genre?
81
year?
1974
--- Monkey's Audio Console Front End (v 3.99) (c) Matthew T. Ashland ---
Decompressing...
Progress: 100.0% (0.0 seconds remaining, 14.5 seconds total) ...... ect, ect..................
LAME 3.98 32bits (http://www.mp3dev.org/)
CPU features: MMX (ASM used), SSE (ASM used), SSE2
Using polyphase lowpass filter, transition band: 18671 Hz - 19205 Hz
Encoding 01 - Late For The Sky.wav
to ./Jackson Browne-Late for The Sky/ 01 - Late For The Sky.mp3
Encoding as 44.1 kHz j-stereo MPEG-1 Layer III VBR(q=2)....ect.
VN:F [1.9.22_1171]