Skip to main content

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

0 Members and 1 Guest are viewing this topic.
  • kwanbis
  • [*][*][*][*][*]
  • Developer (Donating)
Apple Lossless Audio Codec is now open source (Apache license)
Reply #50
Well ok it changes nothing from an audio stand point.  The warm fuzzy feeling you get is up to you

I don't actually use ALAC, but in fact it does. It gives you the peace of mind that the ALAC you get, is 100% accurate. Maybe the reverse engineered version is 100% accurate also, but you never know for sure, and somebody already mentioned there was a problem with the FFMPEG implementation IIRC.

  • saratoga
  • [*][*][*][*][*]
Apple Lossless Audio Codec is now open source (Apache license)
Reply #51
Err, you never know for sure that any code is bug free.  As far as well know both encoders are lossless because everything they've encoded so far has been lossless, but that doesn't mean no bugs exist.  So no it doesn't give that peace of mind, or if it does you're mistaken.  If you want to know for sure, just verify that encoded file matches the input.  This is trivial for lossless files and if its important to you then you should be doing it.

But anyway, my point was that for the situation you described (transcoding flac for use on an ipod), nothing at all has changed.  Before you could trancode and be 100% sure the conversion was lossless (by checking) and afterwards you can continue to do the same (again, by checking). 

I don't understand why you're having some much trouble understanding this.  It seems pretty obvious to me
  • Last Edit: 08 November, 2011, 08:40:34 AM by db1989

  • marc2003
  • [*][*][*][*][*]
Apple Lossless Audio Codec is now open source (Apache license)
Reply #52
Au contraire! It makes me sure that the ALAC i get would be totally official an 100% compatible.


erm.... http://sites.google.com/site/qaacpage/


  • Elbart
  • [*][*]
Apple Lossless Audio Codec is now open source (Apache license)
Reply #53
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.

AirPlay is using ALAC... 

  • Phixion
  • [*][*]
Apple Lossless Audio Codec is now open source (Apache license)
Reply #54
Can anyone point me in the direction of the new open source encoder for Windows please?

I know the source is @ http://alac.macosforge.org/ but I have no idea how to compile it and every google search leads me to the old, reverse engineered ALAC codec.

Many thanks.

Apple Lossless Audio Codec is now open source (Apache license)
Reply #55
Well, i did compile it, but the command line utility that comes with the library is not very useful - it only produces .caf format files, doesn't accept stdin for input and doesn't have any options. I have no idea if it works at all.
CUETools 2.1.4

  • kode54
  • [*][*][*][*][*]
  • Administrator
Apple Lossless Audio Codec is now open source (Apache license)
Reply #56
Well, i did compile it, but the command line utility that comes with the library is not very useful - it only produces .caf format files, doesn't accept stdin for input and doesn't have any options. I have no idea if it works at all.

I have verified that .caf files produced by the utility play in QuickTime X on OS X, but they don't play in iTunes.

Also, it would have been nice to know a way to check out the source with git or some other utility. I ended up downloading it file by file after I got the base download-in-original-format link from their Trac source browser.

Apple Lossless Audio Codec is now open source (Apache license)
Reply #57
You can check it out with SVN from here: http://svn.macosforge.org/repository/alac/trunk
For some reason this link doesn't appear anywhere on their site
  • Last Edit: 01 November, 2011, 07:35:51 PM by Gregory S. Chudov
CUETools 2.1.4

  • jfb
  • [*]
Apple Lossless Audio Codec is now open source (Apache license)
Reply #58
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.
I'm not seeing this; in the source, the mChannelLayoutTag is only set if the number of channels is > 2.  For a stereo bitstream, there's no layout tag.  But ffmpeg is still reading the header incorrectly, I think --

(from libavformat/cafdec.c:read_kuki_chunk()):

