Here is a shell script that will make the convertion if the mp3 file
does not exist:
Yo can save it as /usr/bin/wav2mp3 as root. Remember to convert it to
executable with: chmod a+x /usr/bin/wav2mp3
Then you can use the find command as:
find . -name "*.wav" -print -exec wav2mp3 {} \;
Jan Depner wrote:
On Sun, 2004-05-30 at 15:11, Jos Laake wrote:
Re: mp3 vs. ogg...
Several people have written suggesting I use ogg Vorbis
instead of mp3. I really do get that. I'm not into the
whole 'bleed-em-dry-with-a-proprietary-format' routine.
And it is my intention to move toward making my recordings
available in .ogg format as well. And! This little command
line from Jan Depner is *GREAT*! :
> find . -name "*.wav" -print -exec oggenc -q 5 {} \;
Same for mp3 with bladeenc:
find . -name "*.wav" -print -exec bladeenc -br 160 {} \;
http://bladeenc.mp3.no/
Trust the source Luke!
Jan
--
This Message is sent from my Red Hat Fedora Core 1 Linux server
.-. Gustavo Zamorano S.
`--.____.--' mailto:gzsuniq@cableonda.net
Registered Linux user number 320898
Machine Registration number 205692
(at
http://counter.li.org/)
# wav2mp3
# converts from mp3 to wav
# coreutils must be installed!
input=$1
name=`basename "$input" .wav`
dir=`dirname "$input"
output="${name}.mp3"
# Using lame:
if test -f "$dir/$output"
then echo "$input not converted... $dir/$output already exists!"
else lame -h "$input" "$dir/$output"
fi