Hacker News new | ask | show | jobs
Apple Lossless Audio Codec is now open source (Apache license) (alac.macosforge.org)
395 points by scorchin 5342 days ago
20 comments

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... 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.

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).
Not really. Flac is lossles, and based on what the grandparent said a better format.

So, store your music in flac and convert as needed.

That's what I do. The point of lossless is to have a stable archive that can be converted into the convenient format and bitrate of the day. It's great that Apple is finally open-sourcing their codec but it would have been far better if they'd just thrown their weight behind FLAC in the first place and avoided this completely gratuitous and consumer-unfriendly fragmentation.
> would have been far better if they'd just thrown their weight behind FLAC

That would definitely be better, but the fact is that they can't (reasonably) re-write all of the previous iDevice firmwares to support FLAC, so open sourcing ALAC benefits all of the users with those devices. If open source codecs is the route Apple is going down, then perhaps they will ad support for FLAC to new versions of iOS, but for everyone not using those versions, this would still help. Throwing weight behind FLAC is good, just throwing weight behind FLAC is slightly less good. All that said, using lossless codecs on an iPod, like you said, is a bit overkill.

What I think would really be nice is if Apple would open source the music database on the iPod -- not being able to load an iPod from Linux/not iTunes (easily) is much more of an issue for me than support for a lossless codec.

What I meant was that it would have been much better if they'd originally thrown their weight behind FLAC instead of developing ALAC in the first place. We're stuck with it now. I think it's very unlikely they'll ever add support for FLAC in iTunes or iOS now.
It wasn't originally developed for direct consumer use at all — it's debut was in the protocol used by Airport Express streaming.
It's not that obscure. You can buy Metallica and Beatles tracks in FLAC.
I googled for FLAC combined with a couple of different artists I listen to. Every single hit on the first page was a bittorrent site. I added "-torrent" and got a bunch of non-bittorrent file-sharing sites. :(
Most, if not all of the tracks on bandcamp.com are sold with a FLAC option.
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.

Predicting the future based on current popularity is utterly useless. Just think of the Internet Explorer.
Yes, think of internet explorer.

A decade later, many developers are still supporting IE6's peculiar dialect of HTML. And a few are still supporting IE5's even more peculiar dialect.

I read a comparison months (if not years) ago where one voluntarily flicked random bits and erased portions of files in FLAC and ALAC files, and the result was that ALAC was way, way more resilient than FLAC.
> it's unknown if ALAC has error handling

Shouldn't take us long to find out now.

When I was comparing them years ago I found that a lot of FLAC implementations had a lot of trouble with seeking properly, skipping to the wrong spot and then reporting a third spot as the current timecode.

Then you have the metadata problem — ALAC is in a normal mp4 container so everything's uniform and well-used, with FLAC you're stuck with the ogg container or its proprietary system. That wouldn't be so bad, except that almost nobody puts metadata in their FLAC files, instead preferring to bundle along separate text files with a description of the tracks and info about the rip. I think they do it so that the whole file's hash stays constant.

I haven't found that to be the case at all. All the FLAC files I've purchased have proper FLAC tags, often including cover art. I've never had problems with FLAC seeking at all.

Better still, FLAC provides excellent command-line tools for encoding, decoding and tagging so I can script batch operations easily. I'm not aware of anything similar for ALAC. Maybe with the codec in the open these tools will emerge?

Unfortunately I'm getting more and more biased against Apple these days, but then why they didn't use FLAC from the beginning? The FLAC format was stable from 2001 and Apple introduced ALAC in 2004, was it just as a way to be able to use DRM?
Apple needed DRM at the beginning to get label deals. Now they don't.
DRM was never a consideration for ALAC since Apple never sold tracks in ALAC. My understanding was that Apple developed ALAC instread of using FLAC because they were concerned about possible patent problems with FLAC.
I heard the same theory about patents but after they reversed engineered it, the creator of FLAC pointed out it was effectively a superset of his codec, so any patent affecting FLAC would impact ALAC too, they'd only increased their exposure to patents.

Other theories included better PPC support, and better designed to be decoded in low power hardware like the Airport Express.

To be honest some combination of NIH syndrome and residual squeamishness about using open source code seems far more likely.

I do not understand how ALAC can be both:

- effectively a superset of FLAC

- better designed to be decoded in low power hardware

Can you explain?

As far as I know, is FLAC de- and encoding more battery consuming than using ALAC. So ALAC is the mobile format to go.
The FLAC repository havent been updated for two years.. Shouldn't it be called dead?
What is the newest mp3 "format feature" you're using?

From which git repository do you clone your encoding software?

Have you used WAV files recently? I haven't read about major progress on that front either.

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/

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.

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).

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.

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/

