简体   繁体   English

如何在 azure 媒体服务中提取视频的缩略图

[英]How to pull the thumbnail for a video in azure media services

Is it possible to pull the png thumbnail for a video from the manifest url?是否可以从清单 url 中提取视频的 png 缩略图? I have videos encoded using Azure Media Services.我有使用 Azure 媒体服务编码的视频。 The thumbnail png files are being created and stored in the blob during the transform.在转换期间正在创建缩略图 png 文件并将其存储在 blob 中。 However, I'm not sure how I can retrieve these client side.但是,我不确定如何检索这些客户端。 I would like to display thumbnails for a list of videos and allow the user to select a video based on the thumbnail image.我想显示视频列表的缩略图,并允许用户 select 基于缩略图图像的视频。

Given the collection of manifest urls:鉴于清单 url 的集合:

https://[Account].streaming.media.azure.net/[Locator Id]/Export.ism/manifest https://[Account].streaming.media.azure.net/[Locator Id]/Export.ism/manifest

Is it possible to pull a list of thumbnails with only this information?是否可以仅使用此信息提取缩略图列表?

From all the documents, there is no relevant content that can directly parse manifest urls.从所有的文档来看,没有可以直接解析manifest url的相关内容。

Normal method:普通方法:

  1. Get the container by asset name, and then get the files in the container.通过资产名称获取容器,然后获取容器中的文件。
  2. Analyze the files in the container and find the thumbnail file.分析容器中的文件并找到缩略图文件。

Currently it is not possible to get more information through locator_id, there is no official REST API to use.目前无法通过locator_id获取更多信息,官方没有REST API可以使用。

Suggest:建议:

During development, when uploading files and processing videos, save the file path of the manifest file, thumbnail file and other files that need to be stored in the database field.在开发过程中,上传文件和处理视频时,将manifest文件、缩略图文件等需要存储的文件的文件路径保存在database字段中。 This can reduce a lot of unnecessary trouble.这样可以减少很多不必要的麻烦。

Tryable methods (not tested)可尝试的方法(未测试)

https://docs.microsoft.com/en-us/azure/media-services/video-indexer/video-indexer-use-apis#subscribe-to-the-api https://docs.microsoft.com/en-us/azure/media-services/video-indexer/video-indexer-use-apis#subscribe-to-the-api

https://api-portal.videoindexer.ai/ https://api-portal.videoindexer.ai/

No it is not possible to pull the thumbnail file that you created via the manifest file.不,无法提取您通过清单文件创建的缩略图文件。 The thumbnail files you have created are completely independent from the manifest file.您创建的缩略图文件完全独立于清单文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM