简体   繁体   中英

AWS Elastic Transcoder Create Job Error

Does anyone know why I keep getting this error:

    JSONResponseError: 400 Bad Request
    {u'Message': u'Start of list found where not expected'}

It was working fine when I used the output dictionary specified in the api, but when I since I switched to the outputs list of dicts, I've been getting the aforementioned error.

Here's the code I wrote:

    transInput = {
    'Key': path,
    'FrameRate': 'auto',
    'Resolution': 'auto',
    'AspectRatio': 'auto',
    'Interlaced': 'auto',
    'Container': 'auto'
}
pprint (transInput)

#Create a job for each desired preset                                       
for pId, descrip in presets.iteritems():
  transOutput = {

        'PresetId': pId,
        'Rotate': 0,
        'ThumbnailPattern': 00001,
        'Key': path +"-" + descrip
        }

    outputs.append(transOutput)



try:
    transcode.create_job(pipelineId, transInput, outputs)
except Exception, e:
    print e

如果要使用输出列表,则必须将其指定为outputs参数:

transcode.create_job(pipelineId, transInput, outputs=output)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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