[Matroska-devel] FLAC in Matroska

Moritz Bunkus moritz at bunkus.org
Mon Nov 17 00:03:33 CET 2003


I've finished my FLAC-in-Matroska support and updated the Codec specs
page. Gabest and Toff, could you please update your filter accordingly?

The format is pretty straight forward:
- All header packets (INCLUDING the packet containing the word "fLaC")
are put into CodecPrivate. Unlike Vorbis no lacing structure is used.
- Each FLAC frame is put into one Matroska block.
- Data is being sent to the codec in that order as well without any
modification neccessary (first hand over the CodecPrivate data, then the
following block data).
- CodecId is A_FLAC.

We've chosen to INCLUDE the "fLaC" as it is an integral part of the FLAC
bitstream ( = the decoder needs this packet to be present and won't work
otherwise). Also it's only 4 bytes once in CodecPrivate.

jcsston: I noticed two things about the file created with your encoding
filter that are strange:
1) Each block carries a reference block pointing to itself (timestamp of
0s). This is clearly a bug and should be removed; my guess is that it's
easy to do (probably a problem with 'key frames'?).
2) The timecodes look strange - several packets get the same
timecode. The first eight packets or so have 0.000s, the next eight
packets 0.250s, the following eight 0.500s and so on. Is this something
that can be improved?

If 2) can be changed then I don't see the need to use the A_MS/ACM
compatibility mode - you should them aim for A_FLAC. But I don't know
anything about these DShow matters ( = who has to change what...).

Happy end of the weekend.

 ==> Ciao, Mosu (Moritz Bunkus)

More information about the Matroska-devel mailing list