Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Does ALAC have any advantags over FLAC? (Read 4923 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Does ALAC have any advantags over FLAC?

I'm trying to understand why Apple went through the trouble of creating ALAC for lossless audio, when FLAC, Monkey's Audio and various other compression methods already existed.

I know that ALAC uses an MP4 container, and therefore can use MP4 atoms for metadata. But are MP4 atoms any better than the Vorbis Comments that FLAC uses?

And ALAC is open source. So, it's not like Apple is making licensing fees off of ALAC.

Re: Does ALAC have any advantags over FLAC?

Reply #1
ALAC wasn't open when it was launched! Apple didn't open it until they had lost the format war - although, it only took a year to reverse-engineer it.

* There already being codecs available? Oh, back then there were corporate codecs all over the place (most of them lossy). Attempting to gain control over the market(s). Remember RealAudio was everywhere on the 'net in the nineties? Real made their living from controlling codec, format and player.
Does the world need another codec? was an alien question in an incomprehensive language: Of course Microsoft needed their own codec family. Apple was kinda an oddball when they went for the already-well-established AAC codec (in MP4 container). A wise choice though - look, not even Microsoft could successfully push WMA for too long, so AAC was arguably the only non-MP3 that could make it big back then. (Vorbis? Vorbis worked as a threat against expensive MP3 licenses. It was a big thing back then, but not big enough to make Vorbis a major player ... only a major threat.)

* DRM in MP4: Apple did offer DRM-infested AAC until 2009. Many of us expected DRM'ed ALAC - at least if ALAC would catch on. It didn't so much ... at least not until the sale of DRM-infested files was on its way out, thank goodness. But Apple surely positioned themselves for a situation where they had to sell DRM'ed lossless or no lossless.

* More MP4: There is the MPEG-4 ALS codec. The call for a lossless codec under an MPEG-4 standard was issued in 2002, quite a while before Apple launched ALAC. Real Networks actually supported the development, as their own Real Lossless was not gonna make it.
But there is also the MPEG-4 SLS codec - developed about simultaneously, intended for DRM purposes (playing AAC and DRM-ed correction file).
You can speculate why Apple hurried publishing their own MP4-contained lossless codec when an MPEG-4 lossless codec was coming up. I don't know whether they, with their resources, even considered a bid to develop what was to become MPEG-4 lossless.
One reason could be to facilitate a DRM they would control. And possibly destroy other lossless-in-MP4 competitors.

* For metadata ... encryption keys and the like, are "metadata". But for user tagging, you don't need to reinvent a whole new format.
(Actually, FLAC can be fit in an MP4 container too ... but probably it would be bad PR if Apple took the FLAC algorithm and put it in MP4 for the purpose of DRM-infesting it later.)


And yes, corporate codecs suck. Real Audio? WMA(L)? Sony's attempts at bringing ATRAC into the files market with a lossless version? Eff off. Sure there is an "advantage" in ALAC on Appleware, when Apple doesn't support the competition ... (hm, and "in return", Google has made sure Android has no native ALAC knowledge. For lossless audio, Android only knows WAVE and FLAC. Players can of course support more ... but I digress.)

But to answer your question in a less anti-corporate biased way  O:)  :
At a technical level, I think we have found that ALAC has one element which sometimes makes ALAC do interesting things (reply 5 here) - another way to encode residuals. So every now and then there are more ALAC-friendly signals out there.
Also, frankly: likely we will never know ALAC's "potential" performance. Nobody is going to tweak it the way FLAC has been honed and developed and engineered. But, unknown to most outside HA I guess, Gregory Chudow did port some of ktf's FLAC improvements of ten years ago into CUETools' ALAC encoder, and it actually makes a difference: at https://hydrogenaud.io/index.php/topic,123511.0.html , CUETools.ALACenc.exe at default would spend only ten percent more time than refalac, but compress 1.6 percent better, and that is actually quite significant within one and the same codec. And the difference to ffmpeg's encoder is even bigger, but that encodes faster.

Re: Does ALAC have any advantags over FLAC?

Reply #2
Could very well be Apple was afraid of submarine patents held by any of the developers. iOS started to support FLAC in 2017 when it was pretty clear that FLAC was really free of any patents, as FLAC 1.0 (released in 2001) can still play back current (CDDA) FLAC files.
Music: sounds arranged such that they construct feelings.

Re: Does ALAC have any advantags over FLAC?

