Skip to main content

Topic: Apple Lossless Audio Codec is now open source (Apache license) (Read 64293 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
Apple Lossless Audio Codec is now open source (Apache license)
Reply #25
Quote
Yes, but they're reverse-engineered codecs that are incomplete and not 100% compliant due to unknown or little-known syntax elements.


Source?  I haven't heard of this.

You mean you want to see the source code? Or what is the source of this information?

If you mean the latter, the source is me.  I mentored the Google Summer of Code student who implemented the FFmpeg ALAC encoder a few years ago.


No I mean a source for files that the current decoder cannot handle due to unknown syntax elements?

Any 5.1-channel or 32-bit file, for example.  I think someone did figure out correct 5.1 behavior, but it hasn't been implemented in FFmpeg/Libav at this point.  Also, there could be breakages that haven't been reported.  At any rate, the reverse-engineered decoder did do a pretty good job of handling the vast majority of files, but having a complete implementation will be nice.

  • benski
  • [*][*][*][*][*]
  • Developer
Apple Lossless Audio Codec is now open source (Apache license)
Reply #26
No I mean a source for files that the current decoder cannot handle due to unknown syntax elements?

Reason for edit: deleting unnecessary full quotation of above post


I've worked with and made changes / submitted changes to the crazney.net decoder and can definitely confirm that there are things that it doesn't handle correctly.  I plan on updating it based on the newly released code.

  • googlebot
  • [*][*][*][*][*]
Apple Lossless Audio Codec is now open source (Apache license)
Reply #27
Webkit was a BSD and LGPL project. So Apple did not have to contribute anything to be allowed to take from it. It was a great project with good modularization and performance to begin with, but Apple's high quality contributions were really a significant reason for its take-off.

  • kwanbis
  • [*][*][*][*][*]
  • Developer (Donating)
Apple Lossless Audio Codec is now open source (Apache license)
Reply #28
Ok, then, so, what harm does it makes?

Apple Lossless Audio Codec is now open source (Apache license)
Reply #29
So does this mean Apple is finally going to start offering lossless for sale on the iTunes store?


I highly doubt Apple is going to start offering ALAC content in the iTunes Store mainly because they are about to turn the switch on for iTunes Match and that deals with lossy (256kbps AAC) audio only.  I just don't see Apple starting one lossy service only to startup a lossless one in a short amount of time.  If anything, Apple is just pushing their format beyond the constraints of their own software.  Sure, third part encoders and decoders exist but now users can rely on code directly from Apple instead of using something that may not be completely solid (dBpowerAMP's early implementation of their own ALAC encoder is a prime example).  Leave it up to people on the internet to either blindly stamp on everything Apple does only to chock it up to them trying to take over the world or mindlessly praising it as if everything from them is a gift.  I think this walks somewhere in the middle.  Yes, Apple obviously has their reasoning which will never truly get out but the positive is that the most popular portable audio player line, the most popular slate tablet, and one of the most popular smartphones out there all work with this and now others can take advantage of Apple's ALAC implementation without reverse engineering.

  • funkyblue
  • [*][*][*][*]
Apple Lossless Audio Codec is now open source (Apache license)
Reply #30
I'd presume if any hardware or software that has FLAC support would add Apple Lossless support now.
Can only be good.

I personally hope for lossless iTunes. Now that would be amazing!

  • Garf
  • [*][*][*][*][*]
  • Developer (Donating)
Apple Lossless Audio Codec is now open source (Apache license)
Reply #31
Webkit was a BSD and LGPL project. So Apple did not have to contribute anything to be allowed to take from it.


You have been reading too much Apple propaganda.

The core components (rendering, DOM, JavaScript) were LGPL only, forcing Apple to at the very least publish the changes they needed to make to those components. The things that were BSD were stuff like the debugger and the benchmarks, i.e. the stuff that nobody cares about.

Apple published their changes to WebKit because they legally had no other choice.

Having to publish the changes to Webkit hurt Apple a lot because it allowed Google an easier entry into the browser market. You really think Apple voluntary helped one of their biggest competitors?
  • Last Edit: 29 October, 2011, 07:11:31 AM by Garf

  • galad
  • [*]