> 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.

I think of Apple as akin to a warehouse club like Costco or Sam's.

These "clubs" sell a high margin membership, and you get to buy low-margin toilet paper 50 rolls at a time.

Likewise, Apple sells digital media, which is a relatively low-margin business. But by doing so, they get you to buy high-margin hardware and services.

I'm tired of the term "artificial scarcity". First, do you understand what scarcity means? The supply of content is unlimited. Putting a price on content is not creating "scarcity". Consumers make content purchasing decisions based on the scarcity of their own resources. Second, what is non-artificial scarcity? All scarcity is artificial.
I think the term is being used to note that the price is artificially high - supply is virtually limitless once the first copy of the song is created, so the price should approach zero.
What term would prefer? Corrupt pricing?
I still have quite a few other options to buy my music online or just buy music the old fashioned way; same goes for shows and movies. I do not see anything "scarce" here at all. And I can play music in pretty much all popular formats I got from elsewhere on iTunes and iPod just fine. And now the music from the iTunes store is not DRM locked-down anymore either.

And you are comparing apples and oranges with Google here. Apple is selling hardware and now all sorts of media and software along with it. Google has a completely different business model. And what benefit do I as a customer directly gain from google using Linux as a foundation? As long as their servers work, I am pretty much unaffected by the platform. Apple is using BSD as a foundation in OS X, so? And there are open source components available. Does google give me the source code for their web search or gmail or ads or all their other core products?

What makes google a "clearly superior business model"? Just because Linux is "cool"? Last time I checked, Apple is doing pretty well and has been consistently so over the last years so I doubt their business model needs to be replaced.

I am glad Apple is getting more popular because finally there is some real actual competition in the consumer sector. And for each of their products, there are just as excellent alternatives available so I am not being forced or locked down on anything. I can take my contacts, pictures, videos and music with me, it is pretty much all available or exportable in(to) standardized formats.

Does google give me the source code for their web search or gmail or ads or all their other core products?

No, but Google also doesn't attempt to install their search service on your computer. I don't install proprietary software on any of my computers, because of security. If the software I install isn't open then it could do anything without out my knowledge, including restrict me through DRM.

Just because Linux is "cool"?

Linux is not "cool." To anyone who has used the Lisp machines, all modern operating systems look the basically the same. They are all crappy UNIX derivatives.

The difference is Linux is open, which is necessary prerequisite for security, which is precisely why most foreign governments use it, they don't want to open up their vital computer systems to sabotage.

Apple is selling hardware and now all sorts of media and software along with it. Google has a completely different business model.

If Apple just sold physical hardware that would be fine. But that just isn't the case. The reality is that proprietary software is a fundamental part of Apple's business model, which is precisely why Google's business model is superior.

The proprietary software that Apple sells not only is a security threat, the malicious features they have are well known:

http://www.defectivebydesign.org/apple

I still have quite a few other options to buy my music online or just buy music the old fashioned way; same goes for shows and movies.

The Apple tyranny has a long history of suppressing iTune alternatives like PyMusique:

