Hello all, Is anyone here potentially up to the task of adding support for CAF (the CoreAudio Format) into the flac command-line? This would present minimal difficulty under OSX, due to the presence of the CoreAudio API, but the real challenge would be to support CAF on Unix and Windows - everywhere that flac is now available. Although the format is rather unknown, there are some very specific advantages to adding CAF support. I have the Sound Devices 702 recorder, which supports FLAC. I've already made some recordings that are so long that they cannot be uncompressed from FLAC to WAV or AIFF because they would exceed 4 GB - the maximum file size for those formats. CAF does not have the same 4 GB limitations. Of course, in instances where there is a natural break in a recording, the flac command-line allows decompression ending at a specific time and/or starting at a specific time - meaning that you can create a 4 GB or smaller WAV/AIFF by only extracting a subset. However, there are inevitably situations where unbroken recordings can be made in FLAC format which are too big to fit into legacy formats. I believe that Apple has documented the CAF details sufficiently for a developer to support the format without direct use of Apple Mac OS X API. I scanned the document once, and it seems reasonably straight- forward. I'd just on this myself, but I don't have time at the moment. While I might eventually be able to get around to it, I though it prudent to suggest the feature to the FLAC Developer community at least in case someone else has time to implement this on a shorter time frame. I'm sure it's something that would be appreciated by the unique community of people who use FLAC and still need the ability to convert to other formats for processing. I guess this would still limit the usability to Logic Studio Pro, at least until more companies begin supporting CAF in their audio software. Brian Willoughby Sound Consulting
On Sun, Oct 12, 2008 at 7:26 PM, Brian Willoughby <brianw at sounds.wa.com> wrote:> Is anyone here potentially up to the task of adding support for CAF > (the CoreAudio Format) into the flac command-line? This would > present minimal difficulty under OSX, due to the presence of the > CoreAudio API, but the real challenge would be to support CAF on Unix > and Windows - everywhere that flac is now available.I expect I could do it as part of my work on Ogg Frog: http://www.oggfrog.com/free-music-software In the short term, I would do it by accessing the QuickTime APIs - which *are* available on Windows, if you install either iTunes or QuickTime for Windows. (The iTunes install includes QuickTime.) In the long term, I could write a codec for it that would be straightforward to integrate into the flac command-line tool. That would allow its use on UNIX. HOWEVER! Is the CoreAudio file format or its associated algorithms patented? QuickTime in general has many patents. A patent wouldn't stop me from writing the source code, but a binary couldn't be provided by anyone in a country that recognizes software patents. Mike -- Michael David Crawford mdcrawford at gmail dot com Enjoy my art, photography, music and writing at http://www.geometricvisions.com/ --- Free Compact Disc ---
Thanks for the interest, Michael. I don't use Ogg, so I'm a little wary that standard FLAC would be left out of any Ogg Frog implementation. But I say that mostly out of ignorance. I have noticed that there seem to be two worlds for FLAC, inside Ogg and outside. It's important to be aware of the fact that many hardware devices support the FLAC format directly, without the Ogg container/wrapper. I would want the ability to convert FLAC to CAF directly, hopefully without an intermediate Ogg file (since I'm talking about file sizes where each is over 4 GB). QuickTime is a very good suggestion, and gets two platforms supported rather than one, as the AudioFile API in CoreAudio would do. However, QuickTime tends to be rather limited, and when developers run into those limitations, Apple engineers tend to recommend that folks turn to CoreAudio for full support. Also, I really would like to support Unix, assuming that there are as many Unix folks using FLAC as there are Windows users taking advantage of this underground format. As for the patent question, it's a very smart question, but I think as soon as any interested developer looks at the CAF specification from Apple, it should be readily apparent what the legal ramifications are. My hunch is that Apple does not want to encumber the format, but I'll let their public documents speak for them. In any event, it's a very good issue to be aware of from the start. Thanks again for the comments, and be sure to keep us informed if you do anything. Brian Willoughby Sound Consulting On Oct 12, 2008, at 21:25, Michael Crawford wrote: On Sun, Oct 12, 2008 at 7:26 PM, Brian Willoughby <brianw at sounds.wa.com> wrote:> Is anyone here potentially up to the task of adding support for CAF > (the CoreAudio Format) into the flac command-line? This would > present minimal difficulty under OSX, due to the presence of the > CoreAudio API, but the real challenge would be to support CAF on Unix > and Windows - everywhere that flac is now available.I expect I could do it as part of my work on Ogg Frog: http://www.oggfrog.com/free-music-software In the short term, I would do it by accessing the QuickTime APIs - which *are* available on Windows, if you install either iTunes or QuickTime for Windows. (The iTunes install includes QuickTime.) In the long term, I could write a codec for it that would be straightforward to integrate into the flac command-line tool. That would allow its use on UNIX. HOWEVER! Is the CoreAudio file format or its associated algorithms patented? QuickTime in general has many patents. A patent wouldn't stop me from writing the source code, but a binary couldn't be provided by anyone in a country that recognizes software patents. Mike
On Sun, 2008-10-12 at 19:26 -0700, Brian Willoughby wrote:> Hello all, > > Is anyone here potentially up to the task of adding support for CAF > (the CoreAudio Format) into the flac command-line? This would > present minimal difficulty under OSX, due to the presence of the > CoreAudio API, but the real challenge would be to support CAF on Unix > and Windows - everywhere that flac is now available. > > Although the format is rather unknown, there are some very specific > advantages to adding CAF support.I am a little suprised that you don't know that CAF is already supported by libsndfile, on every platform where libsndfile works (which includes just about every unix and windows platforms i know of).
Erik de Castro Lopo
2008-Oct-13 06:53 UTC
[Flac-dev] Support for CAF in flac command-line?
Paul Davis wrote:> I am a little suprised that you don't know that CAF is already supported > by libsndfile, on every platform where libsndfile works (which includes > just about every unix and windows platforms i know of).Thanks Paul. Yep, Caf support was added in July 2005. Whats more, the sndfile-convert program can also convert from FLAC to the following file formats that support 63 bit file offsets: Au, Caf, rf64, w64 Cheers, Erik -- ----------------------------------------------------------------- Erik de Castro Lopo ----------------------------------------------------------------- "It has been discovered that C++ provides a remarkable facility for concealing the trival details of a program -- such as where its bugs are." -- David Keppel
new tracker item here: https://sourceforge.net/tracker2/?func=detail&aid=2491177&group_id=13478&atid=363478
On Oct 12, 2008, at 22:32, Paul Davis wrote:> On Sun, 2008-10-12 at 19:26 -0700, Brian Willoughby wrote: >> Is anyone here potentially up to the task of adding support for CAF >> (the CoreAudio Format) into the flac command-line? This would >> present minimal difficulty under OSX, due to the presence of the >> CoreAudio API, but the real challenge would be to support CAF on Unix >> and Windows - everywhere that flac is now available. >> >> Although the format is rather unknown, there are some very specific >> advantages to adding CAF support. > > I am a little suprised that you don't know that CAF is already > supported > by libsndfile, on every platform where libsndfile works (which > includes > just about every unix and windows platforms i know of).I realize that I'm a couple of years late in saying so, but you're right. I finally took the time to download libsndfile and compile it (for Leopard), and sndfile-convert easily handled converting a 1.8 GB FLAC recording (from a Sound Devices 702) to a 2.9 GB CAF file. I haven't done extensive testing for conversion errors, but a quick scan of the file seems to indicate that it plays fine. The true test will be the next time I master a recording of a long performance. I still support enhancements to the flac command line to support direct conversion to one or more formats that do not have a 2 GB limit, but for most audio formats libsndfile might be acceptable. Hopefully, libsndfile no longer uses the incorrect 0x7FFF (32767) factor for float to 16-bit integer conversions, because that would make it unacceptable for lossless file conversions. Brian Willoughby Sound Consulting