PDA

View Full Version : Convert AAC to FLAC ?



John J. Stimson-III
2005-02-17, 11:09
On Thu, 17 Feb 2005 09:57:36 +0100, Vince <mailing at vincen.org>
wrote:
>> 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 ?

Michael Peters replied:
>aac is not lossless, even at high bitrate - it is still lossy.

I have encountered several references to lossless AAC files. I
believe that Apple has developed a lossless codec in addition to the
mpeg-related codec, and both use the same AAC "package". I'm by no
means an expert on the subject.

The faad2 program will decode AAC format files into PCM WAV files.
You can pipe the output of faad2 into flac to re-encode AAC to FLAC.
Since FLAC is lossless, you will by definition not lose any
information. I don't know if faad2 supports Apple lossless encoding.
It does work with the music I recently purchased from the iTunes store
in lossy m4a format.

To get faad2, go to sourceforge.net and search for "freeware advanced
audio coder".

There seems to be a minor bug in the current stable version of faad2,
which outputs an odd number of bytes and results in static when trying
to stream multiple AAC songs in a row through the Squeezebox. I don't
know if it will affect files that are saved as WAV or piped into
flac. flac may be smart enough that it isn't confused by the odd byte
at the end.
--

john (AT) idsfa (DOT) net John Stimson
http://www.idsfa.net/~john/ HMC Physics '94

Michael Peters
2005-02-17, 18:48
On Thu, 17 Feb 2005 10:09:39 -0800, John J. Stimson-III
<john (AT) harlie (DOT) idsfa.net> wrote:
> On Thu, 17 Feb 2005 09:57:36 +0100, Vince <mailing at vincen.org>
> wrote:
> >> 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 ?
>
> Michael Peters replied:
> >aac is not lossless, even at high bitrate - it is still lossy.
>
> I have encountered several references to lossless AAC files. I
> believe that Apple has developed a lossless codec in addition to the
> mpeg-related codec, and both use the same AAC "package". I'm by no
> means an expert on the subject.

Apple uses a mpeg4 container.
Apple Lossless is a lossless format in an mpeg4 container.
Apple aac is aac in an mpeg4 container.

They both use a mpeg4 container, but the lossless is different than
lossy, aac is the lossy.
There's talk about using mpeg4 container for mp3's as well in the
future (which would give them better tagging and true gapless
playback)

They might have the same .m4a extension - that extension describes the
container, not the codec for the audio inside.

It's confusing and I hate it - I like to know what a file is by the
extension (IE .ogg can be a divx movie in an ogg container OR a ogg
audio file - I hate that) but the powers that be decided the kind of
file should be described in the container and not the extension.

--
http://mpeters.us/

Marc Sherman
2005-02-18, 06:17
Michael Peters wrote:
>
> It's confusing and I hate it - I like to know what a file is by the
> extension (IE .ogg can be a divx movie in an ogg container OR a ogg
> audio file - I hate that) but the powers that be decided the kind of
> file should be described in the container and not the extension.

Actually, a .ogg can be a divx (or Theora) movie file or a _Vorbis_
audio file. Ogg is just the container format.

It makes a lot of sense to encode the container type in the extension;
the OS needs to know what container handler to pass the file off to.
That container handler can then look inside the file and use the
appropriate codecs to handle the content. Note that a given container
file can contain multiple streams with different codecs (and even
different media types), so an extension based on the media type (such as
..oggv) wouldn't be feasible.

- Marc

Michael Peters
2005-02-18, 06:49
>
> It makes a lot of sense to encode the container type in the extension;
> the OS needs to know what container handler to pass the file off to.

There are better ways for the OS to get that information.
The OS should never rely on the extension to determine the mime type.
I realize that they do, but a resource fork is the right way to do it
- it really is a shame that didn't catch on.

A resource fork would allow the user to determine type by extension by
looking at a file listing without needing to use a tool to look inside
the container.

--
http://mpeters.us/

Sally Shears
2005-02-20, 07:46
On Fri, 18 Feb 2005 08:17:31 -0500, Marc Sherman <msherman (AT) projectile (DOT) ca> wrote:
> Michael Peters wrote:
> >
> > ... the powers that be decided the kind of
> > file should be described in the container and not the extension.
>
> Actually, a .ogg can be a divx (or Theora) movie file or a _Vorbis_
> audio file. Ogg is just the container format.

OK, the extension names the container. And, the content kind is
described within.

But, how to know what's within? Is there an applic that will look at a
..avi file and say "That's a divx, play it with VLC. Or, that .avi is
___ and plays in Quicktime.."?

I have a continuous problem... What application to use to play a file?
The extension is supposed to tell the OS which application to use, but
this falls apart with media files.

For example: Get an .avi file. Double click to play it. Quicktime
opens, then says, "Quicktime is missing software required to display
this movie file. Unfortunately, it is not available on the QuickTime
server." (I'm on Mac OS X Panther.)

I have learned that VLC is the closest to a universal player (for
visual material anyway). But, looking for the common denominator isn't
the best way. We want to open each file with the app that's best for
that file type. How to tell with media files?

-- Sally

