1. Introduction
HTTP Live Streaming (HLS) [HLS] supports the inclusion of timed metadata in ID3 format [ID3] in various container formats, as described in [TM-HLS] .
A large ecosystem has built up around carrying timed ID3 metadata in HLS for applications such as ad delivery & audience measurement. There are many benefits to adopting CMAF for HLS media delivery, but without a specification for carrying ID3 as sparse timed metadata in CMAF, deployment by companies in this ecosystem is blocked.
This specification describes how such ID3 metadata can be carried as timed metadata in a CMAF-compatible fragmented MP4 (fMP4) stream [CMAF] as used by the HLS protocol.
CMAF-compatible fragmented MP4 can also be used in DASH. The elements defined in this specification may also be used with DASH.
The specification also describes how ID3 metadata can be carried in a CMAF-compatible event message track as described in [EMSG-TRACK] .
2. Timed Metadata in a CMAF-compatible stream
2.1. Overview
Timed
Metadata
in
a
CMAF-compatible
stream
is
can
be
signaled
via
one
or
more
Event
Message
boxes
(
emsg
)
[CMAF]
per
segment.
Timed
Metadata
can
also
be
signaled
via
an
Event
Message
Instance
Box
(
emib
)
as
defined
in
[EMSG-TRACK]
.
Event messages with the scheme specified in this document will identify boxes that carry ID3v2 metadata [ID3] .
2.2. ID3 Metadata in an Event Message Box
2.2.1. Introduction
One
or
more
Event
Message
boxes
(
emsg
)
[CMAF]
can
be
included
per
segment.
Version
1
of
the
Event
Message
box
[DASH]
must
be
used.
2.2.2. Syntax
For
convenience,
the
follow
following
box
definition
is
reproduced
from
[DASH]
,
section
5.10.3.3.3.
aligned ( 8 ) class DASHEventMessageBox extends FullBox ( 'emsg ', version , flags = 0 ) { if ( version == 0 ) { string scheme_id_uri ; string value ; unsigned int ( 32 ) timescale ; unsigned int ( 32 ) presentation_time_delta ; unsigned int ( 32 ) event_duration ; unsigned int ( 32 ) id ; } else if ( version == 1 ) { unsigned int ( 32 ) timescale ; unsigned int ( 64 ) presentation_time ; unsigned int ( 32 ) event_duration ; unsigned int ( 32 ) id ; string scheme_id_uri ; string value ; } unsigned int ( 8 ) message_data []; }
2.2.3. Semantics
scheme_id_uri
MUST
be
set
to
https://aomedia.org/emsg/ID3
to
identify
ID3v2
metadata
[ID3]
.
value may either be an absolute or relative user-specified URI which defines the semantics of the id field. Any relative URI is considered to be relative to the scheme_id_uri .
message_data MUST contain complete ID3 version 2.4 data [ID3] .
In
general,
ID3
don’t
carry
a
duration
and
in
those
cases
the
event_duration
field
should
be
set
to
0xFFFFFFFF
.
If
in
a
particular
case,
the
ID3
message
carries
a
duration,
it
should
be
reflected
in
the
event_duration
field.
The presentation_time must be within the time interval of the fragment.
The id field is not restricted in this version of the specification.
2.3. ID3 Metadata in an Event Message Instance Box
2.3.1. Introduction
In
an
event
message
track,
one
or
more
Event
Message
Instance
Boxes
(
emib
)
can
be
included
per
segment.
2.3.2. Syntax
For convenience, the following box definition is reproduced from [EMSG-TRACK] , section 6.1.2.
aligned ( 8 ) class EventMessageInstanceBox extends FullBox ( 'emib ', version , flags = 0 ) { unsigned int ( 32 ) reserved = 0 ; signed int ( 64 ) presentation_time_delta ; unsigned int ( 32 ) event_duration ; unsigned int ( 32 ) id ; string scheme_id_uri ; string value ; unsigned int ( 8 ) message_data []; }
2.3.3. Semantics
The id , scheme_id_uri , value , and message_data semantics are identical to the Event Message Box semantics.
The presentation_time_delta semantics defined in [EMSG-TRACK] remain unchanged.
In
general,
ID3
don’t
carry
a
duration
and
in
those
cases
the
event_duration
field
should
be
set
to
0
.
If
in
a
particular
case,
the
ID3
message
carries
a
duration,
it
should
be
reflected
in
the
event_duration
field.
2.4. Signaling
Files
compliant
to
this
specification
should
signal
it
using
the
brand
aid3
as
part
of
the
list
compatible
brands
in
the
file
type
box.
Manifest
formats
using
files
compliant
to
this
specification
may
signal
these
files
using
the
following
URN:
urn:aomedia:cmaf:id3
.