http://news.xinhuanet.com/english/2005-03/22/content_2728356...

> No, but Google also doesn't attempt to install their search service on your computer

But for using any of their services they are infamous for tracking you everywhere they can, scanning your emails and for analyzing ALL data they can get on you and they are one of the companies that are very high up on the radar of privacy advocates all over the world. It is absolutely ridiculous that you are making Google up to be some sort of shining example of doing good and doing the right thing(tm) given all their history so far. Given all Apple and Google is doing, they are just the same. They are companies trying to make money.

If you don't like proprietary software and/or are not allowed to use it at work then just don't use Apple or Microsoft or others that fit that description. Case closed. But that doesn't counter the fact that Apple has both open and proprietary components and products. Just like Google has lots of proprietary stuff. Just like the overwhelming majority of software and software+hardware companies providing all that wonderfully defective still highly overpriced serious business software we laugh about every day.

And when you are using any of Google's services that you like so much, you ARE using proprietary software that is not even running on your own system and you have absolutely NO idea and NO control over where your data will end up at and just because the servers are running on Linux does not help that fact in the slightest. Or why is OS X's BSD core not good enough for you then just the same? In both cases these are proprietary components and services running on free or open source platforms.

> which is precisely why most foreign governments use it

Yea, I am from Europe, we had a whole bunch of "Open Source now!" movements and those stories sure were popular in newspapers and I have been to the very gov authorities and magistrates doing those projects. Yes it was a good move but let me tell you, you are faaaaar from having replaced the usual evil in the majority of their systems. Plus a hell of a lot of their gov IT is still either proprietary and/or in-house developments and totally closed source. Just because they are using Linux on a few servers as OS or have a few Linux desktops doesn't change anything there.

And if this is your whole point, then WHY are you using google services? If security and control over what happens was really so paramount to you, you should not even remotely use any google products or any "cloud" or other online services.

Therefore I don't see your point.

> The reality is that proprietary software is a fundamental part of Apple's business model, which is precisely why Google's business model is superior.

No. Google's core products and services are just as proprietary and closed source and you have absolutely no control over what happens with all your data that you feed google directly or indirectly, knowingly or unknowingly; see their end user agreements. This is a non-argument you keep coming back to. I have said it at least three times now: just because their proprietary systems are running on a GNU/Linux system doesn't give you the same benefits you see in using Linux.

And you still haven't clarified what is "superior" for you. From a customer's point? From YOUR own personal point? Or from commercial success which is the actual ONLY goal of a business model?

> The Apple tyranny has a long history of suppressing iTune alternatives like PyMusique

This is again completely irrelevant as the music is DRM free now. And still I have all those countless other options of buying music available to me... so it is even more irrelevant that they don't let someone else develop (reverse engineer and violate license agreements) an interface that exploited(!!) their iTunes store and provided you with something you should not have been allowed to have back in 2005. I see this as much less Apple's fault and much more the fault of the RIAA and MPAA who did not want to let go of all their control and were very suspicious of this new way of distributing their music.

But this is the past. Music has been DRM free for quite some time on iTunes now. What is your point? Whether you like it or not, Apple were the first ones to actually provide a viable and legal solution for customers to comfortably buy music online. Most end users very obviously don't care that they have to use iTunes for that. And the ones who do have a multitude of alternatives available.

You have just decided to hate apple and hey more power to you but your "points" or "arguments" are just empty shells and poo-flinging at apple and you are actually contradicting yourself if you want control and open source and then you use google's services but shit on apple.

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.

