2

I'm trying to transcode multiple files into one mp4 output with Aws ElasticTranscoder but I'm getting always the same error: "missing required parameter params[:input]" and "unexpected value at params[:inputs]" and I dont know why. According the Aws docs the only required parameter is pipeline_id, but when I try to transcode multiple files it fails. It only works if I transcode one file to another file, but that is not enough for me becasue I need to transcode multiple files. This is the script I've created to test ElasticTranscoder with Ruby sdk

AWS_PUBLIC_KEY = 'XXXXXXXXXXXX'
AWS_SECRET_ACCESS_KEY = 'XXXXXXXXXXXXXXXXX'
PIPELINE_ID = "a_pipe_line_id"

credentials = Aws::Credentials.new(AWS_PUBLIC_KEY, AWS_SECRET_ACCESS_KEY)

elastictranscoder = Aws::ElasticTranscoder::Client.new({
    region: 'yyyyyyy',
    credentials: credentials
})

begin
    resp = elastictranscoder.create_job({
    pipeline_id: PIPELINE_ID,
    inputs: [{
        key: "converted/003d436e-2afd-4526-8f1a-5e2a4b2c30cb.webm",
        frame_rate: "auto",
        resolution: "auto",
        aspect_ratio: "auto",
        container: "auto"
    },
    { 
        key: "converted/0026d587-0c04-4957-8166-ed365f2bf10d.webm",
        frame_rate: "auto",
        resolution: "auto",
        aspect_ratio: "auto",
        container: "auto"
    }
    ],
    outputs: [{
        key: DateTime.now.to_s + ".mp4",
        preset_id: "the_custom_preset_id"
    }]
})
rescue => e
    ap "entro en rescue"
    ap e.message
end

ap "done"
ap resp.to_s
Víctor B.
  • 1,630
  • 2
  • 14
  • 21
David Dsr
  • 327
  • 2
  • 5
  • 19

0 Answers0