[FFmpeg-devel] [PATCH] attachments support in matroska demuxer

Baptiste Coudurier baptiste.coudurier
Sun Jan 20 17:42:23 CET 2008

M?ns Rullg?rd wrote:
> Baptiste Coudurier <baptiste.coudurier at smartjog.com> writes:
>> Hi
>> Michael Niedermayer wrote:
>>> (not that mpeg-ps/ts and matroska would set codec_tag correctly ...)
>> Yes, mpeg-ps should set codec_tag to startcode.
> There is no logical value to put there for mpeg-ps.  For mpeg-ts, the
> codec ID from the PMT would be a natural, albeit pointless, choice.
> The same value is used in the MPEG-PS PSM when present, but since PSM
> is optional when only MPEG1/2 video and audio is present, there is no
> obvious choice for codec_tag.
> Based on what you say, I have to consider the entire concept of
> codec_tag flawed.  Since the decoder does not in general (and
> certainly should not) know what container the data came in, it cannot
> know how to interpret the value of codec_tag.  Similarly a muxer,
> whether transcoding or copying, does not know the source of the
> codec_tag value, and thus cannot interpret it one way or another.

Well atm decoder is considering extradata presence (and some bits) as a
meaning of bistream formating (h264), dunno if it's really better.

I could decide to use 'f264' as 'stsd' fourcc in mov, and use annex b
bitstream formating or another one without nal escaping for example, tag
would be different from 'avc1', and a way to differentiate formatting,
after all mov is a generic container.

It's IMHO wether only codec_tag is sufficient to identify a formating,
or pair codec_tag/container info is needed.

> I feel sorry for all you people who were raised on AVI files.  I
> really do...

Im not an avi fan either ;)

Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A.                                    http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312

More information about the ffmpeg-devel mailing list