This is fantastic. Apple did AAC because of the patent royalty (http://mp3licensing.com/) which they have to pay on every iPad/pod/etc sold

Since when did Apple "do AAC"? AAC is a standardized format that makes up part of MPEG-4, contributed to by dozens of companies and organizations. The patent licensing is handled by Via Licensing, not Apple. AAC has patent licensing fees too; over a dollar per device (albeit with a very low cap, IIRC).

, as well as because it is just a better format.

MPEG-4 AAC was the successor to MPEG-1 Layer 3 (MP3), by the same organization, so this is no surprise.

ALAC was -- for many years -- a proprietary FLAC-alike. There was no real reason to use it except for compatibility with Apple devices, as the two use nearly identical compression methods and the incompatibility is purely gratuitous.

Sorry: USE aac.

AAC has no patent for streaming or distribution. When we did direct-to-consumer digital sales this is why I used this rather than Mp3, and ALAC for lossless over FLAC because of the support issue.

AAC does have a patent fee for codec usage (i.e., devices).

Nitpick: AAC (right now) has no patent fee for streaming or distribution. What's to stop them from levying such a fee in the future?
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.

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.

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.

> Earlier today, I actually bought vinyl because I couldn't find a lossless digital version of this track anywhere

Two things strike me as astonishing. The first is that anyone remains unconvinced that vinyl has any redeeming technical aspects whatsoever, other than the touchy-feely emotional stuff, and self-deception.

The second is that the music you referenced is so unashamedly digital, that the notion of purchasing it on a vinyl record is like buying a copy of Angry Birds printed on tree bark.

A 256 kbps AAC file (as sold by iTunes) is so very nearly transparent, only a small fraction of 1 percent of people would be able to identify the vanishingly minute differences. The difference is so small, it would be comprehensively outweighed by meaningful factors such as your choice of speakers, the shape of your room, and the presence of any ambient noise.

Whereas vinyl has crackle (unless you're playing a pristine copy in a dust-free environment), clicks, pops, rumble, wow distortion, and intentionally limited dynamic and tonal range. Fidelity progressively reduces as you move to the inner grooves, and high frequencies are literally scratched away as the stylus scrapes past -- every time you play a vinyl, it will sound poorer than the last. You can mitigate some of these problems, but generally at great effort or expense.

Of course, to make that music useful, you'll need to rip it back into your computer. You'd have to be mentally ill to believe that a [Lossless > AAC-256 > Lossless] conversion is more detrimental than [Lossless > equalisation > analogue mastering > lathe cutting > vinyl stamping > stylus scraping > pre-amplification > ADC > Lossless].

one thing lossy formats do really bad at: speeding it up and down. (because they remove 'unhearable' sound artifacts -- that become hearable at different speeds)

big slowdowns also sound 'ugly' with lossless formats (a 44kHz sampled track at half the speed is only 22kHz).

but who plays a track at halfspeed..? :)

i dont want to make a case for vinyl -- sjwright has given a nice overview of arguments against it, that i can all underline.

but there is one thing that a physical soundwave, pressed in a disc of vinyl, never needs to do: anti-aliassing. but since the tracks usually get delivered digitally to the vinyl-press; it is the vinyl press that does the anti-aliassing for you :)

> Digital music is technically superior to bumps on a plastic disc

What you completely failed to realise, is that technical superiority is not the only factor as to how music sounds.

CD mastering these days is almost invariably awful. The real advantage to vinyl (which comes partly because it is a niche format, and partly because of how it is made) is that it has better mastering. This is not subtle on anything better than PC speakers.

I'm fairly certain that devices in twenty or fifty years will still be able to play MP3. It's too pervasive and supporting it is too easy for it to disappear just like that. It might not be supported in hardware (like it is today in many devices to save battery life) but there will be plenty of software.

You tend to not be able to use formats because hardly anyone used them in the past. MP3 is too popular for that to happen. (As is JPEG, PDF and probably AAC.)

The other factor is that the patents that serve as a disadvantage for MP3 will be expiring sometime around 2015-2018.
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.)

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.

