I wrote a nice solution to my problem and thought I'd post it here in case anyone else might find it useful. I created a script to do a sampling rate conversion (but you could easily do other conversions with it) while preserving the ID3 tag info.
This script relies on an excellent program called
mp3info to extract tag and technical info and then
lame for the conversion.
If your on Ubuntu, you can do a
Code:
apt-get install mp3info
from the universe but you'll need to d/l and compile lame yourself (annoying but easy).
Code:
#! /bin/bash
for f in *.mp3; do
rate=`mp3info -p "%q" "$f"`
if [[ $rate != "44" ]]
then
title=`mp3info -p "%t" "$f"`
track=`mp3info -p "%n" "$f"`
artist=`mp3info -p "%a" "$f"`
album=`mp3info -p "%l" "$f"`
year=`mp3info -p "%y" "$f"`
genre=`mp3info -p "%g" "$f"`
comment=`mp3info -p "%c" "$f"`
lame --resample 44.1 --tt "$title" --tn "$track" --ta "$artist" \
--tl "$album" --ty "$year" --tg "$genre" --tc "$comment" \
"$f" "$f.out"
mv -f "$f.out" "$f"
fi
done