如何获取媒体处理器实例How to get a Media Processor instance

概述Overview

媒体处理器是完成特定视频或音频处理任务(例如,对媒体内容进行编码、格式转换、加密或解密)的组件。Media Processors are a component that handles a specific video or audio processing task, such as encoding, format conversion, encrypting, or decrypting media content. 提交到媒体服务的所有任务需要通过一个媒体处理器来编码、加密或转换视频或音频内容。All tasks submitted to Media Services require a media processor to encode, encrypt, or convert the video or audio content.

Azure 媒体处理器Azure media processors

以下主题提供媒体处理器列表:The following topic provides lists of media processors:

备注

访问媒体服务中的实体时,必须在 HTTP 请求中设置特定标头字段和值。When accessing entities in Media Services, you must set specific header fields and values in your HTTP requests. 有关详细信息,请参阅媒体服务 REST API 开发的设置For more information, see Setup for Media Services REST API Development.

连接到媒体服务Connect to Media Services

若要了解如何连接到 AMS API,请参阅通过 Azure AD 身份验证访问 Azure 媒体服务 APIFor information on how to connect to the AMS API, see Access the Azure Media Services API with Azure AD authentication.

获取媒体处理器Get a media processor

以下 REST 调用演示了如何按名称获取媒体处理器实例(在本例中为 Media Encoder Standard)。The following REST call shows how to get a media processor instance by name (in this case, Media Encoder Standard).

请求:Request:

GET https://media.chinacloudapi.cn/api/MediaProcessors()?$filter=Name%20eq%20'Media%20Encoder%20Standard' HTTP/1.1
DataServiceVersion: 1.0;NetFx
MaxDataServiceVersion: 3.0;NetFx
Accept: application/json
Accept-Charset: UTF-8
User-Agent: Microsoft ADO.NET Data Services
Authorization: Bearer <token>
x-ms-version: 2.19
Host: media.chinacloudapi.cn

响应:Response:

. . .

{  
   "odata.metadata":"https://media.chinacloudapi.cn/api/$metadata#MediaProcessors",
   "value":[  
      {  
         "Id":"nb:mpid:UUID:ff4df607-d419-42f0-bc17-a481b1331e56",
         "Description":"Media Encoder Standard",
         "Name":"Media Encoder Standard",
         "Sku":"",
         "Vendor":"Microsoft",
         "Version":"1.1"
      }
   ]
}

媒体服务学习路径Media Services learning paths

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

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

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

后续步骤Next Steps

了解如何获取媒体处理器实例后,请转到如何对资产进行编码一文,其中说明了如何使用 Media Encoder Standard 对资产进行编码。Now that you know how to get a media processor instance, go to the How to Encode an Asset article which demonstrates how to use the Media Encoder Standard to encode an asset.