Codecs like AAC apply psychoacoustic rules that were only correct for the overall piece being encoded, not samples taken from it. If a song has two overlapping sounds and the human ear physically can't hear both, a lossy codec looks for that and conserves space by completely omitting the sound that was masked, leaving you with no way to recover it if your postprocessing takes away the sound that had been masking it. A lossless codec preserves the sounds you might be able to hear after sampling or remixing, though of course it takes more space to do that.
My guess is that a lot of the psychoacoustic models used by lossy codecs aren't tuned for electronic music. The resonant distortion on the bassline of the linked track, for example, might sound different in the original. I have one song in which I can tell a difference for sure: Who Said by Planet Funk, about 1:30 in, has a rising modulated treble sound that sounds awful in 320kbit MP3 compared to the original.
I can.

It depends on how well you know the album, what the music is.

Try Paper Tiger by Beck off of Sea Change... strings and bass at the same time is challenging to lossy compression.

Try Page One by Charlatans off of Between 10th and 11th... same problem.

I don't use an iPod for that reason. I have an external sound card and use Fidelia on my Mac for that reason. I own good headphones for that reason.

When you listen to music you think you know and your heart skips a beat as you hear something new and it moves you... why compromise ever again?

Isn't this the superlative experience that Apple used to deliver? The ability to make you experience something that moves you. Music really can, but when you compress you deaden it, you kill the sound stage, some of the noise is lost.

Listen to a compressed Double Dutch by Malcolm McLaren the skips sound like a synth, listen to the lossless on a capable system and you can hear the distinctiveness of every rotation and hit of the rope on the floor. The latter puts you there, you picture it more.

Sound is even more important than vision. We are all rushing to 1080p and hopefully better, but sound is what fires the imagination more. Film directors have long known this, music producers have long known this... sound is the thing to get right, and when it's right, you fall in love every time you hear the music.

If you're buying any music equipment, find a good retailer and do a blind test of the equipment. I would be very surprised if most consumers would pick compressed audio and poor equipment... more likely they will settle for the point at which they no longer perceive a noticeable difference, but that point is after you've discovered lossless.

The main reason compression is accepted is that on crappy computer speakers, when listening on headphones whilst you have high background noise (commuting)... you could not hear the difference. Everywhere else, the difference is almost black and white, chalk and cheese.

I can... easily. And it matters to me. My hearing is average, and I have HD280Pro Seinheisers which are pretty standard headphones. Maybe it has something to do with the music genre that I like - techno, trance, dubstep, elecronic, etc. This stuff is delicately mastered in the studio and I can tell when the sound isn't reconstructed well upon playback.

I'd love to do a blind hearing test if you can set one up - but you have to do it with a song that I enjoy. I suppose I could even set one up myself as a study. It would be pretty interesting.

In 2011, it doesn't matter much any more, audio is not very big. In 1996, I guess it made sense. For the few cents of extra space you get the peace of mind of perfect copies, the ability duplicate, remix, and reencode ad infinitum.

Notice you won't see the visual effects industry using JPG's to build their shots ... no, they use very high resolution 4k ~48-bit color depth files, that are then combined and then scaled down in resolution/color to theater/blu-ray output. This maintains the highest quality throughout.

You could also think of it the same way as free software (although not the perfect metaphor). Software may pick up compatibility bugs over the years. You'll want the community to have the ability to make fixes or risk losing it.

All these are examples of "keeping your options open," which people value. Now that the cost is not prohibitive and only getting lower there's not much reason not to.

Do you really think you could hear the difference between 256kbps AAC and Lossless?

All the people who claim to be audiophiles and think that thousand dollar wooden knobs make their music sound more rich certainly do.

Sure it might happen, but it would also confuse consumers. That’s a huge negative point to me. I also don’t see the connection to this.
>Lossless music - there is an audience for it, and it creates the ability to stratify prices, which the labels/rights-holders/distributors like.

Yeah, this kind of thinking is pervasive in the music industry which is why I make sure they never get any of my money. You're always paying for the licensing, not the delivery method (so they don't need to replace your CD at cost), unless they can make a buck by making you pay for that, in which case you are no longer paying for the license, but rather the delivery method.

