实时传送视频流中的超时元数据信号Signaling Timed Metadata in Live Streaming

上次更新时间:2019-08-22Last Updated: 2019-08-22

一致表示法Conformance Notation

本文档中的关键字“必须”、“不得”、“需要”、“应”、“不应”、“应该”、“不能”、“建议”、“可以”和“可选”根据 RFC 2119 中所述予以解释The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119

1.简介1. Introduction

为了表示客户端播放器上的广告插入或自定义元数据事件,广播装置通常使用视频中嵌入的计时元数据。In order to signal the insertion of advertisements or custom metadata events on a client player, broadcasters often make use of timed metadata embedded within the video. 为实现这些方案,媒体服务将提供对计时元数据以及从实时传送视频流频道的引入点到客户端应用程序的传输支持。To enable these scenarios, Media Services provides support for the transport of timed metadata from the ingest point of the live streaming channel to the client application. 本规范针对实时传送视频流信号中的计时元数据概述了媒体服务支持的多种模式:This specification outlines several modes that are supported by Media Services for timed metadata within live streaming signals.

  1. 符合 [SCTE-35]、[SCTE-214-1]、[SCTE-214-3] 和 [RFC8216] 所述标准的 [SCTE-35] 信号[SCTE-35] signaling that complies with the standards outlined by [SCTE-35], [SCTE-214-1], [SCTE-214-3] and [RFC8216]

  2. 符合 RTMP 广告信号旧版 [Adobe-Primetime] 规范的 [SCTE-35] 信号。[SCTE-35] signaling that complies with the legacy [Adobe-Primetime] specification for RTMP ad signaling.

  3. 适用于 [SCTE-35] 且可以携带 [ID3v2] 或应用程序开发人员定义的其他自定义架构的泛型计时元数据信号模式。A generic timed metadata signaling mode, for messages that are NOT [SCTE-35] and could carry [ID3v2] or other custom schemas defined by the application developer.

1.1 所用术语1.1 Terms Used

术语Term 定义Definition
广告中断Ad Break 可以安排交付一个或多个广告的位置或时间点;与收益和放置机会相同。A location or point in time where one or more ads may be scheduled for delivery; same as avail and placement opportunity.
广告决策服务Ad Decision Service 确定要向用户显示哪些广告及其持续时间的外部服务。external service that decides which ad(s) and durations will be shown to the user. 该服务通常由合作伙伴提供,不在本文档的介绍范围内。The services is typically provided by a partner and are out of scope for this document.
提示Cue 指示即将发生的广告中断的时间和参数。Indication of time and parameters of the upcoming ad break. 请注意,提示可以指示广告中断的等待开关、广告中断中下一广告的等待开关,以及从广告中断到主要内容的等待开关。Note that cues can indicate a pending switch to an ad break, pending switch to the next ad within an ad break, and pending switch from an ad break to the main content.
打包器Packager Azure 媒体服务“流式处理终结点”提供适用于 DASH 和 HLS 的动态打包功能,在媒体行业称为“打包器”。The Azure Media Services "Streaming Endpoint" provides dynamic packaging capabilities for DASH and HLS and is referred to as a "Packager" in the media industry.
呈现时间Presentation Time 事件呈现给查看者的时间。The time that an event is presented to a viewer. 该时间表示媒体时间线上查看者可以看到事件的那一刻。The time represents the moment on the media timeline that a viewer would see the event. 例如,SCTE-35 splice_info() 命令消息的呈现时间为 splice_time()。For example, the presentation time of a SCTE-35 splice_info() command message is the splice_time().
到达时间Arrival Time 事件消息到达的时间。The time that an event message arrives. 该时间通常不同于事件的呈现时间,因为事件消息在事件的呈现时间之前发送。The time is typically distinct from the presentation time of the event, since event messages are sent ahead of the presentation time of the event.
稀疏轨道Sparse track 不连续的媒体轨迹,时间与父级或控件轨迹的时间同步。media track that is not continuous, and is time synchronized with a parent or control track.
Origin Azure 媒体流式处理服务The Azure Media Streaming Service
信道接收器Channel Sink Azure 媒体实时传送视频流服务The Azure Media Live Streaming Service
HLSHLS Apple HTTP Live Streaming 协议Apple HTTP Live Streaming protocol
DASHDASH 通过 HTTP 的动态自适应流式处理Dynamic Adaptive Streaming Over HTTP
平滑Smooth 平滑流式处理协议Smooth Streaming Protocol
MPEG2-TSMPEG2-TS MPEG 2 传输流MPEG 2 Transport Streams
RTMPRTMP 实时多媒体协议Real-Time Multimedia Protocol
uimsbfuimsbf 无符号整数,最高有效位优先。Unsigned integer, most significant bit first.

1.2 规范参考1.2 Normative References

以下文档包含本文中参考的条款,构成了本文档的条款。The following documents contain provisions, which, through reference in this text, constitute provisions of this document. 标准主体随时可修订所有文档,我们建议读者调查应用下面所列最新版本文档的可能性。All documents are subject to revision by the standards bodies, and readers are encouraged to investigate the possibility of applying the most recent editions of the documents listed below. 另外提醒读者,新版参考文档可能与 Azure 媒体服务的此计时元数据规范版本不兼容。Readers are also reminded that newer editions of the referenced documents might not be compatible with this version of the timed metadata specification for Azure Media Services.

标准Standard 定义Definition
[Adobe-Primetime][Adobe-Primetime] Primetime 数字节目插入信号规范 1.2Primetime Digital Program Insertion Signaling Specification 1.2
[Adobe-Flash-AS][Adobe-Flash-AS] FLASH ActionScript 语言参考FLASH ActionScript Language Reference
[AMF0][AMF0] “操作消息格式 AMF0”"Action Message Format AMF0"
[DASH-IF-IOP][DASH-IF-IOP] DASH 行业论坛互操作指南 v4.2 https://dashif-documents.azurewebsites.net/DASH-IF-IOP/master/DASH-IF-IOP.htmlDASH Industry Forum Interop Guidance v 4.2 https://dashif-documents.azurewebsites.net/DASH-IF-IOP/master/DASH-IF-IOP.html
[HLS-TMD][HLS-TMD] HTTP Live Streaming 的计时元数据 - https://developer.apple.com/streamingTimed Metadata for HTTP Live Streaming - https://developer.apple.com/streaming
[CMAF-ID3][CMAF-ID3] 常用媒体应用程序格式 (CMAF) 中的计时元数据Timed Metadata in the Common Media Application Format (CMAF)
[ID3v2][ID3v2] ID3 标记版本 2.4.0 http://id3.org/id3v2.4.0-structureID3 Tag version 2.4.0 http://id3.org/id3v2.4.0-structure
[ISO-14496-12][ISO-14496-12] ISO/IEC 14496-12:第 12 部分:ISO 基础媒体文件格式,2012-07-15 第 4 版ISO/IEC 14496-12: Part 12 ISO base media file format, FourthEdition 2012-07-15
[MPEGDASH][MPEGDASH] 信息技术 - 通过 HTTP 的动态自适应流式处理 (DASH) - 第 1 部分:媒体展现说明和分段格式。Information technology -- Dynamic adaptive streaming over HTTP (DASH) -- Part 1: Media presentation description and segment formats. 2014 年 5 月。May 2014. 已发布。Published. URL: https://www.iso.org/standard/65274.htmlURL: https://www.iso.org/standard/65274.html
[MPEGCMAF][MPEGCMAF] 信息技术 - 多媒体应用程序格式 (MPEG-A) -- 第 19 部分:分段媒体的常用媒体应用程序格式 (CMAF)。Information technology -- Multimedia application format (MPEG-A) -- Part 19: Common media application format (CMAF) for segmented media. 2018 年 1 月。January 2018. 已发布。Published. URL: https://www.iso.org/standard/71975.htmlURL: https://www.iso.org/standard/71975.html
[MPEGCENC][MPEGCENC] 信息技术 -- MPEG 系统技术 -- 第 7 部分:ISO 基本媒体格式文件中的通用加密。Information technology -- MPEG systems technologies -- Part 7: Common encryption in ISO base media file format files. 2016 年 2 月。February 2016. 已发布。Published. URL: https://www.iso.org/standard/68042.htmlURL: https://www.iso.org/standard/68042.html
[MS-SSTR][MS-SSTR] “Microsoft 平滑流式处理协议”,2014 年 5 月 15 日"Microsoft Smooth Streaming Protocol", May 15, 2014
[MS-SSTR-Ingest][MS-SSTR-Ingest] Azure 媒体服务分片 MP4 实时引入规范Azure Media Services Fragmented MP4 Live Ingest Specification
[RFC8216][RFC8216] R.R. Pantos, Ed.; W. May.Pantos, Ed.; W. May. HTTP Live Streaming。HTTP Live Streaming. 2017 年 8 月。August 2017. 信息。Informational. https://tools.ietf.org/html/rfc8216
[RFC4648][RFC4648] Base16、Base32 和 Base64 数据编码 - https://tools.ietf.org/html/rfc4648The Base16, Base32, and Base64 Data Encodings - https://tools.ietf.org/html/rfc4648
[RTMP][RTMP] “Adobe 实时消息传送协议”,2012 年 12 月 21 日"Adobe's Real-Time Messaging Protocol", December 21, 2012
[SCTE-35-2019][SCTE-35-2019] SCTE 35:2019 - 有线电视数字节目插入提示消息 - https://www.scte.org/SCTEDocs/Standards/ANSI_SCTE%2035%202019r1.pdfSCTE 35: 2019 - Digital Program Insertion Cueing Message for Cable - https://www.scte.org/SCTEDocs/Standards/ANSI_SCTE%2035%202019r1.pdf
[SCTE-214-1][SCTE-214-1] SCTE 214-1 2016 – 基于 IP 的有线电视服务的 MPEG DASH 第 1 部分:MPD 约束和扩展SCTE 214-1 2016 – MPEG DASH for IP-Based Cable Services Part 1: MPD Constraints and Extensions
[SCTE-214-3][SCTE-214-3] SCTE 214-3 2015 – 基于 IP 的有线电视服务的 MPEG DASH 第 3 部分:DASH/FF 配置文件SCTE 214-3 2015 MPEG DASH for IP-Based Cable Services Part 3: DASH/FF Profile
[SCTE-224][SCTE-224] SCTE 224 2018r1 – 事件计划和通知接口SCTE 224 2018r1 – Event Scheduling and Notification Interface
[SCTE-250][SCTE-250] 事件和信号管理 API (ESAM)Event and Signaling Management API (ESAM)

2.计时元数据引入2. Timed Metadata Ingest

Azure 媒体服务支持 [RTMP] 和平滑流式处理 [MS-SSTR-Ingest] 协议的实时带内元数据。Azure Media Services supports real-time in-band metadata for both [RTMP] and Smooth Streaming [MS-SSTR-Ingest] protocols. 可以结合自己独特的自定义架构(JSON、二进制、XML)和行业定义的格式(例如 ID3,或广播流中广告信号的 SCTE-35)使用实时元数据来自定义事件。Real-time metadata can be used to define custom events, with your own unique custom schemas (JSON, Binary, XML), as well as industry defined formats like ID3, or SCTE-35 for ad signaling in a broadcast stream.

本文提供有关如何使用 Azure 媒体服务支持的引入协议发送自定义计时元数据信号的详细信息。This article provides the details for how to send custom timed metadata signals using the supported ingest protocols of Azure Media Services. 本文还介绍了如何使用计时元数据信号修饰 HLS、DASH 和平滑流的清单,以及如何在使用 CMAF(MP4 片段)或 HLS 的传输流 (TS) 段传输内容时在带内承载计时元数据。The article also explains how the manifests for HLS, DASH, and Smooth Streaming are decorated with the timed metadata signals, as well as how it is carried in-band when the content is delivered using CMAF (MP4 fragments) or Transport Stream (TS) segments for HLS.

计时元数据的常见用例方案包括:Common use case scenarios for timed metadata include:

  • 用于在直播活动或线性广播中触发广告中断的 SCTE-35 广告信号SCTE-35 ad signals to trigger ad breaks in a live event or linear broadcast
  • 可在客户端应用程序(浏览器、iOS 或 Android)中触发事件的自定义 ID3 元数据Custom ID3 metadata that can trigger events at a client application (browser, iOS, or Android)
  • 用于在客户端应用程序中触发事件的自定义 JSON、二进制或 XML 元数据Custom defined JSON, Binary, or XML metadata to trigger events at a client application
  • 来自实时编码器、IP 摄像头或无人机的遥测数据Telemetry from a live encoder, IP Camera or Drone
  • 来自运动、人脸检测等 IP 摄像头的事件Events from an IP Camera like Motion, face detection, etc.
  • 来自动作摄像头、无人机或运动设备的地理位置信息Geographic position information from an action camera, drone, or moving device
  • 歌词Song lyrics
  • 线性实时源中的节目边界Program boundaries on a linear live feed
  • 要在实时源中显示的图像或扩充元数据Images or augmented metadata to be displayed on a live feed
  • 赛事比分或比赛计时信息Sports scores or game-clock information
  • 要连同浏览器中的视频一起显示的交互式广告包Interactive advertising packages to be displayed alongside the video in the browser
  • 知识竞赛或投票Quizzes or polls

Azure 媒体服务实时事件和打包器可以接收这些计时元数据信号,并将其转换成可通过基于标准的协议(例如 HLS 和 DASH)抵达客户端应用程序的元数据流。Azure Media Services Live Events and Packager are capable of receiving these timed metadata signals and converting them into a stream of metadata that can reach client applications using standards-based protocols like HLS and DASH.

2.1 RTMP 计时元数据2.1 RTMP Timed Metadata

[RTMP] 协议允许在各种方案(包括自定义元数据和 SCTE-35 广告信号)中发送计时元数据信号。The [RTMP] protocol allows for timed metadata signals to be sent for various scenarios including custom metadata, and SCTE-35 ad signals.

广告信号(提示消息)以嵌入在 [RTMP] 流中的 [AMF0] 提示消息的形式发送。Advertising signals (cue messages) are sent as [AMF0] cue messages embedded within the [RTMP] stream. 提示消息可能会在实际事件前的一段时间发送,否则需要发生 [SCTE35] 广告接合信号。The cue messages may be sent sometime before the actual event or [SCTE35] ad splice signal needs to occur. 为支持此方案,将在提示消息内发送事件的实际呈现时间戳。To support this scenario, the actual presentation timestamp of the event is sent within the cue message. 有关详细信息,请参见 [AMF0]。For more information, see [AMF0].