Apple Lossless Audio Codec is now open source (Apache license)
Reply #32
Yes, Apple needed to publish their changes, but they could have continued to send out some massive diff files every new Safari release (with no description of what changed, how or why), like they used to do, instead of creating a public website for webkit development, a public svn repository, a community around it and accepting contribution by third-parts.

So it's a bit hypocrite to criticize Apple and Webkit by saying that they were just obliged to do what they did.

  • nu774
  • [*][*][*][*][*]
  • Developer
Apple Lossless Audio Codec is now open source (Apache license)
Reply #33
It seems Apple's reference implementation gives incorrect magic cookie on little endian host.
In function ALACEncoder::GetMagicCookie():
Code: [Select]
theChannelLayout.mChannelLayoutTag = ALACChannelLayoutTags[theConfig.numChannels - 1];
--snip---
memcpy(theCookiePointer, &theChannelLayout, sizeof(ALACAudioChannelLayout));

In the upper line, mChannelLayoutTag is set without endian conversion, then it's just copied to the magic cookie buffer.
Probably this is not what they meant, since ALACSpecificConfig part is converted to big-endian.

Apple Lossless Audio Codec is now open source (Apache license)
Reply #34
It seems Apple's reference implementation gives incorrect magic cookie on little endian host.
In function ALACEncoder::GetMagicCookie():
Code: [Select]
theChannelLayout.mChannelLayoutTag = ALACChannelLayoutTags[theConfig.numChannels - 1];
--snip---
memcpy(theCookiePointer, &theChannelLayout, sizeof(ALACAudioChannelLayout));

In the upper line, mChannelLayoutTag is set without endian conversion, then it's just copied to the magic cookie buffer.
Probably this is not what they meant, since ALACSpecificConfig part is converted to big-endian.

You should register at macosforge and send them a bug report.

  • nu774
  • [*][*][*][*][*]
  • Developer
Apple Lossless Audio Codec is now open source (Apache license)
Reply #35
Hi,
In fact, I registered and tried it, only to see the server error like this;
Quote
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/trac/web/api.py", line 376, in send_error
    'text/html')
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/trac/web/chrome.py", line 733, in render_template
    message = req.session.pop('chrome.%s.%d' % (type_, i))
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/trac/web/api.py", line 195, in __getattr__
    value = self.callbacks[name](self)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/trac/web/main.py", line 265, in _get_session
    return Session(self.env, req)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/trac/web/session.py", line 162, in __init__
    self.get_session(req.authname, authenticated=True)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/trac/web/session.py", line 178, in get_session
    super(Session, self).get_session(sid, authenticated)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/trac/web/session.py", line 59, in get_session
    (sid, int(authenticated)))
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/trac/db/util.py", line 64, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/trac/db/util.py", line 64, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
InternalError: current transaction is aborted, commands ignored until end of transaction block

Apple Lossless Audio Codec is now open source (Apache license)
Reply #36
In fact, I registered and tried it, only to see the server error like this;
Quote
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/trac/web/api.py", line 376, in send_error
    'text/html')
(snip)
InternalError: current transaction is aborted, commands ignored until end of transaction block


That's unfortunate. Maybe someone should keep a mirror repo until Apple provides a non-broken way to communicate bugs.

edit: or email one of the people who made the initial git commits
  • Last Edit: 29 October, 2011, 01:37:13 PM by Justin Ruggles

  • Aramys
  • [*]
Apple Lossless Audio Codec is now open source (Apache license)
Reply #37
Great news, I trully hope this move from Apple means they will now switch to HD-AAC, at last !

  • LosMintos
  • [*]
Apple Lossless Audio Codec is now open source (Apache license)
Reply #38
A LOT of us have ipods/ipads/iphones, and they only use ALAC, not FLAC.

This IS good news.
It would have been really good news, if they had added FLAC support to those devices.

  • Garf
  • [*][*][*][*][*]
  • Developer (Donating)
Apple Lossless Audio Codec is now open source (Apache license)
Reply #39
Great news, I trully hope this move from Apple means they will now switch to HD-AAC, at last !


