通知

仅在 Google Ad Manager 360 中提供。

基于 HTTP 的动态自适应流式传输 (DASH)

直播广告插播时间点编码 (DASH)

请参阅支持的 DASH 功能和集成详情的完整列表。

书签跳转到清单和内容要求 | 打包器、平台和播放器

多时段清单与单时段清单

Ad Manager 支持提取 DASH 的多时段清单和单时段清单。

对于单时段清单,发布商提供的 DASH 视频流只有一个时段,其中包含所有内容和广告插播机会,而不是使用多个时段来区分它们。DAI 会在每次提取时将单时段清单转换为多时段清单,从而支持单时段清单。

在 Google Ad Manager 中设置直播并选择“DASH”作为在线播放格式时,您可以选择是以单时段还是多时段形式提供清单。

Ad Manager 界面中的 DASH 清单类型选择器。

请使用本指南了解对多时段清单单时段清单的预期。此外,如果您使用的是单时段清单,请参阅附录,了解 DAI 如何将单时段清单转换为多时段清单。

Google 的动态广告插播不支持拆分片段。本文仅介绍清单调节相关支持。

清单和内容要求

对于多时段清单

对多时段 MPEG-DASH 清单的预期

Google DAI 对原始 MPD 执行以下验证:

MPD 元素验证

  • Type 设置为 dynamic
  • Profile 设置为 urn:mpeg:dash:profile:isoff-live:2011
  • availabilityStartTime 必须为非零值,并且其值在 MPD 的连续轮询之间不得更改
  • publishTime 必须为非零值,并且其值在连续轮询之间应递增或保持不变。不过,publishTime 属性应设置为每次更新时的当前时间。
  • 对于同一 MPD 中引用的整体 DASH 内容,必须使用 HTTPS

示例

<MPD xmlns="urn:mpeg:dash:schema:mpd:2011"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 DASH-MPD.xsd" type="dynamic"
profiles="urn:mpeg:dash:profile:isoff-live:2011"
availabilityStartTime="2022-01-01T10:00:00Z"
publishTime="2022-01-01T10:00:00Z"
minimumUpdatePeriod="PT25S" timeShiftBufferDepth="PTM0S" maxSegmentDuration="PT2S"
minBufferTime="PT2S">
  <Period …>
    …
  </Period>
  …
</MPD>

Period 元素验证

  • Start 必须大于或等于零

    这样就可以支持 ISO-8601 时长(可以选择添加整数天字段)。例如,P3DT3H1M30S 表示 3 天 3 小时 1 分 30 秒。

    目前不支持 ISO-8601 年、月和周时长指示符。

  • Period 至少有一个 AdaptationSet 元素
  • 寻址方案只能采用基于数字和时间进行寻址的模板

示例

<Period start="PT0S">
  <AdaptationSet …>
    …
  </AdaptationSet>
  <AdaptationSet …>
    …
  </AdaptationSet>
</Period>

在 MPD 的连续轮询之间:

  • Period 元素只能从 MPD 顶部移除
  • Period 元素只能附加到 MPD 的底部
  • 只能更新 MPD 中第一个和最后一个时段。不应修改 MPD 中的任何其他时段。更新只能通过以下方式实现:
    • 从第一个时段的顶部移除片段或事件
    • 在最后一个时段底部添加新的片段或事件

AdaptationSet 元素验证

  • AdaptationSet 至少有一个 Representation 元素
  • 如果存在,AdaptationSet 中的 ContentProtection 元素和子元素在 MPD 的连续轮询之间不得更改

示例

<AdaptationSet mimeType="video/mp4" startWithSAP="1"
contentType="video" par="16:9"
minWidth="640" maxWidth="640" minHeight="360" maxHeight="360"
maxFrameRate="60/2"
segmentAlignment="true">
  <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"></Role>
  <ContentComponent id="0" contentType="video" />
  <Representation …>
    …
  </Representation>
  <Representation …>
    …
  </Representation>
</AdaptationSet>

Representation 元素验证

  • Id 不得为空
  • 不得包含 SegmentBaseSegmentList 元素

示例

<Representation width="640" height="360" sar="1:1" frameRate="60/2"
codecs="avc1.64001e" id="V300" bandwidth="300000">
  …
</Representation>

包含时间的 SegmentTemplate 的验证

  • SegmentTimeline S 元素可以包含用于媒体网址的 t 属性
    • 如果未提供值,则假定第一个 S 元素的值为 0,后续 S 元素的值为前一个 S 元素的最早呈现时间和连续时长的和,即值为前一个 S 元素的 [ t + d × (r + 1) ]。
    • 多时段清单支持 $Time$$Number$
    • 未使用 SegmentTemplateStartNumber
  • 在 MPD 的连续轮询之间:
    • 只有当片段移出 DVR 时间范围快照后,才能将其从 SegmentTimeline 顶部移除
    • 片段只能附加到 SegmentTimeline 的底部