Reply #3
I wonder what that would be when it comes to FLAC. Just for a mental exercise: patent troll lawyer looks at the format spec to see what isn't already textbook stuff where prior art would invalidate any claim - where is the potentially weakest spot?
Hardly the fundamentals: linear prediction nor Golomb-Rice coding. Per se, I mean. But maybe on a method to subdivide a subblock uh I mean, partition a frame into optimized smaller intervals with each their own Golomb-Rice exponent? After all, even heavily-compressing codecs seem to miss out on that: they would look for looong term patterns, whereas FLAC's partitioning exploits variations in the short (sometimes very short!) term.
Or ... wasted bits? Implemented already in MLP but it seems to me that early 2000s, it was quite rare. (IIRC, WavPack didn't implement it until it updated its file format ... when was WMA lossless launched?)

But, even if the fear of patent trolling could be real, it need not be tied to anything specific in any existing codec. Apple/Microsoft could have decided rather to stick to what they had done their best to check out, rather than scrutinizing someone else's work. And, for a strategy element: an undocumented format/algorithm it is harder to prove that it infringes anything specific.



... apart from that, a question on metadata: were non-DRM file purchases from Apple ever "fingerprinted" with customer-unique ID? I guess it is easier to "hide" such things - from plain sight - in an MP4 atom?
edit: @apastuszak ... I found a HA comment which seems to put forth some arguments you might consider for this thread   ;)

Re: Does ALAC have any advantags over FLAC?

Reply #4
Could very well be Apple was afraid of submarine patents held by any of the developers. iOS started to support FLAC in 2017 when it was pretty clear that FLAC was really free of any patents, as FLAC 1.0 (released in 2001) can still play back current (CDDA) FLAC files.

Exactly this. Patent owners are much more likely to to be interested in chasing Apple that they are the creator of 'Super Media Player Ultra X'.

But to answer the question - the only advantage is full support in Apple products.

Re: Does ALAC have any advantags over FLAC?

Reply #5
Apple is an enemy of cross-platform, it really is as simple as that.

Re: Does ALAC have any advantags over FLAC?

Reply #6
Apple is an enemy of cross-platform, it really is as simple as that.

Sadly, that wasn't always the case. Apple used to implement open standards before Microsoft did. I think the success of the iPod and the iTunes music store changed that.

I remember when Apple released iTunes and ran the very successful "Rip, Mix, Burn" ads that encouraged you to rip your CDs and make mix CDs out of them. The RIAA almost sued Apple over than one, claiming ripping CDs was illegal.

Re: Does ALAC have any advantags over FLAC?

Reply #7
Apple is an enemy of cross-platform, it really is as simple as that.

It's almost like illegally sharing music wasn't one of their priorities... Those swines.

I'm so please I am a GoboLinux user.

Re: Does ALAC have any advantags over FLAC?

Reply #8
Apple is an enemy of cross-platform, it really is as simple as that.

It's almost like illegally sharing music wasn't one of their priorities... Those swines.

I'm so please I am a GoboLinux user.

Prior to the iTunes Music Store, Apple was very opposed to DRM. There are plenty of interviews from Steve Jobs about how much he hates DRM and patent encumbered technologies. Apple never added support for Blu-Ray because they said the patents on Blu-Ray were a "hot mess."

In order to get the iTunes Music Store off the ground, they needed to add DRM or the record labels would not get on board. In the 2000s, the record labels really messed with digital music distribution with draconain requirements. How many people bought music in the late 90s, early 2000s only to lose it forever? How many people had WMA based music players that would not play a song because it has been too long since you plugged into a PC and had Windows Media Player update the PlayForSure DRM.

I'm sure there are plenty of examples of Apple going proprietary with things like Messages and Facetime. But a lot of Apple's moves with music, IMHO were pretty consumer friendly compared to what other companies were making you do.

Re: Does ALAC have any advantags over FLAC?

Reply #9
Hmm. Whatever it was it doesnt matter now. At least the 61 alacs i still have in my archive that i cant be arsed to convert tell that story. The only cool thing alac has is that foobar can display what bitrate a file is using live. Dont know why that doesnt work with flac.
The name "apple lossless" also kinda implies to the customers that their codec is special, which it really isnt. You got "free" in the name you are out of the question. dont want our customers to get ideas. ;)

Re: Does ALAC have any advantags over FLAC?

