|
I've found many downloadeable software to do this, bu I just wanted to do it in the minimalistic way....
These two scripts can be run from a linux terminal or from a. sh file and will convert all the .flac files in the current directory to .ogg or .mp3
for i in *.flac; do
echo Creating ${i%*.flac}.ogg
gst-launch-0.10 filesrc location="$i" ! decodebin ! audioconvert ! vorbisenc ! oggmux ! filesink location="${i%*.flac}.ogg"
done
for i in *.flac; do
echo Creating ${i%*.flac}.ogg
gst-launch-0.10 filesrc location="$i" ! decodebin ! audioconvert ! lame bitrate=160 ! filesink location="${i%*.flac}.mp3"
done
They require the usage of gstreamer set of codecs, in Ubuntu gstreamer comes preinstalled but you may need the mp3 codec
sudo apt-get gstreamer0.10-lame
(note that the version may change...)
|