示例

<SegmentTemplate timescale="90000" initialization="$RepresentationID$/init.mp4"
media="$RepresentationID$/$Time$.m4s">
  <SegmentTimeline>
    <S t="0" d="270000" r="20" />
  </SegmentTimeline>
</SegmentTimeline>

时间分量验证

Google DAI 支持 ISO-8601 时长的时间分量部分,并且支持可选的整数“天”分量:P0Y0M[n]DT[n]H[n]M[n]S。系统将 1 天视为 24 小时来将“天”分量转换为时长,然后将其加到时间分量中。纳秒是公认的最低粒度。

有效时间格式示例
  • P0Y0M
  • P0Y0M2D
  • P2D
  • PT3H
  • PT0H3M
  • P0Y0M0DT0H0M1.000S
  • P0Y0M1DT2H4M10S
  • PT0.000000001S
无效时间格式示例
  • P
  • PT
  • 2007-03-01
  • P5Y0M1DT2H4M1.000S
  • P0Y1.5M1DT2H4M1.000S
  • P0YiM1DT2H4M1.000S
  • P0Y0M.3DT0H0M1.000S
  • 3h
  • PT100,000H

对 cue-out 和 cue-in 消息事件的预期

Google DAI 对 cue-out 和 cue-in 消息事件执行以下验证。应根据以下要求预先调节内容:

  • 媒体呈现必须拆分为多个时段,并且每个用于中贴片广告的 CUE-OUTCUE-IN 都必须位于时段边界处。
  • 必须准备好每个时段开头处和末尾处的内容片段,以确保该时段能够涵盖相应片段内的每一帧。
  • 关键帧/IDR 帧应跟在广告插入点之后且必须位于时段开头处。如果广告插入点不在自然的边界处,则可能需要使用时长较短的片段来结束时段。

广告插播时间点信号

  • 与同一个广告插播时间点相关的所有内容都必须包含在一个或多个连续的时段中。这些时段必须只包含要替换的内容片段。
  • 广告插播时间点 CUE-OUT 信号应在 MPD 清单中指示,如以下示例所示:

    示例 1

    • SCTE-35 EventStream 元素
    • SchemeIdUri="urn:scte:scte35:2014:xml+bin"
    • DASH 标准中定义。

    <MPD>

    <Period start="PT0S" id="1">

       <!-- 内容时段 -->

       ...

    </Period>

    <Period start="PT32S" id="2">

        <!-- 广告插播时段 -->

        <!-- 该时段的第一个片段是广告插播时段的开始

        广告插播时段以最后一个片段结束 -->

        <EventStream timescale="90000"

        schemeIdUri="urn:scte:scte35:2014:xml+bin">

         <Event duration="2520000" id="1">

         <!-- 此事件中指定的时长应

         尽可能接近该时段的实际时长 -->

            <Signal xmlns="http://www.scte.org/schemas/35/2016"

             <Binary>

               /DAlAAAAAAAAAP/wFAUAAAAEf+/+kybGyP4BSvaQAAEBAQAArky/3g==

             <Binary>

           </Signal>

          </Event>

        </EventStream> 

    </Period>

    <Period start="PT60S" id="3"> 

       <!-- 内容时段 -->

       ...

       </Period>

    </MPD>

    示例 2

    • SCTE-35 EventStream 元素
    • SchemeIdUri="urn:scte:scte35:2013:xml"
    • DASH 标准中定义。

    <MPD>

    <Period start="PT0S" id="1">

       <!-- 内容时段 -->

       ...

    </Period>

    <Period start="PT32S" id="2">

        <!-- 广告插播时段 -->

        <!-- 该时段的第一个片段是广告插播时段的开始

        广告插播时段以最后一个片段结束 -->

       <EventStream timescale="90000"

       schemeIdUri="urn:scte:scte35:2013:xml">

         <Event duration="2520000" id="1">

         <!-- 此事件中指定的时长应

           尽可能接近该时段的实际时长 -->

           <SpliceInfoSection xmlns="urn:scte:scte35:2013:xml">

              <SpliceInsert outOfNetworkIndicator="true" 

              spliceImmediateFlag="true">

                <BreakDuration autoReturn="true"

                duration="2520000"/>

                </SpliceInsert>

            </SpliceInfoSection>

          </Event>

        </EventStream> 

    </Period>

    <Period start="PT60S" id="3"> 

        <!-- 内容时段 -->

        ...

    </Period>

    </MPD>

  • CUE-OUT 事件中指定的广告插播时长应等于广告插播时段内所有片段的总时长。

支持的广告标记

SCTE35 XML Splice Insert

在 DASH 中,CUE 标记附带 XML Period 元素边界。CUE 标记作为 PeriodEventStream 元素中的 Event 元素提供。这个额外的边界会充分发挥作用来标识该标记。此外,由于广告插播时间点是由 Period 边界标记,因此不需要明确的 CUE-IN 标记。

