[Flac-dev] Storing FLAC in Matroska

Josh Coalson xflac at yahoo.com
Tue Jul 8 15:03:17 PDT 2003


--- Jory <jcsston at ToughGuy.net> wrote:
> Hello,
>     I'm looking into storing FLAC audio in Matroska and I have a few
> questions.
> 
> 1. Can I use libflac to extract the compressed frames?
> Or will I need to write up a simple file parser?

I'm not sure I understand your question, but one unfortunate
fact about native FLAC is that you cannot discover the frame
boundaries without decoding.  But you can decode a file, and
after each frame get the current stream position from the
decoder, which will tell you where to chop the original stream.
See the source for metaflac for an example, where it uses this
method to add seekpoints to a seektable.

> 2. What is required to decode the frames?
> From the docs I understand that you need the FRAME and you may need
> the
> METADATA_BLOCK.

If it is in the streamable subset, you need only what's in the
frames.  If not, you may need some numbers from the STREAMINFO
metadata block.  Search for 'subset' on
http://flac.sourceforge.net/format.html

Josh


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com




More information about the Flac-dev mailing list