
Apple Lossless Audio Codec is now open source (Apache license) - scorchin
http://alac.macosforge.org/
======
angus77
Is there an advantage to this for someone who owns no Apple products and has
no iTunes account?

EDIT: Looking at
[http://wiki.hydrogenaudio.org/index.php?title=Lossless_compa...](http://wiki.hydrogenaudio.org/index.php?title=Lossless_comparison#Apple_Lossless_Audio_Codec_.28ALAC.29)
it looks like the only clear advantage ALAC has is iTunes/iDevice support.
FLAC has faster encoding/decoding speeds, and it's unknown if ALAC has error
handling (which FLAC has). FLAC also supports RIFF chunks, has pipe support
and is ReplayGain compatible, and has some support for embedded CUE sheets.

~~~
mitjak
And yet the most major popular MP3 player on the market can't play FLAC, which
will probably mean it will remain as obscure as it is now (i.e., mostly used
among audiophiles).

~~~
ZeroGravitas
It's not that obscure. You can _buy_ Metallica and Beatles tracks in FLAC.

~~~
thomaslangston
Most, if not all of the tracks on bandcamp.com are sold with a FLAC option.

~~~
cageface
FLAC is the defacto lossless standard everywhere but iTunes. Boomkat, Bleep
etc sell FLAC files. It also works in music software like Traktor, Ableton
Live and Renoise.

FLAC is honestly one of the happier OSS success stories.

------
tiles
For those unfamiliar with the site, MacOSForge is an official Apple site which
hosts repositories for code included in OS X (see
<http://www.opensource.apple.com/> and the sidebar)

The announcement with timestamp for today is on the homepage:
<http://www.macosforge.org/>

~~~
kahawe
I don't know why Apple has gotten THAT much flak for allegedly being totally
closed and locking you down worse than Microsoft did back in the dark ages
etc. Yes, they have certain core products which are their own and they don't
open them up and the locking down of their iPhones, well, it could be a
blessing and a curse. I will only say that from the perspective of a regular
customer, the quality control done on apps is probably not such a bad thing
but yes, for app developers it probably just sucks. And the music you buy
online on iTunes now comes pretty much without any DRM in high quality AAC.

But they are not ONLY "evil" because at the same time, Apple did contribute to
open standards and there is a lot of Open Source available. It is, however,
still a business so for me, it seems they are playing it smart and do "open"
where it also benefits them and their customers and do "closed/locked down"
where it is critical for their own success or in accordance with their product
philosophy or the reality distortion field.

~~~
jhuni
The problem is that Apple's _business model_ is based upon selling
artificially scarce content (music, applications, etc) over closed and
restrictive platforms. A couple of open products isn't going to change their
fundamental business model.

The argument that "Apple is just a business" doesn't hold weight for me either
because there are clearly superior business models out their like Google's
which is based upon free software (linux) and intelligent cloud services
(search).

~~~
ralfd
No, look at the quarter results of Apple. Their revenue is selling hardware
stuff. Digital content is relatively a small amount. I also find "artificially
scarce" a very biased description. The App Store has an unbelievable positive
impact on the developer ecosystem. And if books/gamecartridges/printed
newspaper are replaced by digital stuff we shouldn't deride payment for that.
Look at ebooks or Amazon kindle. These are good things. The scarce thing is
really your favorite band making a kickass song, investigative journalism
instead of astroturfing and GRRM writing the next ASOIAF novel in less than
five years.

About Googles "superior business model": Ultimately it is just advertising.
The product which is sold is you. I don't want to sound polemic, I have tons
of respect for Google. But this is a strong realization most never make.
Because of that I avoid to being to dependent on their services (maybe I will
move my email from gmail to icloud).

EDIT:

Oh, never mind. I just read your other reply to kawahe. You clearly are
enlightened and are not bound by the chains of tyranny. I am out of this
discussion.

~~~
jhuni
_The App Store has an unbelievable positive impact on the developer
ecosystem._

Paul Graham (the creator of this site) commented on the App Store himself, and
his words were not entirely of ignorant praise like yours are:

<http://www.paulgraham.com/apple.html>

 _The scarce thing is really your favorite band making a kickass song,
investigative journalism instead of astroturfing and GRRM writing the next
ASOIAF novel in less than five years._

Although this is besides the point, it is pretty easy to envision a moneyless
post-scarcity society where such songs, novels, reports, and other forms of
content are delivered to everyone free of charge:

<http://adciv.org/>

~~~
kahawe
> _Paul Graham (the creator of this site) commented on the App Store himself,
> and his words were not entirely of ignorant praise like yours are_

And you will find just as many people who love the app store oh and
18,000,000,000+ downloads and counting should nicely prove those 2 year old
prophecies wrong.

~~~
jhuni
The fact is Apple's reputation has been permanently tarnished in the face of
developers, including PG. Even today, Apple uses very restrictive license
agreements in the appstore. Here is a full explanation of their licensing
restrictions from 2010, feel free to provide more up to date information:

[https://www.eff.org/deeplinks/2010/03/iphone-developer-
progr...](https://www.eff.org/deeplinks/2010/03/iphone-developer-program-
license-agreement-all)

~~~
sbuk
Resorting to _ad verecundiam_ doesn't prove or disprove your point either way.
It's just an opinion.

~~~
jhuni
Before you blame me for argument for authority, notice that rolfd's post is
already ridiculously exaggerated because he said "it has an _unbelievable_
positive impact."

~~~
sbuk
_Tu quoque_ fallacies are just as bad. Anyone using emotive words or
unnecessary superlatives undermine the point they are attempting to make.

~~~
jhuni
Forget it.

------
ethank
This is fantastic. Apple uses AAC partly because of the patent royalty
(<http://mp3licensing.com/>) which they have to pay on every iPad/pod/etc
sold, as well as because it is just a better format.

MP3 is a total racket held by Thompson Technicolor, on top of being a pretty
crap format.

Hopefully this is a portends Apple offering lossless through ITMS on top of
the 1080p rights they are hunting down right now.

~~~
ugh
MP3 was great for its time. It’s not a crap format, there are merely better
formats available today. They weren’t when MP3 came to the market.
(Specifically AAC was developed as a successor to MP3.)

I’m also not sure whether this tells you anything. Apple started selling AAC
encoded music at a time when no† music player could play it. Many mistakenly
thought that AAC was some sort of proprietary Apple codec and it might as well
have been.

Today more people than ever have an iOS device or an iPod. There is no need at
all for Apple to play nice and make sure that others can also use the ALAC.
Why should they?

Also: What’s the incentive for offering lossless music? No one† can tell the
difference. Do you really think Apple will start catering to audiophiles?
Because of the switch to flash memory space is limited, Apple’s current
devices are not a good match for lossless music.

—

† Don’t be pedantic.

~~~
ethank
Lossless music - there is an audience for it, and it creates the ability to
stratify prices, which the labels/rights-holders/distributors like. See the
vinyl boom, hdtracks.com, <http://www.becausesoundmatters.com/>, etc.

So will Apple cater to audiophiles? No. Will they cater to margins? For damned
sure they will if it serves them and those they entice to sign over content.
Why would they switch to 1080P otherwise?

Also: given device sizes it would be nice to have raw uncompressed/lossless
and I could downsample at will to suit specific devices/systems.

~~~
splicer
I only buy lossless music. I usually end up buying WAV/AIFF/FLAC direct from
the artist, from their record label, or from Beatport. Once in a while, if I
can't find something, I'll buy it on CD. Earlier today, I actually bought
vinyl because I couldn't find a lossless digital version of this track
anywhere: <http://www.youtube.com/watch?v=AwsUfEvmKwI>

Lossy formats are useless to me since I can't remix them without it sounding
like crap. I also feel I'm getting ripped-off when they charge near CD price
for lossy tracks.

Also, 20 years from now I'm going to want to convert my music to whatever
fancy lossy codec has supplanted MP3 and AAC. By archiving in an open lossless
format like FLAC (or now ALAC), I can do this without introducing artifacts.

~~~
Samuel_Michon
Do you really think you could hear the difference between 256kbps AAC and
Lossless? Even if your hearing is way above average, most audio players and
earphones aren't that good.

(Also, given the less-than-subtle music you linked to, I doubt that it really
matters.)

~~~
splicer
No, I can't; and I wasn't claiming that I can. However, as I stated, if I use
an MP3 or AAC in a remix, then compress my remix using a lossy codec like AAC
or MP3, the result will sound like crap. It's similar to working with JPEGs in
Photoshop (rather than RAW), then trying to re-compress to JPEG: you usually
get artifacts.

I've been playing classic violin since the age of 3, and I'm _very_ sensitive
to details. Just because you don't find a particular genre of music "subtle"
doesn't it's not susceptible to the compression artifacts I'm talking about.

~~~
sjwright
> _if I use an MP3 or AAC in a remix, then compress my remix using a lossy
> codec like AAC or MP3, the result will sound like crap_

Or far more likely, it won't sound like crap.

> trying to re-compress to JPEG: you usually get artifacts.

This argument is akin to suggesting that a very very very minimally JPEG
compressed screenshot of a website is inferior to plonking a film camera in
front of your LCD and exposing a frame. After all, big analogue artefacts
don't matter nearly as much.

The reality is, AAC at 256kbps is such a light touch that it could probably
survive four or five rounds of offset re-encoding before the artefacts would
compound meaningfully.

~~~
tripzilch
Again, you forget he's also remixing. That changes the whole game. You may be
right if re-encoding was all he does, but it isn't.

You take the 256kbps high quality AAC, and you time stretch and repitch it by
a few percent (to match it up with the track you're mixing it into) and
probably fiddle the equalizer a bit, to "drop the bass" :)

If you do _that_ a few times, you're losing information, even on a lossless
digital medium.

If you use even high quality audiocodecs in between, it _will_ sound like
crap. And not the kind of super subtle near-impossible to hear difference
between lossless and 256kbps AAC crap, but actual crap. I know this from
experience myself as well. The sound becomes really flat, hard to describe,
but you notice it when you're playing one right next to another track that
hasn't been through such a process. It's like you want to turn it up louder
but it's already loud enough. Hard to describe, but it's a real problem if
you're playing these mixes on high quality speakers in a club--suddenly the
sound is not as crisp anymore, and the crowd notices it too.

If you want to make the analogy with JPEG, imagine re-encoding at 95% quality,
but with a few percent scaling and a few degrees rotation in between, before
saving again as 95% quality JPEG.

You do that twice, with a quality high res digital photograph, and you're
going to wind up with a photo that looks pretty much like the original ...
until you make a high res print of it (or zoom in on the screen). Edges that
were crisp at first have gone fuzzy, and at places you can spot the typical
blocking and ringing JPEG artefacts.

You'd probably get away with it, most of the time, too. But not always, and if
you're a digital graphics professional, this is your craft, and the mark of a
good craftsman is that they put in the work for the little details that you
don't really notice, until they're not there, and how you tell you're holding
a piece of quality work.

------
frou_dh
I've got all my CDs ripped in ALAC so that I can use the iTunes option to have
the tracks automatically transcoded to smaller, lossy AAC when putting them on
iDevices.

I welcome this open sourcing because it makes my 'archival' format slightly
less oddball.

~~~
sitkack
ffmpeg already can transcode from alac to flac, I rip with itunes and
transcode to flac for my Sansa Clip.

------
jolan
Someone came up with a reverse engineered decoder 6+ years ago:

<http://craz.net/programs/itunes/alac.html>

Nice to have an encoder now too.

~~~
daeken
I worked on this with craz, taking directly "decompiled" code into a useful
form. This was by far one of the most interesting things I've ever done -- if
you want to get into reversing or increase your skills, do a codec! I built a
stupid simple reference encoder in Python right after, but never managed to
really get it right; wonder if I still have all the old code around.

------
splicer
I just tried building libalac.a on Linux using GCC 4.6.1 and it worked! There
were quite a few warnings though.

To eliminate the warnings, edit /trunk/codec/makefile and add -Wno-multichar
to CFLAGS.

------
necubi
There's no mention of a patent grant. Does anybody know the state of ALAC with
regards to patents?

~~~
stock_toaster
I believe the apache 2.0 license [1] includes a grant.

    
    
         3. Grant of Patent License. Subject to the terms and 
         conditions of this License, each Contributor hereby grants 
         to You a perpetual, worldwide, non-exclusive, no-charge, 
         royalty-free, irrevocable (except as stated in this section) 
         patent license to make, have made, use, offer to sell, sell, 
         import, and otherwise transfer the Work, where such license 
         applies only to those patent claims licensable by such 
         Contributor that are necessarily infringed by their 
         Contribution(s) alone or by combination of their 
         Contribution(s) with the Work to which such Contribution(s) 
         was submitted. If You institute patent litigation against 
         any entity (including a cross-claim or counterclaim in a 
         lawsuit) alleging that the Work or a Contribution  
         incorporated within the Work constitutes direct or 
         contributory patent infringement, then any patent licenses 
         granted to You under this License for that Work shall 
         terminate as of the date such litigation is filed.
    
    

[1]: <http://www.apache.org/licenses/LICENSE-2.0>

~~~
kinetik
So, the next question is: is the container format (MPEG-4 Part 14) patent
encumbered?

~~~
astrange
There is no active patent pool for MPEG-4 systems.

------
gtrak
What's the point of this over flac?

~~~
tjpick
consumer products that actually support it?

~~~
BitMastro
FLAC has been supported by Rockbox <http://www.rockbox.org/> since 2005.. I
remember using it in my iriver H300, iPods were supported as well

~~~
tjpick
well yeah, decoders exist. Rockbox doesn't qualify as a "consumer product" in
the sense I was using the term. IE, walk into my local electronics store and
pick up a device and take it to the till. Good point (to the other poster)
about the squeezebox though, quite correct.

------
sambeau
I suspect that the big news here might be Airplay.

If you put this together with the rumours of an AppleTV there could be
something very special here, especially if they are pre-emtively paving the
way for open-source, 3rd party developers.

------
sunsu
Would be great if android implemented encoding to that format now. Its a pain
to try to get the same audio formats from both Android and iOS devices because
both platforms encode to completely different formats.

------
sandGorgon
does this mean that FLAC will soon be irrelevant ?

Today a lot of high-fidelity audio players support FLAC as the default
lossless format. This kinda meant that that iPods and these players lived in
different universes as far as lossless is concerned.

If the release of this codec means that h/w manufacturers are able to
incorporate this codec into their silicon (I'm not sure if the open source
license extends to hardware), then effectively there is no _real_ reason to
use or support FLAC anymore (minor differences in quality nonwithstanding).

Anybody know which codec is more power efficient ?

~~~
altrego99
Irrelevant is a strong word, and I very much doubt it. The only reason for
making this open source was for devices to be able to support this more.
However FLAC has been open source for quite a while - consequently most device
makers willing to make the effort to support loss-less audio codec already did
so with FLAC. Support for ALAC will mostly come for these devices. Conversely,
I see no reason for any device to support ALAC and not FLAC.

According to Wikipedia, FLAC is more efficient in encoding/decoding speeds -
with same compression ratio. This translates to it being more power efficient.

Lastly this news will matter to only a few audiophiles who are also Apple
geeks.

Making something open source is a welcome gesture, but I hope Apple will do
this for other items which will have better reaching consequences.

~~~
sandGorgon
_Conversely, I see no reason for any device to support ALAC and not FLAC._

Isnt this implemented in silicon (or atleast implemented as some DSP-specific
library) ? AFAIK that costs money.

Today, if you wanted a lossless player, that player _had_ to have FLAC - which
was taken from a commercial vendor like Tensilica [1]. But now that ALAC is an
alternative, why would I even try to spend more money and also add FLAC ?

Plus, it is reasonably trivial to convert all FLAC to ALAC [2]

[1] [http://www.tensilica.com/products/audio/audio-
codecs/flac.ht...](http://www.tensilica.com/products/audio/audio-
codecs/flac.htm) or <http://www.tensilica.com/products/audio/audio-codecs.htm>
(no ALAC)

[2] <http://www.dbpoweramp.com/dmc.htm>

------
lyime
This is amazing. Since running Mugasha for the past few years, encoding in AAC
has been a huge hassle. Lib faac has terrible encoding quality compared to
good ones like Nero and Apple.

------
b3b0p
What I don't get is why don't places like iTunes and Amazon offer Lossless
options for downloading? I mean, here they are bragging about 720p, 1080p,
high definition video which is gigantic in size, approaching or exceeding
gigabytes for a typical 2 hour movie. Yet, we can't spare the extra space or
bandwidth for a higher quality audio file which is still a fraction of the
size? I don't get it.

~~~
frou_dh
That video isn't lossless either. The _mostly-indistinguishable-from-lossless_
point has already been reached for downloadable audio, whereas video is still
creeping up on it.

~~~
b3b0p
Yes,I know this, but the size of the video files are much greater than the
music files. I hear people complaining about the sizes of lossless music
files, but not about 1080p video files. In fact, I have read comments from
people complaining about only having 720p available from iTunes because of
their 1080p televisions. However, these files are measured better in terms of
gigabytes instead of megabytes. In other words, lossless music files shouldn't
be problem, especially so with the cost of storage and bandwidth available.
They are not that large when you compare them to even compressed video files
(that are 720p or even 1080p).

------
psychotik
I hope Google adds (hardware) support for this to Android - it would add
another option for patent un-encumbered audio formats, outside of Vorbis.

~~~
metajack
FLAC has been around longer and is also part of the Xiph.org project along
with Vorbis. If Google wanted to add a lossless codec, they certainly could
have before now.

(Disclaimer: I am associated with Xiph.org.)

~~~
nitrogen
It looks like it's been done, as of Honeycomb for tablets and Ice Cream
Sandwich for phones: <https://code.google.com/p/android/issues/detail?id=1461>

~~~
vetinari
It may or may not be done. Samsung products tend to support codecs that
vanilla Android does not support. As of 2.3.7 (latest published source), it is
not in the source tree.

~~~
nitrogen
The link I posted is for a Google issue that was marked as Released. Hopefully
we'll see it in there when the ICS source code is released.

------
BuddhaSource
A successor to MP3.

We know there are better formats than MP3 today but getting mass adoption is
difficult. Open source ALAC will give birth to new 3rd party supporting
players, not to mention apple products already supports it & we have higher
chances of mass adoption.

~~~
rsynnott
No, AAC was a successor to MP3, about a decade ago. This is a lossless format,
so not really suitable for the same roles.

------
splicer
FINALLY!!! But what does this mean for the future of FLAC?

~~~
lclarkmichalek
Nothing much? People with lossless collections in FLAC are likely to continue
building them in FLAC. And if they switch over to AAC, then there is no loss.
With free lossless audio codecs, everyone wins.

~~~
Samuel_Michon
ALAC ≠ AAC

ALAC : AAC : : FLAC : MP3

~~~
wollw
Your point that ALAC != AAC is true and all but a better comparison would
probably be

ALAC : AAC :: FLAC : Ogg Vorbis

~~~
Samuel_Michon
Agreed.

------
codys
I see a trac browser for SVN, but i see no SVN link. Any idea what that may be
or what an easy way to determine it is?

------
splicer
Anyone know the URL for the repo? It looks like they're using Subversion, but
I don't see any svn:// links anywhere.

~~~
dmaz
<http://svn.macosforge.org/repository/alac/trunk>

~~~
codys
Sweet.

And not so sweet: I get a nice failure to build the "convert-utility" on link.

It seems that there is some work to be done on this. I expect the best thing
would be for the knowledge/info contained within the source to be merged into
exsisting software.

------
renownedmedia
Awesome! Now embedded devices like my car will be able to play more than just
MP3's!

------
joe_the_user
Open source, sure. But patent free?

Comment here indicates no:

<http://news.ycombinator.com/item?id=3166268>

If AAC costs $1/device to implement, who exactly cares that the code is
"opened"?

~~~
ootachi
Two mistakes here:

(1) Apple Lossless, not AAC. Apple is not open-sourcing their AAC decoder,
which is part of QuickTime.

(2) The Apache license grants a royalty-free patent license.