Code: [Select]
    } else if (st->codec->codec_id == CODEC_ID_ALAC) {
#define ALAC_PREAMBLE 12
#define ALAC_HEADER  36
       if (size < ALAC_PREAMBLE + ALAC_HEADER) {
           av_log(s, AV_LOG_ERROR, "invalid ALAC magic cookie\n");
           avio_skip(pb, size);
           return AVERROR_INVALIDDATA;
       }
I don't think those numbers are correct: the ALAC_PREAMBLE, (which I take to mean 'k' 'u' 'k' 'i' 00 00 00 00 00 00 00 18) is twelve bytes long; and ALAC_HEADER?  Is this supposed to be the contents of the kuki chunk?  Because that's a static size of sizeof(ALACSpecificConfig) for mono and stereo tracks, which is … 24 bytes.  I'm not seeing where this 48 byte minimum size requirement is coming from?  Regardless, this is a variable size -- if there are more than two channels, the size of the cookie payload is variable.  I think this ffmpeg code is just wrong.  Investigating further.

  • Ron Jones
  • [*][*][*][*]
Apple Lossless Audio Codec is now open source (Apache license)
Reply #59
This doesn't help anyone but Apple. ffmpeg and libavcodec have supported ALAC decoding for approximately three years. These technologies have been in the open for a while despite Apple.

When it comes to coded audio formats, decoding is approximately half the battle. The options available for ALAC encoding on Windows are quite limited, for obvious reasons.

Given the nature of this technology and the current climate of lossless audio codecs, I don't see this as genuinely benefitting Apple to any great extent. If there's some major win they get out of this open sourcing, I couldn't describe what that major win could be.

  • Xenion
  • [*][*][*][*][*]
Apple Lossless Audio Codec is now open source (Apache license)
Reply #60
Au contraire! It makes me sure that the ALAC i get would be totally official an 100% compatible.


erm.... http://sites.google.com/site/qaacpage/


which uses refalac now, exactly.
before apple opened the source of alac it relied on quicktime which gives you no guarantee of being a working solution in the future because of changes in quicktime making it incompatible with unsupported 3rd-party software.

  • Xenion
  • [*][*][*][*][*]
Apple Lossless Audio Codec is now open source (Apache license)
Reply #61
Since it's opensource now, someone might compile a binary that is useable with EAC or any other CD-ripper. For people who share lossless audiolibraries on heterogeneous networks alac might be a good choice since mac users often prefer itunes (and alac is the only lossless format itunes can deal with)
  • Last Edit: 08 November, 2011, 08:41:18 AM by db1989

  • saratoga
  • [*][*][*][*][*]
Apple Lossless Audio Codec is now open source (Apache license)
Reply #62
Since it's opensource now, someone might compile a binary that is useable with EAC or any other CD-ripper. For people who share lossless audiolibraries on heterogeneous networks alac might be a good choice since mac users often prefer itunes (and alac is the only lossless format itunes can deal with)


To be clear, you are aware that its been open source for years, and that people already have compiled a binary usable with EAC or any other CD-ripper, right?

  • kwanbis
  • [*][*][*][*][*]
  • Developer (Donating)
Apple Lossless Audio Codec is now open source (Apache license)
Reply #63
Since it's opensource now, someone might compile a binary that is useable with EAC or any other CD-ripper. For people who share lossless audiolibraries on heterogeneous networks alac might be a good choice since mac users often prefer itunes (and alac is the only lossless format itunes can deal with).

Spoon would be able to implement a official ALAC encoder now

To be clear, you are aware that its been open source for years, and that people already have compiled a binary usable with EAC or any other CD-ripper, right?

The apple alac encoder/decoder?

  • spoon
  • [*][*][*][*][*]
  • Administrator
Apple Lossless Audio Codec is now open source (Apache license)
Reply #64
Cue Microsoft in 3..2..1?

  • Elbart
  • [*][*]
Apple Lossless Audio Codec is now open source (Apache license)
Reply #65
Since it's opensource now, someone might compile a binary that is useable with EAC or any other CD-ripper. For people who share lossless audiolibraries on heterogeneous networks alac might be a good choice since mac users often prefer itunes (and alac is the only lossless format itunes can deal with)

Doesn't it need to be ported over first? Would be surprised if they made it multi-plat from the get-go.

  • JunkieXL
  • [*][*][*][*]
Apple Lossless Audio Codec is now open source (Apache license)
Reply #66
You need to read this thread more closely.  We are talking about Apple releasing their source code.  Not some 3rd party that reverse engineered the ALAC codec.  I also stated that above if you had read it.
JXL
  • Last Edit: 04 November, 2011, 07:39:46 PM by JunkieXL

  • hellokeith
  • [*][*][*][*]
Apple Lossless Audio Codec is now open source (Apache license)
Reply #67
Cue Microsoft in 3..2..1?

The only folks left in Windows Media are the Expression Encoder group.  EE4 (free version) doesn't support AAC-LC output, so I doubt they'd be interested in this.

  • spoon
  • [*][*][*][*][*]
  • Administrator
Apple Lossless Audio Codec is now open source (Apache license)
Reply #68
Not MS supporting alac rather to release wmal as os

  • saratoga
  • [*][*][*][*][*]
Apple Lossless Audio Codec is now open source (Apache license)
Reply #69
We are talking about Apple releasing their source code.  Not some 3rd party that reverse engineered the ALAC codec.  I also stated that above if you had read it.


I know what you are talking about.  I didn't quote you because I was referring to Xenon's post rather then yours:

Quote
Since it's opensource now, someone might compile a binary that is useable with EAC or any other CD-ripper. For people who share lossless audiolibraries on heterogeneous networks alac might be a good choice since mac users often prefer itunes (and alac is the only lossless format itunes can deal with)


Theres already an open source encoder available that you can use with EAC.  Hence my point that theres already an open source encoder that you can use with EAC.  I realize that you made a different post above about a different thing, but since I was not referring to it, I did not quote it. 

Is that clear?

  • Destroid
  • [*][*][*][*][*]
Apple Lossless Audio Codec is now open source (Apache license)
Reply #70
Well, of course everything Apple is lame and Steve was the icon of a-holiness and his best iFollowers kept his brain and his ding-dong alive in jar. (btw, this is a sarcastic joke)

Ok, seriously I'll bench the official ALAC encoder because I also was a little put-off by the unofficial encoder and its reputation of not being error-proof. I just don't think I'll see any dazzling scores from it, probably a bit better than FLAC compression wise with slower encode speeds. To what niche does ALAC have outside Apple products? I can't say and wouldn't predict it to catch on too quick, FLAC has quite a bit more notoriety at the present.
"Something bothering you, Mister Spock?"

  • Wombat
  • [*][*][*][*][*]
Apple Lossless Audio Codec is now open source (Apache license)
Reply #71
Ok, seriously I'll bench the official ALAC encoder because I also was a little put-off by the unofficial encoder and its reputation of not being error-proof. I just don't think I'll see any dazzling scores from it, probably a bit better than FLAC compression wise with slower encode speeds. To what niche does ALAC have outside Apple products? I can't say and wouldn't predict it to catch on too quick, FLAC has quite a bit more notoriety at the present.

We won´t see much better compression. Gregory Chudov´s libalac already maxes out what ALAC can archieve at best. Its compression is better as the standard flac 1.21 but also worse as libflake/FlacCL from Gregory.
At least on my testcorpus. On some material ALAC is much worse like Lossywav or with empty bits in files.
I already asked Gregory if we can expect better compression from this source code and the answer wasn´t positive.
When i remember right there was some speculation about wasted bits ability of ALAC but now that the code is open there isn´t something to expect in that direction.
Besides that when you got used to GPU encoding with FlacCL most other codecs are slow. Wanting the tiny bit better high compression from libalac already needs much processing power and ALAC is not good for GPU.

Also i wonder why ALAC on the lossless wiki is said to decode "very fast". On my machine the foobar decoding test shows it at half the speed a flac -8 file decompresses at best.
Even alacConvert.exe decoding the *.caf file is much slower.
Is troll-adiposity coming from feederism?
With 24bit music you can listen to silence much louder!

  • jukkap
  • [*]
Apple Lossless Audio Codec is now open source (Apache license)
Reply #72
probably a bit better than FLAC compression wise with slower encode speeds.


I've found out that Apple's ALAC encoder is extremely fast encoder. I compiled Apple ALAC with Intel C++ max optimized. I'll do better ALAC vs. FLAC comparison later.

The Apple's reference ALAC encoder reads/writes the files in too short blocks and it slows down dramatically its performance.
  • Last Edit: 09 November, 2011, 02:06:20 AM by jukkap

  • spoon
  • [*][*][*][*][*]
  • Administrator
Apple Lossless Audio Codec is now open source (Apache license)
Reply #73
Quote
Either way you look at it, there is little reason for Apple to start selling ALAC files other than to appeal to a relatively small group of people.


When selling anything you need to keep ahead of the game, if Apple have the bandwidth + eco system to do so, it would not negatively impact them, rather it would put unexpected costs onto Amazon, etc to keep up with the game. Apple would put up a page explaining to Joe Public that the new offering (only costing 30c to upgrade your existing m4a purchases to) is the highest CD quality, where as the existing stuff purchased has less quality, people are not going to do listening tests, they would pay the 30c per track and Apple would have 12 months of healthy increased revenue (plus the lossless tracks would likely cost more also).

  • Wombat
  • [*][*][*][*][*]
Apple Lossless Audio Codec is now open source (Apache license)
Reply #74
probably a bit better than FLAC compression wise with slower encode speeds.


I've found out that Apple's ALAC encoder is extremely fast encoder. I compiled Apple ALAC with Intel C++ max optimized. I'll do better ALAC vs. FLAC comparison later.

The Apple's reference ALAC encoder reads/writes the files in too short blocks and it slows down dramatically its performance.

Apple´s default compression must be pretty lousy likle between -3 and -4 for flac
Is troll-adiposity coming from feederism?
With 24bit music you can listen to silence much louder!