输出元数据Output Metadata

媒体服务徽标media services logo


概述Overview

编码作业与要执行部分编码任务的输入资产相关联。An encoding job is associated with an input asset (or assets) on which you want to perform some encoding tasks. 例如,将 MP4 文件编码为 H.264 MP4 自适应比特率集;创建缩略图;创建叠加。For example, encode an MP4 file to H.264 MP4 adaptive bitrate sets; create a thumbnail; create overlays. 完成任务后,会生成一个输出资产。Upon completion of a task, an output asset is produced. 该输出资产包含视频、音频、缩略图等。输出资产还包含提供输出资产相关元数据的文件。The output asset contains video, audio, thumbnails, etc. The output asset also contains a file with metadata about the output asset. 元数据 XML 文件的名称采用下列格式:<source_file_name>_manifest.xml(例如,BigBuckBunny_manifest.xml)。The name of the metadata XML file has the following format: <source_file_name>_manifest.xml (for example, BigBuckBunny_manifest.xml).

媒体服务不会先扫描输入资产以生成元数据。Media Services does not pre-emptively scan input Assets to generate metadata. 只有在作业中处理输入资产时,才会生成输入元数据。Input metadata is generated only as an artifact when an input Asset is processed in a Job. 因此,此项目会写入到输出资产。Hence this artifact is written to the output Asset. 使用不同的工具为输入资产和输出资产生成元数据。Different tools are used to generate metadata for input Assets and output Assets. 因此,输入元数据的模式与输出元数据略有不同。Therefore, the input metadata has a slightly different schema than the output metadata.

要检查元数据文件,可以创建 SAS 定位器并将文件下载到本地计算机。If you want to examine the metadata file, you can create a SAS locator and download the file to your local computer.

本文讨论作为输出元数据 (<source_file_name >_manifest.xml) 的基础的 XML架构的元素和类型。This article discusses the elements and types of the XML schema on which the output metada (<source_file_name>_manifest.xml) is based. 有关包含关于输入资产的元数据的文件的信息,请参阅“输入元数据”。For information about the file that contains metadata about the input asset, see Input Metadata.

可以在本文末尾找到完整的架构代码和 XML 示例。You can find the complete schema code and XML example at the end of this article.

AssetFiles 根元素AssetFiles root element

用于编码作业的 AssetFile 条目的集合。Collection of AssetFile entries for the encoding job.

子元素Child elements

名称Name 说明Description
AssetFile AssetFile

minOccurs="0" maxOccurs="1"minOccurs="0" maxOccurs="1"
AssetFile 元素是 AssetFiles 集合的一部分。An AssetFile element that is part of the AssetFiles collection.

AssetFile 元素AssetFile element

可以找到 XML 示例,请参阅 XML 示例You can find an XML example XML example.

属性Attributes

名称Name 类型Type 说明Description
名称Name

必须Required
xs:stringxs:string 媒体资产文件名称。The media asset file name.
大小Size

minInclusive ="0"minInclusive ="0"

必须Required
xs:longxs:long 以字节为单位的资产文件大小。Size of the asset file in bytes.
持续时间Duration

必须Required
xs:durationxs:duration 内容播放持续时间。Content play back duration.

子元素Child elements

名称Name 说明Description
Sources 输入/源媒体文件的集合,处理该集合以生成此 AssetFile。Collection of input/source media files, that was processed in order to produce this AssetFile. 有关详细信息,请参阅“源元素”。For more information, see Source element.
VideoTracks VideoTracks

minOccurs="0" maxOccurs="1"minOccurs="0" maxOccurs="1"
每个物理 AssetFile 都可包含交错成适当容器格式的零个或多个视频轨道。Each physical AssetFile can contain in it zero or more videos tracks interleaved into an appropriate container format. 有关详细信息,请参阅“VideoTracks 元素”。For more information, see VideoTracks element.
AudioTracks AudioTracks

minOccurs="0" maxOccurs="1"minOccurs="0" maxOccurs="1"
每个物理 AssetFile 可以包含零个或以上交错到相应容器格式的音频轨道。Each physical AssetFile can contain in it zero or more audio tracks interleaved into an appropriate container format. 这是所有这些音频轨道的集合。This is the collection of all those audio tracks. 有关详细信息,请参阅“AudioTracks 元素”。For more information, see AudioTracks element.

Sources 元素Sources element

输入/源媒体文件的集合,处理该集合以生成此 AssetFile。Collection of input/source media files, that was processed in order to produce this AssetFile.

可以找到 XML 示例,请参阅 XML 示例You can find an XML example XML example.

子元素Child elements

名称Name 说明Description
Source Source

