[Flac-dev] Idea to possibly improve flac?

Richard Ash richard at audacityteam.org
Sun Jan 9 13:37:28 PST 2011


On Fri, 2011-01-07 at 17:11 -0800, Brian Willoughby wrote:
> Ok, despite the fact that I said FLAC should not be changed, I  
> actually agree with you that the command-line could use some  
> improvements and bug fixes.  Every time I see the long filenames  
> issue, I worry that there is a problem, until I remember that this is  
> a known issue and just ignore it.
> 
> One of my goals would be to add support for the Apple CAF format.   
> This would actually serve a very important need. My FLAC recorder can  
> create files that are up to 4 GB compressed, which is literally too  
> large when uncompressed to WAV or AIFF.  Usually, I'm dealing with  
> long recordings of multiple performances, so I can just tell FLAC to  
> grab the first hour, or the last hour, and that's small enough to fit  
> within the 2 GB or 4 GB limit.  In contrast, CAF has no limit on file  
> length, so I could theoretically uncompressed a 4 GB FLAC into a 9 GB  
> CAF without any problem.
> 
> I can't decide whether FLAC-to-CAF (and CAF-to-FLAC) should be  
> developed into a new program based on the FLAC library, perhaps with  
> a GUI, or if it should be incorporated into the standard flac command- 
> line tool.  At the very least, if I ever get this working standalone,  
> I would eventually want to roll the feature into the flac command- 
> line for others to use.
> 
> Anyway, the flac command-line should be improved, even though the  
> file format and library are probably just fine being left alone.

The sndfile-convert utility which comes with libsndfile can almost
certainly be used to do this (either to CAF or RIFF64). It's less than
ideal as an encoder because your control over the FLAC settings is
rather limited, but it should decode fine.

If you want a proper two-way tool that is I think the way I'd do it - by
writing a (command line) converter that links to reference libflac and
to libsndfile for the file I/O (unless you wanted to be Mac-only and
used the system quicktime interfaces for CAF), and can provide whatever
options you want.

Alternatively, it looks like the sf_command interface in libsndfile
could be used to pass through more encoder settings to the FLAC support
in libsndfile (which uses the reference libflac to do the work), which
would make sndfile-convert capable of the job
http://www.mega-nerd.com/libsndfile/command.html

This would probably be a lower effort (certainly less reinvention) way
to do the job.

Richard



More information about the Flac-dev mailing list