Reply #10
Hmm. Whatever it was it doesnt matter now. At least the 61 alacs i still have in my archive that i cant be arsed to convert tell that story. The only cool thing alac has is that foobar can display what bitrate a file is using live. Dont know why that doesnt work with flac.
The name "apple lossless" also kinda implies to the customers that their codec is special, which it really isnt. You got "free" in the name you are out of the question i think. dont want our customers to get ideas. ;)

Re: Does ALAC have any advantags over FLAC?

Reply #11
(hm, and "in return", Google has made sure Android has no native ALAC knowledge. For lossless audio, Android only knows WAVE and FLAC. Players can of course support more ... but I digress.)
Is that official? Because on android this doesnt strike me as something that is beeing actively worked against. The only time where i found this boycott painfully obvious and annoying to work with is with itunes and flac. Lead me to just convert my fathers archive to alac because he wanted the music on his iphone.


Re: Does ALAC have any advantags over FLAC?

Reply #13
Is that official?
See here: https://issuetracker.google.com/issues/36931466 It says: Won't fix (Obsolete)
Same about WavPack: https://issuetracker.google.com/issues/36910589
And then this from last year from Matt Ashland, speaking for deaf ears: https://issuetracker.google.com/issues/222338438

I guess ALAC is unwanted. Apple could try to whine over Google abusing market power, but Google can shrug off ALAC by being less relevant now than FLAC was in 2015 when Apple didn't want to touch it - but it won't look that good if Google decides to embrace Monkey's and WavPack, which are smaller. (When was the last time you purchased a download and got any of those formats as options? At least Bandcamp offers ALAC ...)
So Google has gone the other way - AIFF isn't supported either. Lossless audio? FLAC or WAVE and that's it.

Re: Does ALAC have any advantags over FLAC?

Reply #14
Rolling back time twenty-ish years: The iTunes success was a gamechanger nobody had expected ... apparently not Apple either, who sold a million tunes in six days rather than the projected six months. Or something like that.
I'm totally avoiding iThings myself, but there is no denying they did something right.

Even those of us who were around twenty years ago, sometimes need to be reminded of the sorry state of affairs:
* The music industry was trying to lock you in pretty much comparable to the scenario that Coca-Cola would prosecute you for drinking Fanta out of your own glass in your own home. Losing your music because you couldn't access it? Buy it again!
* And with the MAFIAA deliberately infecting CD buying consumers' computers with malware. (Pirate-distributed malware, even!)
* DRM was the next big feature of what would later fizzle out into Windows Vista.
* Remember Zune?
* And remember Apple was small?

In all this, a niche computing company (< 5 percent market share) was trying to convince the record companies that hey, you can try us as a lab rat for selling songs. Nobody but the cult of Mac will buy this anyway, and so it is a small-scale experiment that isn't going to disturb your business model. Heck, we aren't really even allowed to sell music, due to the deal with Beatles label Apple Records. Steve Jobs insisted on $0.99 per song, staying below a significant psychological barrier.
It was never expected to turn big. Sure Steve Jobs bragged it would “go down as a turning point for the music industry”, but little did he know the impact.

Zune, I said?
When iPod was launched, internet jokesters made photoshops about "iPod, Microsoft edition" with big ugly install screens that would force you to read 666 pages of legal junk every time you switched it on.
And Apple made it possible to play the same files both at home and portably. 
Why Sony - a major label and the creators of the Walkman - slept through this for so long without realizing that they had let loose someone else's hardware platform this way ... it must have been because nobody really expected this to take off.

Then Apple launched the iPhone, which relegated telephone functionality to being one application out of several. 
Without iTunes, no iPod, no iPhone, no iPad and no Mac revival.

Re: Does ALAC have any advantags over FLAC?

Reply #15
I'm not saying that Apple hasn't had an impact on the music or software industy, they clearly have. But the crap they pull to try and lock customers in to their platform is painfully anti-consumer. Using a custom audio format is far from the most egregious example, it's just another attempt at (soft) lock-in to add to the list.

Re: Does ALAC have any advantags over FLAC?

Reply #16
Agree, and that is one of the reasons I'm not going to buy appleware myself.

Sure they weren't half as awful on their consumers as RIAA back in the day, but that is a low bar to clear. (Did I buy music still? Sure, but only by oversight did I catch a couple of defective-by-design releases ... one of which a promo from Iron Maiden.)

Obviously when Apple had the chance to expand their userbase enormously, they acted different. Not being benevolent, just being strategic - you kinda gotta catch users before you lock them in.

Re: Does ALAC have any advantags over FLAC?