用于引入 RTMP 的 Azure 媒体服务支持以下 [AMF0] 命令:The following [AMF0] commands are supported by Azure Media Services for RTMP ingest:

  • onUserDataEvent - 用于自定义元数据或 [ID3v2] 计时元数据onUserDataEvent - used for custom metadata or [ID3v2] timed metadata
  • onAdCue - 主要用于在实时流中发出广告定位机会的信号。onAdCue - used primarily for signaling an advertisement placement opportunity in the live stream. 支持两种形式的提示:简单模式和“SCTE-35”模式。Two forms of the cue are supported, a simple mode and a "SCTE-35" mode.
  • onCuePoint - 受某些本地硬件编码器(例如 Elemental 实时编码器)的支持,用于发出 [SCTE35] 消息信号。onCuePoint - supported by certain on-premises hardware encoders, like the Elemental Live encoder, to signal [SCTE35] messages.

下表介绍媒体服务将为“简单”和 [SCTE35] 消息模式引入的 AMF 消息有效负载的格式。The following table describes the format of the AMF message payload that Media Services will ingest for both "simple" and [SCTE35] message modes.

可以使用 [AMF0] 消息的名称来区分相同类型的多个事件流。The name of the [AMF0] message can be used to differentiate multiple event streams of the same type. 对于 [SCTE-35] 消息和“简单”模式,AMF 消息的名称在 [Adobe-Primetime] 规范中必须是“onAdCue”。For both [SCTE-35] messages and "simple" mode, the name of the AMF message MUST be "onAdCue" as required in the [Adobe-Primetime] specification. 下面未列出的任何字段在引入时应由 Azure 媒体服务忽略。Any fields not listed below SHALL be ignored by Azure Media Services at ingest.

2.1.1 使用“onUserDataEvent”和 RTMP 提供自定义元数据2.1.1 RTMP with custom metadata using "onUserDataEvent"

若要使用 RTMP 协议从上游编码器、IP 摄像头、无人机或设备提供自定义元数据源,请使用“onUserDataEvent”[AMF0] 数据消息命令类型。If you want to provide custom metadata feeds from your upstream encoder, IP Camera, Drone, or device using the RTMP protocol, use the "onUserDataEvent" [AMF0] data message command type.

“onUserDataEvent” 数据消息命令必须携带一个消息有效负载,以及要由媒体服务捕获的、打包为带内文件格式的以下定义,此外还要携带 HLS、DASH 和平滑流的清单。The "onUserDataEvent" data message command MUST carry a message payload with the following definition to be captured by Media Services and packaged into the in-band file format as well as the manifests for HLS, DASH and Smooth Streaming. 建议发送计时元数据消息的频率不要超过每 0.5 秒(500 毫秒)一次,否则实时流的稳定性可能会出现问题。It is recommended to send timed-metadata messages no more frequently than once every 0.5 seconds (500ms) or stability issues with the live stream may occur. 如果需要提供帧级元数据,每个消息可以聚合多个帧的元数据。Each message could aggregate metadata from multiple frames if you need to provide frame-level metadata. 如果发送多比特率流,建议另外提供单比特率中的元数据,目的只是减少带宽,并避免视频/音频处理受到干扰。If you are sending multi-bitrate streams, it is recommended that you also provide the metadata on a single bitrate only to reduce the bandwidth and avoid interference with video/audio processing.

“onUserDataEvent” 的有效负载应是 [MPEGDASH] EventStream XML 格式消息。The payload for the "onUserDataEvent" should be an [MPEGDASH] EventStream XML format message. 这样,就可以轻松地传入自定义的架构,这些架构可以在通过 HLS 或 DASH 协议传送的 CMAF [MPEGCMAF] 内容的带内“emsg”有效负载中携带。This makes it easy to pass in custom defined schemas that can be carried in 'emsg' payloads in-band for CMAF [MPEGCMAF] content that is delivered over HLS or DASH protocols. 每个 DASH 事件流消息包含一个充当 URN 消息方案标识符并定义消息有效负载的 schemeIdUri。Each DASH Event Stream message contains a schemeIdUri that functions as a URN message scheme identifier and defines the payload of the message. 为实现互操作性,行业协议已标准化某些方案,例如,适用于 [ID3v2] 的“https://aomedia.org/emsg/ID3”,或适用于 [SCTE-35] 的 urn:scte:scte35:2013:binSome schemes such as "https://aomedia.org/emsg/ID3" for [ID3v2], or urn:scte:scte35:2013:bin for [SCTE-35] are standardized by industry consortia for interoperability. 任何应用程序提供程序都可以使用其控制的 URL(拥有的域)定义自身的自定义方案,并可以在该 URL 中提供规范(如果已选择)。Any application provider can define their own custom scheme using a URL that they control (owned domain) and may provide a specification at that URL if they choose. 如果播放器具有已定义方案的处理程序,则只需提供此组件即可识别有效负载和协议。If a player has a handler for the defined scheme, then that is the only component that needs to understand the payload and protocol.

[MPEG-DASH] EventStream XML 有效负载的架构定义为(摘自 DASH ISO-IEC-23009-1-3rd Edition)。The schema for the [MPEG-DASH] EventStream XML payload is defined as (excerpt from DASH ISO-IEC-23009-1-3rd Edition). 请注意,目前对于每个“EventStream”仅支持一个“EventType”。Note that only one "EventType" per "EventStream" is supported at this time. 如果在 EventStream 中提供了多个事件,只会处理第一个 Event 元素。Only the first Event element will be processed if multiple events are provided in the EventStream.

  <!-- Event Stream -->
  <xs:complexType name="EventStreamType">
    <xs:sequence>
      <xs:element name="Event" type="EventType" minOccurs="0" maxOccurs="unbounded"/>
      <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute ref="xlink:href"/>
    <xs:attribute ref="xlink:actuate" default="onRequest"/>
    <xs:attribute name="schemeIdUri" type="xs:anyURI" use="required"/>
    <xs:attribute name="value" type="xs:string"/>
    <xs:attribute name="timescale" type="xs:unsignedInt"/>
  </xs:complexType>
  <!-- Event  -->
  <xs:complexType name="EventType">
    <xs:sequence>
      <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="presentationTime" type="xs:unsignedLong" default="0"/>
    <xs:attribute name="duration" type="xs:unsignedLong"/>
    <xs:attribute name="id" type="xs:unsignedInt"/>
    <xs:attribute name="contentEncoding" type="ContentEncodingType"/>
    <xs:attribute name="messageData" type="xs:string"/>
    <xs:anyAttribute namespace="##other" processContents="lax"/>
  </xs:complexType>

使用 ID3 架构 ID 和 base64 编码数据有效负载的示例 XML 事件流。Example XML Event Stream with ID3 schema ID and base64-encoded data payload.

   <?xml version="1.0" encoding="UTF-8"?>
   <EventStream schemeIdUri="https://aomedia.org/emsg/ID3">
         <Event contentEncoding="Base64">
          -- base64 encoded ID3v2 full payload here per [CMAF-TMD] --
         </Event>
   <EventStream>

使用自定义架构 ID 和 base64 编码二进制数据的示例事件流Example Event Stream with custom schema ID and base64-encoded binary data

   <?xml version="1.0" encoding="UTF-8"?>
   <EventStream schemeIdUri="urn:example.org:custom:binary">
         <Event contentEncoding="Base64">
          -- base64 encoded custom binary data message --
         </Event>
   <EventStream>

使用自定义架构 ID 和自定义 JSON 的示例事件流Example Event Stream with custom schema ID and custom JSON

   <?xml version="1.0" encoding="UTF-8"?>
   <EventStream schemeIdUri="urn:example.org:custom:JSON">
         <Event>
          [
            {"key1" : "value1"},
            {"key2" : "value2"}
          ]
         </Event>
   <EventStream>

内置支持的方案 ID URIBuilt-in supported Scheme ID URIs

方案 ID URIScheme ID URI 说明Description
https://aomedia.org/emsg/ID3https://aomedia.org/emsg/ID3 描述如何在 CMAF 兼容的 [MPEGCMAF] 分段 MP4 中以计时元数据的形式携带 [ID3v2] 元数据。Describes how [ID3v2] metadata can be carried as timed metadata in a CMAF-compatible [MPEGCMAF] fragmented MP4. 有关详细信息,请参阅常用媒体应用程序格式 (CMAF) 中的计时元数据For more information see the Timed Metadata in the Common Media Application Format (CMAF)

事件处理和清单信号Event processing and manifest signaling

收到有效的 “onUserDataEvent” 事件后,Azure 媒体服务将查找与 EventStreamType(在 [MPEGDASH] 中定义)匹配的有效 XML 有效负载,分析该 XML 有效负载,然后将其转换为 [MPEGCMAF] MP4 片段“emsg”版本 1,以便存储在实时存档中并传输到媒体服务打包器。On receipt of a valid "onUserDataEvent" event, Azure Media Services will look for a valid XML payload that matches the EventStreamType (defined in [MPEGDASH] ), parse the XML payload and convert it into an [MPEGCMAF] MP4 fragment 'emsg' version 1 box for storage in the live archive and transmission to the Media Services Packager. 打包器将检测实时流中的“emsg”块并执行以下操作:The Packager will detect the 'emsg' box in the live stream and:

  • (a) 将其“动态打包”成 TS 段,以传送到符合 HLS 计时元数据规范 [HLS-TMD] 的 HLS 客户端,或者(a) "dynamically package" it into TS segments for delivery to HLS clients in compliance with the HLS timed metadata specification [HLS-TMD], or
  • (b) 传递该块,以通过 HLS 或 DASH 在 CMAF 片段中传送,或者(b) pass it through for delivery in CMAF fragments via HLS or DASH, or
  • (c) 将其转换为稀疏轨迹信号,以通过平滑流式处理 [MS-SSTR] 进行传送。(c) convert it into a sparse track signal for delivery via Smooth Streaming [MS-SSTR].

除了带内“emsg”格式的 CMAF 或适用于 HLS 的 TS PES 数据包外,适用于 DASH (MPD) 和平滑流的清单将包含对带内事件流的引用(在平滑流中也称为“稀疏流轨迹”)。In addition to the in-band 'emsg' format CMAF or TS PES packets for HLS, the manifests for DASH (MPD), and Smooth Streaming will contain a reference to the in-band event streams (also known as sparse stream track in Smooth Streaming).

单个事件或其数据有效负载不会直接在 HLS、DASH 或平滑流清单中输出。Individual events or their data payloads are NOT output directly in the HLS, DASH, or Smooth manifests.

onUserDataEvent 事件的其他信息性约束和默认值Additional informational constraints and defaults for onUserDataEvent events

  • 如果未在 EventStream 元素中设置时间刻度,默认将使用 RTMP 1 kHz 时间刻度If the timescale is not set in the EventStream element, the RTMP 1 kHz timescale is used by default
  • onUserDataEvent 消息的最大传送频率限制为每 500 毫秒一次。如果更频繁地发送事件,可能会影响带宽和实时源的稳定性Delivery of an onUserDataEvent message is limited to once every 500ms max. If you send events more frequently, it can impact the bandwidth and the stability of the live feed

2.1.2 使用“onAdCue”发送 RTMP 广告提示信号2.1.2 RTMP ad cue signaling with "onAdCue"

Azure 媒体服务可以侦听和响应可用于在实时流中通知各种实时同步元数据的多个 [AMF0] 消息类型。Azure Media Services can listen and respond to several [AMF0] message types which can be used to signal various real time synchronized metadata in the live stream. [Primetime] 规范定义了两个称为“简单”和“SCTE-35”模式的提示类型。The [Adobe-Primetime] specification defines two cue types called "simple" and "SCTE-35" mode. 对于“简单”模式,媒体服务支持称为“onAdCue”的单个 AMF 提示消息,该消息使用与下表中的“简单模式”信号定义匹配的有效负载。For "simple" mode, Media Services supports a single AMF cue message called "onAdCue" using a payload that matches the table below defined for the "Simple Mode" signal.

以下部分显示了 RTMP“简单”模式有效负载,它可用于发送基本“spliceOut”广告信号,该信号将传递到 HLS、DASH 和 Microsoft 平滑流式处理的客户端清单。The following section shows RTMP "simple" mode" payload, which can be used to signal a basic "spliceOut" ad signal that will be carried through to the client manifest for HLS, DASH, and Microsoft Smooth Streaming. 这对于以下场景非常有用:客户没有基于 SCTE-35 的复杂广告信号部署或插入系统,而是使用基本的本地编码器通过 API 在提示消息中发送。This is very useful for scenarios where the customer does not have a complex SCTE-35 based ad signaling deployment or insertion system, and is using a basic on-premises encoder to send in the cue message via an API. 通常,本地编码器支持使用基于 REST 的 API 来触发此信号,这还会通过将 IDR 帧插入视频并启动新的 GOP 来对视频流进行“拼接适配”。Typically the on-premises encoder will support a REST-based API to trigger this signal, which will also "splice-condition" the video stream by inserting an IDR frame into the video, and starting a new GOP.

2.1.3 使用“onAdCue”发送 RTMP 广告提示信号 - 简单模式2.1.3 RTMP ad cue signaling with "onAdCue" - Simple Mode

字段名称Field Name 字段类型Field Type 必需?Required? 说明Descriptions
typetype StringString 必须Required 事件消息。The event message. 应为“SpliceOut”以指定简单模式接合。Shall be "SpliceOut" to designate a simple mode splice.
idid StringString 必须Required 描述接合或片段的唯一标识符。A unique identifier describing the splice or segment. 标识消息的此实例Identifies this instance of the message
durationduration NumberNumber 必须Required 接合持续时间。The duration of the splice. 单位为小数形式的秒。Units are fractional seconds.
elapsedelapsed NumberNumber 可选Optional 如果信号重复出现以便支持接收,此字段应为自接合开始后已经过去的呈现时间量。When the signal is being repeated in order to support tune in, this field shall be the amount of presentation time that has elapsed since the splice began. 单位为小数形式的秒。Units are fractional seconds. 使用简单模式时,此值不得超过接合的原始持续时间。When using simple mode, this value should not exceed the original duration of the splice.
timetime NumberNumber 必须Required 呈现时间应为接合的时间。Shall be the time of the splice, in presentation time. 单位为小数形式的秒。Units are fractional seconds.

使用 Adobe RTMP 简单模式时的 MPEG DASH 清单输出示例Example MPEG DASH manifest output when using Adobe RTMP simple mode

参阅示例 3.3.2.1 使用 Adobe 简单模式的 MPEG DASH .mpd 事件流See example 3.3.2.1 MPEG DASH .mpd EventStream using Adobe simple mode

参阅示例 3.3.3.1 使用单周期和 Adobe 简单模式的 DASH 清单See example 3.3.3.1 DASH manifest with single period and Adobe simple mode

使用 Adobe RTMP 简单模式时的 HLS 清单输出示例Example HLS manifest output when using Adobe RTMP simple mode

参阅示例 3.2.2 使用 Adobe 简单模式和 EXT-X-CUE 标记的 HLS 清单See example 3.2.2 HLS manifest using Adobe simple mode and EXT-X-CUE tag

