[FFmpeg-devel] [PATCH] MPEG-TS demuxer: Report 4cc in codec_tag field instead of SMTPE RID

Baptiste Coudurier baptiste.coudurier
Mon Aug 31 19:24:05 CEST 2009


On 8/31/2009 10:15 AM, Reimar D?ffinger wrote:
> On Mon, Aug 31, 2009 at 09:18:29AM -0700, Baptiste Coudurier wrote:
>> On 8/31/2009 1:27 AM, Reimar D?ffinger wrote:
>>> On Mon, Aug 31, 2009 at 10:56:18AM +0300, Christian P. Schmidt wrote:
>>>> I know that mpeg-ts streams to not support 4cc tags for the codecs.
>>>> However, the mpeg-ts demuxer currently copies the registration ID into
>>>> the codec's tag field, which in my opinion is worse than leaving the
>>>> field empty.
>>>>
>>>> As an easy workaround the current tables for codec detection could be
>>>> expanded to hold the 4cc codes as used in riff.c and return those in the
>>>> codec_tag field.
>>>>
>>>> There are two codecs that do not have an official 4cc tag, namely
>>>> bluray-pcm and E-AC-3. I'd go with mplayer's definitions for those, BPCM
>>>> and EAC3.
>>> The codec_tag is not really supposed to be a fourcc, if there is no
>>> stream-specific tag that (more or less uniquely) indicates the codec used
>>> in the file it should be 0. Obviously it shouldn't be "random" nonsense
>>> like it seems to be currently either though.
>> Huh, it's not "random" nonsense, it's the registration descriptor if
>> present.
>
> Well, with DVB-T receptions I know I got something else about each try
> (sorry, haven't properly debugged it, nor recorded enough samples).
> And HDMV for LPCM audio _and_ and some video codecs is not exactly a
> "tag that (more or less uniquely) indicates the codec".
> I don't mind much, but I am having some doubts that the thing that
> currently ends up in codec_tag belongs there.

SMPTE (www.smpte-ra.org) disagree with you.

"SMPTE is authorized by the International Organization for 
Standardization (ISO) to register MPEG-2 format identifiers per ISO/IEC 
13818-1:2000 Annex O: Registration procedure [for "format_identifier" ].

The registration descriptor of MPEG-2 transport is provided by ISO 
13818-1 in order to enable users of the standard to unambiguously carry 
data when its format is not necessarily a recognized international 
standard. This provision will permit the MPEG-2 transport standard to 
carry all types of data while providing for a method of unambiguous 
identification of the characteristics of the underlying private data."

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer                                  http://www.ffmpeg.org



More information about the ffmpeg-devel mailing list