Media Encoder Standard 架构Media Encoder Standard schema

本文介绍 Media Encoder Standard 预设基于的 XML 架构的一些元素和类型。This article describes some of the elements and types of the XML schema on which Media Encoder Standard presets are based. 本文将解释元素及其有效值。The article gives explanation of elements and their valid values.

预设(根元素)Preset (root element)

定义编码预设。Defines an encoding preset.

元素Elements

NameName 类型Type 说明Description
编码Encoding 编码Encoding 根元素,指示要编码的输入源。Root element, indicates that the input sources are to be encoded.
OutputsOutputs 输出Outputs 所需输出文件的集合。Collection of desired output files.
StretchModeStretchMode
minOccurs="0"minOccurs="0"
default="AutoSizedefault="AutoSize
xs:stringxs:string 控制输出视频帧大小、填充、像素或显示纵横比。Control the output video frame size, padding, pixel, or display aspect ratio. StretchMode 可以是下述值之一:NoneAutoSize(默认值)或 AutoFitStretchMode could be one of the following values: None, AutoSize (default), or AutoFit.

:严格遵循输出分辨率(例如,预设中的宽度高度),而不考虑输入视频的像素纵横比或显示纵横比。None: Strictly follow the output resolution (for example, the Width and Height in the preset) without considering the pixel aspect ratio or display aspect ratio of the input video. 建议在裁剪等方案中使用,其中输出视频的纵横比与输入不同。Recommended in scenarios such as cropping, where the output video has a different aspect ratio compared to the input.

AutoSize:输出分辨率将适应预设指定的窗口(宽度 * 高度)。AutoSize: The output resolution will fit inside the window (Width * Height) specified by preset. 但是,编码器会生成具有正方形 (1:1) 像素纵横比的输出视频。However, the encoder produces an output video that has square (1:1) pixel aspect ratio. 因此,可以覆盖输出宽度或输出高度,以便与不包含填充的输入的显示纵横比相匹配。Therefore, either output Width or output Height could be overridden in order to match the display aspect ratio of the input, without padding. 例如,如果输入为 1920x1080,而编码预设要求提供 1280x1280,则会覆盖预设中的高度值,并且输出将是 1280x720,这样可以保持 16:9 的输入纵横比。For example, if the input is 1920x1080 and the encoding preset asks for 1280x1280, then the Height value in the preset is overridden, and the output will be at 1280x720, which maintains the input aspect ratio of 16:9.

AutoFit:必要时,请根据所需的输出分辨率填充输出视频(使用上下黑边或左右黑边),同时确保输出中活动视频区域的纵横比与输入相同。AutoFit: If needed, pad the output video (with either letterbox or pillarbox) to honor the desired output resolution, while ensuring that the active video region in the output has the same aspect ratio as the input. 例如,假设输入为 1920x1080,并且编码预设要求提供 1280x1280。For example, suppose the input is 1920x1080 and the encoding preset asks for 1280x1280. 那么,输出视频将是 1280x1280,但它包含纵横比为 16:9 的“活动视频”的内部 1280x720 矩形,并在顶部和底部包含高度为 280 像素的上下黑边区域。Then the output video will be at 1280x1280, but it will contain an inner 1280x720 rectangle of 'active video' with aspect ratio of 16:9, and letterbox regions 280 pixels high at the top and bottom. 另举一例,如果输入为 1440x1080,并且编码预设要求提供 1280x720,则输出将是 1280x720,其中包含纵横比为 4:3 的 960x720 内部矩形,并在左侧和右侧包含宽度为 160 像素的左右黑边区域。For another example, if the input is 1440x1080 and the encoding preset asks for 1280x720, then the output will be at 1280x720, which contains an inner rectangle of 960x720 at aspect ratio of 4:3, and pillar box regions 160 pixels wide at the left and right.

属性Attributes

NameName 类型Type 说明Description
版本Version

必须Required
xs: decimalxs: decimal 预设版本。The preset version. 以下限制适用:xs:fractionDigits 值 ="1" 和 xs:minInclusive 值 ="1",例如,版本 ="1.0"。The following restrictions apply: xs:fractionDigits value="1" and xs:minInclusive value="1" For example, version="1.0".

编码Encoding

包含以下元素序列:Contains a sequence of the following elements:

元素Elements