2.1.4 使用“onAdCue”发送 RTMP 广告提示信号 - SCTE-35 模式2.1.4 RTMP ad cue signaling with "onAdCue" - SCTE-35 Mode

使用需要将完整 SCTE-35 有效负载消息传递到 HLS 或 DASH 清单的更高级广播生产工作流时,最好是使用 [Adobe-Primetime] 规范的“SCTE-35 模式”。When you are working with a more advanced broadcast production workflow that requires the full SCTE-35 payload message to be carried through to the HLS or DASH manifest, it is best to use the "SCTE-35 Mode" of the [Adobe-Primetime] specification. 此模式支持将带内 SCTE-35 信号直接发送到本地实时编码器,然后使用 [Adobe-Primetime] 规范中指定的“SCTE-35 模式”将信号编码成 RTMP 流。This mode supports in-band SCTE-35 signals being sent directly into an on-premises live encoder, which then encodes the signals out into the RTMP stream using the "SCTE-35 Mode" specified in the [Adobe-Primetime] specification.

通常,SCTE-35 消息只能显示在本地编码器上的 MPEG-2 传输流 (TS) 输入中。Typically SCTE-35 messages can appear only in MPEG-2 transport stream (TS) inputs on an on-premises encoder. 有关如何配置包含 SCTE-35 的传输流引入,以及如何在 Adobe SCTE-35 模式下将其传递到 RTMP 的详细信息,请咨询编码器制造商。Check with your encoder manufacturer for details on how to configure a transport stream ingest that contains SCTE-35 and enable it for pass-through to RTMP in Adobe SCTE-35 mode.

在此方案中,必须使用 “onAdCue” [AMF0] 消息类型从本地编码器发送以下有效负载。In this scenario, the following payload MUST be sent from the on-premises encoder using the "onAdCue" [AMF0] message type.

字段名称Field Name 字段类型Field Type 必需?Required? 说明Descriptions
提示cue StringString 必须Required 事件消息。The event message. 对于 [SCTE-35] 消息,这必须是 base64 编码的 [RFC4648] 二进制 splice_info_section(),才能将消息发送到 HLS、Smooth 和 Dash 客户端。For [SCTE-35] messages, this MUST be the base64-encoded [RFC4648] binary splice_info_section() in order for messages to be sent to HLS, Smooth, and Dash clients.
typetype StringString 必须Required 标识消息方案的 URN 或 URL。A URN or URL identifying the message scheme. 对于 [SCTE-35] 消息,这应该“scte35” ,才能根据 [Adobe-Primetime] 将消息发送到 HLS、Smooth 和 Dash 客户端。For [SCTE-35] messages, this SHOULD be "scte35" in order for messages to be sent to HLS, Smooth, and Dash clients, in compliance with [Adobe-Primetime]. 也可以选择性地使用 URN“urn:scte:scte35:2013:bin”发出 [SCTE-35] 消息信号。Optionally, the URN "urn:scte:scte35:2013:bin" may also be used to signal a [SCTE-35] message.
idid StringString 必须Required 描述接合或片段的唯一标识符。A unique identifier describing the splice or segment. 标识消息的此实例。Identifies this instance of the message. 具有等效语义的消息应具有相同的值。Messages with equivalent semantics shall have the same value.
durationduration NumberNumber 必须Required 如果已知,则为事件或广告接合段的持续时间。The duration of the event or ad splice-segment, if known. 如果未知,该值应该为 0。If unknown, the value SHOULD be 0.
elapsedelapsed NumberNumber 可选Optional 如果 [SCTE-35] 广告信号重复出现以便接收,此字段应为自接合开始后已经过去的呈现时间量。When the [SCTE-35] ad signal is being repeated in order to tune in, this field shall be the amount of presentation time that has elapsed since the splice began. 单位为小数形式的秒。Units are fractional seconds. 在 [SCTE-35] 模式下,此值可能超过接合或片段的最初指定持续时间。In [SCTE-35] mode, this value may exceed the original specified duration of the splice or segment.
timetime NumberNumber 必须Required 事件或广告接合的呈现时间。The presentation time of the event or ad splice. 按照 [ISO-14496-12] Annex I 中的定义,呈现时间和持续时间应该与类型 1 或 2 的流访问点保持一致。对于 HLS 出口,时间和持续时间应该与片段边界保持一致。The presentation time and duration SHOULD align with Stream Access Points (SAP) of type 1 or 2, as defined in [ISO-14496-12] Annex I. For HLS egress, time and duration SHOULD align with segment boundaries. 相同事件流中的不同事件消息的呈现时间和持续时间不得重叠。The presentation time and duration of different event messages within the same event stream MUST not overlap. 单位为小数形式的秒。Units are fractional seconds.

使用 SCTE-35 模式的示例 MPEG DASH .mpd 清单Example MPEG DASH .mpd manifest with SCTE-35 mode

参阅第 3.3.3.2 部分:使用 SCTE-35 的 DASH 清单示例See Section 3.3.3.2 example DASH manifest with SCTE-35

使用 SCTE-35 模式信号的 HLS .m3u8 清单示例Example HLS manifest .m3u8 with SCTE-35 mode signal

参阅第 3.2.1.1 部分:使用 SCTE-35 的 HLS 清单示例See Section 3.2.1.1 example HLS manifest with SCTE-35

2.1.5 使用 Elemental Live“onCuePoint”和 RTMP 发送广告信号2.1.5 RTMP Ad signaling with "onCuePoint" for Elemental Live

Elemental Live 本地编码器支持在 RTMP 信号中使用广告标记。The Elemental Live on-premises encoder supports ad markers in the RTMP signal. Azure 媒体服务目前仅支持 RTMP 的“onCuePoint”广告标记类型。Azure Media Services currently only supports the "onCuePoint" Ad Marker type for RTMP. 可以通过 Elemental Media Live 编码器中的“Adobe RTMP 组设置”,或者通过在 API 中将“ad_markers”设置为“onCuePoint”,来启用此功能。This can be enabled in the Adobe RTMP Group Settings in the Elemental Media Live encoder settings or API by setting the "ad_markers" to "onCuePoint". 有关详细信息,请参阅 Elemental Live 文档。Please refer to the Elemental Live documentation for details. 在 RTMP 组中启用此功能会将 SCTE-35 信号传递到 Adobe RTMP 输出,以供 Azure 媒体服务处理。Enabling this feature in the RTMP Group will pass SCTE-35 signals to the Adobe RTMP outputs to be processed by Azure Media Services.

“onCuePoint”消息类型在 [Adobe-Flash-AS] 中定义,从 Elemental Live RTMP 输出发送时采用以下有效负载结构。The "onCuePoint" message type is defined in [Adobe-Flash-AS] and has the following payload structure when sent from the Elemental Live RTMP output.

属性Property 说明Description
namename 在 Elemental Live 中的名称应为“scte35”。The name SHOULD be 'scte35' by Elemental Live.
timetime 时间线中提示点在视频文件中发生的时间(秒)The time in seconds at which the cue point occurred in the video file during timeline
typetype 提示点的类型应设置为“event”。The type of cue point SHOULD be set to "event".
参数parameters 名称/值对字符串的关联数组,包含 SCTE-35 消息中的信息,包括 ID 和持续时间。An associative array of name/value pair strings containing the information from the SCTE-35 message, including Id and duration. 这些值由 Azure 媒体服务分析,将包含在清单修饰标记中。These values are parsed out by Azure Media Services and included in the manifest decoration tag.

使用此广告标记模式时,HLS 清单输出类似于 Adobe 的“简单”模式。When this mode of ad marker is used, the HLS manifest output is similar to Adobe "Simple" mode.

MPEG DASH MPD 单周期 Adobe 简单模式信号示例Example MPEG DASH MPD, single period, Adobe Simple mode signals

<?xml version="1.0" encoding="utf-8"?>
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="dynamic" publishTime="2020-01-07T18:58:03Z" minimumUpdatePeriod="PT0S" timeShiftBufferDepth="PT58M56S" availabilityStartTime="2020-01-07T17:44:47Z" minBufferTime="PT7S">
    <Period start="PT0S">
        <EventStream schemeIdUri="urn:com:adobe:dpi:simple:2015" value="scte35" timescale="10000000">
            <Event presentationTime="1583497601000000" duration="300000000" id="1085900"/>
            <Event presentationTime="1583500901666666" duration="300000000" id="1415966"/>
            <Event presentationTime="1583504202333333" duration="300000000" id="1746033"/>
            <Event presentationTime="1583507502666666" duration="300000000" id="2076066"/>
            <Event presentationTime="1583510803333333" duration="300000000" id="2406133"/>
            <Event presentationTime="1583514104000000" duration="300000000" id="2736200"/>
            <Event presentationTime="1583517404666666" duration="300000000" id="3066266"/>
            <Event presentationTime="1583520705333333" duration="300000000" id="3396333"/>
            <Event presentationTime="1583524006000000" duration="300000000" id="3726400"/>
            <Event presentationTime="1583527306666666" duration="300000000" id="4056466"/>
            <Event presentationTime="1583530607333333" duration="300000000" id="4386533"/>
        </EventStream>
        <AdaptationSet id="1" group="1" profiles="ccff" bitstreamSwitching="false" segmentAlignment="true" contentType="video" mimeType="video/mp4" codecs="avc1.4D400C" maxWidth="256" maxHeight="144" startWithSAP="1">
            <InbandEventStream schemeIdUri="urn:mpeg:dash:event:2012" value="1"/>
            <InbandEventStream schemeIdUri="urn:com:adobe:dpi:simple:2015" value="scte35"/>
            <SegmentTemplate timescale="10000000" presentationTimeOffset="1583486678426666" media="QualityLevels($Bandwidth$)/Fragments(video=$Time$,format=mpd-time-csf)" initialization="QualityLevels($Bandwidth$)/Fragments(video=i,format=mpd-time-csf)">
                <SegmentTimeline>
                    <S t="1583495318000000" d="64000000" r="34"/>
                    <S d="43000000"/>
                    <S d="21000000"/>
                    <!-- ... Truncated for brevity of sample-->

                </SegmentTimeline>
            </SegmentTemplate>
            <ProducerReferenceTime id="1583495318000000" type="0" wallClockTime="2020-01-07T17:59:10.957Z" presentationTime="1583495318000000"/>
            <Representation id="1_V_video_3750956353252827751" bandwidth="149952" width="256" height="144"/>
        </AdaptationSet>
        <AdaptationSet id="2" group="5" profiles="ccff" bitstreamSwitching="false" segmentAlignment="true" contentType="audio" mimeType="audio/mp4" codecs="mp4a.40.2" lang="en">
            <InbandEventStream schemeIdUri="urn:mpeg:dash:event:2012" value="1"/>
            <InbandEventStream schemeIdUri="urn:com:adobe:dpi:simple:2015" value="scte35"/>
            <Label>ambient</Label>
            <SegmentTemplate timescale="10000000" presentationTimeOffset="1583486678426666" media="QualityLevels($Bandwidth$)/Fragments(ambient=$Time$,format=mpd-time-csf)" initialization="QualityLevels($Bandwidth$)/Fragments(ambient=i,format=mpd-time-csf)">
                <SegmentTimeline>
                    <S t="1583495254426666" d="64000000" r="35"/>
                    <S d="43093334"/>
                    <S d="20906666"/>
                    <!-- ... Truncated for brevity of sample-->

                </SegmentTimeline>
            </SegmentTemplate>
            <ProducerReferenceTime id="1583495254426666" type="0" wallClockTime="2020-01-07T17:59:04.600Z" presentationTime="1583495254426666"/>
            <Representation id="5_A_ambient_9125670592623055209" bandwidth="96000" audioSamplingRate="48000"/>
        </AdaptationSet>
    </Period>
</MPD>

使用 EXT-X-CUE 标记的 HLS 播放列表 Adobe 简单模式信号示例(为简洁起见,已截断部分内容)Example HLS playlist, Adobe Simple mode signals using EXT-X-CUE tag (truncated "..." for brevity)

以下示例显示了使用 Adobe 简单模式信号和传统 [Adobe-Primetime] EXT-X-CUE 标记的 RTMP 引入流的媒体服务动态打包器的输出。The following example shows the output from the Media Services dynamic packager for an RTMP ingest stream using Adobe "simple" mode signals and the legacy [Adobe-Primetime] EXT-X-CUE tag.

#EXTM3U
#EXT-X-VERSION:8
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-TARGETDURATION:7
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-PROGRAM-DATE-TIME:2020-01-07T17:44:47Z
#EXTINF:6.400000,no-desc
Fragments(video=1583486742000000,format=m3u8-aapl-v8)
#EXTINF:6.400000,no-desc
Fragments(video=1583486806000000,format=m3u8-aapl-v8)
...
#EXTINF:6.166667,no-desc
Fragments(video=1583487638000000,format=m3u8-aapl-v8)
#EXT-X-CUE:ID=95766,TYPE="SpliceOut",DURATION=30.000000,TIME=158348769.966667
#EXTINF:0.233333,no-desc
Fragments(video=1583487699666666,format=m3u8-aapl-v8)
#EXT-X-CUE:ID=95766,TYPE="SpliceOut",DURATION=30.000000,TIME=158348769.966667,ELAPSED=0.233333
#EXTINF:6.400000,no-desc
Fragments(video=1583487702000000,format=m3u8-aapl-v8)
#EXT-X-CUE:ID=95766,TYPE="SpliceOut",DURATION=30.000000,TIME=158348769.966667,ELAPSED=6.633333
#EXTINF:6.400000,no-desc
Fragments(video=1583487766000000,format=m3u8-aapl-v8)
#EXT-X-CUE:ID=95766,TYPE="SpliceOut",DURATION=30.000000,TIME=158348769.966667,ELAPSED=13.033333
#EXTINF:6.400000,no-desc
Fragments(video=1583487830000000,format=m3u8-aapl-v8)
#EXT-X-CUE:ID=95766,TYPE="SpliceOut",DURATION=30.000000,TIME=158348769.966667,ELAPSED=19.433333
#EXTINF:6.400000,no-desc
Fragments(video=1583487894000000,format=m3u8-aapl-v8)
#EXT-X-CUE:ID=95766,TYPE="SpliceOut",DURATION=30.000000,TIME=158348769.966667,ELAPSED=25.833333
#EXTINF:4.166667,no-desc
Fragments(video=1583487958000000,format=m3u8-aapl-v8)
#EXTINF:2.233333,no-desc
Fragments(video=1583487999666666,format=m3u8-aapl-v8)
#EXTINF:6.400000,no-desc
Fragments(video=1583488022000000,format=m3u8-aapl-v8)
...

2.1.6 取消和更新2.1.6 Cancellation and Updates