Reply #17
Using a custom audio format is far from the most egregious example, it's just another attempt at (soft) lock-in to add to the list.

Calling AAC a custom audio format is a strech. Also Apple eventually phased out DRM on 30 May 2007 with EMI (which didn't save the record label and made things so much worse, and they were not good to begin with), I remember that day because I bought music from iTunes that day and even converted some DRMed files.

Apple introducing a own lossless file format was weird indeed but also FLAC is kinda weird, FLAC became part of Xiph in 2003 but instead of putting FLAC in an Ogg container, FLAC still uses its own with Vorbis comments as meta data but the cover art is in FLAC specific place instead of Vorbis comments.

Re: Does ALAC have any advantags over FLAC?

Reply #18
Apple is an enemy of cross-platform, it really is as simple as that.

To write such a thing you must have no memory of what Mozilla ports were before Safari. Apple freed itself from Internet Explorer leaving Webkit (formerly KHTML) to the world, I hope I don't need to write anything else. As far as I'm concerned, I've always avoided Vorbis on audio encoders, the same goes for FLAC, Opus, and many others because I'm an early adopter and therefore I've always created very negative judgments on projects that would be improved later. Also I prefer the standards used in telecommunication, the later conversion doesn't interest me. ALAC was a special case, I used it as an intermediate format often because it allowed to obtain the best quality with Apple's AAC encoder, under certain conditions which are still the same used for music distributed as Apple Digital masters. And precisely because the subsequent conversion doesn't interest me I rarely transform an AIFF or a WAV into FLAC or ALAC, computing power is cheap, space too, what has an ever increasing value is my time, an increasingly scarce resource at the moment. Point of no longer wanting to waste it talking about nothing. Therefore I keep the music in the format in which I receive it, end of unnecessary complications.



Re: Does ALAC have any advantags over FLAC?

Reply #21
My experience is that FOSS projects may start in a rough state relative to competition, but with enough momentum and time stand a good chance of being the solution that wins in the end. I meant ALAC not AAC.

Webkit, the rendering engine that for years was mandated by Apple as the only engine allowed on ios. To stifle cross-platform.

Re: Does ALAC have any advantags over FLAC?

Reply #22
Is that official?
See here: https://issuetracker.google.com/issues/36931466 It says: Won't fix (Obsolete)
Same about WavPack: https://issuetracker.google.com/issues/36910589
A lot of the issues seem to come from plain visibility. I have an S23 ultra and it does show the alac (m4a) in the default file explorer. Even with a little music icon. Since this phone doesnt even have a native music app i dont get what else there would be to do. Will try to do this with the native alac container too but i dont really use that one.
Maybe they just want to keep the project size as low as possible?
Edit: Hmm downloaded the samsung music app that one doesnt work. not a good look

Re: Does ALAC have any advantags over FLAC?

Reply #23
Using a custom audio format

Using a standard format (see https://www.iso.org/standard/43345.html ) instead WMA or others.

Confusing ALAC with something else?

No, I prefer standard format for broadcast like AAC for lossy, for lossless it's a problem because ISO working on more solution, sometimes one it's better of the others, not always, the winner was FLAC. The Apple AAC encoder provide better quality with a 32 bit input file, so ALAC it's best of FLAC like intermediate codec, WAV or AIFF (not compressed) are the same.

In the past I can't using FLAC for 32 bit input. Furthermore I'm recording many hours for day only mono voice, for my jobs have no sense to use these formats, but for music ALAC provide a clear advantage, only before compression and also inside the Apple ecosystem. For voice recording today many company use the 32 bit depth because you don't need to set the correct gain before recording. At the end the level need to be changed at -23dBFS EBU value and at the same time become unnecessary to keep the 32 bit depth. For the end user today FLAC it's the preferred lossless solution in many platform, but I prefer to change decoders rather than re-encoding my archives.

Re: Does ALAC have any advantags over FLAC?

Reply #24
The Apple AAC encoder provide better quality with a 32 bit input file
The "32-bit" is float, not integer, as mentioned here:
https://images.apple.com/euro/itunes/mastered-for-itunes/docs/mastered_for_itunes.pdf
Quote
For voice recording today many company use the 32 bit depth because you don't need to set the correct gain before recording.
Which is also float, not integer:
https://www.sounddevices.com/noise-in-32-bit-float/
As for the "you can't clip" myth, the digital format won't clip, but the physical and analog chain (mic and preamp) before digital conversion can still clip.