minOccurs="1" maxOccurs="unbounded"minOccurs="1" maxOccurs="unbounded"
生成此资产时所使用的输入/源文件。An input/source file used when generating this asset. 有关详细信息,请参阅“源元素”。For more information, see Source element.

Source 元素Source element

生成此资产时所使用的输入/源文件。An input/source file used when generating this asset.

可以找到 XML 示例,请参阅 XML 示例You can find an XML example XML example.

属性Attributes

名称Name 类型Type 说明Description
名称Name

必须Required
xs:stringxs:string 输入源文件名称。Input source file name.

VideoTracks 元素VideoTracks element

每个物理 AssetFile 都可包含交错成适当容器格式的零个或多个视频轨道。Each physical AssetFile can contain in it zero or more videos tracks interleaved into an appropriate container format. VideoTracks 元素表示其中包含所有视频轨道的一个集合。The VideoTracks element represents a collection of all the video tracks.

可以找到 XML 示例,请参阅 XML 示例You can find an XML example XML example.

子元素Child elements

名称Name 说明Description
VideoTrackVideoTrack

minOccurs="1" maxOccurs="unbounded"minOccurs="1" maxOccurs="unbounded"
父 AssetFile 中的特定视频轨道。A specific video track in the parent AssetFile. 有关详细信息,请参阅“VideoTrack 元素”。For more information, see VideoTrack element.

VideoTrack 元素VideoTrack element

父 AssetFile 中的特定视频轨道。A specific video track in the parent AssetFile.

可以找到 XML 示例,请参阅 XML 示例You can find an XML example XML example.

属性Attributes

名称Name 类型Type 说明Description
Id Id

minInclusive ="0"minInclusive ="0"

必须Required
xs:intxs:int 此视频轨道从零开始的索引。注意: 此“Id”不一定是 MP4 文件中使用的 TrackID 。Zero-based index of this video track. Note: This Id is not necessarily the TrackID as used in an MP4 file.
FourCC FourCC

必须Required
xs:stringxs:string 视频编解码器 FourCC 代码。Video codec FourCC code.
配置文件Profile xs:stringxs:string H264 配置文件(仅适用于 H264 编解码器)。H264 profile (only applicable to H264 codec).
Level Level xs:stringxs:string H264 级别(仅适用于 H264 编解码器)。H264 level (only applicable to H264 codec).
Width Width

minInclusive ="0"minInclusive ="0"

必须Required
xs:intxs:int 以像素为单位的编码视频宽度。Encoded video width in pixels.
Height Height

minInclusive ="0"minInclusive ="0"

必须Required
xs:intxs:int 以像素为单位的编码视频高度。Encoded video height in pixels.
DisplayAspectRatioNumerator DisplayAspectRatioNumerator

minInclusive ="0"minInclusive ="0"

必须Required
xs:doublexs:double 视频显示纵横比分子。Video display aspect ratio numerator.
DisplayAspectRatioDenominator DisplayAspectRatioDenominator

minInclusive ="0"minInclusive ="0"

必须Required
xs:doublexs:double 视频显示纵横比分母。Video display aspect ratio denominator.
Framerate Framerate

minInclusive ="0"minInclusive ="0"

必须Required
xs:decimalxs:decimal 采用 .3f 格式的测量的视频帧速率。Measured video frame rate in .3f format.
TargetFramerate TargetFramerate

minInclusive ="0"minInclusive ="0"

必须Required
xs:decimalxs:decimal 预设 .3f 格式的目标视频帧速率。Preset target video frame rate in .3f format.
Bitrate Bitrate

minInclusive ="0"minInclusive ="0"

必须Required
xs:intxs:int 由 AssetFile 计算所得的平均视频比特率(千比特/秒)。Average video bit rate in kilobits per second, as calculated from the AssetFile. 仅针对基本流有效负载计数,不包含打包开销。Counts only the elementary stream payload, and does not include the packaging overhead.
TargetBitrate TargetBitrate

minInclusive ="0"minInclusive ="0"

必须Required
xs:intxs:int 通过编码预设请求的此视频轨道的目标平均比特率(千比特/秒)。Target average bitrate for this video track, as requested via the encoding preset, in kilobits per second.
MaxGOPBitrateMaxGOPBitrate

minInclusive ="0"minInclusive ="0"
xs:intxs:int 此视频轨道的最大 GOP 平均比特率(千比特/秒)。Max GOP average bitrate for this video track, in kilobits per second.

AudioTracks 元素AudioTracks element

每个物理 AssetFile 可以包含零个或以上交错到相应容器格式的音频轨道。Each physical AssetFile can contain in it zero or more audio tracks interleaved into an appropriate container format. AudioTracks 元素表示其中包含所有那些音频轨道的一个集合。The AudioTracks element represents a collection of all those audio tracks.