NameName 类型Type 说明Description
H264VideoH264Video H264VideoH264Video 视频的 H.264 编码的设置。Settings for H.264 encoding of video.
AACAudioAACAudio AACAudioAACAudio 音频的 AAC 编码的设置。Settings for AAC encoding of audio.
BmpImageBmpImage BmpImageBmpImage Bmp 图像的设置。Settings for Bmp image.
PngImagePngImage PngImagePngImage Png 图像的设置。Settings for Png image.
JpgImageJpgImage JpgImageJpgImage Jpg 图像的设置。Settings for Jpg image.

H264VideoH264Video

元素Elements

NameName 类型Type 说明Description
TwoPassTwoPass

minOccurs="0"minOccurs="0"
xs: booleanxs:boolean 目前,仅支持单步编码。Currently, only one-pass encoding is supported.
KeyFrameIntervalKeyFrameInterval

minOccurs="0"minOccurs="0"

default="00:00:02"default="00:00:02"
xs:timexs:time 确定 IDR 帧的固定间距(以秒为单位)。Determines the fixed spacing between IDR frames in units of seconds. 亦称为“GOP 持续时间”。Also referred to as the GOP duration. 请参阅 SceneChangeDetection,此元素用于控制编码器能否偏离此值。See SceneChangeDetection for controlling whether the encoder can deviate from this value.
SceneChangeDetectionSceneChangeDetection

minOccurs="0"minOccurs="0"

default="false"default="false"
xs:booleanxs:boolean 如果设置为 true,编码器尝试检测视频中的场景更改并插入 IDR 帧。If set to true, encoder attempts to detect scene change in the video and inserts an IDR frame.
复杂性Complexity

minOccurs="0"minOccurs="0"

default="Balanced"default="Balanced"
xs:stringxs:string 控制编码速度和视频质量的平衡。Controls the trade-off between encode speed and video quality. 可能是以下值之一:速度、均衡或质量Could be one of the following values: Speed, Balanced, or Quality

默认值:均衡Default: Balanced
SyncModeSyncMode

minOccurs="0"minOccurs="0"
将在未来版本中公开功能。Feature will be exposed in a future release.
H264LayersH264Layers

minOccurs="0"minOccurs="0"
H264LayersH264Layers 输出视频层的集合。Collection of output video layers.

属性Attributes

NameName 类型Type 说明Description
条件Condition xs:stringxs:string 当输入不包含视频时,建议强制编码器插入单色视频轨道。为此,请使用 Condition="InsertBlackIfNoVideoBottomLayerOnly"(仅在最低比特率处插入视频)或 Condition="InsertBlackIfNoVideo"(在所有输出比特率处插入视频)。When the input has no video, you may want to force the encoder to insert a monochrome video track. To do that, use Condition="InsertBlackIfNoVideoBottomLayerOnly" (to insert a video at only the lowest bitrate) or Condition="InsertBlackIfNoVideo" (to insert a video at all output bitrates). 有关详细信息,请参阅本文For more information, see this article.

H264LayersH264Layers

默认情况下,如果向编码器发送仅包含音频而不包含视频的输入,那么输出资产文件仅包含音频数据。By default, if you send an input to the encoder that contains only audio, and no video, the output asset contains files with audio data only. 某些播放器可能无法处理此类输出流。Some players may not be able to handle such output streams. 在这种情况下,可使用 H264Video 的 InsertBlackIfNoVideo 属性设置,强制编码器将视频轨道添加到输出中。You can use the H264Video's InsertBlackIfNoVideo attribute setting to force the encoder to add a video track to the output in that scenario. 有关详细信息,请参阅本文For more information, see this article.

元素Elements

NameName 类型Type 说明Description
H264LayerH264Layer

minOccurs="0" maxOccurs="unbounded"minOccurs="0" maxOccurs="unbounded"
H264LayerH264Layer H264 层的集合。A collection of H264 layers.

H264LayerH264Layer

Note

视频限制基于 H264 级别 表中描述的值。Video limits are based on the values described in the H264 Levels table.

元素Elements

NameName 类型Type 说明Description
ProfileProfile

minOccurs="0"minOccurs="0"

default="Auto"default="Auto"
xs:stringxs:string 可能是以下 xs:string 值之一:自动、基线、主要、高。Could be of one of the following xs:string values: Auto, Baseline, Main, High.
级别Level

minOccurs="0"minOccurs="0"

default="Auto"default="Auto"
xs:stringxs:string
BitrateBitrate

