You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Azure Media Services中az ams job start报错“list index out of range”求助

Azure Media Services作业启动"list index out of range"错误排查方案

1. 检查Transform的输出预设配置

该错误大概率与Transform的预设和输入文件类型不匹配有关:

  • 确认Transform使用的是音频兼容的预设,若使用仅针对视频的预设(如仅配置H.264视频编码),处理纯MP3文件时会触发索引越界错误。
  • 用以下命令查看Transform的具体配置,重点检查outputs中的预设是否包含音频处理规则:
    az ams transform show --account-name myaccount --name mytransform --resource-group mygroup
    
    示例正确的音频编码预设结构:
    "preset": {
      "@odata.type": "#Microsoft.Media.StandardEncoderPreset",
      "codecs": [
        {
          "@odata.type": "#Microsoft.Media.AacAudio",
          "channels": 2,
          "samplingRate": 48000,
          "bitrate": 128000,
          "profile": "AacLc"
        }
      ],
      "formats": [
        {
          "@odata.type": "#Microsoft.Media.Mp4Format",
          "filenamePattern": "{Basename}_{Bitrate}_{Label}.mp4"
        }
      ]
    }
    

2. 验证输入资产的文件匹配度

  • 确认--files参数指定的文件名与资产内实际文件完全一致(注意大小写、后缀名,比如是否是myfile.mp3而非MyFile.MP3)
  • 执行以下命令查看资产内的文件列表:
    az ams asset list-files --account-name myaccount --name myinputasset --resource-group mygroup
    

3. 检查输出资产状态

  • 确保myoutputasset已提前创建,且未被锁定或关联其他未完成作业
  • 若未创建,先执行创建命令:
    az ams asset create --account-name myaccount --name myoutputasset --resource-group mygroup
    

4. 匹配Transform输出数量与作业输出资产数量

  • 如果Transform包含多个输出预设,作业的--output-assets参数需要指定对应数量的资产,格式为outputAssetName1=label1,outputAssetName2=label2
  • 示例(2个输出的场景):
    az ams job start --account-name myaccount --input-asset-name "myinputasset" --files "myfile.mp3" --transform-name "mytransform" --output-assets "output1=label1,output2=label2" --resource-group "mygroup" --name "myname"
    

5. 获取作业详细错误日志

  • 即使命令行返回索引错误,仍可通过以下命令查看作业的具体错误信息:
    az ams job show --account-name myaccount --name myname --resource-group mygroup --query 'outputs[].error'
    

内容的提问来源于stack exchange,提问作者DJA

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.20 12:45:43