可以找到 XML 示例,请参阅 XML 示例You can find an XML example XML example.

子元素Child elements

名称Name 说明Description
AudioTrackAudioTrack

minOccurs="1" maxOccurs="unbounded"minOccurs="1" maxOccurs="unbounded"
父 AssetFile 中的特定音频轨道。A specific audio track in the parent AssetFile. 有关详细信息,请参阅“AudioTrack 元素”。For more information, see AudioTrack element.

AudioTrack 元素AudioTrack element

父 AssetFile 中的特定音频轨道。A specific audio track in the parent AssetFile.

可以找到 XML 示例,请参阅 XML 示例You can find an XML example XML example.

属性Attributes

名称Name 类型Type 说明Description
Id Id

minInclusive ="0"minInclusive ="0"

必须Required
xs:intxs:int 此音频轨道从零开始的索引。注意: 也不一定是 MP4 文件中使用的 TrackID。Zero-based index of this audio track. Note: This is not necessarily the TrackID as used in an MP4 file.
CodecCodec xs:stringxs:string 音频轨道编解码器字符串。Audio track codec string.
EncoderVersionEncoderVersion xs:stringxs:string 可选的编码器版本字符串,对于 EAC3 是必需的。Optional encoder version string, required for EAC3.
通道 Channels

minInclusive ="0"minInclusive ="0"

必须Required
xs:intxs:int 音频通道数。Number of audio channels.
SamplingRate SamplingRate

minInclusive ="0"minInclusive ="0"

必须Required
xs:intxs:int 音频采样率(样本数/秒或 Hz)。Audio sampling rate in samples/sec or Hz.
Bitrate Bitrate

minInclusive ="0"minInclusive ="0"

必须Required
xs:intxs:int 由 AssetFile 计算所得的平均音频比特率(比特/秒)。Average audio bit rate in bits per second, as calculated from the AssetFile. 仅针对基本流有效负载计数,不包含打包开销。Counts only the elementary stream payload, and does not include the packaging overhead.
BitsPerSampleBitsPerSample

minInclusive ="0"minInclusive ="0"

必须Required
xs:intxs:int wFormatTag 格式类型的每个样本位数。Bits per sample for the wFormatTag format type.

子元素Child elements

名称Name 说明Description
LoudnessMeteringResultParameters LoudnessMeteringResultParameters

minOccurs="0" maxOccurs="1"minOccurs="0" maxOccurs="1"
响度测量结果参数。Loudness metering result parameters. 有关详细信息,请参阅“LoudnessMeteringResultParameters 元素”。For more information, see LoudnessMeteringResultParameters element.

LoudnessMeteringResultParameters 元素LoudnessMeteringResultParameters element

响度测量结果参数。Loudness metering result parameters.

可以找到 XML 示例 XML 示例You can find an XML example XML example.

属性Attributes

名称Name 类型Type 说明Description
DPLMVersionInformationDPLMVersionInformation xs:stringxs:string Dolby 专业响度测量开发套件版本。Dolby professional loudness metering development kit version.
DialogNormalization DialogNormalization

minInclusive="-31" maxInclusive="-1"minInclusive="-31" maxInclusive="-1"

必须Required
xs:intxs:int 通过 DPLM 收集的 DialogNormalization,设置 LoudnessMetering 时为必需DialogNormalization generated through DPLM, required when LoudnessMetering is set
IntegratedLoudness IntegratedLoudness

minInclusive="-70" maxInclusive="10"minInclusive="-70" maxInclusive="10"

必须Required
xs:floatxs:float 集成的响度Integrated loudness
IntegratedLoudnessUnit IntegratedLoudnessUnit

必须Required
xs:stringxs:string 集成的响度单位。Integrated loudness unit.
IntegratedLoudnessGatingMethod IntegratedLoudnessGatingMethod

必须Required
xs:stringxs:string 选通标识符Gating identifier
IntegratedLoudnessSpeechPercentage IntegratedLoudnessSpeechPercentage

minInclusive ="0" maxInclusive="100"minInclusive ="0" maxInclusive="100"
xs:floatxs:float 节目的语音内容,以百分比表示。Speech content over the program, as a percentage.
SamplePeak SamplePeak

必须Required
xs:floatxs:float 从重置或上一次清除开始每通道绝对采样峰值。Peak absolute sample value, since reset or since it was last cleared, per channel. 单位为 dBFS。Units are dBFS.
SamplePeakUnit SamplePeakUnit

fixed="dBFS"fixed="dBFS"