--
Sally Shears (a.k.a. "Molly")
SallyShears (AT) gmail (DOT) com -or- Sally (AT) Shears (DOT) org
(was sshears (AT) theWorld (DOT) com)

John Hernandez
2005-02-23, 14:13
Sally Shears wrote:
> I have a continuous problem... What application to use to play a file?
> The extension is supposed to tell the OS which application to use, but
> this falls apart with media files.
>
> For example: Get an .avi file. Double click to play it. Quicktime
> opens, then says, "Quicktime is missing software required to display
> this movie file. Unfortunately, it is not available on the QuickTime
> server." (I'm on Mac OS X Panther.)

On Linux, I use the 'file' command. It's not automated, but it
generally serves to clue me in. I suspect Mac OS X has 'file' too, but
I'm not sure.

% file mymovie.avi
mymovie.avi: RIFF (little-endian) data, AVI, 624 x 352, 23.98 fps,
video: XviD, audio: MPEG-1 Layer 3 (stereo, 48000 Hz)

Sally Shears
2005-03-06, 15:36
Hmm... On my Mac OS X, looking at an AVI file (plays in VLC, not in
QuickTime), I see:

$file xyz.avi
xyz.avi: RIFF (little-endian) data, AVI

So, it still won't tell me what I really want to know: Which
application should I use to lay the file.

Ugh.

-- Sally

On Wed, 23 Feb 2005 14:13:47 -0700, John Hernandez <jph (AT) jph (DOT) net> wrote:
> Sally Shears wrote:
> > I have a continuous problem... What application to use to play a file?
> > The extension is supposed to tell the OS which application to use, but
> > this falls apart with media files.
> >
> > For example: Get an .avi file. Double click to play it. Quicktime
> > opens, then says, "Quicktime is missing software required to display
> > this movie file. Unfortunately, it is not available on the QuickTime
> > server." (I'm on Mac OS X Panther.)
>
> On Linux, I use the 'file' command. It's not automated, but it
> generally serves to clue me in. I suspect Mac OS X has 'file' too, but
> I'm not sure.
>
> % file mymovie.avi
> mymovie.avi: RIFF (little-endian) data, AVI, 624 x 352, 23.98 fps,
> video: XviD, audio: MPEG-1 Layer 3 (stereo, 48000 Hz)
>

Michael Peters
2005-03-06, 15:55
On Sun, 6 Mar 2005 17:36:56 -0500, Sally Shears <sallyshears (AT) gmail (DOT) com> wrote:
> Hmm... On my Mac OS X, looking at an AVI file (plays in VLC, not in
> QuickTime), I see:
>
> $file xyz.avi
> xyz.avi: RIFF (little-endian) data, AVI
>
> So, it still won't tell me what I really want to know: Which
> application should I use to lay the file.
>
> Ugh.

If it's AVI then I'm guessing the video is divx and you actually may
be able to play it in QuickTime if you install the DivX plugin for
QuickTime.

http://www.divx.com/divx/mac/

--
http://mpeters.us/

Sally Shears
2005-03-07, 19:16
On Sun, 6 Mar 2005 22:44:26 -0800 (PST), Allan Hise <allan (AT) hise (DOT) org> wrote:
> On Sun, 6 Mar 2005, Michael Peters wrote:
> >
> > If it's AVI then I'm guessing the video is divx and you actually may
> > be able to play it in QuickTime if you install the DivX plugin for
> > QuickTime.
> >
> > http://www.divx.com/divx/mac/
>
> Or try VLC. It will play a lot of files that Quicktime can't.
> You can find them at the usual spots, like www.macupdate.com

Thanks, Michael and Alan.

-- Sally

--
Sally Shears (a.k.a. "Molly")
SallyShears (AT) gmail (DOT) com -or- Sally (AT) Shears (DOT) org
(was sshears (AT) theWorld (DOT) com)

dbls
2005-03-08, 05:52
Sally,

I have to ask, regarding your signature:

Does it have anything to do with "Red hair and black
leather, my favourite colour scheme"?

-:- dbls

----- Original Message -----
From: "Sally Shears" <sallyshears (AT) gmail (DOT) com>
To: "Slim Devices Discussion" <discuss (AT) lists (DOT) slimdevices.com>
Sent: Monday, March 07, 2005 9:16 PM
Subject: Re: [slim] Convert AAC to FLAC ?


> On Sun, 6 Mar 2005 22:44:26 -0800 (PST), Allan Hise <allan (AT) hise (DOT) org> wrote:
>> On Sun, 6 Mar 2005, Michael Peters wrote:
>> >
>> > If it's AVI then I'm guessing the video is divx and you actually may
>> > be able to play it in QuickTime if you install the DivX plugin for
>> > QuickTime.
>> >
>> > http://www.divx.com/divx/mac/
>>
>> Or try VLC. It will play a lot of files that Quicktime can't.
>> You can find them at the usual spots, like www.macupdate.com
>
> Thanks, Michael and Alan.
>
> -- Sally
>
> --
> Sally Shears (a.k.a. "Molly")
> SallyShears (AT) gmail (DOT) com -or- Sally (AT) Shears (DOT) org
> (was sshears (AT) theWorld (DOT) com)
>