PDA

View Full Version : Convert AAC to FLAC ?



Vince
2005-02-17, 01:57
Hi,
I'd like to know if it's ok to convert AAC files that are supposed to
be loseless files to FLAC formats ? and if so how can I do in under mac
osx or linux ?
Thanks in advance

Vincèn

Michael Peters
2005-02-17, 06:50
On Thu, 17 Feb 2005 09:57:36 +0100, Vince <mailing (AT) vincen (DOT) org> wrote:
> Hi,
> I'd like to know if it's ok to convert AAC files that are supposed to
> be loseless files to FLAC formats ? and if so how can I do in under mac
> osx or linux ?
> Thanks in advance
>
> Vincèn

aac is not lossless, even at high bitrate - it is still lossy.
In Linux you can do it in two steps with mplayer - play the file to a
wav file, and then flac encode the resulting wav file. I don't know of
a more direct approach, maybe something with gstreamer pipes would do
it.

--
http://mpeters.us/

Phil Karn
2005-02-25, 04:08
Vince wrote:
> Hi,
> I'd like to know if it's ok to convert AAC files that are supposed to
> be loseless files to FLAC formats ? and if so how can I do in under mac
> osx or linux ?

I assume you are actually referring to Apple's lossLESS format, as it
wouldn't make much sense to convert something in Apple's lossY Advanced
Audio Coding (AAC) format to FLAC. The file wouldn't sound any better;
it would only get bigger. You might as well keep it in AAC and let
Slimserver convert it on the fly to PCM whenever you actually play it.

Files in Apple's lossless format have the same extension (.m4a) as files
in AAC (Advanced Audio Coding), Apple's lossy format widely used on the
iPod. As others have pointed out, Apple uses MPEG-4 containers for both
formats, hence the common file extension, but inside they're quite
different.

The big problem with Apple's lossless format is that it's proprietary,
and open-source decoders like faad2 that handle .m4a files containing
AAC can't handle it. I haven't seen any documentation that would allow
someone to write an open source implementation that could be dropped
into Slimserver, for example.

However, you can use iTunes to convert Apple's lossless compression
format into something more friendly, like WAV, and then feed that to
flac. To do this, bring up the Preferences panel in iTunes and select
the "WAV Encoder" option for the "Import Using" field. Close the
preferences window. This will put the entry "Convert Selection to WAV"
on the iTunes "Advanced" menu. Assuming the files you want to convert
are already in your iTunes library, select them and then the
aforementioned "Convert Selection to WAV" command. This will add entries
to your iTunes library for the selected items in WAV format. On my
version of iTunes (4.7.1 on Mac OS X), at least, it leaves the originals
intact.

Now you can extract the new WAV files from your iTunes library and do
whatever you want with them.

There doesn't seem to be a "convert selection to FOO" command in iTunes,
where FOO is any one of its supported formats. It only seems to have the
one command that will convert a selection into whatever your currently
selected format is for importing music from a CD.

It really is too bad that Apple -- who made a seminal breakthrough in
adopting an open-source operating system (BSD) as its foundation for OS
X -- chose to ignore a perfectly good open lossless compression
technology (FLAC) in favor of its own proprietary scheme. I just can't
see any advantages to it, other than built-in support in iTunes. Both
lossless compression algorithms (Apple and FLAC) have about the same
compression ratio, about 50% on average and somewhat better on quiet
classical music.

--Phil

Phil Karn
2005-02-25, 16:24
After I sent my comments last night about Apple Lossless Coding, I
noticed that the main Slimdevices web page (www.slimdevices.com) asserts
that Slimserver 5.4 *does* support Apple Lossless. However, it doesn't
actually work on Linux.

Is this true only when the server runs on a Mac, so it can use
Apple-provided codecs?

Phil