

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# VOD 支持的编解码器和输入类型
<a name="supported-inputs-vod"></a>

以下各节介绍基于文件的视频点播 (VOD) 内容支持的输入类型、输入编解码器和输出编解码器。

## 支持的输入类型
<a name="supported-types-vod"></a>

这些是 MediaPackage 支持 VOD 内容的输入类型。


| MediaPackage 输入类型 | 使用案例 | 
| --- | --- | 
| HLS | 从 Amazon S3 存储桶中提取 HLS 流集，无论是否具有安全连接。其他要求：[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/mediapackage/latest/ug/supported-inputs-vod.html) | 
| SMIL | 无论是否有安全连接，均从 Amazon S3 存储桶中提取.smil 清单引用的 MP4 流集。有关 .smil 清单的信息，请参阅 [.smil 清单的要求](supported-inputs-vod-smil.md)。其他要求：[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/mediapackage/latest/ug/supported-inputs-vod.html) | 

## 支持的输入编解码器
<a name="suported-inputs-codecs-vod"></a>

这些是 MediaPackage 支持基于文件的源内容的视频、音频和字幕编解码器。


| 输入类型 | 媒体容器 | 视频编解码器 | 音频编解码器 | 字幕/字幕格式 | 
| --- | --- | --- | --- | --- | 
| HLS |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/mediapackage/latest/ug/supported-inputs-vod.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/mediapackage/latest/ug/supported-inputs-vod.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/mediapackage/latest/ug/supported-inputs-vod.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/mediapackage/latest/ug/supported-inputs-vod.html)  | 
| SMIL | MP4 （非碎片） |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/mediapackage/latest/ug/supported-inputs-vod.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/mediapackage/latest/ug/supported-inputs-vod.html)  | SRT | 

## 支持的输出编解码器
<a name="suported-outputs-codecs-vod"></a>

这些是 MediaPackage 支持传送 VOD 内容的视频、音频和字幕编解码器。


| 端点类型 | 清单格式 | 媒体容器 | 视频编解码器 | 音频编解码器 | 字幕/字幕格式 | 
| --- | --- | --- | --- | --- | --- | 
| Apple HLS | HLS |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/mediapackage/latest/ug/supported-inputs-vod.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/mediapackage/latest/ug/supported-inputs-vod.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/mediapackage/latest/ug/supported-inputs-vod.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/mediapackage/latest/ug/supported-inputs-vod.html)  | 
| DASH-ISO | MPEG-DASH | MP4 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/mediapackage/latest/ug/supported-inputs-vod.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/mediapackage/latest/ug/supported-inputs-vod.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/mediapackage/latest/ug/supported-inputs-vod.html)  | 
| Microsoft Smooth | MSS | MP4 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/mediapackage/latest/ug/supported-inputs-vod.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/mediapackage/latest/ug/supported-inputs-vod.html)  | DFXP | 
| CMAF | HLS | CMAF |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/mediapackage/latest/ug/supported-inputs-vod.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/mediapackage/latest/ug/supported-inputs-vod.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/mediapackage/latest/ug/supported-inputs-vod.html)  | 

# .smil 清单的要求
<a name="supported-inputs-vod-smil"></a>

向发送 VOD MP4 资源时 AWS Elemental MediaPackage，必须包含.smil 清单。.smil 清单是一个 XML 文件，它充当资产中所有文件的封装器，让人们 MediaPackage 知道 MP4s 哪些文件属于单个资产。

**资源**
+ 有关创建.smil 清单的指南，请参阅[使用 AWS Elemental VOD 的.smil（博客](https://aws.amazon.com/blogs/media/smil-using-aws-elemental-mediapackage-vod/)）。 MediaPackage 
+ 有关同步多媒体集成语言（SMIL）的一般信息，请参阅 [SMIL 3.0 规范](https://www.w3.org/TR/SMIL/)。

MediaPackage 支持.smil 清单中的以下属性。

**属性**
+ `audioName`：音频轨道的名称，例如 `English 2`。
+ `includeAudio` - 一个布尔值，指示是否应包含音频轨道。此属性应包含与已定义语言数量相同的值。如果未指定，所有轨道默认为 `true`。
+ `src` 或 `name`：相对于清单位置的文本流或视频文件的名称或源。
+ `subtitleName`：字幕名称，例如 `English`。
+ `systemLanguage` 或 `language`：系统语言，例如 `eng`。

**Example .smil 清单**  
以下是 `.smil` 清单的示例。  

```
<?xml version="1.0" encoding="utf-8"?>
<smil>
    <body>
        <alias value="Example"/>
        <switch>
            <video name="example_360.mp4" systemLanguage="eng,fra,spa" audioName="English,French,Spanish" includeAudio="true,true,true"/>
            <video name="example_480.mp4" systemLanguage="eng" audioName="English 2" includeAudio="false"/>
            <textstream src="example_subs_eng.srt" systemLanguage="eng" subtitleName="English" includeAudio="false"/>
            <textstream src="example_subs_fra.srt" systemLanguage="fra" subtitleName="French" includeAudio="false"/>
            <textstream src="example_subs_spa.srt" systemLanguage="spa" subtitleName="Spanish" includeAudio="false"/>
    </switch>
</body>
</smil>
```