minOccurs="0"minOccurs="0"
xs:intxs:int 此视频层使用的比特率,以 kbps 为单位指定。The bitrate used for this video layer, specified in kbps.
MaxBitrateMaxBitrate

minOccurs="0"minOccurs="0"
xs: intxs: int 此视频层使用的最大比特率,以 kbps 为单位指定。The maximum bitrate used for this video layer, specified in kbps.
BufferWindowBufferWindow

minOccurs="0"minOccurs="0"

default="00:00:05"default="00:00:05"
xs: timexs: time 视频缓冲区的长度。Length of the video buffer.
WidthWidth

minOccurs="0"minOccurs="0"
xs: intxs: int 输出视频帧的宽度,以像素为单位。Width of the output video frame, in pixels.

目前必须指定“Width”和“Height”。Currently, you must specify both Width and Height. Width 和 Height 需为偶数。The Width and Height need to be even numbers.
HeightHeight

minOccurs="0"minOccurs="0"
xs:intxs:int 输出视频帧的高度,以像素为单位。Height of the output video frame, in pixels.

目前必须指定“Width”和“Height”。Currently, you must specify both Width and Height. Width 和 Height 需为偶数。The Width and Height need to be even numbers.
BFramesBFrames

minOccurs="0"minOccurs="0"
xs: intxs: int 参考帧之间的 B 帧数。Number of B frames between reference frames.
ReferenceFramesReferenceFrames

minOccurs="0"minOccurs="0"

default="3"default="3"
xs:intxs:int GOP 中的参考帧数。Number of reference frames in a GOP.
EntropyModeEntropyMode

minOccurs="0"minOccurs="0"

default="Cabac"default="Cabac"
xs:stringxs:string 可能是以下值之一:CabacCavlcCould be one of the following values: Cabac and Cavlc.
FrameRateFrameRate

minOccurs=“0”minOccurs="0"
有理数rational number 确定输出视频的帧速率。Determines the frame rate of the output video. 使用默认值 "0/1",允许编码器使用与输入视频相同的帧速率。Use default of "0/1" to let the encoder use the same frame rate as the input video. 允许的值应为通用视频帧速率。Allowed values are expected to be common video frame rates. 但是,允许使用任何有效有理数。However, any valid rational is allowed. 例如 1/1 表示 1 fps 且有效。For example, 1/1 would be 1 fps and is valid.

- 12/1 (12 fps)- 12/1 (12 fps)

- 15/1 (15 fps)- 15/1 (15 fps)

- 24/1 (24 fps)- 24/1 (24 fps)

- 24000/1001 (23.976 fps)- 24000/1001 (23.976 fps)

- 25/1 (25 fps)- 25/1 (25 fps)

- 30/1 (30 fps)- 30/1 (30 fps)

- 30000/1001 (29.97 fps)- 30000/1001 (29.97 fps)

注意 如果要创建多比特率编码的自定义预设,则预设的所有层必须都使用相同的帧速率值。NOTE If you are creating a custom preset for multiple-bitrate encoding, then all layers of the preset must use the same value of FrameRate.
AdaptiveBFrameAdaptiveBFrame

minOccurs="0"minOccurs="0"
xs: booleanxs: boolean 从 Azure 媒体编码器复制Copy from Azure media encoder
SlicesSlices

minOccurs="0"minOccurs="0"

default="0"default="0"
xs:intxs:int 确定一帧分为多少切片。Determines how many slices a frame is divided into. 建议使用默认值。Recommend using default.

AACAudioAACAudio

包含以下元素和组的序列。Contains a sequence of the following elements and groups.

有关 AAC 的详细信息,请参阅 AACFor more information about AAC, see AAC.

元素Elements

NameName 类型Type 说明Description
配置文件Profile

minOccurs="0"minOccurs="0 "

default="AACLC"default="AACLC"
xs: stringxs: string 可能是以下值之一:AACLC、HEAACV1 或 HEAACV2。Could be one of the following values: AACLC, HEAACV1, or HEAACV2.

属性Attributes

NameName 类型Type 说明Description
条件Condition xs: stringxs: string 若要强制编码器在输入不包含音频时生成包含静音曲目的资产,请指定“InsertSilenceIfNoAudio”值。To force the encoder to produce an asset that contains a silent audio track when input has no audio, specify the "InsertSilenceIfNoAudio" value.

