简体   繁体   中英

elastic transcode is not writing metadata in s3, AWS

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

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",
                        )
                );

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