[Ffmpeg-devel] 4XM audio codec_tag

Måns Rullgård mru
Mon Nov 6 16:12:30 CET 2006


Michael Niedermayer said:
> Hi
>
> On Mon, Nov 06, 2006 at 12:17:20PM +0100, Baptiste Coudurier wrote:
>> Hi
>>
>> Michael Niedermayer wrote:
>> >>> [...]
>> >>> if you wish to prevent the user from doing things (s)he wants to do
>> >>> then you shouldnt write open source software
>> >> That doesn't mean we should make it easier for users to do stupid
>> >> things, like creating files in violation of the standards.  Of course
>> >> we can't completely stop them from doing it, but they should at least
>> >> have to put some effort into it.
>> >
>> > could you point me to the spec which disallows a new codec to be stored in
>> > it? iam not even sure if mpeg-ps/ts do that and if they do, are really all
>> > the things various _different_ standard comittees put in it valid?
>> >
>>
>> Depends on container, but I know for sure that ISO Media and derivates
>> does not support it by defining really constrained specs. (mp4 only
>> allows 'mp4v' and 'avc1' as fourcc and defines codec type in object type
>> id, all values are defined or reserved, same for 3gp, I don't really
>> know for mov, I did not check deeply). I think that overriding a
>> reserved value is non standard and therefore forbidden.
>
> so to summarize, iso mp4 supports mpeg4video and h264, 3gp which is
> not mp4 is copy and pasted from mp4 with the table of alowed codec
> ids edited to support another set of codecs? (no iam not sure, the
> mp4 systems spec is so fragmented over various documents that i simply
> cant make sense of it,i dont even know which documents i should look
> at)

I don't have the mp4 specs either, so I can't comment on that.

> and mpeg-ps ... there is no mpeg-ps spec which lists
> all allowed codecs and how they should be stored or?

Table 2-29 in the 2000-12-01 edition of ISO 13818-1 lists the stream type
values for both MPEG-PS and MPEG-TS.  An amendment adds H.264 to the list.

> its rather that every
> standard comitee hacks mpeg-ps as they see fit to squeeze their codec
> into it (again iam not sure, the draft i have definitly has no hint
> about aac ac3 mpeg4 or anything like that)

The ISO standard specifies values for MPEG1 video, MPEG2 video, MPEG1 audio,
MPEG2 audio, AAC, MPEG4-2 video, H.264 video.

The unused values up to 0x7f are reserved, and might be used in future
amendments.  Values 0x80-0xff are user private, meaning that they are
free to use for anything.  These values would normally be used only where
you have control over both the encoding and decoding ends.  For example,
ATSC has assigned 0x81 for AC3 in MPEG-TS.  In another context this same
value could be used for something entirely different.  This is not a problem,
since you generally know if your source is an ATSC broadcast.

> and last, you can store anything in mpeg-ps by using a private stream
> that is not violating the standard,

This is the approach taken by the DVD consortium.  Their use of private
streams is well documented in the DVD specs.  Unfortunately, they are not
very open with their specs, but that is an unrelated matter.

Both MPEG-PS and -TS can include a registration descriptor.  This descriptor
consists of a 32-bit format_identifier field and up to 251 (255-4) bytes of
arbitrary data.  A format_identifier value may be requested from a registration
authority appointed by ISO.

> and you can do the same with mp4
> and some codecs like ac3 are stored as private stream (a mess worse
> then avi)

As long as that use of the private streams is defined somewhere, and there
is some means of identifying which spec applies to the private stream contents,
I don't see a problem with this.

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




More information about the ffmpeg-devel mailing list