Discussion:
flac to mp3
Paul Kaplan
2007-03-06 03:38:52 UTC
Permalink
Any recommendations for a program to convert a bunch of flac audio files to
mp3 format?
Paul
Harry L. Lee
2007-03-06 03:57:42 UTC
Permalink
since flac is lossless, you could simply decode it to a wav and then use an
mp3 encoder to create the mp3. A python script would be wll suited to drive
this process.
I myself am stupid and anal retentive. I rip to BOTH mp3 and wav, and keep
both (storage is cheap and getting cheaper) someone is always gonna come out
with a new compression, by keeping the wavs I can pretty much always get
there without too much effort.
Post by Paul Kaplan
Any recommendations for a program to convert a bunch of flac audio files to
mp3 format?
Paul
--
ubuntu-users mailing list
ubuntu-users at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
--
harry at jonesnose.com
Harry L Lee (via gmail)
chief cook and bottle washer
http://jonesnose.com
mailto:harry at jonesnose.com
207-384-8030 (email preferred)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20070305/8b96edd6/attachment.html>
John L Fjellstad
2007-03-06 05:28:49 UTC
Permalink
Post by Paul Kaplan
Any recommendations for a program to convert a bunch of flac audio
files to mp3 format?
This is the script I use:
#!/bin/bash

METAFLAC=/usr/bin/metaflac
LAME=/usr/bin/lame
LAME_OPTS="--preset extreme --add-id3v2 --ignore-tag-errors"
FLAC=/usr/bin/flac

function usage
{
echo $0 flac1 [flac2] [flac3] ...
exit 1
}

if [ $# -lt 1 ]; then
usage
fi


for file in "$@"; do
file "$file" | grep FLAC
if [ $? -eq 0 ]; then
ARTIST=`metaflac --show-tag=ARTIST "$file" | cut -d'=' -f2`
ALBUM=`metaflac --show-tag=ALBUM "$file" | cut -d'=' -f2`
TITLE=`metaflac --show-tag=TITLE "$file" | cut -d'=' -f2`
DATE=`metaflac --show-tag=DATE "$file" | cut -d'=' -f2`
GENRE=`metaflac --show-tag=GENRE "$file" | cut -d'=' -f2`
TRACK=`metaflac --show-tag=TRACKNUMBER "$file" | cut -d'=' -f2`
mp3file=`basename "$file" flac`
flac -d -c "$file" | lame $LAME_OPTS --tt "$TITLE" --ta "$ARTIST" --tl "$ALBUM" --ty "$DATE" --tn "$TRACK" --tg "$GENRE" - "${mp3file}mp3"
fi
done
exit 0

Probably someone who can optimize the script
--
John L. Fjellstad
web: http://www.fjellstad.org/ Quis custodiet ipsos custodes
H.S.
2007-03-06 06:27:34 UTC
Permalink
I would recommend soundconverter or soundkonverter depending on
whether you are using GNOME or KDE...
Post by Paul Kaplan
Any recommendations for a program to convert a bunch of flac audio files to
mp3 format?
Paul
You have already got a script suggestion which looks pretty nice (I'd
use it myself). However, if you want to go the gui way, try audacity. It
imports flac and can export to ogg or mp3.

->HS

Loading...