默认情况下,如果要向编码器发送仅包含视频而不包含音频的输入,则输出资产包含仅有视频数据的文件。By default, if you send an input to the encoder that contains only video, and no audio, then the output asset contains files that contain only video data. 某些播放器可能无法处理此类输出流。Some players may not be able to handle such output streams. 对于这种方案,可以使用此设置来强制编码器将静音曲目添加到输出。You can use this setting to force the encoder to add a silent audio track to the output in that scenario.

Groups

参考Reference 说明Description
AudioGroupAudioGroup

minOccurs="0"minOccurs="0"
请参阅 AudioGroup 的说明,了解可为每个配置文件设置的适当通道数、采样率和比特率。See description of AudioGroup to know the appropriate number of channels, sampling rate, and bit rate that could be set for each profile.

AudioGroupAudioGroup

有关每个配置文件的有效值的详细信息,请参阅随后的“音频编解码器详细信息”表。For details about what values are valid for each profile, see the "Audio codec details" table that follows.

元素Elements

NameName 类型Type 说明Description
通道Channels

minOccurs="0"minOccurs="0"
xs: intxs: int 音频通道数。The number of audio channels encoded. 以下是有效选项:1、2、5、6、8。The following are valid options: 1, 2, 5, 6, 8.

默认值:2.Default: 2.
SamplingRateSamplingRate

minOccurs="0"minOccurs="0"
xs: intxs: int 音频采样率,以 Hz 为单位指定。The audio sampling rate, specified in Hz.
BitrateBitrate

minOccurs="0"minOccurs="0"
xs: intxs: int 对音频进行编码时使用的比特率,以 kbps 为单位指定。The bitrate used when encoding the audio, specified in kbps.

音频编解码器详细信息Audio codec details

音频编解码器Audio Codec 详细信息Details
AACLCAACLC 1:1:

- 11025:8 <= 比特率 < 16- 11025: 8 <= bitrate < 16

- 12000:8 <= 比特率 < 16- 12000: 8 <= bitrate < 16

- 16000:8 <= 比特率 <32- 16000: 8 <= bitrate <32

- 22050:24 <= 比特率 < 32- 22050: 24 <= bitrate < 32

- 24000:24 <= 比特率 < 32- 24000: 24 <= bitrate < 32

- 32000:32 <= 比特率 <= 192- 32000: 32 <= bitrate <= 192

- 44100:56 <= 比特率 <= 288- 44100: 56 <= bitrate <= 288

- 48000:56 <= 比特率 <= 288- 48000: 56 <= bitrate <= 288

- 88200 :128 <= 比特率 <= 288- 88200 : 128 <= bitrate <= 288

- 96000 :128 <= 比特率 <= 288- 96000 : 128 <= bitrate <= 288

2:2:

- 11025:16 <= 比特率 < 24- 11025: 16 <= bitrate < 24

- 12000:16 <= 比特率 < 24- 12000: 16 <= bitrate < 24

- 16000:16 <= 比特率 < 40- 16000: 16 <= bitrate < 40

- 22050:32 <= 比特率 < 40- 22050: 32 <= bitrate < 40

- 24000 :32 <= 比特率 < 40- 24000 : 32 <= bitrate < 40

- 32000:40 <= 比特率 <= 384- 32000: 40 <= bitrate <= 384

- 44100:96 <= 比特率 <= 576- 44100: 96 <= bitrate <= 576

- 48000 :96 <= 比特率 <= 576- 48000 : 96 <= bitrate <= 576

- 88200:256 <= 比特率 <= 576- 88200: 256 <= bitrate <= 576

- 96000:256 <= 比特率 <= 576- 96000: 256 <= bitrate <= 576

5/6:5/6:

- 32000:160 <= 比特率 <= 896- 32000: 160 <= bitrate <= 896

- 44100:240 <= 比特率 <= 1024- 44100: 240 <= bitrate <= 1024

- 48000:240 <= 比特率 <= 1024- 48000: 240 <= bitrate <= 1024

- 88200:640 <= 比特率 <= 1024- 88200: 640 <= bitrate <= 1024

- 96000:640 <= 比特率 <= 1024- 96000: 640 <= bitrate <= 1024

8:8:

- 32000 :224 <= 比特率 <= 1024- 32000 : 224 <= bitrate <= 1024

- 44100 :384 <= 比特率 <= 1024- 44100 : 384 <= bitrate <= 1024