可以通过发送多条具有相同呈现时间和 ID 的消息来取消或更新消息。Messages can be canceled or updated by sending multiple messages with the same presentation time and ID. 呈现时间和 ID 用于唯一标识事件,并且针对具体呈现时间收到的满足前置式约束的最后一条消息为待处理的消息。The presentation time and ID uniquely identify the event, and the last message received for a specific presentation time that meets pre-roll constraints is the message that is acted upon. 已更新的事件将替换以前接收的任何消息。The updated event replaces any previously received messages. 前置式约束为 4 秒。The pre-roll constraint is four seconds. 在呈现时间前的至少 4 秒内收到的消息将有待处理。Messages received at least four seconds prior to the presentation time will be acted upon.

2.2 分片 MP4 引入(平滑流式处理)2.2 Fragmented MP4 Ingest (Smooth Streaming)

有关实时流引入的要求,请参阅 [MS-SSTR-Ingest]。Refer to [MS-SSTR-Ingest] for requirements on live stream ingest. 以下各节提供有关引入超时呈现元数据的详细信息。The following sections provide details regarding ingest of timed presentation metadata. 超时呈现元数据作为稀疏轨迹引入,Live Server Manifest Box(请参阅 MS-SSTR)和 Movie Box(“moov”)中都对稀疏轨迹进行了定义。Timed presentation metadata is ingested as a sparse track, which is defined in both the Live Server Manifest Box (see MS-SSTR) and the Movie Box ('moov').

每个稀疏片段都包含 Movie Fragment Box(“moof”)和 Media Data Box(“mdat”),其中“mdat”块是二进制消息。Each sparse fragment consists of a Movie Fragment Box ('moof') and Media Data Box ('mdat'), where the 'mdat' box is the binary message.

为了实现帧准确的广告插入,编码器必须在显示需要插入提示时拆分片段。In order to achieve frame-accurate insertion of ads, the encoder MUST split the fragment at the presentation time where the cue is required to be inserted. 必须创建以新建 IDR 帧开头的新片段,或使用 [ISO-14496-12] 附录 I 中定义的类型 1 或 2 流访问点 (SAP)。这样,Azure 媒体打包器将正确生成 HLS 清单和 DASH 多时段清单,其中的新时段从帧准确的接合适配呈现时间开始。A new fragment MUST be created that begins with a newly created IDR frame, or Stream Access Points (SAP) of type 1 or 2, as defined in [ISO-14496-12] Annex I. This allows the Azure Media Packager to properly generate an HLS manifest and a DASH multi-period manifest where the new Period begins at the frame-accurate splice conditioned presentation time.

2.2.1 Live Server Manifest Box2.2.1 Live Server Manifest Box

稀疏轨迹必须在具有 <textstream> 条目的 Live Server Manifest Box 中进行声明,并且必须包含以下属性集:The sparse track MUST be declared in the Live Server Manifest box with a <textstream> entry and it MUST have the following attributes set:

属性名称Attribute Name 字段类型Field Type 必需?Required? 说明Description
systemBitratesystemBitrate NumberNumber 必须Required 必须为“0”,以指示具有未知、可变比特率的轨迹。MUST be "0", indicating a track with unknown, variable bitrate.
parentTrackNameparentTrackName StringString 必须Required 必须是父级轨迹的名称,稀疏轨迹时间码与父级轨迹时间刻度一致。MUST be the name of the parent track, to which the sparse track time codes are timescale aligned. 父级轨迹不能为稀疏轨迹。The parent track cannot be a sparse track.
manifestOutputmanifestOutput 布尔Boolean 必须Required 必须为“true”,以指示将在 Smooth 客户端清单中嵌入稀疏轨迹。MUST be "true", to indicate that the sparse track will be embedded in the Smooth client manifest.
子类型Subtype StringString 必须Required 必须是四字符代码的“DATA”。MUST be the four character code "DATA".
SchemeScheme StringString 必须Required 必须为标识消息方案的 URN 或 URL。MUST be a URN or URL identifying the message scheme. 对于 [SCTE-35] 消息,这必须为“urn:scte:scte35:2013:bin”,以便按照 [SCTE-35] 将消息发送至 HLS、Smooth 和 Dash 客户端。For [SCTE-35] messages, this MUST be "urn:scte:scte35:2013:bin" in order for messages to be sent to HLS, Smooth, and Dash clients in compliance with [SCTE-35].
trackNametrackName StringString 必须Required 必须为稀疏轨迹的名称。trackName 可用来区分具有相同方案的多个事件流。MUST be the name of the sparse track. The trackName can be used to differentiate multiple event streams with the same scheme. 每个唯一事件流必须具有唯一的轨迹名称。Each unique event stream MUST have a unique track name.
timescaletimescale NumberNumber 可选Optional 必须为父级轨迹时间刻度。MUST be the timescale of the parent track.

2.2.2 Movie Box2.2.2 Movie Box

作为稀疏轨迹的流标头的一部分,Movie Box(“moov”)将遵循 Live Server Manifest Box。The Movie Box ('moov') follows the Live Server Manifest Box as part of the stream header for a sparse track.

如 [ISO-14496-12] 中定义的,“moov”块 应该包含 TrackHeaderBox (‘tkhd’) 块,且具有以下约束:The 'moov' box SHOULD contain a TrackHeaderBox ('tkhd') box as defined in [ISO-14496-12] with the following constraints:

字段名称Field Name 字段类型Field Type 必需?Required? 说明Description
durationduration 64 位无符号整数64-bit unsigned integer 必须Required 应该为 0,因为轨迹块具有零个示例,且轨迹块中示例的总持续时间为 0。SHOULD be 0, since the track box has zero samples and the total duration of the samples in the track box is 0.

如 [ISO-14496-12] 中所述,“moov”块 应该包含 HandlerBox (‘hdlr’) ,且具有以下约束:The 'moov' box SHOULD contain a HandlerBox ('hdlr') as defined in [ISO-14496-12] with the following constraints:

字段名称Field Name 字段类型Field Type 必需?Required? 说明Description
handler_typehandler_type 32 位无符号整数32-bit unsigned integer 必须Required 应该为“meta”。SHOULD be 'meta'.

如 [ISO-14496-12] 中所述,“stsd”块 应该包含带有编码名称的 MetaDataSampleEntry 块。The 'stsd' box SHOULD contain a MetaDataSampleEntry box with a coding name as defined in [ISO-14496-12]. 例如,对于 SCTE-35 消息,编码名称应该为“scte”。For example, for SCTE-35 messages the coding name SHOULD be 'scte'.

2.2.3 Movie Fragment Box 和 Media Data Box2.2.3 Movie Fragment Box and Media Data Box

稀疏轨迹片段包含 Movie Fragment Box(“moof”)和 Media Data Box(“mdat”)。Sparse track fragments consist of a Movie Fragment Box ('moof') and a Media Data Box ('mdat').

备注

为了实现帧准确的广告插入,编码器必须在显示需要插入提示时拆分片段。In order to achieve frame-accurate insertion of ads, the encoder MUST split the fragment at the presentation time where the cue is required to be inserted. 必须创建以新建 IDR 帧开头的,或者以 [ISO-14496-12] 附录 I 中定义的类型 1 或 2 流访问点 (SAP) 开头的新片段。A new fragment MUST be created that begins with a newly created IDR frame, or Stream Access Points (SAP) of type 1 or 2, as defined in [ISO-14496-12] Annex I

如 [MS-SSTR] 中定义,MovieFragmentBox(“moof”)框 必须包含 TrackFragmentExtendedHeaderBox (‘uuid’) 框,且具有以下字段:The MovieFragmentBox ('moof') box MUST contain a TrackFragmentExtendedHeaderBox ('uuid') box as defined in [MS-SSTR] with the following fields:

字段名称Field Name 字段类型Field Type 必需?Required? 说明Description
fragment_absolute_timefragment_absolute_time 64 位无符号整数64-bit unsigned integer 必须Required 必须为事件的到达时间。MUST be the arrival time of the event. 此值可使消息与父级轨迹保持一致。This value aligns the message with the parent track.
fragment_durationfragment_duration 64 位无符号整数64-bit unsigned integer 必须Required 必须为事件的持续时间。MUST be the duration of the event. 持续时间可以为零,以指示持续时间未知。The duration can be zero to indicate that the duration is unknown.

MediaDataBox (‘mdat’) 框 必须采用以下格式:The MediaDataBox ('mdat') box MUST have the following format:

字段名称Field Name 字段类型Field Type 必需?Required? 说明Description
版本version 32 位无符号整数 (uimsbf)32-bit unsigned integer (uimsbf) 必须Required 确定“mdat”块的内容格式。Determines the format of the contents of the 'mdat' box. 将忽略无法识别的版本。Unrecognized versions will be ignored. 当前仅支持版本 1。Currently the only supported version is 1.
idid 32 位无符号整数 (uimsbf)32-bit unsigned integer (uimsbf) 必须Required 标识消息的此实例。Identifies this instance of the message. 具有等效语义的消息应具有相同的值;即,处理具有相同 ID 的任何一个事件消息块就足够了。Messages with equivalent semantics shall have the same value; that is, processing any one event message box with the same id is sufficient.
presentation_time_deltapresentation_time_delta 32 位无符号整数 (uimsbf)32-bit unsigned integer (uimsbf) 必须Required TrackFragmentExtendedHeaderBox 中指定的 fragment_absolute_time 总和以及 presentation_time_delta 必须是事件的呈现时间。The sum of the fragment_absolute_time, specified in the TrackFragmentExtendedHeaderBox, and the presentation_time_delta MUST be the presentation time of the event. 按照 [ISO-14496-12] Annex I 中的定义,呈现时间和持续时间应该与类型 1 或 2 的流访问点保持一致。对于 HLS 出口,时间和持续时间应该与片段边界保持一致。The presentation time and duration SHOULD align with Stream Access Points (SAP) of type 1 or 2, as defined in [ISO-14496-12] Annex I. For HLS egress, time and duration SHOULD align with segment boundaries. 相同事件流中的不同事件消息的呈现时间和持续时间不得重叠。The presentation time and duration of different event messages within the same event stream MUST not overlap.
messagemessage Byte Arraybyte array 必须Required 事件消息。The event message. 对于 [SCTE-35] 消息,消息仍为二进制 binary splice_info_section()。For [SCTE-35] messages, the message is the binary splice_info_section(). 对于 [SCTE-35] 消息,这必须为 splice_info_section(),以便按照 [SCTE-35] 将消息发送至 HLS、Smooth 和 Dash 客户端。For [SCTE-35] messages, this MUST be the splice_info_section() in order for messages to be sent to HLS, Smooth, and Dash clients in compliance with [SCTE-35]. 对于 [SCTE-35] 消息,二进制 splice_info_section() 是“mdat”块的有效负载,且它 不是 base64 编码。For [SCTE-35] messages, the binary splice_info_section() is the payload of the 'mdat' box, and it is NOT base64 encoded.

2.2.4 取消和更新2.2.4 Cancellation and Updates

可以通过发送多条具有相同呈现时间和 ID 的消息来取消或更新消息。Messages can be canceled or updated by sending multiple messages with the same presentation time and ID. 呈现时间和 ID 可唯一标识事件。The presentation time and ID uniquely identify the event. 针对具体呈现时间收到的满足前置式约束的最后一条消息为待处理的消息。The last message received for a specific presentation time, that meets pre-roll constraints, is the message that is acted upon. 已更新的消息将替换以前接收的任何消息。The updated message replaces any previously received messages. 前置式约束为 4 秒。The pre-roll constraint is four seconds. 在呈现时间前的至少 4 秒内收到的消息将有待处理。Messages received at least four seconds prior to the presentation time will be acted upon.

3 超时元数据交付3 Timed Metadata Delivery

事件流数据对媒体服务不透明。Event stream data is opaque to Media Services. 媒体服务仅传递引入终结点和客户端终结点之间的三条信息。Media Services merely passes three pieces of information between the ingest endpoint and the client endpoint. 根据 [SCTE-35] 和/或客户端的流式处理协议,将向客户端传递以下属性:The following properties are delivered to the client, in compliance with [SCTE-35] and/or the client's streaming protocol:

  1. 架构 - 标识消息方案的 URN 或 URL。Scheme – a URN or URL identifying the scheme of the message.
  2. 呈现时间 - 媒体时间线上的事件的呈现时间。Presentation Time – the presentation time of the event on the media timeline.
  3. 持续时间 - 事件的持续时间。Duration – the duration of the event.
  4. ID - 事件的可选唯一标识符。ID – an optional unique identifier for the event.
  5. 消息 - 事件数据。Message – the event data.

3.1 Microsoft 平滑流式处理清单3.1 Microsoft Smooth Streaming Manifest

有关如何设置稀疏消息轨迹格式的详细信息,参阅稀疏轨迹处理 [MS-SSTR]。对于 [SCTE35] 消息,平滑流式处理会将 base64 编码的 splice_info_section() 输出到稀疏片段。Refer to sparse track handling [MS-SSTR] for details on how to format a sparse message track. For [SCTE35] messages, Smooth Streaming will output the base64-encoded splice_info_section() into a sparse fragment. StreamIndex 必须具有子类型“DATA”,CustomAttributes 必须包含名称为“Schema”、值为“urn:scte:scte35:2013:bin”的属性。The StreamIndex MUST have a Subtype of "DATA", and the CustomAttributes MUST contain an Attribute with Name="Schema" and Value="urn:scte:scte35:2013:bin".

演示 base64 编码 [SCTE35] splice_info_section() 的平滑客户端清单示例Smooth Client Manifest Example showing base64-encoded [SCTE35] splice_info_section()

