1

Over the last day we started getting an interesting error when trying to push a transcoding job with the PHP SDK:

'Aws\ElasticTranscoder\Exception\ElasticTranscoderException' with message 'Error executing "CreateJob" on "https://elastictranscoder.us-east-1.amazonaws.com/2012-09-25/jobs"; AWS HTTP error: Client error: 400 ValidationException (client): Playlists '64k' is a duplicate of an output key. - {"message":"Playlists '64k' is a duplicate of an output key."}' in /var/www/html/app/1.0/vendor/aws/aws-sdk-php/src/WrappedHttpHandler.php:152

The settings we're pushing to Elastic Transcoder:

        'PipelineId'      => $this->config['pipeline_id'],
        'OutputKeyPrefix' => "$prefix/",
        'Input'           => [
            'Key' => "uploads/$input_filename.$input_extension",
        ],
        'Playlists'       => [
            'OutputKeys' => [$bitrate],
            'Name'       => $bitrate,
            'Format'     => 'HLSv4',
        ],
        'Outputs'         => [
            'PresetId'        => $preset_id,
            'Key'             => $bitrate,
            'SegmentDuration' => '9.0',
        ],

where $bitrate is '64k' with the (target) end result of the transcoding job creating the files: 64k.ts, 64k.m3u8, 64k_v4.m3u8.

My first thought was possibly an S3 key conflict due to the prefix existing already but even after clearing the output bucket the error remained. And as far as I'm aware 64k.ts and 64k.m3u8 are treated as distinct objects in S3.

Does the duplicate output key in this case refer to an S3 object or perhaps a conflict in the transcoding job?

Further info: Changing Playlists:Name to anything but bitrate, $bitrate . '_v3', seems to prevent the error. I can still go into the output bucket at the specified prefix and rename 64k_v3.m3u8 to 64k.m3u8 with no issues. In this case, why is Elastic Transcoder blocking creation of a playlist named 64k.m3u8?

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470

0 Answers0