Help - Search - Members - Calendar
Full Version: FLAC to AAC or other lossy format
Hydrogenaudio Forums > Lossless Audio Compression > FLAC
RoyHarper
Hello,

I appologize if my question has already been answered previously:

Thus far, all I've been able to do is rip my CD's into FLAC, using EAC with Flacattack; however, I now have a ton of FLAC images and I'd like to rip them to AAC (I have Nero 6.x, which has an AAC encoder).

Could someone point me to a thread that gives step by step instructions on how to convert from FLAC to a lossy format?

Thanks!
Roy




crunge
Here's what I do (on Mac). On PC you may want to look at Foobar with iTunesEncode, although I haven't done this.

(1) I run a script that converts the flac files to wav files, but in so doing, uses the metadata from the flac file as the filename for the wav file:

------ 8<--------

#!/bin/bash

#
# decode flac files to wav format
#
# by Chris Runge <----------@---.--->
#
# This script converts flac-encoded audio files to wav format. The
# filename of the resulting wav file is written to include the basic
# metadata of the file, including the artist, the album title, the
# year, genre, track number, and song title. The resulting wav files
# can then be converted into a format of your choice.
#
# One way to use this script is to convert flac to wav, then import
# the wav files into iTunes. Using the Song Parser script you can
# then quickly put the metadata "back" into the file itself, e.g., as
# part of a conversion to Apple Lossless, AIFF, AAC, or other formats.
#

# strip flac comment and clean up illegal filename characters
function laundry {
sed s/.*=//g | sed 's/[/+{;"\=~<>*|$]/_/g'
}

# process the *.flac files in the current directory
for flac in *.flac
do
echo "Converting $flac"
OUTF=`echo "$flac" | sed s/\.flac/.wav/g`

# extract metadata
ARTIST=`metaflac "$flac" --show-tag=ARTIST | laundry`
ALBUM=`metaflac "$flac" --show-tag=ALBUM | laundry`
YEAR=`metaflac "$flac" --show-tag=DATE | laundry`
GENRE=`metaflac "$flac" --show-tag=GENRE | laundry`
TRACK=`metaflac "$flac" --show-tag=TRACKNUMBER | laundry`
TITLE=`metaflac "$flac" --show-tag=TITLE | laundry`
COMMENT=`metaflac "$flac" --show-tag=COMMENT | laundry`

# decode the flac to a wav
flac -d -s "$flac" -o \
"$ARTIST --- $ALBUM --- $YEAR --- $GENRE --- $TRACK --- $TITLE.w
av"
done

------- >8 ---------

(2) I then import the wav files into iTunes, select them, and run the Track Parser script from Doug's Applescripts for iTunes. This reads the metadata out of the filename and puts it into the appropriate places.

(3) Then I have wav files that I can convert into Apple Lossless, AAC, etc.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.