必须Required
xs:anySimpleTypexs:anySimpleType 采样峰值单位。Sample peak unit.
TruePeak TruePeak

必须Required
xs:floatxs:float 根据 ITU-R BS.1770-2,从重置或上一次清除开始每通道最大实际峰值。Maximum true peak value, as per ITU-R BS.1770-2, since reset or since it was last cleared, per channel. 单位为 dBTP。Units are dBTP.
TruePeakUnit TruePeakUnit

fixed="dBTP"fixed="dBTP"

必须Required
xs:anySimpleTypexs:anySimpleType 实际峰值单位。True peak unit.

架构代码Schema Code

<?xml version="1.0" encoding="utf-8"?>  
<xs:schema xmlns:xs="https://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" version="1.2"  
            xmlns="http://schemas.microsoft.com/windowsazure/mediaservices/2013/05/mediaencoder/metadata"  
            targetNamespace="http://schemas.microsoft.com/windowsazure/mediaservices/2013/05/mediaencoder/metadata"  
            elementFormDefault="qualified">  
  <xs:element name="AssetFiles">  
    <xs:annotation>  
      <xs:documentation>Collection of AssetFile entries for the encoding job</xs:documentation>  
    </xs:annotation>  
    <xs:complexType>  
      <xs:sequence>  
        <xs:element name="AssetFile" minOccurs="1" maxOccurs="unbounded">  
          <xs:annotation>  
            <xs:documentation>asset file</xs:documentation>  
          </xs:annotation>  
          <xs:complexType>  
            <xs:sequence>  
              <xs:element name="Sources">  
                <xs:annotation>  
                  <xs:documentation>Collection of input/source media files, that was processed in order to produce this AssetFile</xs:documentation>  
                </xs:annotation>  
                <xs:complexType>  
                  <xs:sequence>  
                    <xs:element name="Source" minOccurs="1" maxOccurs="unbounded">  
                      <xs:annotation>  
                        <xs:documentation>An input/source file used when generating this asset</xs:documentation>  
                      </xs:annotation>  
                      <xs:complexType>  
                        <xs:attribute name="Name" type="xs:string" use="required">  
                          <xs:annotation>  
                            <xs:documentation>input source file name</xs:documentation>  
                          </xs:annotation>  
                        </xs:attribute>  
                      </xs:complexType>  
                    </xs:element>  
                  </xs:sequence>  
                </xs:complexType>  
              </xs:element>  
              <xs:element name="VideoTracks" minOccurs="0">  
                <xs:annotation>  
                  <xs:documentation>Each physical AssetFile can contain in it zero or more video tracks interleaved into an appropriate container format. This is the collection of all those video tracks</xs:documentation>  
                </xs:annotation>  
                <xs:complexType>  
                  <xs:sequence>  
                    <xs:element name="VideoTrack" maxOccurs="unbounded">  
                      <xs:annotation>  
                        <xs:documentation>A specific video track in the parent AssetFile</xs:documentation>  
                      </xs:annotation>  
                      <xs:complexType>  
                        <xs:attribute name="Id" use="required">  
                          <xs:annotation>  
                            <xs:documentation>zero-based index of this video track. Note: this is not necessarily the TrackID as used in an MP4 file</xs:documentation>  
                          </xs:annotation>  
                          <xs:simpleType>  
                            <xs:restriction base="xs:int">  
                              <xs:minInclusive value="0"/>  
                            </xs:restriction>  
                          </xs:simpleType>  
                        </xs:attribute>  
                        <xs:attribute name="FourCC" type="xs:string" use="required">  
                          <xs:annotation>  
                            <xs:documentation>video codec FourCC code</xs:documentation>  
                          </xs:annotation>  
                        </xs:attribute>  
                        <xs:attribute name="Profile" type="xs:string">  
                          <xs:annotation>  
                            <xs:documentation>H264 profile (only appliable for H264 codec)</xs:documentation>  
                          </xs:annotation>  
                        </xs:attribute>  
                        <xs:attribute name="Level" type="xs:string">  
                          <xs:annotation>  
                            <xs:documentation>H264 level (only appliable for H264 codec)</xs:documentation>  
                          </xs:annotation>  
                        </xs:attribute>  
                        <xs:attribute name="Width" use="required">  
                          <xs:annotation>  
                            <xs:documentation>encoded video width in pixels</xs:documentation>  
                          </xs:annotation>  
                          <xs:simpleType>  
                            <xs:restriction base="xs:int">  
                              <xs:minInclusive value="0"/>  
                            </xs:restriction>  
                          </xs:simpleType>  
                        </xs:attribute>  
                        <xs:attribute name="Height" use="required">  
                          <xs:annotation>  
                            <xs:documentation>encoded video height in pixels</xs:documentation>  
                          </xs:annotation>  
                          <xs:simpleType>  
                            <xs:restriction base="xs:int">  
                              <xs:minInclusive value="0"/>  
                            </xs:restriction>  
                          </xs:simpleType>  
                        </xs:attribute>  
                        <xs:attribute name="DisplayAspectRatioNumerator" use="required">  
                          <xs:annotation>  
                            <xs:documentation>video display aspect ratio numerator</xs:documentation>  
                          </xs:annotation>  
                          <xs:simpleType>  
                            <xs:restriction base="xs:double">  
                              <xs:minInclusive value="0"/>  
                            </xs:restriction>  
                          </xs:simpleType>  
                        </xs:attribute>  
                        <xs:attribute name="DisplayAspectRatioDenominator" use="required">  
                          <xs:annotation>  
                            <xs:documentation>video display aspect ratio denominator</xs:documentation>  
                          </xs:annotation>  
                          <xs:simpleType>  
                            <xs:restriction base="xs:double">  
                              <xs:minInclusive value="0"/>  
                            </xs:restriction>  
                          </xs:simpleType>  
                        </xs:attribute>  
                        <xs:attribute name="Framerate" use="required">  
                          <xs:annotation>  
                            <xs:documentation>measured video frame rate in .3f format</xs:documentation>  
                          </xs:annotation>  
                          <xs:simpleType>  
                            <xs:restriction base="xs:decimal">  
                              <xs:minInclusive value="0"/>  
                              <xs:fractionDigits value="3"/>  
                            </xs:restriction>  
                          </xs:simpleType>  
                        </xs:attribute>  
                        <xs:attribute name="TargetFramerate" use="required">  
                          <xs:annotation>  
                            <xs:documentation>preset target video frame rate in .3f format</xs:documentation>  
                          </xs:annotation>  
                          <xs:simpleType>  
                            <xs:restriction base="xs:decimal">  
                              <xs:minInclusive value="0"/>  
                              <xs:fractionDigits value="3"/>  
                            </xs:restriction>  
                          </xs:simpleType>  
                        </xs:attribute>  
                        <xs:attribute name="Bitrate" use="required">  
                          <xs:annotation>  
                            <xs:documentation>average video bit rate in kilobits per second, as calculated from the AssetFile. Counts only the elementary stream payload, and does not include the packaging overhead</xs:documentation>  
                          </xs:annotation>  
                          <xs:simpleType>  
                            <xs:restriction base="xs:int">  
                              <xs:minInclusive value="0"/>  
                            </xs:restriction>  
                          </xs:simpleType>  
                        </xs:attribute>  
                        <xs:attribute name="TargetBitrate" use="required">  
                          <xs:annotation>  
                            <xs:documentation>target average bitrate for this video track, as requested via the encoding preset, in kilobits per second</xs:documentation>  
                          </xs:annotation>  
                          <xs:simpleType>  
                            <xs:restriction base="xs:int">  
                              <xs:minInclusive value="0"/>  
                            </xs:restriction>  
                          </xs:simpleType>  
                        </xs:attribute>  
                        <xs:attribute name="MaxGOPBitrate">  
                          <xs:annotation>  
                            <xs:documentation>Max GOP average bitrate for this video track, in kilobits per second</xs:documentation>  
                          </xs:annotation>  
                          <xs:simpleType>  
                            <xs:restriction base="xs:int">  
                              <xs:minInclusive value="0"/>  
                            </xs:restriction>  
                          </xs:simpleType>  
                        </xs:attribute>  
                      </xs:complexType>  
                    </xs:element>  
                  </xs:sequence>  
                </xs:complexType>  
              </xs:element>  
              <xs:element name="AudioTracks" minOccurs="0">  
                <xs:annotation>  
                  <xs:documentation>each physical AssetFile can contain in it zero or more audio tracks interleaved into an appropriate container format. This is the collection of all those audio tracks</xs:documentation>  
                </xs:annotation>  
                 <xs:complexType>  
                  <xs:sequence>  
                    <xs:element name="AudioTrack" maxOccurs="unbounded">  
                      <xs:annotation>  
                        <xs:documentation>a specific audio track in the parent AssetFile</xs:documentation>  
                      </xs:annotation>  
                      <xs:complexType>  
                        <xs:sequence>  
                          <xs:element name="LoudnessMeteringResultParameters" minOccurs="0" maxOccurs="1">  
                            <xs:annotation>  
                              <xs:documentation>Loudness Metering Result Parameters</xs:documentation>  
                            </xs:annotation>  
                            <xs:complexType>  
                              <xs:attribute name="DPLMVersionInformation" type="xs:string">  
                                <xs:annotation>  
                                  <xs:documentation>Dolby Professional Loudness Metering Development Kit Version</xs:documentation>  
                                </xs:annotation>  
                              </xs:attribute>  
                              <xs:attribute name="DialogNormalization" use="required">  
                                <xs:annotation>  
                                  <xs:documentation> DialogNormalization generated through DPLM, required when LoudnessMetering is set</xs:documentation>  
                                </xs:annotation>  
                                <xs:simpleType>  
                                  <xs:restriction base="xs:int">  
                                    <xs:minInclusive value="-31"/>  
                                    <xs:maxInclusive value="-1"/>  
                                  </xs:restriction>  
                                </xs:simpleType>  
                              </xs:attribute>  
                              <xs:attribute name="IntegratedLoudness" use="required">  
                                <xs:annotation>  
                                  <xs:documentation>Integrated loudness</xs:documentation>  
                                </xs:annotation>  
                                <xs:simpleType>  
                                  <xs:restriction base="xs:float">  
                                    <xs:minInclusive value="-70"/>  
                                    <xs:maxInclusive value="10"/>  
                                  </xs:restriction>  
                                </xs:simpleType>  
                              </xs:attribute>  
                              <xs:attribute name="IntegratedLoudnessUnit" use="required" type="xs:string">  
                              </xs:attribute>  
                              <xs:attribute name="IntegratedLoudnessGatingMethod" use="required" type="xs:string">  
                                <xs:annotation>  
                                  <xs:documentation>Gating identifier</xs:documentation>  
                                </xs:annotation>  
                              </xs:attribute>  
                              <xs:attribute name="IntegratedLoudnessSpeechPercentage">  
                                <xs:annotation>  
                                  <xs:documentation>Speech content over the program, as a percentage.</xs:documentation>  
                                </xs:annotation>  
                                <xs:simpleType>  
                                  <xs:restriction base="xs:float">  
                                    <xs:minInclusive value="0"/>  
                                    <xs:maxInclusive value="100"/>  
                                  </xs:restriction>  
                                </xs:simpleType>  
                              </xs:attribute>  
                              <xs:attribute name="SamplePeak" use="required" type="xs:float">  
                                <xs:annotation>  
                                  <xs:documentation>Peak absolute sample value, since reset or since it was last cleared, per channel.  Units are dBFS.</xs:documentation>  
                                </xs:annotation>  
                              </xs:attribute>  
                              <xs:attribute name="SamplePeakUnit" use="required" fixed="dBFS">  
                              </xs:attribute>  
                              <xs:attribute name="TruePeak" use="required" type="xs:float">  
                                <xs:annotation>  
                                  <xs:documentation>Maximum True Peak value, as per ITU-R BS.1770-2, since reset or since it was last cleared, per channel.  Units are dBTP.</xs:documentation>  
                                </xs:annotation>  
                              </xs:attribute>  
                              <xs:attribute name="TruePeakUnit" use="required" fixed="dBTP">  
                              </xs:attribute>  
                            </xs:complexType>  
                          </xs:element>  
                        </xs:sequence>  
                        <xs:attribute name="Id" use="required">  
                          <xs:annotation>  
                            <xs:documentation>zero-based index of this audio track. Note: this is not necessarily the TrackID as used in an MP4 file</xs:documentation>  
                          </xs:annotation>  
                          <xs:simpleType>  
                            <xs:restriction base="xs:int">  
                              <xs:minInclusive value="0"/>  
                            </xs:restriction>  
                          </xs:simpleType>  
                        </xs:attribute>  
                        <xs:attribute name="Codec" type="xs:string">  
                          <xs:annotation>  
                            <xs:documentation>audio track codec string</xs:documentation>  
                          </xs:annotation>  
                        </xs:attribute>  
                        <xs:attribute name="EncoderVersion" type="xs:string">  
                          <xs:annotation>  
                            <xs:documentation>optional encoder version string, required for EAC3</xs:documentation>  
                          </xs:annotation>  
                        </xs:attribute>  
                        <xs:attribute name="Channels" use="required">  
                          <xs:annotation>  
                            <xs:documentation>number of audio channels</xs:documentation>  
                          </xs:annotation>  
                          <xs:simpleType>  
                            <xs:restriction base="xs:int">  
                              <xs:minInclusive value="0"/>  
                            </xs:restriction>  
                          </xs:simpleType>  
                        </xs:attribute>  
                        <xs:attribute name="SamplingRate" use="required">  
                          <xs:annotation>  
                            <xs:documentation>audio sampling rate in samples/sec or Hz</xs:documentation>  
                          </xs:annotation>  
                          <xs:simpleType>  
                            <xs:restriction base="xs:int">  
                              <xs:minInclusive value="0"/>  
                            </xs:restriction>  
                          </xs:simpleType>  
                        </xs:attribute>  
                        <xs:attribute name="Bitrate" use="required">  
                          <xs:annotation>  
                            <xs:documentation>average audio bit rate in bits per second, as calculated from the AssetFile. Counts only the elementary stream payload, and does not include the packaging overhead</xs:documentation>  
                          </xs:annotation>  
                          <xs:simpleType>  
                            <xs:restriction base="xs:int">  
                              <xs:minInclusive value="0"/>  
                            </xs:restriction>  
                          </xs:simpleType>  
                        </xs:attribute>  
                        <xs:attribute name="BitsPerSample" use="required">  
                          <xs:annotation>  
                            <xs:documentation>Bits per sample for the wFormatTag format type</xs:documentation>  
                          </xs:annotation>  
                          <xs:simpleType>  
                            <xs:restriction base="xs:int">  
                              <xs:minInclusive value="0"/>  
                            </xs:restriction>  
                          </xs:simpleType>  
                        </xs:attribute>  
                      </xs:complexType>  
                    </xs:element>  
                  </xs:sequence>  
                </xs:complexType>  
              </xs:element>  
            </xs:sequence>  
            <xs:attribute name="Name" type="xs:string" use="required">  
              <xs:annotation>  
                <xs:documentation>the media asset file name</xs:documentation>  
              </xs:annotation>  
            </xs:attribute>  
            <xs:attribute name="Size" use="required">  
              <xs:annotation>  
                <xs:documentation>size of file in bytes</xs:documentation>  
              </xs:annotation>  
              <xs:simpleType>  
                <xs:restriction base="xs:long">  
                  <xs:minInclusive value="0"/>  
                </xs:restriction>  
              </xs:simpleType>  
            </xs:attribute>  
            <xs:attribute name="Duration" use="required">  
              <xs:annotation>  
                <xs:documentation>content play back duration</xs:documentation>  
              </xs:annotation>  
              <xs:simpleType>  
                <xs:restriction base="xs:duration"/>  
              </xs:simpleType>  
            </xs:attribute>  
          </xs:complexType>  
        </xs:element>  
      </xs:sequence>  
    </xs:complexType>  
  </xs:element>  
