[FFmpeg-devel] [PATCH] read metadata in FLAC demuxer

Justin Ruggles justinruggles
Tue Oct 2 01:47:01 CEST 2007


Rich Felker wrote:
> On Mon, Oct 01, 2007 at 12:25:56AM -0400, Justin Ruggles wrote:
>> Using mkvinfo, it appears that the metadata blocks are located in 
>> CodecPrivate.
> 
> I suspect this was not intentional, but rather the result of copying a
> flac stream into mkv without any special treatment for the metadata.
> Thus it just got copied as-is along with the real CodecPrivate data
> since they're stuck together in the source file. I doubt this practice
> is encouraged by the Matroska developers and I wouldn't be surprised
> if they discourage demuxers from reading this data, since it's in the
> wrong place.. Someone authoring a proper MKV file should put this info
> in the MKV metadata tags...

I agree.  And FFmpeg's MKV demuxer works with FLAC because it 
automatically copies the CodecPrivate data verbatim into extradata, 
which the decoder can handle.  This can stay exactly how it is.

AVI and NUT are the same way...they just pass the extradata to the 
decoder.  Ogg is the only oddball (as usual).  It has its own layout for 
the metadata blocks (ogg packets and pages and such), but all the actual 
metadata is FLAC format (vorbiscomments, cuesheets, pictures, etc...).

So. I think I have a simple solution now.

I wrote it all out, but then I decided there was too much English and 
not enough C. :)

-Justin




More information about the ffmpeg-devel mailing list