首页 文章

如何在Azure Media Services中向资产添加元数据?

提问于
浏览
2

我正在使用Azure媒体服务以及上传,编码和流媒体视频 . Question is, is there a way to attach video titles, descriptions and tags somewhere in Azure Media Services API?

其他细节:当我处理资产时,Azure Blob存储中的新容器被创建,当我点击blob本身时,它有“用户定义的字段” - 也就是元数据,我可以使用它们,但我不确定是否它们完全暴露给Azure Media API以及如何访问它们 .

我搜索了所有的MS文档,一无所获:/

3 回答

  • 0

    目前,Azure Media Services API公开了有关编码媒体资产的限制元数据集 . 您可以查看https://github.com/Azure/azure-sdk-for-media-services-extensions获取元数据的示例及其实现方式:

    // The asset encoded with the Windows Media Services Encoder. Get a reference to it from the context.
    IAsset asset = null;
    
    // Get an enumerator with the metadata for all the asset files.
    IEnumerable<AssetFileMetadata> manifestAssetFile = asset.GetMetadata();
    

    如果您要求将自定义元数据与媒体资产相关联并且能够进行搜索,则必须将其存储在Azure文档数据库或Azure搜索等外部服务中 . Azure Media Services公开属性IAsset.AlternateId,您可以在其中存储来自外部存储的元数据的id / key以进行链接 .

  • 0

    感谢您的回答@George,我花了一周时间尝试并搜索并尝试了您的建议,但最后,我得出结论,Azure Media API不是存储,索引器或任何媒体处理服务,并应该这样使用 . [咄...]

    所以我的行为是将SQL数据库引入我的抽象层,保留我的资产,索引等所有数据 . 这也帮助我加快了我的系统,因为我不再打电话给AMS列出我的资产 - 我使用 Headers ,描述,标签,子父级层次结构等在我的数据库中跟踪它们 .

  • 1

    为了它的 Value ,我最终重新连接到Azure Media Services存储的存储Blob,以及每个特定的.mp4资产(我只有1个渐进式流URI)我最终将我的元数据保存到存储Blob,适用于我的应用程序 .

    因此,我不仅要使用Azure Media Service API进行上传/编码,还要使用Storage API进行基于文件的元数据操作 .

相关问题