此示例展示了 DASH 的基于 XML 的 SCTE35 标记。此标记与 SCTE35 Binary Splice Insert 类似,只不过数据被解析并显示为 XML(而非二进制文件)。

示例

<Period>

  <EventStream timescale="90000" schemeIdUri="urn:scte:scte35:2013:xml">

     <Event duration="2520000" id="1">

       <SpliceInfoSection xmlns="urn:scte:scte35:2013:xml">

          <SpliceInsert outOfNetworkIndicator="true" spliceImmediateFlag="true">

          <BreakDuration autoReturn="true" duration="2520000"/>

          </SpliceInsert>

        </SpliceInfoSection>

      </Event>

    </EventStream>

</Period>

SCTE35 XML 时间信号

在 DASH 中,CUE 标记附带 XML Period 元素边界。CUE 标记作为 PeriodEventStream 元素中的 Event 元素提供。这个额外的边界会充分发挥作用来标识该标记。此外,由于广告插播时间点是由 Period 边界标记,因此不需要明确的 CUE-IN 标记。

此示例展示了 DASH 的基于 XML 的 SCTE35 标记。此标记与 SCTE35 二进制时间信号类似,只不过数据被解析并显示为 XML(而非二进制文件)。

示例

<Period>

  <EventStream timescale="90000" schemeIdUri="urn:scte:scte35:2013:xml">

     <Event duration="2520000" id="1">

       <SpliceInfoSection xmlns="urn:scte:scte35:2013:xml">

          <TimeSignal outOfNetworkIndicator="true" spliceImmediateFlag="true">

             <SpliceTime ptsTime="123123"/>

          </TimeSignal>

          <SegmentationDescriptor  segmentationEventId="123123" segmentationEventCancelIndicator="false" segmentationDuration="123123">

             <DeliveryRestrictions webDeliveryAllowedFlag="false" noRegionalBlackoutFlag="true" archiveAllowedFlag="false" deviceRestrictions="3"/>            

             <SegmentationUpid segmentationUpidType="14" segmentationTypeId="52" >11111</SegmentationUpid>

          </SegmentationDescriptor>

        </SpliceInfoSection>

      </Event>

    </EventStream>

</Period>

SegmentationTypeId 指明时间信号的类型。

以下 SegmentationTypeId 值被识别为有效的 CUE-OUT 时间信号:

34:广告插播开始
48:提供商广告开始
52:提供商展示位置机会开始

以下 SegmentationTypeId 值被识别为有效的 CUE-IN 时间信号:

35:广告插播结束
49:提供商广告结束
53:提供商展示位置机会结束

SCTE35 Binary Splice Insert

在 DASH 中,CUE 标记附带 XML Period 元素边界。CUE 标记作为 PeriodEventStream 元素中的 Event 元素提供。这个额外的边界会充分发挥作用来标识该标记。此外,由于广告插播时间点是由 Period 边界标记,因此不需要明确的 CUE-IN 标记。

此示例展示了 DASH 的二进制 SCTE35 标记。

示例

<Period>

    <EventStream schemeIdUri="urn:scte:scte35:2014:xml+bin">

      <Event duration="2520000" id="1">

       <Signal xmlns="http://www.scte.org/schemas/35/2016">

         <Binary>

         /DAlAAAAAAAAAP/wFAUAAAAEf+/+kybGyP4BSvaQAAEBAQAArky/3g==

         </Binary>

       </Signal>

      </Event>

    </EventStream>

 ...

<Period>

SCTE35 二进制时间信号:广告插播时间点开始/结束

必须对 SCTE-35 二进制(采用 base64 编码)数据进行解码和解析,以便确定该数据是否包含有效的 CUE-OUT/CUE-IN 以及所有插播时间点定位信息。

例如,以下二进制数据包含有效的 CUE-OUT 信号:

示例

<Period>

    <EventStream schemeIdUri="urn:scte:scte35:2014:xml+bin">

      <Event duration="2520000" id="1">

       <Signal xmlns="http://www.scte.org/schemas/35/2016">

         <Binary>

           /DAsAAAAAyiYAP/wBQb/PVbrDQAWAhRDVUVJB48zWH//AAEuGvsAACIAAdRJqiI=

         </Binary>

       </Signal>

      </Event>

    </EventStream>

 ...

<Period>

解码后的消息包含以下字段:

  • splice_command_type,此字段的值设为 6,用于指明这是时间信号
  • segmentation_type_id,用于指明时间信号的类型

以下 segmentation_type_id 值被识别为有效的 CUE-OUT 时间信号:

34:广告插播开始

以下 segmentation_type_id 值(当 splice_command_type = 6 时)被识别为有效的 CUE-IN 时间信号:

35:广告插播结束

SCTE35 Binary Time Signal: Provider Ad Start/End

必须对 SCTE-35 二进制(采用 base64 编码)数据进行解码和解析,以便确定该数据是否包含有效的 CUE-OUT/CUE-IN 以及所有插播时间点定位信息。

例如,以下二进制数据包含有效的 CUE-OUT 信号:

示例

<Period>

    <EventStream schemeIdUri="urn:scte:scte35:2014:xml+bin">

      <Event duration="2520000" id="1">

       <Signal xmlns="http://www.scte.org/schemas/35/2016">

         <Binary>

           /DBcAAAAAAAAAP/wBQb//ciI8QBGAh1DVUVJXQk9EX+fAQ5FUDAxODAzODQwMDY2NiEEZAIZQ1VFSV0JPRF/3wABLit7AQVDMTQ2NDABAQEKQ1VFSQCAMTUwKnPhdcU=

         </Binary>

       </Signal>

      </Event>

    </EventStream>

 ...

<Period>

解码后的消息包含以下字段:

  • splice_command_type,此字段的值设为 6,用于指明这是时间信号
  • segmentation_type_id,用于指明时间信号的类型

以下 segmentation_type_id 值被识别为有效的 CUE-OUT 时间信号:

48:提供商广告开始

以下 segmentation_type_id 值(当 splice_command_type = 6 时)被识别为有效的 CUE-IN 时间信号:

49:提供商广告结束

SCTE35 Binary Time Signal: Provider Placement Opportunity

必须对 SCTE-35 二进制(采用 base64 编码)数据进行解码和解析,以便确定该数据是否包含有效的 CUE-OUT/CUE-IN 以及所有插播时间点定位信息。

例如,以下二进制数据包含有效的 CUE-OUT 信号:

示例

<Period>

    <EventStream schemeIdUri="urn:scte:scte35:2014:xml+bin">

      <Event duration="2520000" id="1">

       <Signal xmlns="http://www.scte.org/schemas/35/2016">

         <Binary>

           /DA0AAAAAAAA///wBQb+cr0AUAAeAhxDVUVJSAAAjn/PAAGlmbAICAAAAAAsoKGKNAIAmsnRfg==

         </Binary>

       </Signal>

      </Event>

    </EventStream>

 ...

<Period>

解码后的消息包含以下字段:

  • splice_command_type,此字段的值设为 6,用于指明这是时间信号
  • segmentation_type_id,用于指明时间信号的类型

以下 segmentation_type_id 值被识别为有效的 CUE-OUT 时间信号:

52:提供商广告投放机会开始

以下 segmentation_type_id 值(当 splice_command_type = 6 时)被识别为有效的 CUE-IN 时间信号:

53 : Provider Placement Opportunity End

SCTE-35 标记的宏

如果您的 Feed 包含 EXT-OATCLS-SCTE35EXT-X-DATERANGE 标记,则系统会自动提取元数据并通过自定义键值对提供元数据。您需要设置自定义键值对,并在生成广告代码时将其作为宏插入。

为 SCTE-35 字段设置新的自定义键值时,应使用自定义键(例如“scte35”),并将值设置为与 Feed 中的字段类型对应的宏:

说明
%%SPLICE_INSERT_EVENT_ID%% SCTE35 消息中的无符号整数将作为十进制数字转换为字符串。
%%SPLICE_INSERT_UPID%%
%%TIME_SIGNAL_EVENT_ID%%
%%TIME_SIGNAL_UPID%% 以小写十六进制字母的形式呈现,且没有 0x 前缀。
%%TIME_SIGNAL_UPID_RAW%% 会原样插入 SCTE 消息所含原始字节,而不会进行十六进制转换(初始字符串必须是有效的 UTF-8 编码字符串)
%%AFMM_CBC%% 会从接合信息中提取商业广告插播时间点代码(这是法国 AF2M 规范的一项要求)。
DASH 内容必须遵循 DASH-IF Interoperability Points(DASH-IF 互操作性要点)的“Service Offering Requirements and Guidelines”(服务提供要求与准则)中指定的所有规则。
对于单时段清单

对单时段 MPEG-DASH 清单的预期

Google DAI 对原始 MPD 执行以下验证:

MPD 元素验证

  • Type 设置为 dynamic
  • Profiles 设置为 urn:mpeg:dash:profile:isoff-live:2011
  • AvailabilityStartTime 必须为非零值,并且其值在 MPD 的连续轮询之间不得更改
  • PublishTime 必须为非零值,并且其值在连续轮询之间应递增或保持不变
  • MPD 有且只有一个 Period 元素
  • 对于同一 MPD 中引用的整体 DASH 内容,必须使用 HTTPS

示例

