媒体服务 v2 常见问题解答Media Services v2 frequently asked questions

本文介绍由 Azure 媒体服务 (AMS) 用户社区提出的常见问题。This article addresses frequently asked questions raised by the Azure Media Services (AMS) user community.

一般性的 AMS 常见问题General AMS FAQs

问:如何流式传输到 Apple iOS 设备?Q: How do you stream to Apple iOS devices?

答:向 URL 的“/Manifest”部分添加“(format=m3u8-aapl)”路径,告知流式处理源服务器返回供 Apple iOS 本机设备使用的 HLS 内容(有关详细信息,请参阅传送内容)。A: add "(format=m3u8-aapl)" path to the "/Manifest" portion of the URL to tell the streaming origin server to return back HLS content for consumption on Apple iOS native devices (for details, see delivering content),

问:如何缩放索引?Q: How do you scale indexing?

A:编码任务和索引任务的预留单位相同。A: The reserved units are the same for Encoding and Indexing tasks. 请遵循如何缩放编码预留单位中的说明。Follow instructions on How to Scale Encoding Reserved Units. 请注意,预留单位类型不影响索引器性能。Note that Indexer performance is not affected by Reserved Unit Type.

问:我已经上传、编码并发布了视频。Q: I uploaded, encoded, and published a video. 为什么在尝试对视频进行流式处理时,它不播放?What would be the reason the video does not play when I try to stream it?

A:最常见的原因之一是,没有“正在运行” 状态下从其播放的流式处理终结点。A: One of the most common reasons is you do not have the streaming endpoint from which you are trying to play back in the Running state.

问:我是否可以在实时流上进行合成操作?Q: Can I do compositing on a live stream?

A:Azure 媒体服务当前不提供实时流上的合成操作,因此需要在计算机上进行预合成。A: Compositing on live streams is currently not offered in Azure Media Services, so you would need to pre-compose on your computer.

问:Azure 媒体服务是否支持存储图像?Q: Does Azure Media services support storing images?

A:如果需要存储 JPEG 或 PNG 图像,应将其存储在 Azure Blob 存储中。A: If you are just looking to store JPEG or PNG images, you should keep those in Azure Blob Storage. 除非想要将图像与视频或音频资产相关联,否则将图像放入媒体服务帐户毫无益处。There is no benefit to putting them in your Media Services account unless you want to keep them associated with your Video or Audio Assets. 如果需要在视频编码器中将图像作为叠加层使用,Media Encoder Standard 支持在视频上叠加图像,且它将 JPEG 和 PNG 列为支持的输入格式。Or if you might have a need to use the images as overlays in the video encoder.Media Encoder Standard supports overlaying images on top of videos, and that is what it lists JPEG and PNG as supported input formats. 有关详细信息,请参阅创建覆盖For more information, see Creating Overlays.

问:如何将资产从一个媒体服务帐户复制到另一个媒体服务帐户?Q: How can I copy assets from one Media Services account to another?

A:要使用 .NET 将资产从一个媒体服务帐户复制到另一个帐户,可以使用 Azure 媒体服务 .NET SDK 扩展存储库中提供的 IAsset.Copy 扩展方法。A: To copy assets from one Media Services account to another using .NET, use IAsset.Copy extension method available in the Azure Media Services .NET SDK Extensions repository. 有关详细信息,请参阅 论坛主题。For more information, see this forum thread.

问:AMS 支持使用哪些字符来为文件命名?Q: What are the supported characters for naming files when working with AMS?

A:构建流内容的 URL 时,媒体服务会使用 IAssetFile.Name 属性的值(如 http://{AMSAccount}.origin.mediaservices.chinacloudapi.cn/{GUID}/{IAssetFile.Name}/streamingParameters。)出于这个原因,不允许使用百分号编码。A: Media Services uses the value of the IAssetFile.Name property when building URLs for the streaming content (for example, http://{AMSAccount}.origin.mediaservices.chinacloudapi.cn/{GUID}/{IAssetFile.Name}/streamingParameters.) For this reason, percent-encoding is not allowed. Name 属性的值不能含有任何以下百分号编码保留字符:!*'();:@&=+$,/?%#[]"。The value of the Name property cannot have any of the following percent-encoding-reserved characters: !*'();:@&=+$,/?%#[]". 此外,只能有一个“.”Also, there can only be one ‘.’ 此外,文件扩展名中只能含有一个“.”。for the file name extension.

问:如何使用 REST 进行连接?Q: How to connect using REST?

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

问:如何在编码过程中旋转视频?Q: How can I rotate a video during the encoding process?

A:Media Encoder Standard 支持旋转 90/180/270 度。A: The Media Encoder Standard supports rotation by angles of 90/180/270. 默认行为是“自动”,即尝试在传入的 MP4/MOV 文件中检测旋转元数据并对其进行补偿。The default behavior is "Auto", where it tries to detect the rotation metadata in the incoming MP4/MOV file and compensate for it. 包含 此处 定义的 json 预设之一的以下 Sources元素:Include the following Sources element to one of the json presets defined here:

"Version": 1.0,
"Sources": [
{
  "Streams": [],
  "Filters": {
    "Rotation": "90"
  }
}
],
"Codecs": [

...

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

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

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

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