</xs:schema>  

XML 示例XML example

以下 XML 是输出元数据文件的示例。The following XML is an example of the Output metadata file.

<AssetFiles xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="https://www.w3.org/2001/XMLSchema"   
            xmlns="http://schemas.microsoft.com/windowsazure/mediaservices/2013/05/mediaencoder/metadata">  
  <AssetFile Name="BigBuckBunny_H264_3400kbps_AAC_und_ch2_96kbps.mp4" Size="4646283" Duration="PT8.4288444S">  
    <Sources>  
      <Source Name="BigBuckBunny.mp4"/>  
    </Sources>  
    <VideoTracks>  
      <VideoTrack Id="0" FourCC="AVC1" Profile="Main" Level="3.2" Width="1280" Height="720" DisplayAspectRatioNumerator="16" DisplayAspectRatioDenominator="9" Framerate="23.974" TargetFramerate="23.974" Bitrate="4250" TargetBitrate="3400" MaxGOPBitrate="5514"/>  
    </VideoTracks>  
    <AudioTracks>  
      <AudioTrack Id="0" Codec="AacLc" Channels="2" SamplingRate="44100" Bitrate="93" BitsPerSample="16"/>  
    </AudioTracks>  
  </AssetFile>  
  <AssetFile Name="BigBuckBunny_H264_2250kbps_AAC_und_ch2_96kbps.mp4" Size="3166728" Duration="PT8.4288444S">  
    <Sources>  
      <Source Name="BigBuckBunny.mp4"/>  
    </Sources>  
      <VideoTracks>  
      <VideoTrack Id="0" FourCC="AVC1" Profile="Main" Level="3.1" Width="960" Height="540" DisplayAspectRatioNumerator="16" DisplayAspectRatioDenominator="9" Framerate="23.974" TargetFramerate="23.974" Bitrate="2846" TargetBitrate="2250" MaxGOPBitrate="3630"/>  
    </VideoTracks>  
    <AudioTracks>  
      <AudioTrack Id="0" Codec="AacLc" Channels="2" SamplingRate="44100" Bitrate="93" BitsPerSample="16"/>  
    </AudioTracks>  
  </AssetFile>  
  <AssetFile Name="BigBuckBunny_H264_1500kbps_AAC_und_ch2_96kbps.mp4" Size="2205095" Duration="PT8.4288444S">  
    <Sources>  
      <Source Name="BigBuckBunny.mp4"/>  
    </Sources>  
    <VideoTracks>  
      <VideoTrack Id="0" FourCC="AVC1" Profile="Main" Level="3.1" Width="960" Height="540" DisplayAspectRatioNumerator="16" DisplayAspectRatioDenominator="9" Framerate="23.974" TargetFramerate="23.974" Bitrate="1932" TargetBitrate="1500" MaxGOPBitrate="2513"/>  
    </VideoTracks>  
    <AudioTracks>  
      <AudioTrack Id="0" Codec="AacLc" Channels="2" SamplingRate="44100" Bitrate="93" BitsPerSample="16"/>  
    </AudioTracks>  
  </AssetFile>  
  <AssetFile Name="BigBuckBunny_H264_1000kbps_AAC_und_ch2_96kbps.mp4" Size="1508567" Duration="PT8.4288444S">  
    <Sources>  
      <Source Name="BigBuckBunny.mp4"/>  
    </Sources>  
    <VideoTracks>  
      <VideoTrack Id="0" FourCC="AVC1" Profile="Main" Level="3.0" Width="640" Height="360" DisplayAspectRatioNumerator="16" DisplayAspectRatioDenominator="9" Framerate="23.974" TargetFramerate="23.974" Bitrate="1271" TargetBitrate="1000" MaxGOPBitrate="1527"/>  
    </VideoTracks>  
    <AudioTracks>  
      <AudioTrack Id="0" Codec="AacLc" Channels="2" SamplingRate="44100" Bitrate="93" BitsPerSample="16"/>  
    </AudioTracks>  
  </AssetFile>  
  <AssetFile Name="BigBuckBunny_H264_650kbps_AAC_und_ch2_96kbps.mp4" Size="1057155" Duration="PT8.4288444S">  
    <Sources>  
      <Source Name="BigBuckBunny.mp4"/>  
    </Sources>  
    <VideoTracks>  
      <VideoTrack Id="0" FourCC="AVC1" Profile="Main" Level="3.0" Width="640" Height="360" DisplayAspectRatioNumerator="16" DisplayAspectRatioDenominator="9" Framerate="23.974" TargetFramerate="23.974" Bitrate="843" TargetBitrate="650" MaxGOPBitrate="1086"/>  
    </VideoTracks>  
    <AudioTracks>  
      <AudioTrack Id="0" Codec="AacLc" Channels="2" SamplingRate="44100" Bitrate="93" BitsPerSample="16"/>  
    </AudioTracks>  
  </AssetFile>  
  <AssetFile Name="BigBuckBunny_H264_400kbps_AAC_und_ch2_96kbps.mp4" Size="699262" Duration="PT8.4288444S">  
    <Sources>  
      <Source Name="BigBuckBunny.mp4"/>  
    </Sources>  
    <VideoTracks>  
      <VideoTrack Id="0" FourCC="AVC1" Profile="Main" Level="1.3" Width="320" Height="180" DisplayAspectRatioNumerator="16" DisplayAspectRatioDenominator="9" Framerate="23.974" TargetFramerate="23.974" Bitrate="503" TargetBitrate="400" MaxGOPBitrate="661"/>  
    </VideoTracks>  
    <AudioTracks>  
      <AudioTrack Id="0" Codec="AacLc" Channels="2" SamplingRate="44100" Bitrate="93" BitsPerSample="16"/>  
    </AudioTracks>  
  </AssetFile>  
  <AssetFile Name="BigBuckBunny_AAC_und_ch2_96kbps.mp4" Size="166780" Duration="PT8.4288444S">  
    <Sources>  
      <Source Name="BigBuckBunny.mp4"/>  
    </Sources>  
    <AudioTracks>  
      <AudioTrack Id="0" Codec="AacLc" Channels="2" SamplingRate="44100" Bitrate="93" BitsPerSample="16"/>  
    </AudioTracks>  
  </AssetFile>  
  <AssetFile Name="BigBuckBunny_AAC_und_ch2_56kbps.mp4" Size="124576" Duration="PT8.4288444S">  
    <Sources>  
      <Source Name="BigBuckBunny.mp4"/>  
    </Sources>  
    <AudioTracks>  
      <AudioTrack Id="0" Codec="AacLc" Channels="2" SamplingRate="44100" Bitrate="53" BitsPerSample="16"/>  
    </AudioTracks>  
  </AssetFile>  
</AssetFiles>  

后续步骤Next steps

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

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

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