- 48000:384 <= 比特率 <= 1024- 48000: 384 <= bitrate <= 1024

- 88200:896 <= 比特率 <= 1024- 88200: 896 <= bitrate <= 1024

- 96000:896 <= 比特率 <= 1024- 96000: 896 <= bitrate <= 1024
HEAACV1HEAACV1 1:1:

- 22050: 比特率 = 8- 22050: bitrate = 8

- 24000:8 <= 比特率 <= 10- 24000: 8 <= bitrate <= 10

- 32000:12 <= 比特率 <= 64- 32000: 12 <= bitrate <= 64

- 44100:20 <= 比特率 <= 64- 44100: 20 <= bitrate <= 64

- 48000:20 <= 比特率 <= 64- 48000: 20 <= bitrate <= 64

- 88200: 比特率 = 64- 88200: bitrate = 64

2:2:

- 32000:16 <= 比特率 <= 128- 32000: 16 <= bitrate <= 128

- 44100:16 <= 比特率 <= 128- 44100: 16 <= bitrate <= 128

- 48000:16 <= 比特率 <= 128- 48000: 16 <= bitrate <= 128

- 88200 :96 <= 比特率 <= 128- 88200 : 96 <= bitrate <= 128

- 96000:96 <= 比特率 <= 128- 96000: 96 <= bitrate <= 128

5/6:5/6:

- 32000 :64 <= 比特率 <= 320- 32000 : 64 <= bitrate <= 320

- 44100:64 <= 比特率 <= 320- 44100: 64 <= bitrate <= 320

- 48000:64 <= 比特率 <= 320- 48000: 64 <= bitrate <= 320

- 88200 :256 <= 比特率 <= 320- 88200 : 256 <= bitrate <= 320

- 96000:256 <= 比特率 <= 320- 96000: 256 <= bitrate <= 320

8:8:

- 32000:96 <= 比特率 <= 448- 32000: 96 <= bitrate <= 448

- 44100:96 <= 比特率 <= 448- 44100: 96 <= bitrate <= 448

- 48000:96 <= 比特率 <= 448- 48000: 96 <= bitrate <= 448

- 88200:384 <= 比特率 <= 448- 88200: 384 <= bitrate <= 448

- 96000:384 <= 比特率 <= 448- 96000: 384 <= bitrate <= 448
HEAACV2HEAACV2 2:2:

- 22050:8 <= 比特率 <= 10- 22050: 8 <= bitrate <= 10

- 24000:8 <= 比特率 <= 10- 24000: 8 <= bitrate <= 10

- 32000:12 <= 比特率 <= 64- 32000: 12 <= bitrate <= 64

- 44100:20 <= 比特率 <= 64- 44100: 20 <= bitrate <= 64

- 48000:20 <= 比特率 <= 64- 48000: 20 <= bitrate <= 64

- 88200:64 <= 比特率 <= 64- 88200: 64 <= bitrate <= 64

剪辑Clip

属性Attributes

NameName 类型Type 说明Description
StartTimeStartTime xs:durationxs:duration 指定演示的开始时间。Specifies the start time of a presentation. StartTime 的值需与输入视频的绝对时间戳匹配。The value of StartTime needs to match the absolute timestamps of the input video. 例如,如果输入视频第一帧的时间戳为 12:00:10.000,则 StartTime 应大于或等于 12:00:10.000。For example, if the first frame of the input video has a timestamp of 12:00:10.000, then StartTime should be at least 12:00:10.000 or greater.
持续时间Duration xs:durationxs:duration 指定演示文稿的持续时间(例如,视频中覆盖的外观)。Specifies the duration of a presentation (for example, appearance of an overlay in the video).

输出Output

属性Attributes

NameName 类型Type 说明Description
FileNameFileName xs:stringxs:string 输出文件的名称。The name of the output file.

可以使用下表中描述的宏来生成输出文件名。You can use macros described in the following table to build the output file names. 例如:For example:

"Outputs": [ { "FileName": "{Basename}{Resolution}{Bitrate}.mp4", "Format": { "Type":"MP4Format" } } ]"Outputs": [ { "FileName": "{Basename}{Resolution}{Bitrate}.mp4", "Format": { "Type": "MP4Format" } } ]

Macros

Macro 说明Description
{Basename}{Basename} 如果正在进行 VoD 编码,则 {Basename} 是输入资产中主文件的 AssetFile.Name 属性的前 32 个字符。If you are doing VoD encoding, the {Basename} is the first 32 characters of the AssetFile.Name property of the primary file in the input asset.

