如何通过 REST 在 Azure 媒体服务中获取视频缩略图 API

How to get thumbnail of Videos in Azure media services via REST API

我正在为移动设备使用 azure 媒体服务 application.It 作品 properly.I 只是想通过 REST 获取已发布资产的缩略图 API.I 需要 API 缩略图端点。

我阅读了 sample code 并尝试使用 AMS RestAPI(V2) 开始工作。

然后,您可以创建一个 SASLocator 来在作业完成时下载缩略图。

POST {{RESTAPIEndpoint}}/Jobs
{
  "Name": "NewThumbnailJOB",
  "InputMediaAssets": [{
    "__metadata": {
      "uri": "{{RESTAPIEndpoint}}/Assets('nb:cid:UUID:xxxxx')"
    }
  }],
  "Tasks": [{
    "Configuration":"{
      \"Version\": 1.0,
      \"Codecs\": [
        {
          \"PngLayers\": [
            {
              \"Type\": \"PngLayer\",
              \"Width\": \"100%\",
              \"Height\": \"100%\"
            }
          ],
          \"Start\": \"{Best}\",
          \"Type\": \"PngImage\"
        }
      ],
      \"Outputs\": [
        {
          \"FileName\": \"{Basename}_{Index}{Extension}\",
          \"Format\": {
            \"Type\": \"PngFormat\"
          }
        }
      ]
    }
",
    "MediaProcessorId": "{{Media Encoder Standard ID}}",
    "TaskBody": "<?xml version=\"1.0\" encoding=\"utf-8\"?>
                <taskBody>
                    <inputAsset>JobInputAsset(0)</inputAsset>
                    <outputAsset>JobOutputAsset(0)</outputAsset>
                </taskBody>"
  }]
}