<MPD xmlns="urn:mpeg:dash:schema:mpd:2011"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 DASH-MPD.xsd" type="dynamic"
profiles="urn:mpeg:dash:profile:isoff-live:2011"
availabilityStartTime="2022-01-01T10:00:00Z"
publishTime="2022-01-01T10:00:00Z"
minimumUpdatePeriod="PT25S" timeShiftBufferDepth="PTM0S" maxSegmentDuration="PT2S"
minBufferTime="PT2S">
  <Period …>
    …
  </Period>
  …
</MPD>

Period 元素验证

  • Start 必须大于或等于零
  • Period 至少有一个 AdaptationSet 元素

示例

<Period start="PT0S">
  <AdaptationSet …>
    …
  </AdaptationSet>
  <AdaptationSet …>
    …
  </AdaptationSet>
</Period>

EventStream 元素验证

在 MPD 的连续轮询之间:

  • Event 元素只能从 EventStream 的顶部移除
  • Event 元素只能附加到 EventStream 的底部

AdaptationSet 元素验证

  • AdaptationSet 至少有一个 Representation 元素
  • 如果存在,AdaptationSet 中的 ContentProtection 元素和子元素在 MPD 的连续轮询之间不得更改

示例

<AdaptationSet mimeType="video/mp4" startWithSAP="1"
contentType="video" par="16:9"
minWidth="640" maxWidth="640" minHeight="360" maxHeight="360"
maxFrameRate="60/2"
segmentAlignment="true">
  <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"></Role>
  <ContentComponent id="0" contentType="video" />
  <Representation …>
    …
  </Representation>
  <Representation …>
    …
  </Representation>
</AdaptationSet>

Representation 元素验证

  • Id 不得为空
  • 不得包含 SegmentBaseSegmentList 元素

示例

<Representation width="640" height="360" sar="1:1" frameRate="60/2"
codecs="avc1.64001e" id="V300" bandwidth="300000">
  …
</Representation>

包含 $Time$ 的 SegmentTemplate 的验证

  • SegmentTimeline S 元素可以包含用于媒体网址的 t 属性
    • 如果未提供值,则假定第一个 S 元素的值为 0,后续 S 元素的值为前一个 S 元素的最早呈现时间和连续时长的和,即值为前一个 S 元素的 [ t + d × (r + 1) ]。
    • 单时段清单支持 $Time$;尚不支持 $Number$
    • 未使用 SegmentTemplateStartNumber
  • 在 MPD 的连续轮询之间:
    • 只有当片段移出 DVR 时间范围快照后,才能将其从 SegmentTimeline 顶部移除
    • 片段只能附加到 SegmentTimeline 的底部

示例

<SegmentTemplate timescale="90000" initialization="$RepresentationID$/init.mp4"
media="$RepresentationID$/$Time$.m4s">
  <SegmentTimeline>
    <S t="0" d="270000" r="20" />
  </SegmentTimeline>
</SegmentTimeline>

时间分量验证

Google DAI 支持 ISO-8601 时长的时间分量部分,并且支持可选的整数“天”分量:P0Y0M[n]DT[n]H[n]M[n]S。系统将 1 天视为 24 小时来将“天”分量转换为时长,然后将其加到时间分量中。纳秒是公认的最低粒度。

有效时间格式示例
  • P0Y0M
  • P0Y0M2D
  • P2D
  • PT3H
  • PT0H3M
  • P0Y0M0DT0H0M1.000S
  • P0Y0M1DT2H4M10S
  • PT0.000000001S
无效时间格式示例
  • P
  • PT
  • 2007-03-01
  • P5Y0M1DT2H4M1.000S
  • P0Y1.5M1DT2H4M1.000S
  • P0YiM1DT2H4M1.000S
  • P0Y0M.3DT0H0M1.000S
  • 3h
  • PT100,000H

对输入 SCTE-35 标记的预期

Google DAI 对输入 SCTE-35 标记执行以下验证:

接合点验证

只有当接合点通过以下验证时,Google DAI 才会将这些接合点识别为 DASH MPD Event 元素中携带的 SCTE-35 标记:

  • 采用 Base64 编码的 SCTE-35 数据必须包含在事件 Signal 元素的 Binary 元素中
    • 支持 Splice_insert
    • 支持使用 segmentation_descriptor 命令的 Time_signal
  • 包含带有 SCTE-35 标记的事件的 EventStream 元素必须将 schemeIdUri 设置为 urn:scte:scte35:2014:xml+bin
  • Signal 命名空间必须设置为 http://www.scte.org/schemas/35/2016
  • 对于 cue-out,必须设置 Event 中的 presentationTime
  • 对于 cue-in,必须设置 Event 中的 presentationTime,且不得设置时长
  • EventStream 中的 Event 元素必须按 presentationTime 排序
利用接合点,您可以从一个内容流来源切换到另一个内容流来源。接合点可以是 cue-out(即切换到广告插播时间点的机会),也可以是 cue-in(即从广告插播时间点返回的机会)。