ALAC doesn't have anything to do with HD-AAC.

  • Garf
  • [*][*][*][*][*]
  • Developer (Donating)
Apple Lossless Audio Codec is now open source (Apache license)
Reply #40
Yes, Apple needed to publish their changes, but they could have continued to send out some massive diff files every new Safari release (with no description of what changed, how or why), like they used to do, instead of creating a public website for webkit development, a public svn repository, a community around it and accepting contribution by third-parts.

So it's a bit hypocrite to criticize Apple and Webkit by saying that they were just obliged to do what they did.


I pointed out your claims regarding the LGPL were false, and that Apple is legally compelled to produce the modified sources. That makes me a hypocrite?

You *are* correct in saying that Apple provided their changes in the most unproductive way possible until they started getting massive community backlash against it, and the associated bad publicity.

  • Aramys
  • [*]
Apple Lossless Audio Codec is now open source (Apache license)
Reply #41
Great news, I trully hope this move from Apple means they will now switch to HD-AAC, at last !


ALAC doesn't have anything to do with HD-AAC.


Where do you read that ALAC as something to do with HD-AAC in my post? 

Apple making gifts to the community is just so strange. I hope it means they drop ALAC to use another (very promising) tech to sell lossless on iTunes.
  • Last Edit: 01 November, 2011, 11:17:26 AM by Aramys

  • googlebot
  • [*][*][*][*][*]
Apple Lossless Audio Codec is now open source (Apache license)
Reply #42
I'm pretty sure that Apple has something coming for lossless mid- to long-term. They have no track record for releasing open source projects, that would else end up in the trash (or transition to pure maintenance mode), without ulterior motives.

I'd think that they wait a while until there is broader, ~100% compatible support and then launch a new offer, with a decreased risk that half of the blogosphere cries "nice, but why not FLAC FFS?".

  • Aramys
  • [*]
Apple Lossless Audio Codec is now open source (Apache license)
Reply #43
All Apple devices or whatever other brand devices able to play AAC files are compatible with HD-AAC (they'll only play the "core" lossy AAC-LC part of the file). Maybe Apple sees that ALAC will never be adopted by other makers so now could be the time to use an ISO standard, licensed technology, which is also highly compatible with the current iTunes catalog. Time will tell.

  • kwanbis
  • [*][*][*][*][*]
  • Developer (Donating)
Apple Lossless Audio Codec is now open source (Apache license)
Reply #44
It would have been really good news, if they had added FLAC support to those devices.

Well, LOSSLESS is LOSSLESS, so the good thing is that you can now reencode from FLAC to ALAC at the time of transfer.

  • saratoga
  • [*][*][*][*][*]
Apple Lossless Audio Codec is now open source (Apache license)
Reply #45
It would have been really good news, if they had added FLAC support to those devices.

Well, LOSSLESS is LOSSLESS, so the good thing is that you can now reencode from FLAC to ALAC at the time of transfer.



You've been able to do this for years now.

  • kwanbis
  • [*][*][*][*][*]
  • Developer (Donating)
Apple Lossless Audio Codec is now open source (Apache license)
Reply #46
You've been able to do this for years now.

Right. But now with an official encoder.

  • saratoga
  • [*][*][*][*][*]
Apple Lossless Audio Codec is now open source (Apache license)
Reply #47
You've been able to do this for years now.

Right. But now with an official encoder.


Yes, but my point is that if you're transcoding from FLAC having an official encoder changes nothing.

  • kwanbis
  • [*][*][*][*][*]
  • Developer (Donating)
Apple Lossless Audio Codec is now open source (Apache license)
Reply #48
Yes, but my point is that if you're transcoding from FLAC having an official encoder changes nothing.

Au contraire! It makes me sure that the ALAC i get would be totally official an 100% compatible.

  • saratoga
  • [*][*][*][*][*]
Apple Lossless Audio Codec is now open source (Apache license)
Reply #49
Yes, but my point is that if you're transcoding from FLAC having an official encoder changes nothing.

Au contraire! It makes me sure that the ALAC i get would be totally official an 100% compatible.


Well ok it changes nothing from an audio stand point.  The warm fuzzy feeling you get is up to you