FLAC support in Mac OS X 10.5 “Leopard”

The rumour about FLAC support in Leopard started appearing more than one year ago. As rumours go, that one was pretty vague - nonetheless some people managed to infer that iTunes would support it as well, naturally. I must admit that at some point, due to a certain person that shall remain unnamed, I got quite confused myself.

On Friday Leopard has been released. Yesterday I’ve spoken on IRC about the FLAC support with some users that already have 10.5. Then I played with the developer kit for Mac OS X 10.5, now available to everybody. And I have my answer.

Xcode 3.0 developer kit contains some new examples in /Developer/Examples/CoreAudio. One of them is an example implementation of AudioCodec compressor and decompressor for FLAC streams (as in “streams of logically related bits” not “network streams”). To build that codec you would need to, following included README, download FLAC source distribution, copy some of the source files into a subdirectory in the example AudioCodec implementation, edit one of the copied files and build the whole thing in Xcode. After it builds the resulting bundle needs to be copied into /Library/Components. From the README: “You now have a working FLAC encoder and decoder on the system.”

Right. What you still don’t have is any way to extract those FLAC-formatted bit streams from the files FLAC usually comes in, like .flac or occasionally .ogg files, to be able to use your new and shiny codec to decode them. You still don’t have a way to put those FLAC-formatted bit streams into a .flac or .ogg file. Possibly 10.5 comes with some tools, or some more D.I.Y. examples, to manipulate CoreAudio Files (.caf) or maybe even QuickTime (.mov) files, so you can store and extract those FLAC-formatted bit streams in/from those Apple-specific file formats. But still, neither QuickTime Player nor iTunes won’t be able to play .flac files even if you build and install the example codec.

And that’s it. That’s the FLAC “support” in Leopard, as far as I know. Expected more? Sorry, move along.

If you are a XiphQT user you had the same “support” for FLAC decoding more than a year ago, when version 0.1.5 had been released. Except it included support for FLAC in .ogg files. I know, to many people that’s next to useless, but still. And XiphQT’s code for decoding FLAC is roughly half the size of the Apple’s example and doesn’t have loops copying data between interfaces sample by sample! Even a simple thing like multi-channel mappings is incorrect in their implementation - they either didn’t bother to read the FLAC specification or didn’t bother to implement it properly, because it’s hard to believe they don’t know how to use their own API. Nice “example” Apple!

At this point there’s only one more thing left to write. Expect native FLAC file format support in XiphQT soon.

13 comments on “FLAC support in Mac OS X 10.5 “Leopard””

  1. Casey Leedom wrote:

    My housemate and I are hoping to be able to use your plug-in to directly import audio CDs into FLAC format using iTunes. Is that going to be possible? Currently he’s importing audio CDs into AIFF using iTunes and then transcoding them into FLAC using a tool called “flac” (of all things). Unfortunately that tool tosses all of the tags and then he has to go back and add the tags back in by hand. As you might imagine this is a painful process.

    Casey


  2. Boycott wrote:

    Why not simply boycott MAC/iTunes products. As nice as MACs are Apple is increasingly behaving like a microsoft. Try Linux, I did and I haven’t looked back.


  3. Casey Leedom wrote:

    I’m not a major fan of the way that Apple acts sometimes but it still hasn’t risen to the likes of uSoft or, in my mind, even worse, Google.

    However, all those soft fuzzy feeling aside, the Mac OS/X interface and tools are simply the best when it comes to ease of use and, usually, completness and integration. uSoft comes in a close second and Linux isn’t even on the horizon.

    In particular with respect to the current issue, if you use iTunes to import a CD, it invariably has better information (tagging, etc.) for the CD versus any of the other tools. If we could RIP straight to FLAC life would be great. But, instead, we RIP to AIFF, transcode to FLAC losing the tags in the process, and then labor mightily to reenter the tagging information that the AIFF->FLAC tool so carefully threw away.

    My housemate is in the process of RIPP my and his entire collections onto a local RAID array for our squeeze box. This is something on the order of 5,000 CDs. He made good progress through my ~650 pop/rock CDs but the classical CDs are making his life miserable since almost none non-iTunes tools have any information on them and he’s having to enter all of the information by hand. My classical collection is only about 150 CDs. His is considerably larger. (sigh)

    Casey


  4. richard wrote:

    You can use Max to rip straight to FLAC, complete with tag and album art support. Check it out at sbooth.org.


  5. richarde wrote:

    “…Expect native FLAC file format support in XiphQT soon…” Can anyone tell us how this is going? Thanks and keep up the good work!


  6. c0nd3mn3d wrote:

    Boycott: Perhaps you’ve figured it out by now, but it’s “Mac,” not “MAC.”


  7. Ket wrote:

    Using the experimental (dev) downloads from the xiph QT site, there is a FLAC component, that works with the XiphQT component. As long as you drop the encoded FLAC file onto the setOgg application, this imports into iTunes nicely.

    I also play back all my FLAC files directly through iTunes (I must admit I’ve used Cog a bit whilst I’ve been too lazy to get my 10.5 installation setup properly).

    I’ve also written a small applescript that leverages metaflac (You will need to installe vorbis-tools)

    My Workflow:

    • Install Developer Tools (one off)

    • Install MacPorts (one off)

    • Install vorbis-tools, flac (one off)

    •Max -> Encode CD’s to FLAC

    •setOgg -> Set FLAC files to the correct format to be recognised by iTunes (I want to write an app that can use the post processing in MAX to do this automatically, but the way setOgg works, it stays open and requires a manual Quit)

    •Drop FLAC files into iTunes

    •Run Applescript in iTunes to write Track Number, Track Year information to iTunes Metadata.


  8. Ralf wrote:

    “Expect native FLAC file format support in XiphQT soon.” Posted Oct 2007 — your definition of soon, please? Just bugging - really, I appreciate your work and am just wondering if there’s been any progress?


  9. Nabeel wrote:

    Am I the only one who can’t get the component to build without errors?


  10. More-eazy wrote:

    Why bother with the slow FLAC conversion, simply burn a CD with the ID3 tags intact! in toast or whatever program, they all recognize FLAC, that’s the whole point.
    and then import this cd in itunes after that. This is as rapid as any cd import!!
    As easy as things in heaven!!

    More-eazy- Making life more eazy…


  11. More-eazy wrote:

    So drag the flac files to toast audio cd burning
    and there you go. then burn to image or Cd up to you
    this image will contain the aiff files you can simply drag in Itunes


  12. Edu Camargo wrote:

    Well, seems that Sbooth’s applications work as great alternatives for the mac user regarding flac, ain’t it? At least the mac OS does not prevent people from installing software that is capable of doing things that Apple apps don’t. Just for curiosity because I’m futurely migrating to Mac; is “Play” a great software? I hope that yes. Currently I’m using Windows and my jukebox application is Foobar2000. Its decent flac support is a breeze. I have a lot of positive references about “Play” and “Cog”, so I think that these apps will help a lot. But another point from you will help even more.

    Thanks.

    Edu.


  13. bART wrote:

    What’s up with iTunes?
    Break the monopoly!

    Play Flac, Ape, Wv, … files native with Cog: fast reliable player.
    Convert files with Max
    Best of all “import” your cd with XLD: kick es program

    Trying something different is always a refreshment at least!