As such I don't even know what the fuck I'd be paying for if I bought a song on iTunes or whatever else.

ALAC is used in AirPlay streaming (it was first announced along with the AirPort Express in mid 2004). This might be a plan to make AirPlay audio streaming more ubiquitous.
The nice thing about ALAC with AirPlay is it does not transcode to a compressed format for streaming.
> Why should they?

Because others already have FLAC?

Isn't it similar to the kid offering to share his bicycle, to his neighbor, with the hope of friendship, knowing fully well that it will do no real benefit since his neighbor already has an equally good machine?

"Apple started selling AAC encoded music at a time when no† music player could play it"

Not that it mattered at the time as they were DRMed anyway.

This is incorrect. In the past, Apple has tended to prefer patented formats, because they are the holders of many of these patents and so increasing their use benefits them. If Apple had preferred patent-free formats at the time of the iPod, they would have chosen Vorbis, which has an open royalty-free encoder that is superior to QuickTime's rather poor AAC encoder.

Since the Apache license grants a patent license, this development regarding Apple Lossless would seem to be a reversal of their previous stances. I'm glad to see it.

Edit: That said, I agree with Dark Shikari that it would have been better had Apple Lossless never existed and if they had just used FLAC instead.

QuickTime has a poor AAC encoder? I don't think you'll find anyone credible who seriously believes that.
I think it used to be just okay, now I believe it's one of the best.

http://listening-tests.hydrogenaudio.org/igorc/aac-96-a/resu...

Maybe he was getting confused with Quicktime's rubbish H.264 encoder (or the low quality of the open source AAC encoder)?

Yeah, I was confused with the H.264 encoder (and the MP3 encoder). My mistake.
> If Apple had preferred patent-free formats at the time of the iPod, they would have chosen Vorbis, which has an open royalty-free encoder

That would have been a good trick, given that the very first release of Vorbis was only a year before the iPod hit the market.

This article is about ALAC (a lossless codec developed by Apple), not AAC (a lossy codec developed by the ISO and used by Apple).
MP3 may be a crap format, but it's the VHS of the digital world.
It's the DVD of the audio world, ten years from now. It's supported everywhere. The quality is good enough, but we have better.
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.

ffmpeg already can transcode from alac to flac, I rip with itunes and transcode to flac for my Sansa Clip.
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.

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.
ffmpeg has had both encode and decode support for alac for some time.
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.

There's no mention of a patent grant. Does anybody know the state of ALAC with regards to patents?
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
So, the next question is: is the container format (MPEG-4 Part 14) patent encumbered?
There is no active patent pool for MPEG-4 systems.
What's the point of this over flac?
It allows you to play lossless audio on the combined 400 million(1) iPods and iOS devices out there.

(1)http://arstechnica.com/apple/news/2011/04/apple-lawsuit-reve...

Well, FLAC already can be played in the millions of Android phones out there. I don't see the point in having two different formats, it will just make worse for the consumer who want to change from one platform to another. I bought a lot of FLAC music and it is a shame that I can only listen it on my Android phone and not on my iPod.
Been hunting around, but does anyone know the first ipod to support it?
I'm not familiar with the current state of FLAC but as of a few years ago ALAC offered better meta-data in the MP4 container. Part of the reason I abandoned FLAC years ago was constant problems with meta-data. I would often end up corrupt files post-tagging or the player would simply not show meta-data I had meticulously added to my bootleg collection. I got the sense at the time that there was a lack of agreement on how meta-data was supposed to work in FLAC files.
Note to uriel: your last few posts are all [dead] for some reason.

  uriel 2 hours ago | link [dead]

  Afaik FLAC this days uses an ogg container, which is where
  the metadata goes, so support should be as good as for Ogg
  Vorbis.

  In practical terms, I have a huge collection of FLAC, and
  never had trouble with metadata, sounds like a bug in
  whatever player you were using.
