0

When we pass the multiple input video for the clip stitching, but it returns error Input must be an array of properties,Got numerically

indexed array

$result = $client - > createJob(array(
    'PipelineId' => '151111112277-cq5k40',
    'Input' => array(array('Key' => 'test.mp4'), array('Key' => 'abc.mp4')),

    'Output' => array(
        'Key' => $output_file,
        'PresetId' => '1351621234501-000001',
        'Composition' => array(
            array(
                'TimeSpan' => array(

                    'StartTime' => '00:00:00.000',
                    'Duration' => '00:01:00.000',
                )
            )

        ),
    ),
));
Raju1990
  • 26
  • 8

1 Answers1

0

Docs suggest 'Input' => ... is an array of properties, but 'Inputs' => ... is an array of arrays of properties, with Input being used when there's only one file, or Inputs used with multiple files.

Input

Type: JobInput structure

A section of the request body that provides information about the file that is being transcoded.

Inputs

Type: Array of JobInput structures

A section of the request body that provides information about the files that are being transcoded.

https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-elastictranscoder-2012-09-25.html#createjob

Michael - sqlbot
  • 169,571
  • 25
  • 353
  • 427
  • 1
    $result = $client->createJob(array('PipelineId' => '1234567-cqw5k40', 'Inputs' =>array( array('Key' => 'KingsCollegeDynamic20180228111415.mp4', 'TimeSpan' => array('Duration' => '00:00:04.000','StartTime' => '00:00:00.000') ), array('Key' => 'SampleVideo.mp4', 'TimeSpan' => array('Duration' => '00:00:04.000','StartTime' => '00:00:00.000') ), ), 'Outputs' => array(array( 'Key' => $output_file, 'PresetId' => '1351621234001-000001'),), )); still give error ,include either input or an inputs do not include both – Raju1990 Mar 16 '18 at 10:31
  • anyone please help – Raju1990 Mar 17 '18 at 07:01