在这种情况下,接合点用于将 Period 拆分为单独的内容,并根据接合点的呈现时间和/或时长拆分 Period 元素。这些接合点由带有 SCTE-35 标记的 Event 元素提供。

splice_insert 验证

  • cue-out 是 out_of_network_indicator 设置为 1splice_insert
  • cue-in 是 out_of_network_indicator 设置为 0splice_insert
  • 当且仅当包含 cue-out 的 Eventsplice_insertduration 设置为非零值时,cue-in 才是可选的
    • Google DAI 会通过 cue-out 的呈现时间 presentationTime + duration 来解读隐式 splice_insert cue-in
    • 明确的 cue-in 事件可在其时长结束之前结束 cue-out。这是触发提前返回的方式。

time_signal 验证

  • cue-out 是带有 segmentation_Descriptorsegmentation_type_id 采用以下值的 time_signal
    • 34 - 广告插播开始
    • 48 - 提供商广告开始
    • 52 - 提供商广告投放机会开始
  • cue-in 是带有 segmentation_descriptorsegmentation_type_id 采用以下值的 time_signal
    • 35 - 广告插播结束
    • 49 - 提供商广告结束
    • 53 - 提供商广告投放机会结束
  • 所有其他 segmentation_type_ids 都不受支持
  • Time_signal 不支持从包含明确 cue-in 的广告插播时间点自动返回

呈现时间验证

Google DAI 不支持拆分片段,因此接合点的呈现时间与最近的片段边界最多只能相差 100 毫秒。

  • 将接合点的呈现时间与 MPDavailabilityStartTime 相关联,方法是将通过 EventStreamtimescale 调整的 EventpresentationTime 加到 Periodstart 上。

    通过将时长与相关联的 cue-out 的呈现时间相加,计算出隐式 cue-in 的呈现时间。接合点的时长通过 Eventduration/EventStreamtimescale 计算得出。

    在这种情况下,SCTE-35 信号中提供的 PTS 时间和时长不会用于计算呈现时间或时长。

  • cue-out 不得与另一 cue-out 或 cue-in 位于同一 Segment 边界处
  • 一个或多个 cue-in 可位于同一 Segment 边界处(例如,提前插播广告与广告插播的实际结束时间同时触发)。系统会有效忽略重复的 cue-in。

Periods、cue-out 和 cue-in 消息事件

在创建单时段清单的多时段呈现时,将在 cue-out 事件开始时和结束时(或 cue-out 和 cue-in 事件开始时)都插入新的 Periods

  • 第一个新 Period 的开始由 cue-out 的呈现时间表示,第二个新 Period 的开始是 cue-out 的 presentationTimeduration 的和,或者是 cue-in 的 presentationTime(如果提供)。
    • 如果为包含 duration 的 cue-out 提供了 cue-in,则系统会使用之前的接合点拆分 Period
  • Google DAI 会忽略 SCTE-35 消息中的 splice_timebreak_durationauto_returnsplice_immediate_flag 字段

在广告插播时段的整个时长内,必须存在表明 cue-out 消息的 Event

这并不意味着 EventStream 中的第一个 Event 始终是 cue-out 消息。如果输入 DVR 时间范围足够长,则该时间范围内可能存在一些属于先前广告插播的事件。

cue-out 消息由下一条插入 cue-in 消息结束。

  • SCTE-35 接合 ID(splice_event_idsegmentation_event_id)以及事件的 id 属性会被忽略
  • 如果未设置 auto_return,则 splice_insert cue-out 消息只能由 splice_insert cue-in 消息结束
  • time_signal cue-out 消息只能由具有相同 segmentation_type_idtime_signal cue-in 消息结束
在其时长结束前紧跟另一 cue-out 消息的 cue-out 消息将关闭初始广告插播,然后开始另一个广告插播(即产生一个新的 Period)。

示例

<EventStream schemeIdUri="urn:scte:scte35:2014:xml+bin" timescale="600" presentationTimeOffset="991724821200">

  <Event presentationTime="992568282204" duration="18073" id="1615447966">

    <Signal xmlns="http://www.scte.org/schemas/35/2016">

      <Binary>/DAbAAAAAAAAAP/wCgUAAAAAf98AAAAAAAAHeq0Q</Binary>

    </Signal>

  </Event>

  <Event presentationTime="992568300277" id="1085695472">

    <Signal xmlns="http://www.scte.org/schemas/35/2016">

      <Binary>/DAbAAAAAAAAAP/wCgUAAAAAf18AAAAAAAAqqkN1</Binary>

    </Signal>

  </Event>

</EventStream>

支持的平台、打包器和播放器

平台

设备/浏览器

版本

DRM

Chrome 浏览器

66+

Widevine

Firefox 浏览器

60+

Widevine

Microsoft Edge

18

PlayReady

Android

4.4+

Widevine

Chromecast

第 2 代、Ultra (CAF API)

Widevine

Roku

3、4(固件 8.1)

