gpt4 book ai didi

azure - 从启用了存储加密的现有 blob 复制的 Assets : encoding fails

转载 作者:行者123 更新时间:2023-12-03 05:59:51 25 4
gpt4 key购买 nike

我成功地将现有 blob 复制到媒体服务 Assets 中,并且能够执行编码任务。

当我在启用存储加密的情况下复制 Assets 时,情况发生了变化。此 Assets 的编码任务失败,并显示消息“使用 H264 自适应比特率 MP4 设置 720p 加密的存储的 Azure 媒体编码”UserInput:不支持文件类型或编解码器。”

                IAsset asset = mediaContext.Assets.Create("NewAsset_" + Guid.NewGuid(), AssetCreationOptions.StorageEncrypted);

最佳答案

这是您正在尝试执行的操作示例:

string mediaservicename = "your_media_service_name";
string mediaservicekey = "your_media_service_key";

// create the cloud media context
var mediaServiceContext = new CloudMediaContext(mediaservicename, mediaservicekey);

// create an encrypted asset
var asset = mediaServiceContext.Assets.Create("MyAsset_" + Guid.NewGuid(), AssetCreationOptions.StorageEncrypted);

// create the asset file and upload it from a local path
var assetFile = asset.AssetFiles.Create("BigBuckBunny_320x180.mp4");
assetFile.Upload(@"C:\Users\jucoriol\Desktop\BigBuckBunny_320x180.mp4");

// create the encoding job with a single task
var encodingJob = mediaServiceContext.Jobs.CreateWithSingleTask(
"Azure Media Encoder",
"H264 Adaptive Bitrate MP4 Set 720p",
asset,
"Big Bunny Adaptive 720p",
AssetCreationOptions.StorageEncrypted);

// submit the job
encodingJob.Submit();

Console.ReadLine();

我认为问题不在于存储加密,而可能是:

  • 使用不受支持的编解码器的媒体。如果您还没有这样做,您可以尝试在不加密的情况下对其进行编码(您可以使用 Azure Media Service Explorer 进行快速测试:https://github.com/Azure/Azure-Media-Services-Explorer)
  • 另一个常见错误是创建名称中没有扩展名的资源文件。 Azure Media Encoder 要求文件具有有效的扩展名。我在没有有效扩展名的文件上收到此错误消息。

希望这有助于解决您的问题。

朱利安

关于azure - 从启用了存储加密的现有 blob 复制的 Assets : encoding fails,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34035777/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com