<?xml version="1.0" encoding="utf-8"?>
<SmoothStreamingMedia MajorVersion="2" MinorVersion="0" TimeScale="10000000" IsLive="true" Duration="0"
  LookAheadFragmentCount="2" DVRWindowLength="6000000000">

  <StreamIndex Type="video" Name="video" Subtype="" Chunks="0" TimeScale="10000000"
    Url="QualityLevels({bitrate})/Fragments(video={start time})">
    <QualityLevel Index="0" Bitrate="230000"
      CodecPrivateData="250000010FC3460B50878A0B5821FF878780490800704704DC0000010E5A67F840" FourCC="WVC1"
      MaxWidth="364" MaxHeight="272"/>
    <QualityLevel Index="1" Bitrate="305000"
      CodecPrivateData="250000010FC3480B50878A0B5821FF87878049080894E4A7640000010E5A67F840" FourCC="WVC1"
      MaxWidth="364" MaxHeight="272"/>
    <c t="0" d="20000000" r="300" />
  </StreamIndex>
  <StreamIndex Type="audio" Name="audio" Subtype="" Chunks="0" TimeScale="10000000"
    Url="QualityLevels({bitrate})/Fragments(audio={start time})">
    <QualityLevel Index="0" Bitrate="96000" CodecPrivateData="1000030000000000000000000000E00042C0"
      FourCC="WMAP" AudioTag="354" Channels="2" SamplingRate="44100" BitsPerSample="16" PacketSize="4459"/>
    <c t="0" d="20000000" r="300" />
  </StreamIndex>
  <StreamIndex Type="text" Name="scte35-sparse-stream" Subtype="DATA" Chunks="0" TimeScale="10000000"
    ParentStreamIndex="video" ManifestOutput="true" 
    Url="QualityLevels({bitrate})/Fragments(captions={start time})">
    <QualityLevel Index="0" Bitrate="0" CodecPrivateData="" FourCC="">
      <CustomAttributes>
        <Attribute Name="Scheme" Value="urn:scte:scte35:2013:bin"/>
      </CustomAttributes>
    </QualityLevel>
    <!-- The following <c> and <f> fragments contains the base64-encoded [SCTE35] splice_info_section() message -->
    <c t="600000000" d="300000000">    <f>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48QWNxdWlyZWRTaWduYWwgeG1sbnM9InVybjpjYWJsZWxhYnM6bWQ6eHNkOnNpZ25hbGluZzozLjAiIGFjcXVpc2l0aW9uUG9pbnRJZGVudGl0eT0iRVNQTl9FYXN0X0FjcXVpc2l0aW9uX1BvaW50XzEiIGFjcXVpc2l0aW9uU2lnbmFsSUQ9IjRBNkE5NEVFLTYyRkExMUUxQjFDQTg4MkY0ODI0MDE5QiIgYWNxdWlzaXRpb25UaW1lPSIyMDEyLTA5LTE4VDEwOjE0OjI2WiI+PFVUQ1BvaW50IHV0Y1BvaW50PSIyMDEyLTA5LTE4VDEwOjE0OjM0WiIvPjxTQ1RFMzVQb2ludERlc2NyaXB0b3Igc3BsaWNlQ29tbWFuZFR5cGU9IjUiPjxTcGxpY2VJbnNlcnQgc3BsaWNlRXZlbnRJRD0iMzQ0NTY4NjkxIiBvdXRPZk5ldHdvcmtJbmRpY2F0b3I9InRydWUiIHVuaXF1ZVByb2dyYW1JRD0iNTUzNTUiIGR1cmF0aW9uPSJQVDFNMFMiIGF2YWlsTnVtPSIxIiBhdmFpbHNFeHBlY3RlZD0iMTAiLz48L1NDVEUzNVBvaW50RGVzY3JpcHRvcj48U3RyZWFtVGltZXM+PFN0cmVhbVRpbWUgdGltZVR5cGU9IkhTUyIgdGltZVZhbHVlPSI1MTUwMDAwMDAwMDAiLz48L1N0cmVhbVRpbWVzPjwvQWNxdWlyZWRTaWduYWw+</f>
    </c>
    <c t="1200000000" d="400000000">      <f>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48QWNxdWlyZWRTaWduYWwgeG1sbnM9InVybjpjYWJsZWxhYnM6bWQ6eHNkOnNpZ25hbGluZzozLjAiIGFjcXVpc2l0aW9uUG9pbnRJZGVudGl0eT0iRVNQTl9FYXN0X0FjcXVpc2l0aW9uX1BvaW50XzEiIGFjcXVpc2l0aW9uU2lnbmFsSUQ9IjRBNkE5NEVFLTYyRkExMUUxQjFDQTg4MkY0ODI0MDE5QiIgYWNxdWlzaXRpb25UaW1lPSIyMDEyLTA5LTE4VDEwOjE0OjI2WiI+PFVUQ1BvaW50IHV0Y1BvaW50PSIyMDEyLTA5LTE4VDEwOjE0OjM0WiIvPjxTQ1RFMzVQb2ludERlc2NyaXB0b3Igc3BsaWNlQ29tbWFuZFR5cGU9IjUiPjxTcGxpY2VJbnNlcnQgc3BsaWNlRXZlbnRJRD0iMzQ0NTY4NjkxIiBvdXRPZk5ldHdvcmtJbmRpY2F0b3I9InRydWUiIHVuaXF1ZVByb2dyYW1JRD0iNTUzNTUiIGR1cmF0aW9uPSJQVDFNMFMiIGF2YWlsTnVtPSIxIiBhdmFpbHNFeHBlY3RlZD0iMTAiLz48L1NDVEUzNVBvaW50RGVzY3JpcHRvcj48U3RyZWFtVGltZXM+PFN0cmVhbVRpbWUgdGltZVR5cGU9IkhTUyIgdGltZVZhbHVlPSI1MTYyMDAwMDAwMDAiLz48L1N0cmVhbVRpbWVzPjwvQWNxdWlyZWRTaWduYWw+</f>
    </c>
  </StreamIndex>
</SmoothStreamingMedia>

3.2 Apple HLS 清单修饰3.2 Apple HLS Manifest Decoration

Azure 媒体服务支持在实时或按需事件期间使用以下 HLS 清单标记来通知广告权益信息。Azure Media Services supports the following HLS manifest tags for signaling ad avail information during a live or on-demand event.

  • 在 Apple HLS [RFC8216] 中定义的 EXT-X-DATERANGEEXT-X-DATERANGE as defined in Apple HLS [RFC8216]
  • 在 [Adobe-Primetime] 中定义的 EXT-X-CUE - 此模式被视为“传统”模式。EXT-X-CUE as defined in [Adobe-Primetime] - this mode is considered "legacy". 客户应尽可能地采用 EXT-X-DATERANGE 标记。Customers should adopt the EXT-X-DATERANGE tag when possible.

每个标记的数据输出根据所用的引入信号模式而异。The data output to each tag will vary based on the ingest signal mode used. 例如,使用 Adobe 简单模式进行的 RTMP 引入不包含完整的 SCTE-35 base64 编码有效负载。For example, RTMP ingest with Adobe Simple mode does not contain the full SCTE-35 base64-encoded payload.

Apple HTTP Live Streaming [RFC8216] 规范允许发送 [SCTE-35] 消息信号。The Apple HTTP Live Streaming [RFC8216] specification allows for signaling of [SCTE-35] messages. 消息将根据标题为“将 SCTE-35 映射到 EXT-X-DATERANGE”的 [RFC8216] 部分插入到 EXT-X-DATERANGE 标记中的分段播放列表。The messages are inserted into the segment playlist in an EXT-X-DATERANGE tag per [RFC8216] section titled "Mapping SCTE-35 into EXT-X-DATERANGE". 客户端应用层可以分析 M3U 播放列表并处理 M3U 标记,或通过 Apple Player Framework 接收事件。The client application layer can parse the M3U playlist and process M3U tags, or receive the events through the Apple player framework.

Azure 媒体服务(版本 3 API)中建议的方法是遵循 [RFC8216],并将 EXT-X_DATERANGE 标记用于清单中的 [SCTE35] 广告权益修饰。The RECOMMENDED approach in Azure Media Services (version 3 API) is to follow [RFC8216] and use the EXT-X_DATERANGE tag for [SCTE35] ad avail decoration in the manifest.

3.2.1.1 显示 SCTE-35 的 EXT-X-DATERANGE 信号发送的示例 HLS 清单 .m3u83.2.1.1 Example HLS manifest .m3u8 showing EXT-X-DATERANGE signaling of SCTE-35

媒体服务动态打包器的以下示例 HLS 清单输出显示了使用来自 [RFC8216] 的 EXT-X-DATERANGE 标记在流中发送 SCTE-35 事件信号。The following example HLS manifest output from the Media Services dynamic packager shows the use of the EXT-X-DATERANGE tag from [RFC8216] signaling the SCTE-35 events in the stream. 此外,此流包含 [Adobe-Primetime] 的“传统”EXT-X-CUE 标记。In addition, this stream contains the "legacy" EXT-X-CUE tag for [Adobe-Primetime].