The Ogg container is optional, and I can't say I've seen it used much, if ever - I gather its main use was for streaming. FLAC has its own metadata as part of the spec: http://flac.sourceforge.net/format.html#metadata_block
Afaik FLAC this days uses an ogg container, which is where the metadata goes, so support should be as good as for Ogg Vorbis.

In practical terms, I have a huge collection of FLAC, and never had trouble with metadata, sounds like a bug in whatever player you were using.

It plays on iPods and other iOS devices. Other than that, not much -- FLAC's compression ratio is a bit better on average, and more non-Apple devices support it.

The release of this code isn't really all that exciting, as there's already a free reverse-engineered implementation in libav. (It might not support all the modes described in this source release, though.)

he means ffmpeg
ffmpeg renamed themselves to libav
No they didn't. FFmpeg still exists. It is still active with plenty of contributions.
iTunes does not support FLAC.
Dedicated playback hardware on iOS devices.
consumer products that actually support it?
I have had something like this for 3 years:

http://www.logitech.com/en-au/speakers-audio/wireless-music-...

Android market has had at least one FLAC player for at least 2 years now
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
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.
In addition to iOS playback as mentioned by other posters, ALAC is also used when streaming AirPlay audio. I would have killed for this code a few years ago.
iDevices don't support FLAC, IIRC.
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.

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.
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 ?

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.

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... or http://www.tensilica.com/products/audio/audio-codecs.htm (no ALAC)

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

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.
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.
Apple tend to shun "completeness" for simplicity to the average user. I.e. 1. Extra complexity without a significant consumer demand. 2. Licensing issues with the studios, should these be priced higher for example.
Check out www.murfie.com

They do downloads and offer ALAC and FLAC

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.
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).
Not even remotely. H.264 is wondrous, but it can't compete with even ProRes. If we all had gigabit pipes, Apple would be selling/renting the latter over the former, believe you me.

EDIT: Of course, at comparable bitrates, H.264 would likely be superior to ProRes (75-250Mb/s), but the computational complexity involved in decoding even intra-frame only H.264 versus a mezzanine format like ProRes would certainly point towards sending the latter rather than the former down the pipe, ceteris paribus.

Boomkat.com is an excellent source for lossless music. They offer almost everything as FLAC, which unfortunately I have to convert to ALAC in order to make it available in iTunes/on my iPhone. Quobuz.com on the other hand offers ALAC, WAV and FLAC. Basic french language skills will enable you to buy music there.
There have been rumors for the past few months that Apple will do just that. This release might be consistent with that; it will undoubtedly expand the audience, less because of the source availability, and more because of the Apache license patent grant.
I hope Google adds (hardware) support for this to Android - it would add another option for patent un-encumbered audio formats, outside of Vorbis.
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.)

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
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.
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.
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.

No, AAC was a successor to MP3, about a decade ago. This is a lossless format, so not really suitable for the same roles.
It doesn't make sense to use ALAC on mobile players. It's lossless so the file size is huge — you can't tell the difference between an ALAC file and whatever is sold in the iTunes store on a mobile device. Especially when the storage space is so little.
FINALLY!!! But what does this mean for the future of FLAC?
The Xiph.org project has always maintained that if there are royalty free audio codecs available for everyone, then we've won. We never cared that they were ours, but no one else seemed to be building them.

It's a little silly that Apple rolled their own when a perfectly good option was available, but the world still wins.

I hope they try and get it standardized. That would make it even better.

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.
ALAC ≠ AAC

ALAC : AAC : : FLAC : MP3

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

ALAC : AAC :: FLAC : Ogg Vorbis

Agreed.
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?
Anyone know the URL for the repo? It looks like they're using Subversion, but I don't see any svn:// links anywhere.
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.

Thanks :D
Awesome! Now embedded devices like my car will be able to play more than just MP3's!
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"?

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.