MediaConvert client.create_job() 由于某种原因不起作用

问题描述 投票:0回答:1

到目前为止我已经想出了这段代码:

# Initialize a MediaConvert client
    client = boto3.client('mediaconvert', region_name='us-east-1')

    job_settings = {
      "Queue": "arn:aws:mediaconvert:my-queue",
      "UserMetadata": {},
      "Role": "arn:aws:iam::my-role",
      "Settings": {
        "TimecodeConfig": {
          "Source": "ZEROBASED"
        },
        "OutputGroups": [
          {
            "CustomName": "video resolution",
            "Name": "File Group",
            "Outputs": [
              {
                "Preset": "System-Broadcast_Avci_Ts_Avc_Aac_16x9_1280x720p_30Hz_50Mbps",
                "NameModifier": "720p"
              },
              {
                "Preset": "System-Broadcast_Avci_Ts_Avc_Aac_16x9_1920x1080i_25Hz_100Mbps",
                "NameModifier": "1080p"
              },
              {
                "Preset": "System-Broadcast_Mpegts_Ts_Hevc_Aac_4x3_720x480p_30Hz_1.5Mbps",
                "NameModifier": "480p"
              }
            ],
            "OutputGroupSettings": {
              "Type": "FILE_GROUP_SETTINGS",
              "FileGroupSettings": {
                "Destination": "s3://vidvast/videos/",
                "DestinationSettings": {
                  "S3Settings": {
                    "StorageClass": "STANDARD"
                  }
                }
              }
            }
          }
        ],
        "FollowSource": 1,
        "Inputs": [
          {
            "AudioSelectors": {
              "Audio Selector 1": {
                "DefaultSelection": "DEFAULT"
              }
            },
            "VideoSelector": {},
            "TimecodeSource": "ZEROBASED",
            "FileInput": input_file
          }
        ]
      },
      "BillingTagsSource": "JOB",
      "AccelerationSettings": {
        "Mode": "DISABLED"
      },
      "StatusUpdateInterval": "SECONDS_60",
      "Priority": 0
    }

    # Create the job
    response = client.create_job(**job_settings)
    return response

响应抛出错误:
参数验证失败:设置中的未知参数:“FollowSource”

我不知道下一步该做什么。有MediaConvert和boto3经验的人可以给点建议吗?

我的代码主要是从我在 MediaConvert 上手动运行的成功作业的 json 片段中获取的。

python amazon-web-services boto3 aws-media-convert
1个回答
0
投票

我发现我的错误必须删除:

“关注来源”:1,

“存储类别”:“标准”
来自我的字典,因为我猜这是错误的语法

© www.soinside.com 2019 - 2024. All rights reserved.