PlayReady

 

打包器

Shaka

2.1.0

多时段支持

Bitmovin

1.47.3

多时段支持

统一流式传输

1.11.17 单时段支持
 

播放器

Shaka

2.4.2

推荐用于测试

Bitmovin

v7

 

Exo-Player

2.8.2

 

Dash.js

2.0

 

附录

如果您使用的是单时段清单,这些示例演示了 DAI 如何将单时段清单转换为多时段清单。

单时段清单输入示例

<?xml version="1.0" encoding="UTF-8"?>

<MPD availabilityStartTime="2017-01-01T10:00:00Z" id="id1" maxSegmentDuration="PT2S" minBufferTime="PT2S" minimumUpdatePeriod="PT25S" profiles="urn:mpeg:dash:profile:isoff-live:2011" publishTime="2017-01-01T10:00:00Z" timeShiftBufferDepth="PT5M" type="dynamic" ns1:schemaLocation="urn:mpeg:dash:schema:mpd:2011 DASH-MPD.xsd" xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:ns1="http://www.w3.org/2001/XMLSchema-instance">

  <BaseURL>http://example.com/dash/</BaseURL>

  <Period id="1" start="PT0S">

    <EventStream timescale="90000" schemeIdUri="urn:scte:scte35:2014:xml+bin">

      <Event duration="2700000" presentationTime="270000" id="1">

        <Signal xmlns="http://www.scte.org/schemas/35/2016">

          <Binary>/DAlAAAAAAAAAP/wFAUAAA+if+/+INAJ0P4AKTLgAAAAAAAA9UTkTA==</Binary>

        </Signal>

      </Event>

      <Event presentationTime="2970000" id="2">

        <Signal xmlns="http://www.scte.org/schemas/35/2016">

          <Binary>/DAgAAAAAAAAAP/wDwUAAA+if0/+IPk8sAAAAAAAAH3XbUE=</Binary>

        </Signal>

      </Event>

    </EventStream>

    <AdaptationSet contentType="audio" lang="eng" mimeType="audio/mp4" segmentAlignment="true" startWithSAP="1">

      <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main" />

      <SegmentTemplate timescale="44100" initialization="$RepresentationID$/init.mp4" media="$RepresentationID$/$Number$.m4s">

        <SegmentTimeline>

          <S t="0" d="132300" r="20" />

        </SegmentTimeline>

      </SegmentTemplate>

      <Representation audioSamplingRate="48000" bandwidth="48000" codecs="mp4a.40.2" id="A48">

        <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2" />

      </Representation>

    </AdaptationSet>

    <AdaptationSet contentType="video" maxFrameRate="60/2" maxHeight="360" maxWidth="640" mimeType="video/mp4" minHeight="360" minWidth="640" par="16:9" segmentAlignment="true" startWithSAP="1">

      <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main" />

      <SegmentTemplate timescale="90000" initialization="$RepresentationID$/init.mp4" media="$RepresentationID$/$Number$.m4s">

        <SegmentTimeline>

          <S t="0" d="270000" r="20" />

        </SegmentTimeline>

      </SegmentTemplate>

      <Representation bandwidth="300000" codecs="avc1.64001e" frameRate="60/2" height="360" id="V300" sar="1:1" width="640" />

    </AdaptationSet>

  </Period>

</MPD>

多时段清单输出示例

<?xml version="1.0" encoding="UTF-8"?>