如果输入资产是实时存档,则 {Basename} 从服务器清单中的 trackName 属性派生。If the input asset is a live archive, then the {Basename} is derived from the trackName attributes in the server manifest. 如果使用 TopBitrate 提交子剪辑作业,如:“<VideoStream>TopBitrate</VideoStream>”,并且输出文件包含视频,则 {Basename} 是具有最高比特率的视频层的 trackName 的前 32 个字符。If you are submitting a subclip job using the TopBitrate, as in: "<VideoStream>TopBitrate</VideoStream>", and the output file contains video, then the {Basename} is the first 32 characters of the trackName of the video layer with the highest bitrate.

如果改为使用所有输入比特率提交子剪辑作业,例如“<VideoStream>*</VideoStream>”,并且输出文件包含视频,则 {Basename} 是对应视频层的 trackName 的前 32 个字符。If instead you are submitting a subclip job using all of the input bitrates, such as "<VideoStream>*</VideoStream>", and the output file contains video, then {Basename} is the first 32 characters of the trackName of the corresponding video layer.
{Codec}{Codec} 对于视频,映射到“H264”;对于音频,映射到“AAC”。Maps to "H264" for video and "AAC" for audio.
{Bitrate}{Bitrate} 如果输出文件包含视频和音频,则为目标视频比特率;如果输出文件仅包含音频,则为目标音频比特率。The target video bitrate if the output file contains video and audio, or target audio bitrate if the output file contains audio only. 使用的值是以 kbps 为单位的比特率。The value used is the bitrate in kbps.
{Channel}{Channel} 如果文件包含音频,则为音频通道计数。Audio channel count if the file contains audio.
{Width}{Width} 如果文件包含视频,则为输出文件中以像素为单位的视频宽度。Width of the video, in pixels, in the output file, if the file contains video.
{Height}{Height} 输出文件中以像素为单位的视频高度,如果文件包含视频。Height of the video, in pixels, in the output file, if the file contains video.
{Extension}{Extension} 从输出文件的“Type”属性继承。Inherits from the "Type" property for the output file. 输出文件名具有以下扩展名之一:“mp4”、“ts”、“jpg”、“png”或“bmp”。The output file name has an extension which is one of: "mp4", "ts", "jpg", "png", or "bmp".
{Index}{Index} 对于缩略图是必需的。Mandatory for thumbnail. 仅可呈现一次。Should only be present once.

视频(继承自编解码器的复杂类型)Video (complex type inherits from Codec)

属性Attributes

NameName 类型Type 说明Description
启动Start xs:stringxs:string
步骤Step xs:stringxs:string
范围Range xs:stringxs:string
PreserveResolutionAfterRotationPreserveResolutionAfterRotation xs:booleanxs:boolean 有关详细说明,请参阅以下部分:PreserveResolutionAfterRotationFor detailed explanation, see the following section: PreserveResolutionAfterRotation

PreserveResolutionAfterRotationPreserveResolutionAfterRotation

建议使用 PreserveResolutionAfterRotation 标志结合以百分比条目表示的分辨率值(宽度=“100%”,高度=“100%”)。It is recommended to use the PreserveResolutionAfterRotation flag in combination with resolution values expressed in percentage terms (Width="100%" , Height="100%").

默认情况下,Media Encoder Standard (MES) 预设中的编码分辨率设置(宽度、高度)针对 0 度旋转的视频。By default, the encode resolution settings (Width, Height) in the Media Encoder Standard (MES) presets are targeted at videos with 0-degree rotation. 例如,如果输入视频为 1280x720,且为零度旋转,则默认预设确保输出具有相同的分辨率。For example, if your input video is 1280x720 with zero-degree rotation, then the default presets ensure that the output has the same resolution.

MESRoation1

如果输入视频是以非零旋转捕获(例如,垂直持握的智能手机或平板电脑),则默认情况下,MES 将对输入视频应用编码分辨率设置(宽度、高度),然后补偿旋转。If the input video has been captured with non-zero rotation (for example, a smartphone or tablet held vertically), then MES by default applies the encode resolution settings (Width, Height) to the input video, and then compensate for the rotation. 有关示例,请参阅下图。For example, see the picture that follows. 预设使用 Width = "100%",Height = "100%",MES 将此解释为所需输出为 1280 像素宽和 720 像素高。The preset uses Width = "100%", Height = "100%", which MES interprets as requiring the output to be 1280 pixels wide and 720 pixels tall. 旋转视频后,它会缩小图片适应窗口,左右两侧会出现黑边区域。After rotating the video, it then shrinks the picture to fit into that window, leading to pillar-box areas on the left and right.