#EXTM3U
#EXT-X-VERSION:8
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-TARGETDURATION:2
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-PROGRAM-DATE-TIME:2020-01-07T19:40:50Z
#EXTINF:1.501500,no-desc
Fragments(video=22567545,format=m3u8-aapl-v8)
#EXTINF:1.501500,no-desc
Fragments(video=22702680,format=m3u8-aapl-v8)
#EXTINF:1.501500,no-desc
Fragments(video=22837815,format=m3u8-aapl-v8)
#EXTINF:1.501500,no-desc
Fragments(video=22972950,format=m3u8-aapl-v8)
#EXTINF:1.501500,no-desc
Fragments(video=23108085,format=m3u8-aapl-v8)
#EXTINF:1.234567,no-desc
Fragments(video=23243220,format=m3u8-aapl-v8)
#EXTINF:0.016689,no-desc
Fragments(video=23354331,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=0.000022
#EXTINF:0.250244,no-desc
Fragments(video=23355833,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=0.250267
#EXTINF:0.850856,no-desc
Fragments(video=23378355,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=1.101122
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:10.610Z",SCTE35-IN=0xFC30200000000005DD00FFF00F05000003EA7F4FFE0165E4D3000101010000607CE85A
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=0.000000,TIME=260.610344,CUE="/DAgAAAAAAXdAP/wDwUAAAPqf0/+AWXk0wABAQEAAGB86Fo="
#EXTINF:0.650644,no-desc
Fragments(video=23454932,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=1.751767
#EXTINF:0.050044,no-desc
Fragments(video=23513490,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=1.801811
#EXTINF:1.451456,no-desc
Fragments(video=23517994,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=3.253267
#EXTINF:1.501500,no-desc
Fragments(video=23648625,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=4.754767
#EXTINF:1.501500,no-desc
Fragments(video=23783760,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=6.256267
#EXTINF:1.501500,no-desc
Fragments(video=23918895,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=7.757767
#EXTINF:1.501500,no-desc
Fragments(video=24054030,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=9.259267
#EXTINF:1.501500,no-desc
Fragments(video=24189165,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=10.760767
#EXTINF:1.501500,no-desc
Fragments(video=24324300,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=12.262267
#EXTINF:1.501500,no-desc
Fragments(video=24459435,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=13.763767
#EXTINF:1.501500,no-desc
Fragments(video=24594570,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=15.265267
#EXTINF:1.501500,no-desc
Fragments(video=24729705,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=16.766767
#EXTINF:1.501500,no-desc
Fragments(video=24864840,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=18.268267
#EXTINF:1.501500,no-desc
Fragments(video=24999975,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=19.769767
#EXTINF:1.501500,no-desc
Fragments(video=25135110,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=21.271267
#EXTINF:1.501500,no-desc
Fragments(video=25270245,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=22.772767
#EXTINF:1.501500,no-desc
Fragments(video=25405380,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=24.274267
#EXTINF:1.501500,no-desc
Fragments(video=25540515,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=25.775767
#EXTINF:1.501500,no-desc
Fragments(video=25675650,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=27.277267
#EXTINF:1.501500,no-desc
Fragments(video=25810785,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=28.778767
#EXTINF:1.501500,no-desc
Fragments(video=25945920,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=30.280267
#EXTINF:1.501500,no-desc
Fragments(video=26081055,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=31.781767
#EXTINF:1.501500,no-desc
Fragments(video=26216190,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=33.283267
#EXTINF:1.501500,no-desc
Fragments(video=26351325,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=34.784767
#EXTINF:1.501500,no-desc
Fragments(video=26486460,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=36.286267
#EXTINF:1.501500,no-desc
Fragments(video=26621595,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=37.787767
#EXTINF:1.501500,no-desc
Fragments(video=26756730,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=39.289267
#EXTINF:1.501500,no-desc
Fragments(video=26891865,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=40.790767
#EXTINF:1.501500,no-desc
Fragments(video=27027000,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=42.292267
#EXTINF:1.501500,no-desc
Fragments(video=27162135,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=43.793767
#EXTINF:1.501500,no-desc
Fragments(video=27297270,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=45.295267
#EXTINF:1.501500,no-desc
Fragments(video=27432405,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=46.796767
#EXTINF:1.501500,no-desc
Fragments(video=27567540,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=48.298267
#EXTINF:1.501500,no-desc
Fragments(video=27702675,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=49.799767
#EXTINF:1.501500,no-desc
Fragments(video=27837810,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=51.301267
#EXTINF:1.501500,no-desc
Fragments(video=27972945,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=52.802767
#EXTINF:1.501500,no-desc
Fragments(video=28108080,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=54.304267
#EXTINF:1.501500,no-desc
Fragments(video=28243215,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=55.805767
#EXTINF:1.501500,no-desc
Fragments(video=28378350,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=57.307267
#EXTINF:1.501500,no-desc
Fragments(video=28513485,format=m3u8-aapl-v8)
#EXT-X-DATERANGE:ID="1002",START-DATE="2020-01-07T19:45:09.509Z",SCTE35-OUT=0xFC30250000000005DD00FFF01405000003EA7FEFFE016461B8FE00526363000101010000F20D5E37
#EXT-X-CUE:ID="1002",TYPE="scte35",DURATION=59.993278,TIME=259.509244,CUE="/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==",ELAPSED=58.808767
#EXTINF:1.501500,no-desc
Fragments(video=28648620,format=m3u8-aapl-v8)

3.2.2 将 Apple HLS 与 Adobe Primetime EXT-X-CUE 配合使用(传统方法)3.2.2 Apple HLS with Adobe Primetime EXT-X-CUE (legacy)

Azure 媒体服务(版本 2 和 3 API)中还提供一种“传统”实现,该实现使用 [Adobe-Primetime]“SCTE-35 模式”中定义的 EXT-X-CUE 标记。There is also a "legacy" implementation provided in Azure Media Services (version 2 and 3 API) that uses the EXT-X-CUE tag as defined in [Adobe-Primetime] "SCTE-35 Mode". 在此模式下,Azure 媒体服务会将 base64 编码的 [SCTE-35] splice_info_section() 嵌入到 EXT-X-CUE 标记中。In this mode, Azure Media Services will embed base64-encoded [SCTE-35] splice_info_section() in the EXT-X-CUE tag.

“传统”EXT-X-CUE 标记的定义如下,也可以在 [Adobe-Primetime] 规范中以规范方式引用它。The "legacy" EXT-X-CUE tag is defined as below and also can be normative referenced in the [Adobe-Primetime] specification. 应该只在有必要时才将它用于传统的 SCTE35 信号,否则应根据 EXT-X-DATERANGE 所述在 [RFC8216] 中定义建议的标记。This should only be used for legacy SCTE35 signaling where needed, otherwise the recommended tag is defined in [RFC8216] as EXT-X-DATERANGE.

属性名称Attribute Name 类型Type 必需?Required? 说明Description
提示CUE 带引号的字符串quoted string 必须Required 如 [RFC4648] 中所述编码为 base64 字符串的消息。The message encoded as a base64-encoded string as described in [RFC4648]. 对于 [SCTE-35] 消息,这是 base64 编码的 splice_info_section()。For [SCTE-35] messages, this is the base64-encoded splice_info_section().
TYPETYPE 带引号的字符串quoted string 必须Required 标识消息方案的 URN 或 URL。A URN or URL identifying the message scheme. 对于 [SCTE-35] 消息,类型将采用特殊值“scte35”。For [SCTE-35] messages, the type takes the special value "scte35".
IDID 带引号的字符串quoted string 必须Required 事件的唯一标识符。A unique identifier for the event. 引入消息时,如果未指定 ID,Azure 媒体服务将生成唯一 ID。If the ID is not specified when the message is ingested, Azure Media Services will generate a unique id.
DURATIONDURATION 十进制浮点数decimal floating point number 必须Required 事件持续时间。The duration of the event. 如果未知,该值应该为 0。If unknown, the value SHOULD be 0. 单位为小数形式的秒。Units are factional seconds.
已用时间ELAPSED 十进制浮点数decimal floating point number 可选,但是对于滑动窗口为必需Optional, but Required for sliding window 如果信号重复出现以便支持滑动呈现窗口,此字段必须为事件开始后已经过去的呈现时间量。When the signal is being repeated to support a sliding presentation window, this field MUST be the amount of presentation time that has elapsed since the event began. 单位为小数形式的秒。Units are fractional seconds. 此值可能超过接合或片段的最初指定持续时间。This value may exceed the original specified duration of the splice or segment.
TIMETIME 十进制浮点数decimal floating point number 必须Required 事件的呈现时间。The presentation time of the event. 单位为小数形式的秒。Units are fractional seconds.

HLS 播放器应用程序层将使用 TYPE 执行以下操作:标识消息的格式、对消息进行解码、应用必要的时间转换以及处理事件。The HLS player application layer will use the TYPE to identify the format of the message, decode the message, apply the necessary time conversions, and process the event. 根据事件的时间戳,事件时间在父级轨迹的片段播放列表中保持同步。The events are time synchronized in the segment playlist of the parent track, according to the event timestamp. 它们被插入在最近的片段(#EXTINF 标记)前面。They are inserted before the nearest segment (#EXTINF tag).

3.2.3 使用“传统”Adobe Primetime EXT-X-CUE 的 HLS .m3u8 清单示例3.2.3 HLS .m3u8 manifest example using "Legacy" Adobe Primetime EXT-X-CUE

以下示例演示使用 Adobe Primetime EXT-X-CUE 标记的 HLS 清单修饰。The following example shows HLS manifest decoration using the Adobe Primetime EXT-X-CUE tag. “CUE”参数仅包含 TYPE 和 Duration 属性,这意味着,这是使用 Adobe“简单”模式信号的 RTMP 源。The "CUE" parameter contains only the TYPE and Duration properties which means that this was an RTMP source using Adobe "simple" mode signaling. 如果这是 SCTE-35 模式信号,则标记将包含 base64 编码的二进制 SCTE-35 有效负载,如 3.2.1.1 示例中所示。If this was a SCTE-35 mode signal, the tag would include the base64 encoded binary SCTE-35 payload as seen in the 3.2.1.1 example.

#EXTM3U
#EXT-X-VERSION:4
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-ALLOW-CACHE:NO
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-TARGETDURATION:11
#EXT-X-PROGRAM-DATE-TIME:2019-12-10T09:18:14Z
#EXTINF:10.010000,no-desc
Fragments(video=4011540820,format=m3u8-aapl)
#EXTINF:10.010000,no-desc
Fragments(video=4011550830,format=m3u8-aapl)
#EXTINF:10.010000,no-desc
Fragments(video=4011560840,format=m3u8-aapl)
#EXT-X-CUE:ID=4011578265,TYPE="SpliceOut",DURATION=119.987000,TIME=4011578.265000
#EXTINF:8.008000,no-desc
Fragments(video=4011570850,format=m3u8-aapl)
#EXT-X-CUE:ID=4011578265,TYPE="SpliceOut",DURATION=119.987000,TIME=4011578.265000,ELAPSED=0.593000
#EXTINF:4.170000,no-desc
Fragments(video=4011578858,format=m3u8-aapl)
#EXT-X-CUE:ID=4011578265,TYPE="SpliceOut",DURATION=119.987000,TIME=4011578.265000,ELAPSED=4.763000
#EXTINF:9.844000,no-desc
Fragments(video=4011583028,format=m3u8-aapl)
#EXT-X-CUE:ID=4011578265,TYPE="SpliceOut",DURATION=119.987000,TIME=4011578.265000,ELAPSED=14.607000
#EXTINF:10.010000,no-desc
Fragments(video=4011592872,format=m3u8-aapl)
#EXT-X-CUE:ID=4011578265,TYPE="SpliceOut",DURATION=119.987000,TIME=4011578.265000,ELAPSED=24.617000
#EXTINF:10.010000,no-desc
Fragments(video=4011602882,format=m3u8-aapl)
#EXT-X-CUE:ID=4011578265,TYPE="SpliceOut",DURATION=119.987000,TIME=4011578.265000,ELAPSED=34.627000
#EXTINF:10.010000,no-desc
Fragments(video=4011612892,format=m3u8-aapl)
#EXT-X-CUE:ID=4011578265,TYPE="SpliceOut",DURATION=119.987000,TIME=4011578.265000,ELAPSED=44.637000
#EXTINF:10.010000,no-desc
Fragments(video=4011622902,format=m3u8-aapl)
#EXT-X-CUE:ID=4011578265,TYPE="SpliceOut",DURATION=119.987000,TIME=4011578.265000,ELAPSED=54.647000
#EXTINF:10.010000,no-desc
Fragments(video=4011632912,format=m3u8-aapl)
#EXT-X-CUE:ID=4011578265,TYPE="SpliceOut",DURATION=119.987000,TIME=4011578.265000,ELAPSED=64.657000
#EXTINF:10.010000,no-desc
Fragments(video=4011642922,format=m3u8-aapl)
#EXT-X-CUE:ID=4011578265,TYPE="SpliceOut",DURATION=119.987000,TIME=4011578.265000,ELAPSED=74.667000
#EXTINF:10.010000,no-desc
Fragments(video=4011652932,format=m3u8-aapl)
#EXT-X-CUE:ID=4011578265,TYPE="SpliceOut",DURATION=119.987000,TIME=4011578.265000,ELAPSED=84.677000
#EXTINF:10.010000,no-desc
Fragments(video=4011662942,format=m3u8-aapl)
#EXT-X-CUE:ID=4011578265,TYPE="SpliceOut",DURATION=119.987000,TIME=4011578.265000,ELAPSED=94.687000
#EXTINF:10.010000,no-desc
Fragments(video=4011672952,format=m3u8-aapl)
#EXT-X-CUE:ID=4011578265,TYPE="SpliceOut",DURATION=119.987000,TIME=4011578.265000,ELAPSED=104.697000
#EXTINF:10.010000,no-desc
Fragments(video=4011682962,format=m3u8-aapl)
#EXT-X-CUE:ID=4011578265,TYPE="SpliceOut",DURATION=119.987000,TIME=4011578.265000,ELAPSED=114.707000
#EXTINF:10.010000,no-desc
Fragments(video=4011692972,format=m3u8-aapl)
#EXTINF:8.008000,no-desc
Fragments(video=4011702982,format=m3u8-aapl)

3.2.4“传统”Adobe Primetime EXT-X-CUE 的 HLS 消息处理3.2.4 HLS Message Handling for "Legacy" Adobe Primetime EXT-X-CUE

事件会在每个视频和音频轨迹的片段播放列表中发出信号。根据 [Adobe-Primetime] 的要求,EXT-X-CUE 标记必须始终位于第一个 HLS 片段(用于接合结束或片段开始)之前或位于最后一个 HLS 片段(用于接合开始或片段结束)之后,以便其 TIME 和 DURATION 属性进行引用。Events are signaled in the segment playlist of each video and audio track. The position of the EXT-X-CUE tag MUST always be either immediately before the first HLS segment (for splice out or segment start) or immediately after the last HLS segment (for splice in or segment end) to which its TIME and DURATION attributes refer, as required by [Adobe-Primetime].

根据 [Adobe-Primetime] 的要求,启用滑动呈现窗口后,EXT-X-CUE 标记必须重复出现足够多的次数,以便始终在片段播放列表中完整介绍接合或片段,并且 ELASPED 属性必须用于指示接合或片段活跃的时间量。When a sliding presentation window is enabled, the EXT-X-CUE tag MUST be repeated often enough that the splice or segment is always fully described in the segment playlist, and the ELAPSED attribute MUST be used to indicate the amount of time the splice or segment has been active, as required by [Adobe-Primetime].

启用滑动呈现窗口后,当 EXT-X-CUE 标记引用的媒体时间滚出滑动呈现窗口时,将从片段播放列表中删除该标记。When a sliding presentation window is enabled, the EXT-X-CUE tags are removed from the segment playlist when the media time that they refer to has rolled out of the sliding presentation window.

3.3 DASH 清单修饰 (MPD)3.3 DASH Manifest Decoration (MPD)

[MPEGDASH] 提供三种方式来发出事件信号:[MPEGDASH] provides three ways to signal events:

  1. MPD EventStream 中发出信号的事件Events signaled in the MPD EventStream
  2. 使用事件消息框 ('emsg') 在带内发出信号的事件Events signaled in-band using the Event Message Box ('emsg')
  3. 两者的组合A combination of both 1 and 2

MPD EventStream 中发出信号的事件可用于 VOD 流式处理,因为下载 MPD 后,客户端即可有权访问所有事件。Events signaled in the MPD EventStream are useful for VOD streaming because clients have access to all the events, immediately when the MPD is downloaded. 这也适用于 SSAI 信号,其中的下游 SSAI 供应商需要从多时段 MPD 清单分析信号,并动态插入广告内容。It is also useful for SSAI signaling, where the downstream SSAI vendor needs to parse the signals from a multi-period MPD manifest, and insert ad content dynamically. 带内 ('emsg') 解决方案可用于实时流式处理,其中的客户端无需再次下载 MPD,或者客户端与源之间不会发生任何 SSAI 清单操作。The in-band ('emsg')solution is useful for live streaming where clients do not need to download the MPD again, or there is no SSAI manifest manipulation happening between the client and the origin.

对于 DASH,Azure 媒体服务的默认行为是使用事件消息框 ('emsg') 在 MPD EventStream 中和带内发送信号。Azure Media Services default behavior for DASH is to signal both in the MPD EventStream and in-band using the Event Message Box ('emsg').

通过 [RTMP] 或 [MS-SSTR-Ingest] 引入的提示消息将使用带内“emsg”框和/或 MPD EventStreams 映射为 DASH 事件。Cue messages ingested over [RTMP] or [MS-SSTR-Ingest] are mapped into DASH events, using in-band 'emsg' boxes and/or in-MPD EventStreams.

适用于 DASH 的带内 SCTE-35 信号遵循 [SCTE-214-3] 以及 [DASH-IF-IOP] 部分 13.12.2(“SCTE35 事件”)中的定义和要求。In-band SCTE-35 signaling for DASH follows the definition and requirements defined in [SCTE-214-3] and also in [DASH-IF-IOP] section 13.12.2 ('SCTE35 Events').

对于带内 [SCTE-35] 负载,事件消息框 ('emsg')使用 schemeId = "urn:SCTE:scte35:2013:bin"。For in-band [SCTE-35] carriage, the Event Message box ('emsg') uses the schemeId = "urn:scte:scte35:2013:bin". 对于 MPD 清单修饰,EventStream schemeId 使用 "urn:scte:scte35:2014:xml+bin"。For MPD manifest decoration the EventStream schemeId uses "urn:scte:scte35:2014:xml+bin". 此格式是事件的 XML 表示形式,其中包括引入时抵达的完整 SCTE-35 消息的二进制 base64 编码输出。This format is an XML representation of the event which includes a binary base64-encoded output of the complete SCTE-35 message that arrived at ingest.

[SCTE-214-1] 部分 6.7.4 (MPD) 和 [SCTE-214-3] 部分 7.3.2(SCTE 35 提示消息的负载)提供了 DASH 中 [SCTE-35] 提示消息的负载的规范引用定义。Normative reference definitions of carriage of [SCTE-35] cue messages in DASH are available in [SCTE-214-1] sec 6.7.4 (MPD) and [SCTE-214-3] sec 7.3.2 (Carriage of SCTE 35 cue messages).

3.3.1 MPEG DASH (MPD) EventStream 信号3.3.1 MPEG DASH (MPD) EventStream Signaling

事件的清单 (MPD) 修饰将使用 EventStream 元素在 MPD 中发送信号,该元素将显示在 Period 元素中。Manifest (MPD) decoration of events will be signaled in the MPD using the EventStream element, which appears within the Period element. 使用的 schemeId 为 "urn:scte:scte35:2014:xml+bin"。The schemeId used is "urn:scte:scte35:2014:xml+bin".

备注

为简明起见,[SCTE-35] 允许使用 Signal.Binary 元素(而不是 Signal.SpliceInfoSection 元素)中的 base64 编码部分来代替完整分析的提示消息的负载。For brevity purposes [SCTE-35] allows use of the base64-encoded section in Signal.Binary element (rather than the Signal.SpliceInfoSection element) as an alternative to carriage of a completely parsed cue message. Azure 媒体服务使用此 'xml+bin' 方法在 MPD 清单中发出信号。Azure Media Services uses this 'xml+bin' approach to signaling in the MPD manifest. 这也是 [DASH-IF-IOP] 中建议使用的方法 - 请参阅标题为 DASH IF IOP 的“广告插入事件流”指南的部分This is also the recommended method used in the [DASH-IF-IOP] - see section titled 'Ad insertion event streams' of the DASH IF IOP guideline

EventStream 元素具有以下属性:The EventStream element has the following attributes:

属性名称Attribute Name 类型Type 必需?Required? 说明Description
scheme_id_urischeme_id_uri stringstring 必须Required 标识消息的方案。Identifies the scheme of the message. 方案将设为“Live Server Manifest”块中的方案属性的值。The scheme is set to the value of the Scheme attribute in the Live Server Manifest box. 该值应该是用于标识消息方案的 URN 或 URL;根据 [SCTE-214-1] 部分 6.7.4 (MPD),支持的输出 schemeId 应该是 "urn:scte:scte35:2014:xml+bin",因为出于 MPD 的简洁性,该服务目前仅支持 "xml+bin"。The value SHOULD be a URN or URL identifying the message scheme; The supported output schemeId should be "urn:scte:scte35:2014:xml+bin" per [SCTE-214-1] sec 6.7.4 (MPD), as the service supports only "xml+bin" at this time for brevity in the MPD.
valuevalue stringstring 可选Optional 方案所有者用于自定义消息的语义的附加字符串值。An additional string value used by the owners of the scheme to customize the semantics of the message. 为便于区分具有相同方案的多个事件流,值必须设为 事件流的名称([MS-SSTR-Ingest] 的 trackName,或 [RTMP] 引入的 AMF 消息)。In order to differentiate multiple event streams with the same scheme, the value MUST be set to the name of the event stream (trackName for [MS-SSTR-Ingest] or AMF message name for [RTMP] ingest).
时间刻度Timescale 32 位无符号整数32-bit unsigned integer 必须Required 时间刻度,以每秒为刻度单位。The timescale, in ticks per second.

3.3.2 MPEG DASH 的示例事件流3.3.2 Example Event Streams for MPEG DASH

3.3.2.1 使用 Adobe 简单模式的 RTMP 流的示例 MPEG DASH .mpd 清单信号发送3.3.2.1 Example MPEG DASH .mpd manifest signaling of RTMP streaming using Adobe simple mode

以下示例显示了使用 Adobe“简单”模式信号的 RTMP 流的媒体服务动态打包器的事件流摘录。The following example shows an excerpt EventStream from the Media Services dynamic packager for an RTMP stream using Adobe "simple" mode signaling.

<!-- Example EventStream element using "urn:com:adobe:dpi:simple:2015" Adobe simple signaling per [Adobe-Primetime] -->
    <EventStream schemeIdUri="urn:com:adobe:dpi:simple:2015" value="simplesignal" timescale="10000000">
        <Event presentationTime="1583497601000000" duration="300000000" id="1085900"/>
        <Event presentationTime="1583500901666666" duration="300000000" id="1415966"/>
        <Event presentationTime="1583504202333333" duration="300000000" id="1746033"/>
        <Event presentationTime="1583507502666666" duration="300000000" id="2076066"/>
        <Event presentationTime="1583510803333333" duration="300000000" id="2406133"/>
        <Event presentationTime="1583514104000000" duration="300000000" id="2736200"/>
        <Event presentationTime="1583517404666666" duration="300000000" id="3066266"/>
        <Event presentationTime="1583520705333333" duration="300000000" id="3396333"/>
        <Event presentationTime="1583524006000000" duration="300000000" id="3726400"/>
        <Event presentationTime="1583527306666666" duration="300000000" id="4056466"/>
        <Event presentationTime="1583530607333333" duration="300000000" id="4386533"/>
    </EventStream>

3.3.2.2 使用 Adobe SCTE-35 模式的 RTMP 流的示例 MPEG DASH .mpd 清单信号发送3.3.2.2 Example MPEG DASH .mpd manifest signaling of an RTMP stream using Adobe SCTE-35 mode

以下示例显示了使用 Adobe SCTE-35 模式信号的 RTMP 流的媒体服务动态打包器的事件流摘录。The following example shows an excerpt EventStream from the Media Services dynamic packager for an RTMP stream using Adobe SCTE-35 mode signaling.

<!-- Example EventStream element using xml+bin style signaling per [SCTE-214-1] -->

      <EventStream schemeIdUri="urn:scte:scte35:2014:xml+bin" value="scte35" timescale="10000000">
        <Event presentationTime="2595092444" duration="11011000" id="1002">
            <Signal xmlns="http://www.scte.org/schemas/35/2016">
                <Binary>/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==</Binary>
            </Signal>
        </Event>
        <Event presentationTime="2606103444" id="1002">
            <Signal xmlns="http://www.scte.org/schemas/35/2016">
                <Binary>/DAgAAAAAAXdAP/wDwUAAAPqf0/+AWXk0wABAQEAAGB86Fo=</Binary>
            </Signal>
        </Event>
      </EventStream>

重要

请注意,presentationTime 是 [SCTE-35] 事件的呈现时间,经转换后相对于时段开始时间,而不是消息的抵达时间。Note that presentationTime is the presentation time of the [SCTE-35] event translated to be relative to the Period Start time, not the arrival time of the message. [MPEGDASH] 将 Event@presentationTime 定义为“指定相对于时段开始时间的事件的呈现时间”。[MPEGDASH] defines the Event@presentationTime as "Specifies the presentation time of the event relative to the start of the Period. 呈现时间的值(以秒为单位)是此属性的值与 EventStream@timescale 属性的值相除的结果。The value of the presentation time in seconds is the division of the value of this attribute and the value of the EventStream@timescale attribute. 如果不存在,则呈现时间值为 0。If not present, the value of the presentation time is 0.

3.3.3.1 使用 Adobe 简单模式信号的单周期事件流的示例 MPEG DASH 清单 (MPD)3.3.3.1 Example MPEG DASH manifest (MPD) with single-period, EventStream, using Adobe simple mode signals

以下示例显示了使用 Adobe“简单”模式广告信号方法的源 RTMP 流的媒体服务动态打包器的输出。The following example shows the output from the Media Services dynamic packager for a source RTMP stream using the Adobe "simple" mode ad signal method. 输出是单周期清单,显示使用设置为“urn:com:adobe:dpi:simple:2015”的 schemeId URI、设置为“simplesignal”的值属性的事件流。The output is a single period manifest showing an EventStream using the schemeId Uri set to "urn:com:adobe:dpi:simple:2015" and value property set to "simplesignal". 每个简单信号在某个 Event 元素中提供,该元素中的 @presentationTime、@duration 和 @id 属性是根据传入的简单信号填充的。Each simple signal is provided in an Event element with the @presentationTime, @duration, and @id properties populated based on the incoming simple signals.

<?xml version="1.0" encoding="utf-8"?>
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="static" mediaPresentationDuration="PT28M1.680S" minBufferTime="PT3S">
    <Period>
        <EventStream schemeIdUri="urn:com:adobe:dpi:simple:2015" value="simplesignal" timescale="1000">
            <Event presentationTime="4011578265" duration="119987" id="4011578265"/>
        </EventStream>
        <AdaptationSet id="1" group="1" profiles="ccff" bitstreamSwitching="false" segmentAlignment="true" contentType="video" mimeType="video/mp4" codecs="avc1.4D4028" maxWidth="1920" maxHeight="1080" startWithSAP="1">
            <InbandEventStream schemeIdUri="urn:com:adobe:dpi:simple:2015" value="simplesignal"/>
            <ProducerReferenceTime id="4011460740" type="0" wallClockTime="2020-01-25T19:35:54.740Z" presentationTime="4011460740"/>
            <SegmentTemplate timescale="1000" presentationTimeOffset="4011460740" media="QualityLevels($Bandwidth$)/Fragments(video=$Time$,format=mpd-time-csf)" initialization="QualityLevels($Bandwidth$)/Fragments(video=i,format=mpd-time-csf)">
                <SegmentTimeline>
                    <S t="4011460740" d="2002" r="57"/>
                    <S d="1401"/>
                    <S d="601"/>
                    <S d="2002"/>

                     <!--> ... video segments truncated for sample brevity </-->

                </SegmentTimeline>
            </SegmentTemplate>
            <Representation id="1_V_video_14759481473095519504" bandwidth="6000000" width="1920" height="1080"/>
            <Representation id="1_V_video_1516803357996956148" bandwidth="4000000" codecs="avc1.4D401F" width="1280" height="720"/>
            <Representation id="1_V_video_5430608182379669372" bandwidth="2600000" codecs="avc1.4D401F" width="960" height="540"/>
            <Representation id="1_V_video_3780180650986497347" bandwidth="1000000" codecs="avc1.4D401E" width="640" height="360"/>
            <Representation id="1_V_video_13759117363700265707" bandwidth="699000" codecs="avc1.4D4015" width="480" height="270"/>
            <Representation id="1_V_video_6140004908920393176" bandwidth="400000" codecs="avc1.4D4015" width="480" height="270"/>
            <Representation id="1_V_video_10673801877453424365" bandwidth="200000" codecs="avc1.4D400D" width="320" height="180"/>
        </AdaptationSet>
        <AdaptationSet id="2" group="5" profiles="ccff" bitstreamSwitching="false" segmentAlignment="true" contentType="audio" mimeType="audio/mp4" codecs="mp4a.40.2">
            <InbandEventStream schemeIdUri="urn:com:adobe:dpi:simple:2015" value="simplesignal"/>
            <ProducerReferenceTime id="4011460761" type="0" wallClockTime="2020-01-25T19:35:54.761Z" presentationTime="4011460761"/>
            <Label>audio</Label>
            <SegmentTemplate timescale="1000" presentationTimeOffset="4011460740" media="QualityLevels($Bandwidth$)/Fragments(audio=$Time$,format=mpd-time-csf)" initialization="QualityLevels($Bandwidth$)/Fragments(audio=i,format=mpd-time-csf)">
                <SegmentTimeline>
                    <S t="4011460761" d="1984"/>
                    <S d="2005" r="1"/>
                    <S d="2006"/>

                    <!--> ... audio segments truncated for example brevity </-->

                </SegmentTimeline>
            </SegmentTemplate>
            <Representation id="5_A_audio_17504386117102112482" bandwidth="128000" audioSamplingRate="48000"/>
        </AdaptationSet>
    </Period>
</MPD>

3.3.3.2 使用 Adobe SCTE35 模式信号的多周期事件流的示例 MPEG DASH 清单 (MPD)3.3.3.2 Example MPEG DASH manifest (MPD) with multi-period, EventStream, using Adobe SCTE35 mode signaling

以下示例显示了使用 Adobe SCTE35 模式信号的源 RTMP 流的媒体服务动态打包器的输出。The following example shows the output from the Media Services dynamic packager for a source RTMP stream using the Adobe SCTE35 mode signaling. 在本例中,输出清单是包含 EventStream 元素的多周期 DASH .mpd,@schemeIdUri 属性设置为“urn:scte:scte35:2014:xml+bin”,@value 属性设置为“scte35”。In this case, the output manifest is a multi-period DASH .mpd with an EventStream element, and @schemeIdUri property set to "urn:scte:scte35:2014:xml+bin" and a @value property set to "scte35". EventStream 中的每个 Event 元素包含完整的 base64 编码二进制 SCTE35 信号Each Event element in the EventStream contains the full base64 encoded binary SCTE35 signal

<?xml version="1.0" encoding="utf-8"?>
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="dynamic" publishTime="2020-01-07T19:42:44Z" minimumUpdatePeriod="PT0S" timeShiftBufferDepth="PT58M56S" availabilityStartTime="2020-01-07T19:40:50Z" minBufferTime="PT4S">
    <Period start="PT2M48.168S" id="main-content_0">
        <AdaptationSet id="1" group="1" profiles="ccff" bitstreamSwitching="false" segmentAlignment="true" contentType="video" mimeType="video/mp4" codecs="avc1.640020" maxWidth="1280" maxHeight="720" startWithSAP="1">
            <InbandEventStream schemeIdUri="urn:mpeg:dash:event:2012" value="1"/>
            <InbandEventStream schemeIdUri="urn:com:adobe:dpi:simple:2015" value="amssignal"/>
            <SegmentTemplate timescale="90000" presentationTimeOffset="15135120" media="QualityLevels($Bandwidth$)/Fragments(video=$Time$,format=mpd-time-csf)" initialization="QualityLevels($Bandwidth$)/Fragments(video=i,format=mpd-time-csf)">
                <SegmentTimeline>
                    <S t="15135120" d="135135" r="59"/>
                    <S d="111111"/>
                    <S d="1502"/>
                </SegmentTimeline>
            </SegmentTemplate>
            <ProducerReferenceTime id="15135120" type="0" wallClockTime="2020-01-07T19:40:50Z" presentationTime="15135120"/>
            <Representation id="1_V_video_5322324134428436312" bandwidth="3500000" width="1280" height="720"/>
            <Representation id="1_V_video_16981495139092747609" bandwidth="2200000" width="960" height="540"/>
            <Representation id="1_V_video_1384718563016940751" bandwidth="1350000" codecs="avc1.64001F" width="704" height="396"/>
            <Representation id="1_V_video_4425970933904124207" bandwidth="850000" codecs="avc1.64001E" width="512" height="288"/>
            <Representation id="1_V_video_11952982975776937431" bandwidth="550000" codecs="avc1.640016" width="384" height="216"/>
            <Representation id="1_V_video_10673801877453424365" bandwidth="200000" codecs="avc1.640015" width="340" height="192"/>
        </AdaptationSet>
        <AdaptationSet id="2" group="5" profiles="ccff" bitstreamSwitching="false" segmentAlignment="true" contentType="audio" mimeType="audio/mp4" codecs="mp4a.40.5" lang="en">
            <InbandEventStream schemeIdUri="urn:mpeg:dash:event:2012" value="1"/>
            <InbandEventStream schemeIdUri="urn:com:adobe:dpi:simple:2015" value="amssignal"/>
            <Label>audio</Label>
            <SegmentTemplate timescale="44100" presentationTimeOffset="7416208" media="QualityLevels($Bandwidth$)/Fragments(audio=$Time$,format=mpd-time-csf)" initialization="QualityLevels($Bandwidth$)/Fragments(audio=i,format=mpd-time-csf)">
                <SegmentTimeline>
                    <S t="7417856" d="133120"/>
                    <S d="132096" r="1"/>
                    
                    <!--> ... aduio segments truncated for sample brevity </-->

                </SegmentTimeline>
            </SegmentTemplate>
            <ProducerReferenceTime id="7417856" type="0" wallClockTime="2020-01-07T19:40:50.037Z" presentationTime="7417856"/>
            <Representation id="5_A_audio_17504386117102112482" bandwidth="128000" audioSamplingRate="44100"/>
        </AdaptationSet>
    </Period>
    <Period start="PT4M19.509S" id="scte-35_0">
        <EventStream schemeIdUri="urn:scte:scte35:2014:xml+bin" value="scte35" timescale="10000000">
            <Event presentationTime="2595092444" duration="11011000" id="1002">
                <Signal xmlns="http://www.scte.org/schemas/35/2016">
                    <Binary>/DAlAAAAAAXdAP/wFAUAAAPqf+/+AWRhuP4AUmNjAAEBAQAA8g1eNw==</Binary>
                </Signal>
            </Event>
            <Event presentationTime="2606103444" id="1002">
                <Signal xmlns="http://www.scte.org/schemas/35/2016">
                    <Binary>/DAgAAAAAAXdAP/wDwUAAAPqf0/+AWXk0wABAQEAAGB86Fo=</Binary>
                </Signal>
            </Event>
        </EventStream>
        <AdaptationSet id="1" group="1" profiles="ccff" bitstreamSwitching="false" segmentAlignment="true" contentType="video" mimeType="video/mp4" codecs="avc1.640020" maxWidth="1280" maxHeight="720" startWithSAP="1">
            <InbandEventStream schemeIdUri="urn:mpeg:dash:event:2012" value="1"/>
            <InbandEventStream schemeIdUri="urn:com:adobe:dpi:simple:2015" value="amssignal"/>
            <SegmentTemplate timescale="90000" presentationTimeOffset="23355832" media="QualityLevels($Bandwidth$)/Fragments(video=$Time$,format=mpd-time-csf)" initialization="QualityLevels($Bandwidth$)/Fragments(video=i,format=mpd-time-csf)">
                <SegmentTimeline>
                    <S t="23355833" d="22522"/>
                    <S d="76577"/>
                </SegmentTimeline>
            </SegmentTemplate>
            <ProducerReferenceTime id="23355833" type="0" wallClockTime="2020-01-07T19:42:21.341Z" presentationTime="23355833"/>
            <Representation id="1_V_video_5322324134428436312" bandwidth="3500000" width="1280" height="720"/>
            <Representation id="1_V_video_16981495139092747609" bandwidth="2200000" width="960" height="540"/>
            <Representation id="1_V_video_1384718563016940751" bandwidth="1350000" codecs="avc1.64001F" width="704" height="396"/>
            <Representation id="1_V_video_4425970933904124207" bandwidth="850000" codecs="avc1.64001E" width="512" height="288"/>
            <Representation id="1_V_video_11952982975776937431" bandwidth="550000" codecs="avc1.640016" width="384" height="216"/>
            <Representation id="1_V_video_10673801877453424365" bandwidth="200000" codecs="avc1.640015" width="340" height="192"/>
        </AdaptationSet>
        <AdaptationSet id="2" group="5" profiles="ccff" bitstreamSwitching="false" segmentAlignment="true" contentType="audio" mimeType="audio/mp4" codecs="mp4a.40.5" lang="en">
            <InbandEventStream schemeIdUri="urn:mpeg:dash:event:2012" value="1"/>
            <InbandEventStream schemeIdUri="urn:com:adobe:dpi:simple:2015" value="amssignal"/>
            <Label>audio</Label>
            <SegmentTemplate timescale="44100" presentationTimeOffset="11444358" media="QualityLevels($Bandwidth$)/Fragments(audio=$Time$,format=mpd-time-csf)" initialization="QualityLevels($Bandwidth$)/Fragments(audio=i,format=mpd-time-csf)">
                <SegmentTimeline>
                    <S t="11446272" d="49152"/>
                </SegmentTimeline>
            </SegmentTemplate>
            <ProducerReferenceTime id="11446272" type="0" wallClockTime="2020-01-07T19:42:21.384Z" presentationTime="11446272"/>
            <Representation id="5_A_audio_17504386117102112482" bandwidth="128000" audioSamplingRate="44100"/>
        </AdaptationSet>
    </Period>
    <Period start="PT4M20.610S" id="main-content_1">
        <AdaptationSet id="1" group="1" profiles="ccff" bitstreamSwitching="false" segmentAlignment="true" contentType="video" mimeType="video/mp4" codecs="avc1.640020" maxWidth="1280" maxHeight="720" startWithSAP="1">
            <InbandEventStream schemeIdUri="urn:mpeg:dash:event:2012" value="1"/>
            <InbandEventStream schemeIdUri="urn:com:adobe:dpi:simple:2015" value="amssignal"/>
            <SegmentTemplate timescale="90000" presentationTimeOffset="23454931" media="QualityLevels($Bandwidth$)/Fragments(video=$Time$,format=mpd-time-csf)" initialization="QualityLevels($Bandwidth$)/Fragments(video=i,format=mpd-time-csf)">
                <SegmentTimeline>
                    <S t="23454932" d="58558"/>
                    <S d="4504"/>
                    <S d="130631"/>
                    <S d="135135" r="12"/>
                </SegmentTimeline>
            </SegmentTemplate>
            <ProducerReferenceTime id="23454932" type="0" wallClockTime="2020-01-07T19:42:22.442Z" presentationTime="23454932"/>
            <Representation id="1_V_video_5322324134428436312" bandwidth="3500000" width="1280" height="720"/>
            <Representation id="1_V_video_16981495139092747609" bandwidth="2200000" width="960" height="540"/>
            <Representation id="1_V_video_1384718563016940751" bandwidth="1350000" codecs="avc1.64001F" width="704" height="396"/>
            <Representation id="1_V_video_4425970933904124207" bandwidth="850000" codecs="avc1.64001E" width="512" height="288"/>
            <Representation id="1_V_video_11952982975776937431" bandwidth="550000" codecs="avc1.640016" width="384" height="216"/>
            <Representation id="1_V_video_10673801877453424365" bandwidth="200000" codecs="avc1.640015" width="340" height="192"/>
        </AdaptationSet>
        <AdaptationSet id="2" group="5" profiles="ccff" bitstreamSwitching="false" segmentAlignment="true" contentType="audio" mimeType="audio/mp4" codecs="mp4a.40.5" lang="en">
            <InbandEventStream schemeIdUri="urn:mpeg:dash:event:2012" value="1"/>
            <InbandEventStream schemeIdUri="urn:com:adobe:dpi:simple:2015" value="amssignal"/>
            <Label>audio</Label>
            <SegmentTemplate timescale="44100" presentationTimeOffset="11492916" media="QualityLevels($Bandwidth$)/Fragments(audio=$Time$,format=mpd-time-csf)" initialization="QualityLevels($Bandwidth$)/Fragments(audio=i,format=mpd-time-csf)">
                <SegmentTimeline>
                    <S t="11495424" d="28672"/>
                    <S d="1024"/>
                    <S d="131072"/>
                    <S d="132096"/>
                    <S d="133120"/>
                    <S d="132096" r="1"/>
                    <S d="133120"/>
                </SegmentTimeline>
            </SegmentTemplate>
            <ProducerReferenceTime id="11495424" type="0" wallClockTime="2020-01-07T19:42:22.499Z" presentationTime="11495424"/>
            <Representation id="5_A_audio_17504386117102112482" bandwidth="128000" audioSamplingRate="44100"/>
        </AdaptationSet>
    </Period>
</MPD>

3.3.4 MPEG DASH 带内事件消息框信号3.3.4 MPEG DASH In-band Event Message Box Signaling

带内事件流要求 MPD 具有适应集级别的 InbandEventStream 元素。An in-band event stream requires the MPD to have an InbandEventStream element at the Adaptation Set level. 此元素具有一个必需的 schemeIdUri 属性和可选的时间刻度属性,该属性还显示在事件消息块(“emsg”)中。This element has a mandatory schemeIdUri attribute and optional timescale attribute, which also appear in the Event Message Box ('emsg'). 不应存在具有未在 MPD 中定义的方案标识符的事件消息框。Event message boxes with scheme identifiers that are not defined in the MPD SHOULD not be present.

对于带内 [SCTE-35] 负载,信号必须使用 schemeId = "urn:scte:scte35:2013:bin"。For in-band [SCTE-35] carriage, signals MUST use the schemeId = "urn:scte:scte35:2013:bin". [SCTE-214-3] 部分 7.3.2(SCTE 35 提示消息的负载)中定义了 [SCTE-35] 带内消息的规范定义。Normative definitions of carriage of [SCTE-35] in-band messages are defined in [SCTE-214-3] sec 7.3.2 (Carriage of SCTE 35 cue messages).

以下详细信息概述了客户端预期在 'emsg' 中使用的符合 [SCTE-214-3] 的特定值:The following details outline the specific values the client should expect in the 'emsg' in compliance with [SCTE-214-3]:

字段名称Field Name 字段类型Field Type 必需?Required? 说明Description
scheme_id_urischeme_id_uri stringstring 必须Required 标识消息的方案。Identifies the scheme of the message. 方案将设为“Live Server Manifest”块中的方案属性的值。The scheme is set to the value of the Scheme attribute in the Live Server Manifest box. 该值必须是用于标识消息方案的 URN。The value MUST be a URN identifying the message scheme. 对于 [SCTE-35] 消息,此值 必须是符合 [SCTE-214-3] 的 "urn:scte:scte35:2013:bin"For [SCTE-35] messages, this MUST be "urn:scte:scte35:2013:bin" in compliance with [SCTE-214-3]
ValueValue stringstring 必须Required 方案所有者用于自定义消息的语义的附加字符串值。An additional string value used by the owners of the scheme to customize the semantics of the message. 为便于区分具有相同方案的多个事件流,值将设为 事件流的名称(平滑引入的 trackName 或 RTMP 引入的 AMF 消息)。In order to differentiate multiple event streams with the same scheme, the value will be set to the name of the event stream (trackName for Smooth ingest or AMF message name for RTMP ingest).
时间刻度Timescale 32 位无符号整数32-bit unsigned integer 必须Required “emsg”块中的时间和持续时间字段的时间刻度(以“滴答数/秒”为单位)。The timescale, in ticks per second, of the times and duration fields within the 'emsg' box.
Presentation_time_deltaPresentation_time_delta 32 位无符号整数32-bit unsigned integer 必须Required 此片段中的事件呈现时间的媒体呈现时间增量和最早的呈现时间。The media presentation time delta of the presentation time of the event and the earliest presentation time in this segment. 呈现时间和持续时间应该与类型 1 或 类型 2 的流访问点 (SAP) 保持一致,如 [ISO-14496-12] 附录 I 中所述。The presentation time and duration SHOULD align with Stream Access Points (SAP) of type 1 or 2, as defined in [ISO-14496-12] Annex I.
event_durationevent_duration 32 位无符号整数32-bit unsigned integer 必须Required 事件的持续时间或 0xFFFFFFFF,以指示未知的持续时间。The duration of the event, or 0xFFFFFFFF to indicate an unknown duration.
IDId 32 位无符号整数32-bit unsigned integer 必须Required 标识消息的此实例。Identifies this instance of the message. 具有等效语义的消息应具有相同的值。Messages with equivalent semantics shall have the same value. 引入消息时,如果未指定 ID,Azure 媒体服务将生成唯一 ID。If the ID is not specified when the message is ingested, Azure Media Services will generate a unique id.
Message_dataMessage_data Byte Arraybyte array 必须Required 事件消息。The event message. 对于 [SCTE-35] 消息,消息数据是符合 [SCTE-214-3] 的二进制 binary splice_info_section()For [SCTE-35] messages, the message data is the binary splice_info_section() in compliance with [SCTE-214-3]

Adobe 简单模式的示例 InBandEvenStream 实体Example InBandEvenStream entity for Adobe Simple mode


      <InbandEventStream schemeIdUri="urn:com:adobe:dpi:simple:2015" value="amssignal"/>

3.3.5 DASH 消息处理3.3.5 DASH Message Handling

对于视频和音频轨迹,事件都是“emsg”块内的带内信号。Events are signaled in-band, within the 'emsg' box, for both video and audio tracks. 所有片段请求都会发出信号,因为 presentation_time_delta 为 15 秒或更少。The signaling occurs for all segment requests for which the presentation_time_delta is 15 seconds or less.

启用滑动呈现窗口后,当事件消息的时间和持续时间之和小于清单中的媒体数据的时间时,将从 MPD 中删除事件消息。When a sliding presentation window is enabled, event messages are removed from the MPD when the sum of the time and duration of the event message is less than the time of the media data in the manifest. 换而言之,当事件消息引用的媒体时间滚出滑动呈现窗口时,将从清单中删除事件消息。In other words, the event messages are removed from the manifest when the media time to which they refer has rolled out of the sliding presentation window.

4.面向编码器供应商的 SCTE-35 引入实现指南4. SCTE-35 Ingest Implementation Guidance for Encoder Vendors

以下指导原则针对编码器供应商在实施此规范时可能遇到的常见问题。The following guidelines are common issues that can impact an encoder vendor's implementation of this specification. 以下指导原则是根据真实的合作伙伴反馈收集的,旨在更轻松地为其他人实施此规范。The guidelines below have been collected based on real world partner feedback to make it easier to implement this specification for others.

[SCTE-35] 消息针对 [MS-SSTR-Ingest] 使用方案 “urn:scte:scte35:2013:bin” 以二进制格式引入,并针对 [RTMP] 引入使用类型 “scte35”[SCTE-35] messages are ingested in binary format using the Scheme "urn:scte:scte35:2013:bin" for [MS-SSTR-Ingest] and the type "scte35" for [RTMP] ingest. 为便于转换基于 MPEG-2 传输流呈现时间戳 (PTS) 的 [SCTE-35] 计时,事件呈现时间(对于平滑引入为 fragment_absolute_time 字段,对于 RTMP 引入为时间字段)在 PTS (pts_time + pts_adjustment of the splice_time()) 和媒体时间线之间提供了一种映射。To facilitate the conversion of [SCTE-35] timing, which is based on MPEG-2 transport stream presentation time stamps (PTS), a mapping between PTS (pts_time + pts_adjustment of the splice_time()) and the media timeline is provided by the event presentation time (the fragment_absolute_time field for Smooth ingest and the time field for RTMP ingest). 映射是必需的,因为 33 位 PTS 值每隔大约 26.5 小时将汇总一次。The mapping is necessary because the 33-bit PTS value rolls over approximately every 26.5 hours.

平滑流式处理引入 [MS-SSTR-Ingest] 要求媒体数据框 (‘mdat’) 必须包含 [SCTE-35] 中所定义的 splice_info_section()Smooth Streaming ingest [MS-SSTR-Ingest] requires that the Media Data Box ('mdat') MUST contain the splice_info_section() defined in [SCTE-35].

对于 RTMP 引入,AMF 消息的提示属性应设置为 [SCTE-35] 中定义的 base64 编码splice_info_section()For RTMP ingest,the cue attribute of the AMF message is set to the base64-encoded splice_info_section() defined in [SCTE-35].

如果消息采用上述格式,它们将发送到上面定义的 HLS、Smooth 和 DASH 客户端。When the messages have the format described above, they are sent to HLS, Smooth, and DASH clients as defined above.

使用 Azure 媒体服务平台测试实现时,请先使用“直通”LiveEvent 开始测试,然后继续对编码 LiveEvent 进行测试。When testing your implementation with the Azure Media Services platform, please start testing with a "pass-through" LiveEvent first, before moving to testing on an encoding LiveEvent.


更改历史记录Change History

DateDate 更改Changes
07/2/1907/2/19 修订了 SCTE35 的 RTMP 引入支持,添加了 Elemental Live 的 RTMP“onCuePoint”Revised RTMP ingest for SCTE35 support, added RTMP "onCuePoint" for Elemental Live
08/22/1908/22/19 已做出更新,将 OnUserDataEvent 添加到自定义元数据的 RTMPUpdated to add OnUserDataEvent to RTMP for custom metadata
1/08/201/08/20 修复了 RTMP 简单模式和 RTMP SCTE35 模式的错误。Fixed error on RTMP Simple and RTMP SCTE35 mode. 已从“onCuePoint”更改为“onAdCue”。Changed from "onCuePoint" to "onAdCue". 更新了简单模式表。Updated Simple mode table.

后续步骤Next steps

查看媒体服务学习路径。View Media Services learning paths.

媒体服务 v3(最新版本)Media Services v3 (latest)

查看最新版本的 Azure 媒体服务!Check out the latest version of Azure Media Services!

媒体服务 v2(旧版)Media Services v2 (legacy)