<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:XMLSchema-instance="http://www.w3.org/2001/XMLSchema-instance" XMLSchema-instance:schemaLocation="urn:mpeg:dash:schema:mpd:2011 DASH-MPD.xsd" id="id1" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="dynamic" availabilityStartTime="2017-01-01T10:00:00Z" publishTime="2017-01-01T10:00:00Z" minimumUpdatePeriod="PT25S" minBufferTime="PT2S" timeShiftBufferDepth="PT5M0S" maxSegmentDuration="PT2S">

  <BaseURL>http://example.com/dash/</BaseURL>

  <Period id="0s" start="PT0S">

    <AdaptationSet mimeType="audio/mp4" startWithSAP="1" lang="eng" contentType="audio" segmentAlignment="true">

      <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"></Role>

      <SegmentTemplate timescale="44100" presentationTimeOffset="0" media="$RepresentationID$/$Number$.m4s" initialization="$RepresentationID$/init.mp4">

        <SegmentTimeline>

          <S d="132300"></S>

        </SegmentTimeline>

      </SegmentTemplate>

      <Representation audioSamplingRate="48000" codecs="mp4a.40.2" id="A48" bandwidth="48000">

        <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"></AudioChannelConfiguration>

      </Representation>

    </AdaptationSet>

    <AdaptationSet mimeType="video/mp4" startWithSAP="1" contentType="video" par="16:9" minWidth="640" maxWidth="640" minHeight="360" maxHeight="360" maxFrameRate="60/2" segmentAlignment="true">

      <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"></Role>

      <SegmentTemplate timescale="90000" presentationTimeOffset="0" media="$RepresentationID$/$Number$.m4s" initialization="$RepresentationID$/init.mp4">

        <SegmentTimeline>

          <S d="270000"></S>

        </SegmentTimeline>

      </SegmentTemplate>

      <Representation width="640" height="360" sar="1:1" frameRate="60/2" codecs="avc1.64001e" id="V300" bandwidth="300000"></Representation>

    </AdaptationSet>

  </Period>

  <Period id="3s" start="PT3S">

    <EventStream schemeIdUri="urn:scte:scte35:2014:xml+bin" timescale="90000">

      <Event duration="2700000" id="1">

        <Signal xmlns="http://www.scte.org/schemas/35/2016">

          <Binary>/DAlAAAAAAAAAP/wFAUAAA+if+/+INAJ0P4AKTLgAAAAAAAA9UTkTA==</Binary>

        </Signal>

      </Event>

    </EventStream>

    <AdaptationSet mimeType="audio/mp4" startWithSAP="1" lang="eng" contentType="audio" segmentAlignment="true">

      <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"></Role>

      <SegmentTemplate timescale="44100" presentationTimeOffset="132300" media="$RepresentationID$/$Number$.m4s" initialization="$RepresentationID$/init.mp4">

        <SegmentTimeline>

          <S t="132300" d="132300" r="9"></S>

        </SegmentTimeline>

      </SegmentTemplate>

      <Representation audioSamplingRate="48000" codecs="mp4a.40.2" id="A48" bandwidth="48000">

        <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"></AudioChannelConfiguration>

      </Representation>

    </AdaptationSet>

    <AdaptationSet mimeType="video/mp4" startWithSAP="1" contentType="video" par="16:9" minWidth="640" maxWidth="640" minHeight="360" maxHeight="360" maxFrameRate="60/2" segmentAlignment="true">

      <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"></Role>

      <SegmentTemplate timescale="90000" presentationTimeOffset="270000" media="$RepresentationID$/$Number$.m4s" initialization="$RepresentationID$/init.mp4">

        <SegmentTimeline>

          <S t="270000" d="270000" r="9"></S>

        </SegmentTimeline>

      </SegmentTemplate>

      <Representation width="640" height="360" sar="1:1" frameRate="60/2" codecs="avc1.64001e" id="V300" bandwidth="300000"></Representation>

    </AdaptationSet>

  </Period>

  <Period id="33s" start="PT33S">

    <EventStream schemeIdUri="urn:scte:scte35:2014:xml+bin" timescale="90000">

      <Event id="2">

        <Signal xmlns="http://www.scte.org/schemas/35/2016">

          <Binary>/DAgAAAAAAAAAP/wDwUAAA+if0/+IPk8sAAAAAAAAH3XbUE=</Binary>

        </Signal>

      </Event>

    </EventStream>

    <AdaptationSet mimeType="audio/mp4" startWithSAP="1" lang="eng" contentType="audio" segmentAlignment="true">

      <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"></Role>

      <SegmentTemplate timescale="44100" presentationTimeOffset="1455300" media="$RepresentationID$/$Number$.m4s" initialization="$RepresentationID$/init.mp4">

        <SegmentTimeline>

          <S t="1455300" d="132300" r="9"></S>

        </SegmentTimeline>

      </SegmentTemplate>

      <Representation audioSamplingRate="48000" codecs="mp4a.40.2" id="A48" bandwidth="48000">

        <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"></AudioChannelConfiguration>

      </Representation>

    </AdaptationSet>

    <AdaptationSet mimeType="video/mp4" startWithSAP="1" contentType="video" par="16:9" minWidth="640" maxWidth="640" minHeight="360" maxHeight="360" maxFrameRate="60/2" segmentAlignment="true">

      <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"></Role>

      <SegmentTemplate timescale="90000" presentationTimeOffset="2970000" media="$RepresentationID$/$Number$.m4s" initialization="$RepresentationID$/init.mp4">

        <SegmentTimeline>

          <S t="2970000" d="270000" r="9"></S>

        </SegmentTimeline>

      </SegmentTemplate>

      <Representation width="640" height="360" sar="1:1" frameRate="60/2" codecs="avc1.64001e" id="V300" bandwidth="300000"></Representation>

    </AdaptationSet>

  </Period>

</MPD>

对于与 DAI 问题排查或服务中断相关的任何问题,请与发布商支持团队联系

该内容对您有帮助吗?

您有什么改进建议?
true
动态广告插播 (DAI) 入门指南

我们专为跨直播、线性和点播视频内容打造无缝广告体验而制作的指南。
查看该指南

搜索
清除搜索内容
关闭搜索框
主菜单
10740716677997717957
true
搜索支持中心
true
true
true
true
true
148
false
false