MESRoation2

或者,可以使用 PreserveResolutionAfterRotation 标志,将其设置为“true”(默认值为“false”)。Alternatively, you can make use of the PreserveResolutionAfterRotation flag and set it to "true" (default is "false"). 因此,如果预设为 Width = "100%",Height = "100%",并将 PreserveResolutionAfterRotation 设置为 "true",则宽为 1280 像素、高为 720 像素,且 90 度旋转的输入视频会生成 0 度旋转但宽为 720 像素、高为 1280 像素的输出视频。So if your preset has Width = "100%", Height = "100%" and PreserveResolutionAfterRotation set to "true", an input video, which is 1280 pixels wide and 720 pixels tall with 90-degree rotation produces an output with zero-degree rotation, but 720 pixels wide and 1280 pixels tall. 参阅下图:See the following picture:

MESRoation3

FormatGroup(组)FormatGroup (group)

元素Elements

NameName 类型Type 说明Description
BmpFormatBmpFormat BmpFormatBmpFormat
PngFormatPngFormat PngFormatPngFormat
JpgFormatJpgFormat JpgFormatJpgFormat

BmpLayerBmpLayer

元素Element

NameName 类型Type 说明Description
宽度Width

minOccurs="0"minOccurs="0"
xs:intxs:int
HeightHeight

minOccurs="0"minOccurs="0"
xs:intxs:int

属性Attributes

NameName 类型Type 说明Description
条件Condition xs:stringxs:string

PngLayerPngLayer

元素Element

NameName 类型Type 说明Description
宽度Width

minOccurs="0"minOccurs="0"
xs:intxs:int
HeightHeight

minOccurs="0"minOccurs="0"
xs:intxs:int

属性Attributes

NameName 类型Type 说明Description
条件Condition xs:stringxs:string

JpgLayerJpgLayer

元素Element

NameName 类型Type 说明Description
宽度Width

minOccurs="0"minOccurs="0"
xs:intxs:int
HeightHeight

minOccurs="0"minOccurs="0"
xs:intxs:int
质量Quality

minOccurs="0"minOccurs="0"
xs:intxs:int 有效值:1(最差)-100(最好)Valid values: 1(worst)-100(best)

属性Attributes

NameName 类型Type 说明Description
条件Condition xs:stringxs:string

PngLayersPngLayers

元素Elements

NameName 类型Type 说明Description
PngLayerPngLayer

minOccurs="0" maxOccurs="unbounded"minOccurs="0" maxOccurs="unbounded"
PngLayerPngLayer

BmpLayersBmpLayers

元素Elements

NameName 类型Type 说明Description
BmpLayerBmpLayer

minOccurs="0" maxOccurs="unbounded"minOccurs="0" maxOccurs="unbounded"
BmpLayerBmpLayer

JpgLayersJpgLayers

元素Elements

NameName 类型Type 说明Description
JpgLayerJpgLayer

minOccurs="0" maxOccurs="unbounded"minOccurs="0" maxOccurs="unbounded"
JpgLayerJpgLayer

BmpImage(继承自视频的复杂类型)BmpImage (complex type inherits from Video)

元素Elements

NameName 类型Type 说明Description
PngLayersPngLayers

minOccurs="0"minOccurs="0"
PngLayersPngLayers Png 层Png layers

JpgImage(继承自视频的复杂类型)JpgImage (complex type inherits from Video)

元素Elements

NameName 类型Type 说明Description
PngLayersPngLayers

minOccurs="0"minOccurs="0"
PngLayersPngLayers Png 层Png layers

PngImage(继承自视频的复杂类型)PngImage (complex type inherits from Video)

元素Elements

NameName 类型Type 说明Description
PngLayersPngLayers

minOccurs="0"minOccurs="0"
PngLayersPngLayers Png layersPng layers

示例Examples

查看根据此架构生成的 XML 预设示例,请参阅 MES (Media Encoder Standard) 的任务预设See examples of XML presets that are built based on this schema, see Task Presets for MES (Media Encoder Standard).