What is flac2aac?

flac2aac is a simple frontend to iTunes and flac. It currently is written
in AppleScript. Commenting is supported through metaflac; see the code to
add your own fields if necessary.

Recently added was a routine to convert ReplayGain differentials (from
REPLAYGAIN_TRACK_GAIN) to iTunes' Volume Adjustment. This eliminates
having to rely on an external app like iVolume. In fact, a few quick tests
here show that the Volume Adjustments determined by flac2aac were nearly
the same as iVolume-1.6 for the standard ReplayGain 83dB level, for levels
other than 83dB, and when "Adjust for iPod with buggy firmware" was
emulated. Warning: this does not do any kind of analysis on the sound data
so clipping may result when gains higher than 83dB are desired.

What does flac2aac require?

flac2aac requires MacOS X (known to work on 10.{2,3,4}, iTunes {4,5,6,7}.x,
flac, and metaflac (from flac-1.1.1 or later).


Double-click to start, click Run in Script Editor to run.

If you want to use a gain other than 83dB, set "desired_loudness" to an
integer other than 83. If the AACs you're making will be played on an
iPod, the value 92 is preferable; additionally, you should set "with_ipod"
to true.

Known Issues

flac2aac was hacked together from example code and working AppleScripts
from all over the place. It's amazing that it works.

- Will crash iTunes unless "iTunes -> Preferences -> Importing -> Play
  songs while importing" is UNCHECKED
. There is no known way to disable
  this through iTunes' AppleScript API.
- Will lock up if an info window is open in iTunes before the script
  accesses iTunes

Future Release Plans

- Fine-tune the REPLAY_TRACK_GAIN to Volume Adjustment conversion
- Use droplet instead of file selection dialog; in the meantime one should
  be able to select multiple individual files for transcoding
- Be able to grab artwork from someplace and add to tag (the AppleScript
  API for iTunes currently does not allow this unless you're using
  PICT-formatted images)
- Encode multiple AIFFs at once in iTunes
- Implement better argument checking / error detection and handling


Feel free to hack flac2aac up, but give me credit where credit is due as I
have done for others in this code.


It is highly recommended that you download the latest version:

flac2aac-0.3d - ChangeLog (2007-08-21)

Past Releases

flac2aac-0.3c - (2007-05-10)
flac2aac-0.3b - (2006-09-12)
flac2aac-0.3 - (2006-04-24)
flac2aac-0.2d - (2005-02-26)
flac2aac-0.2c - (2004-11-20)
flac2aac-0.2b - (2004-09-06)
flac2aac-0.2 - (2004-08-23)
flac2aac-0.1 - (2004-08-12)


Using flac2aac? Want more features? Hate flac2aac? Let me know.

Badlands Home