[Ffmpeg-devel] 4XM audio codec_tag

Måns Rullgård mru
Mon Nov 6 03:55:14 CET 2006


Diego Biurrun <diego at biurrun.de> writes:

> On Mon, Nov 06, 2006 at 02:38:38AM +0100, Michael Niedermayer wrote:
>> 
>> On Sun, Nov 05, 2006 at 11:48:08PM +0000, M?ns Rullg?rd wrote:
>> > Michael Niedermayer <michaelni at gmx.at> writes:
>> > >
>> > > i have no problem with one table per format, what i have a problem with
>> > > is that libav* would fail decoding a file if no match is found and that
>> > > it would leave the codec tag decission to the end user and not suggest
>> > > a default one if theres none in the one table for the target format
>> > >
>> > > if OTOH there is one table per format and a default fallback table then
>> > > thats something different with which iam fine
>> > 
>> > A "fallback table" doesn't make any sense at all.  None.  Zero.  Nil.
>> > Either a format supports some particular codec, in which case its ID
>> > table will have an entry for that codec, or the codec is not
>> > supported, in which case failure is the only sensible option.
>> > "Suggesting" to use a tag from some other random format instead is
>> > utterly senseless.  Such behavior is what created the AVI mess in the
>> > first place.
>> 
>> avi is a generic container its supposed to be possible to store anything
>> in it (with a few exceptions)
>> the same is the case for mov, matroska and nut
>> there is nothing messy with that
>
> I was just going to ask that..
>
> So please remind me: What is the problem with storing arbitrary
> audio and video formats in multimedia containers, especially generic
> ones?

The format needs to be able to store global headers (aka extradata),
and it needs some way of identifying the codec.  The extradata part is
easy: either there is a place for it or there isn't.  If the format
can't accommodate an extradata chunk, codecs that need it can't be
used.  To identify the codec, format specifications typically include
a list of tag/codec pairs.  Any codec in this list can be stored using
the format in question.  If the codec is not in the list, it is of
course possible to invent a tag.  The problem with this approach is
that nobody else will know what this tag means, and thus nobody else
will be able to play the file.  Is this really so difficult to
understand?

-- 
M?ns Rullg?rd
mru at inprovide.com




More information about the ffmpeg-devel mailing list