1

I am using lambda function to transcode the video file I upload. Here is the code I am using in the lambda function.

var params = {
        PipelineId: pipelineId,
        Input: {
            Key: inputKey
        },
        Outputs: [{
            Key: outputKey,
            PresetId: transcoderPresetID,

        }],
        UserMetadata : {jid : 'test', vid: v001 }

    }

but when I check the metadata on the s3 object that was written by elastic transcoder, all I can see is "content-type": "video/mp4"

My log files are not showing any errors, am I missing something. Please let me know. Thank you

Ankmachine
  • 11
  • 3

1 Answers1

0

The UserMetadata is not used when saving an object to S3. The UserMetadata is sent as part of the job status notification as documented here:

https://docs.aws.amazon.com/elastictranscoder/latest/developerguide/notifications.html

If you wish to add custom metadata on the S3 object after transcoding, you could perform an object copy. For example:

                $s3Client->copyObject(
                    $sourceObject,
                    $sourceObject,
                    array(
                        "jid" => "test",
                        "vid" => "v001",
                        )
                );
Glen
  • 106
  • 8