[Bug 13359] <track> A way is needed to identify the type of data in a track element

https://www.w3.org/Bugs/Public/show_bug.cgi?id=13359

--- Comment #45 from Bob Lund <b.lund@cablelabs.com> 2012-05-01 23:24:47 UTC ---
(In reply to comment #44)
> Exposing some author-provided machine label for metadata tracks seems
> reasonable, and not too much of a burden on implementors, _if_ we provide it by
> just exposing a single field from each format. You don't need more than one
> field, it just has to be something that the author can control on the
> production side and then read predictably on the consumption side. It has to be
> a field that the author can use to provide arbitrary data.
> 
> For ogg, it seems "name" is the closest match. It's not intended to be
> user-readable, as far as I can tell, and it's freeform.

I think that would do.

> 
> For WebM/Matroska, I can't see an appropriate field, but maybe CodecID is
> sufficient for most use cases.

I think the CodecID looks right.

> 
> I don't know the other formats well enough to comment on those.

The type of metadata can be determined as follows in MPPEG-4 ISO Base Media
File Format and MPEG-2 Single Program Transport Stream.

MPEG-4 File Format:

A timed metadata track is identified by this box in the file:
moov:trak:mdia:hdlr ==  'meta' ([1] section 8.4.3.1). Such a metadata track may
include text or XML formatted data.

A timed metadata track contains text if moov:trak:mdia:minf:stbl:stsd contains
MetaDataSampleEntry('mett'). The type of text data is identified by a MIME
type. In this case let TYPE = 'mp4-mett' and VALUE =
TextMetaDataSampleEntry.mime_format ([1] section 8.5.2.2).

A timed metadata track contains XML if moov:trak:mdia:minf:stbl:stsd contains
MetaDataSampleEntry('metx'). The format of the XML document is identified by
its namespace. In this case let TYPE = 'mp4-metx' and VALUE =
XMLMetaDataSampleEntry.namespace.

Set the HTML5 metadata TextTrack label attribute to "{TYPE : VALUE}". NOTE:
this is a suggested syntax for type/value. If something else is more
appropriate than that would be fine as long as the representation allows script
to distinguish whether the label attribute contains a text MIME type of an XML
name space.

MPEG-2 Single Program Transport Stream

A private data elementary stream in an MPEG-2 SPTS that should be exposed as an
HTML5 TextTrack of kind='metadata' is identified by the MPEG-2 TS elementary
stream type 'stream_type' in the program map table (PMT) of the MPEG-2 media
resource ([2] section 2.4.4.8). A 'stream_type' of 0x05, 0x06, 0x08, 0x09,
0x0E, 0x15-0x1A, 0x7F, 0x82-0x86, 0x88-0xFF indicates such a private data
elementary stream.

Further information about the type of private data in that elementary stream is
identified by one or more descriptors associated with this stream type in the
PMT. These descriptors occupy a ES_info_length number of bytes immediately
following the ES_info_length field in the PMT ([2] 2.4.4.9). Let TYPE =
'mp2t-ST' where ST is a string representation of the 'stream_type' field. Let
VALUE = a string consisting of the Base64 encoded descriptor bytes.

Set the HTML5 metadata TextTrack label attribute to "{TYPE : VALUE}".

[1] ISO/IEC 14496-12 Third Edition 2008-10-15 "ISO base media file format"
[2] ITU-T H.222.0 05/2006 "Information technology – Generic coding of moving
pictures and associated audio information: Systems"

> 
> 
> Note that currently we don't actually define even how "label" is mapped. The
> idea is that there will be format-specific specifications to define the
> mapping. 

Populating the label in the manner we're talking about for TextTrack would be
useful for video and audio as well. HTML5 has enumerated "kind" for certain
types of video, audio and text tracks but this mechanism doesn't allow the
content creator to create a track of a kind that's not in the enumeration and
have it be identifiable by script. Filling in the label as discussed would
address this limitation.


> The only difference here is that it's not at all as clear what the
> mapping should be for this field so I don't trust that user agents would
> implement it interoperably with similar vague hand-waving.

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Received on Tuesday, 1 May 2012 23:24:51 UTC