Elastic Transcoder Formats For Essays

Easy Video Transcoding in AWS

A Cloud Guru is in the business of education. They provide high-quality, curated courses for IT professionals. Their students come from all over the world and because of this they have different connection types, speeds and devices so they need to be flexible with how they deliver their content.

(Want to know more? Check out our book: Serverless Architectures on AWS)

Producing and serving quality video is a must have. A typical course can have up to 50 different videos lectures that span from 2 minutes to 20 minutes. As Sam has written before the platform is built on serverless architecture. Naturally this extends to how it deals with media too.

At the moment A Cloud Guru uses S3 buckets & CloudFront to help serve video & audio content. Videos are placed in a bucket behind CloudFront and authorized users are granted a signed CloudFront URL that is valid for a limited time. Users play videos through the A Cloud Guru website and automatically re-authorize their access for as long as they continue to be members.

When work began on A Cloud Guru, the team manually (i.e. using the excellent Handbrake app) had to encode videos from 1080p down to 720p to other encodings & resolutions. Although it was fine initially, it didn’t really fit with the team’s ethos of complete automation. It was slow and, frankly, painful to do.

Recently I got a chance to help out to overhaul the transcoding process and make it automated using Elastic Transcoder, S3 and Lambda. Thanks to AWS I had an initial implementation done in less than a day. The process not only transcodes videos to 720p, webm and HLSv3 but also generates thumbnails, watermarks our videos and nicely organises everything in S3.

Elastic Transcoder

Elastic Transcoder serves as the backbone of our implementation. To get it up and running you need to do two things: define a pipeline and create a job. A pipeline essentially defines a queue for future jobs. To create a pipeline you need to specify the input bucket (where the source videos will be), the output bucket and a bucket for thumbnails. You can also, optionally, set SNS topics for various events that’ll happen in the system such as On Completion and On Error. We recommend setting these and then using SNS to fire-off notifications especially for the On Error case.

As with anything AWS there are optional extras to be set as well — such as storage classes for the files and extra permissions.

Having created a pipeline you can immediately create a job and kick off a transcoding task. The job involves specifying the name of the file, selecting one or more of the transcoding presets (e.g. Generic 720p, webm, HLS, etc..), setting up a playlist, metadata or overriding input parameters such as the frame rate or aspect ratio.

Naturally we played with various jobs to get a good sense of the Elastic Transcoder but our end-goal was total automation.

Enter Lambda

In a serverless approach one way to run custom code is to use AWS Lambda. At the moment, there is no way to automatically run an Elastic Transcoder job by uploading a file to a bucket. However, it is easy to invoke Lambda from an S3 event and from a Lambda function invoke Elastic Transcoder.

Invoking a Lambda function from an S3 bucket is straightforward — open the required bucket in S3 and click on Properties. From there click on Events, Lambda and from the drop-down select the relevant Lambda function you want to execute. Finally, select the event (ObjectCreated (All)) that will trigger the process.

Digging in to Lambda

Previously I mentioned that you can create and execute jobs using the Elastic Transcoder console. That’s good but we need to be able to create and run Elastic Transcoder jobs from our Lambda function too. Thankfully it’s pretty easy to do using the AWS JavaScript SDK. Here are the main steps you would go through:

  1. Create a basic Lambda function and add the AWS SDK to it.
  2. Extract the bucket and the filename of the uploaded file from the event object that is passed in to the handler function.
  3. Create a job and specify the required outputs as well as any other settings.
  4. Kick off the job and enjoy seeing the progress in the Elastic Transcoder console. If you signed up to an SNS topic (when you created the Elastic Transcoder pipeline) and configured your email, you’ll get notifications for the various stages of the job.

An example Lambda function that meets our requirements is given below. Note that it creates a job with 3 outputs — generic 720p, webm and hlsv3.

‘use strict’;var AWS = require(‘aws-sdk’);var s3 = new AWS.S3({
apiVersion: ‘2012–09–25’
});var eltr = new AWS.ElasticTranscoder({
apiVersion: ‘2012–09–25’,
region: ‘us-east-1’
});exports.handler = function(event, context) {
console.log(‘Executing Elastic Transcoder Orchestrator’); var bucket = event.Records[0].s3.bucket.name;
var key = event.Records[0].s3.object.key;
var pipelineId = ‘112321321343–2abcc1’; if (bucket !== ‘acloud-video-input’) {
context.fail(‘Incorrect Video Input Bucket’);
return;
} var srcKey = decodeURIComponent(event.Records[0].s3.object.key.replace(/\+/g, " ")); //the object may have spaces
var newKey = key.split('.')[0]; var params = {
PipelineId: pipelineId,
OutputKeyPrefix: newKey + ‘/’,
Input: {
Key: srcKey,
FrameRate: ‘auto’,
Resolution: ‘auto’,
AspectRatio: ‘auto’,
Interlaced: ‘auto’,
Container: ‘auto’
}, Outputs: [{
Key: ‘mp4-’ + newKey + ‘.mp4’,
ThumbnailPattern: ‘thumbs-’ + newKey + ‘-{count}’,
PresetId: ‘1351620000001–000010’, //Generic 720p
Watermarks: [{
InputKey: ‘watermarks/logo-horiz-large.png’,
PresetWatermarkId: ‘BottomRight’
}],
},{
Key: ‘webm-’ + newKey + ‘.webm’,
ThumbnailPattern: ‘’,
PresetId: ‘1351620000001–100240’, //Webm 720p
Watermarks: [{
InputKey: ‘watermarks/logo-horiz-large.png’,
PresetWatermarkId: ‘BottomRight’
}],
},{
Key: ‘hls-’ + newKey + ‘.ts’,
ThumbnailPattern: ‘’,
PresetId: ‘1351620000001–200010’, //HLS v3 2mb/s
Watermarks: [{
InputKey: ‘watermarks/logo-horiz-large.png’,
PresetWatermarkId: ‘BottomRight’
}],
}]
}; console.log(‘Starting Job’); eltr.createJob(params, function(err, data){
if (err){
console.log(err);
} else {
console.log(data);
} context.succeed(‘Job well done’);
});
};

Presets

One detail you might notice in the Lambda function above is the use of presets (e.g. 1351620000001–000010). Presets describe how to encode the given file. The full list of available presets can be found in AWS documentation.

It’s also possible to create your own preset too. You can do so by clicking on the Presets link in the Elastic Transcoder console. You’ll see the full list of system presets there and you’ll be able to create your own by hitting the Create New Preset button.

Presets allow for a lot of granular control over how files are encoded. Naturally, you can find a lot of detail in the appropriate AWS documentation.

Next Steps

There is much more that the Elastic Transcoder can do that we haven’t yet touched on. Captions and DRM immediately come to mind and both are extremely important for the platform. The A Cloud Guru team have big plans for the serverless media encoding and serving system, so watch this space.

Have you used the Elastic Transcoder and what were your impressions? I am keen to hear about your experience and what you think about the platform.

A Cloud Guru

The mission of A Cloud Guru is to engage individuals in a journey to level-up their cloud computing skills by delivering the world’s leading educational content designed to evolve both mindsets and careers.

“Let no man in the world live in delusion. Without a Guru, none can cross over to the other shore.“ — Guru Nanak

Our courses are delivered by industry experts with a shared passion for cloud computing. We strive to serve our growing community of cloud gurus, who generously contribute their insights in our forums, workshops, meet-ups, and conferences.

Keep up with the A Cloud Guru crew @acloudguru.

Settings that You Specify When You Create an Elastic Transcoder Job

When you create a job using the Elastic Transcoder console, you can specify the following values.

Note

You can configure Elastic Transcoder to notify you when the status of a job changes, including when Elastic Transcoder starts and finishes processing a job, and when Elastic Transcoder encounters a warning or error condition. For more information, see Notifications of Job Status.

Topics

  • Region
  • General Settings
  • Input Details, Part 1
  • Input Details, Part 2, Clip and Caption Settings
  • Output Details, Part 1
  • Output Details, Part 2
  • Output Details, Part 3, Caption Settings
  • (Optional) Output Encryption
  • (Video/Thumbnails Only) Watermarks
  • (FLAC/MP3/MP4 Only) Album Art
  • (Optional) User Metadata
  • (Fragmented MP4/MPEG-TS Outputs Only) Playlist
  • (Fragmented MP4/MPEG-TS Outputs Only, Optional) HLS Content Protection
  • (HLSv3 and Smooth Playlists Only, Optional) Digital Rights Management

Region

Elastic Transcoder creates your job in the region you are in.

General Settings

Pipeline

The name of the pipeline that you want Elastic Transcoder to use for transcoding. The pipeline determines several settings, including the Amazon S3 bucket from which Elastic Transcoder gets the files to transcode and the bucket into which Elastic Transcoder puts the transcoded files.

Output Key Prefix

The value, if any, that you want Elastic Transcoder to prepend to the names of all files that this job creates, including output files, thumbnails, and playlists. If you specify a value, it must contain a / somewhere after the first character, which simplifies Amazon S3 file management.

Input Details, Part 1

Use the settings in this section to specify information about the input files. If you provide more than one input file, Elastic Transcoder transcodes them and then stitches them together into one output file. For more information, see Clip Stitching.

Input Key

The name of the files that you want to transcode. To determine from which Amazon S3 bucket to get the file, Elastic Transcoder refers to the Input Bucket field in the pipeline that you specified for this job.

If a file name includes a prefix—for example, —include the prefix in the key. If the file isn't in the specified bucket, Elastic Transcoder returns an error.

Input Decryption

The encryption settings, if any, that are used for decrypting your input files. If your input file is encrypted, you must specify the mode that Elastic Transcoder will use to decrypt your file.

Decryption Mode (Required for Decryption)

The specific encryption mode that you want Elastic Transcoder to use when decrypting your files.

Elastic Transcoder supports the following options:

  • Amazon S3 Server-Side Encryption: Amazon S3 handles the encryption and decryption of your files. As long as Elastic Transcoder has access permissions to your Amazon S3 bucket, you don't need to take any action.

    For more information, see Protecting Data Using Server-Side Encryption in the Amazon Simple Storage Service Developer Guide.

  • Client-Side Encryption Using Customer-Provided Keys: Elastic Transcoder supports three types of encryption using customer-provided keys:

    • aes-cbc-pkcs7: A padded cipher-block mode of operation.

    • aes-ctr: AES Counter Mode.

    • aes-gcm: AES Galois Counter Mode, a mode of operation that is an authenticated encryption format, meaning that a file, key, or initialization vector that has been tampered with will fail the decryption process.

    If you chose one of the AES-encryption modes, you must also specify the following three values (all three must be base64-encoded):

    • Encryption Key

    • Encryption Key MD5

    • Encryption Initialization Vector

Decryption Key (Required for AES Decryption)

The data encryption key used to encrypt your file. The key must be base64-encoded and it must be one of the following bit lengths before being base64-encoded:

, , or .

The key must also be encrypted by using AWS KMS. For more information, see Encrypting and Decrypting Data in the AWS Key Management Service Developer Guide.

Decryption Key MD5 (Required for AES Decryption)

The MD5 digest of the key used to encrypt your input file, and that you want Elastic Transcoder to use as a checksum to make sure your key was not corrupted in transit. The key MD5 must be base64-encoded, and it must be exactly 16 bytes before being base64-encoded.

Decryption Initialization Vector (Required for AES Decryption)

The series of random bits created by a random bit generator, unique for every encryption operation, that you used to encrypt your input files. The initialization vector must be base64-encoded, and it must be exactly 16 bytes before being base64-encoded.

For more information, go to Initialization Vector.

Input Details, Part 2, Clip and Caption Settings

Use the settings in this section to specify information about clips and captions for the input files. These settings are available only when you provide multiple inputs.

For more information on captions, see Captions

(Optional) Clip Start Time

You can create an output file that contains an excerpt from the input file. Clip Start Time indicates the place in the input file where you want a clip to start. The format can be either HH:mm:ss.SSS (maximum value: 23:59:59.999; SSS is thousandths of a second) or sssss.SSS (maximum value: 86399.999). If you don't specify a value, Elastic Transcoder starts at the beginning of the input file.

(Optional) Clip Duration

The duration of your excerpt clip. The format can be either HH:mm:ss.SSS (maximum value: 23:59:59.999; SSS is thousandths of a second) or sssss.SSS (maximum value: 86399.999). If you don't specify a value, Elastic Transcoder clips from Clip Start Time to the end of the file.

If you specify a value longer than the duration of the input file, Elastic Transcoder transcodes from Clip Start Time to the end of the file and returns a warning message.

(Video Only) Captions Merge Policy

A policy that determines how Elastic Transcoder handles the existence of multiple captions.

  • MergeOverride: Elastic Transcoder transcodes both embedded and sidecar captions into outputs. If captions for a language are embedded in the input file and also appear in a sidecar file, Elastic Transcoder uses the sidecar captions and ignores the embedded captions for that language.

  • MergeRetain: Elastic Transcoder transcodes both embedded and sidecar captions into outputs. If captions for a language are embedded in the input file and also appear in a sidecar file, Elastic Transcoder uses the embedded captions and ignores the sidecar captions for that language. If Caption Source is empty, Elastic Transcoder omits all sidecar captions from the output files.

  • Override: Elastic Transcoder transcodes only the sidecar captions that you specify in Caption Source.

(Video Only, Optional) Input Key

The name of the sidecar caption file that you want Elastic Transcoder to transcode and include with the outputs.

(Video Only) Language

A string that specifies the language of the caption in one of the following formats:

  • 2-character ISO 639-1 code, for example, en for English

  • 3-character ISO 639-2 code, for example, eng for English

For more information on ISO language codes, see List of ISO 639-1 codes.

(Video Only, Optional) TimeOffset

For clip generation or captions that do not start at the same time as the associated video file, the TimeOffset tells Elastic Transcoder how much of the video to encode before including captions.

Specify the TimeOffset in the form [+-]SS.sss or [+-]HH:mm:SS.ss.

(Video Only, Optional) Label

The label of the caption shown in the player when choosing a language. We recommend that you put the caption language name here, in the language of the captions.

Output Details, Part 1

Use the settings in this section to specify information about the output files.

Preset

The preset that you want to use for this output. The preset determines the audio, video, and thumbnail settings that Elastic Transcoder uses for transcoding.

(Fragmented MP4/MPEG-TS Outputs Only) Segment Duration

If you specify a preset for the current output for which the value of Container is either ts (MPEG-TS) or fmp4 (Fragmented MP4), Segment Duration is the target maximum duration of each segment in seconds. For HLSv3 format playlists, each media segment is stored in a separate file. For HLSv4, MPEG-DASH, and Smooth playlists, all media segments for an output are stored in a single file. Each segment is approximately the length of the Segment Duration, though individual segments might be shorter or longer.

The range of valid values is 1 to 60 seconds. If the duration of the video is not evenly divisible by Segment Duration, the duration of the last segment is the remainder of:

Elastic Transcoder creates an output-specific playlist for each HLS output that you specify in Output Keys. To add an output to a master playlist for this job, include it in Outputs in Master Playlist.

Elastic Transcoder applies this segmenting to any captions associated with the output video.

For more information, see HTTP Live Streaming or Smooth Streaming Technical Overview.

Output Key

The name that you want Elastic Transcoder to assign to the transcoded file and playlist. Elastic Transcoder saves the file or files in the Amazon S3 bucket specified by the Bucket field in the pipeline that you specify in Pipeline. If the bucket already contains a file that has the specified name, the output fails. However, other outputs in the same job might succeed.

The format for file names depends on the container type and whether the segment duration is set. If the container type is not or the segment duration is not provided, the name of the output file is a concatenation of Output Key Prefix and Output Key.

If the container type is and segment duration is provided, Elastic Transcoder uses the value of Output Key to name both the playlist for the output and the files:

  • Playlist:

    • HLSv3: The file name is a concatenation of Output Key Prefix and Output Key plus the file name extension .m3u8:

      Output Key PrefixOutput Key.m3u8

    • HLSv4: The file name is a concatenation of Output Key Prefix and Output Key plus the file name extension _v4.m3u8. Video outputs create a second file with a file name that is a concatenation of Output Key Prefix and Output Key plus the file name extension _iframe.m3u8:

      Output Key PrefixOutput Key_v4.m3u8

      Output Key PrefixOutput Key_iframe.m3u8 (Video only)

  • Segment (.ts) files:

    • HLSv3: The file name is a concatenation of Output Key Prefix and Output Key, plus a five-digit sequential counter beginning with 00000, and the file name extension .ts:

      Output Key PrefixOutput Key00000.ts

    • HLSv4: The file name is a concatenation of Output Key Prefix and Output Key plus the file name extension .ts:

      Output Key PrefixOutput Key.ts

If a segmented output is not included in a master playlist, Elastic Transcoder treats the output as HLSv3.

Note

Elastic Transcoder automatically appends the relevant file extension to outputs in an HLSv3 or HLSv4 playlist. If you include a file extension in the Output Key for HLSv3 or HLSv4 playlist outputs, the filename will have two extensions.

Output Key Prefix groups all of the files for a job together in your Amazon S3 bucket. If you want to group the files for each output within a job, you can include a prefix in the value of Output Key, for example:

OutputKeyPrefixiPhone/Key00000.ts

OutputKeyPrefixKindleFireHD/Key00000.ts

Segment Filename Preview

The name of the first segment file, based on the value that you entered for Output Key.

Output Details, Part 2

Use the settings in this section to specify information about the output files.

(Video Only) Create Thumbnails

If you want Elastic Transcoder to create thumbnails for your videos, select Yes, and specify the format for the file names in the Thumbnail Filename Pattern field.

(Video Only) Thumbnail Filename Pattern

If you selected Yes for Thumbnail Filename Pattern, specify the format for the file names. You can specify the following values in any sequence:

  • {count} (Required): A five-digit number beginning with 00001 that indicates where a given thumbnail appears in the sequence of thumbnails for a transcoded file. You must include {count} somewhere in the field. If you omit it, Elastic Transcoder automatically appends the count to the end of the file name, immediately before the file name extension (.jpg or .png).

  • (Optional) Literal values: You can specify literal values anywhere in the field, for example, as a file name prefix or as a delimiter between and .

  • (Optional) {resolution}: If you want Elastic Transcoder to include the resolution in the file name, include in the field.

The Thumbnail Filename Preview field displays a sample of file names for thumbnails based on the value that you entered in Thumbnail Filename Pattern.

When creating thumbnails, Elastic Transcoder automatically saves the files in the format (.jpg or .png) that appears in the preset that you specified in Preset. Elastic Transcoder also appends the applicable file name extension.

(Video/Thumbnails Only, Optional) Output Rotation

The number of degrees clockwise by which you want Elastic Transcoder to rotate the output relative to the input. If you want Elastic Transcoder to automatically detect whether the input file is rotated, select auto. Note, however, that Elastic Transcoder generally can only detect whether the output needs to be rotated if the file that you're transcoding contains rotation metadata.

Output Details, Part 3, Caption Settings

Use the settings in this section to specify information about captions for the output files.

For more information on captions, see Captions.

(Video Only) Caption Format

The format you specify determines whether Elastic Transcoder generates an embedded or sidecar caption for this output. If you leave this value blank, Elastic Transcoder returns an error.

  • Embedded Caption Formats: For MP4 containers, mov-text and CEA-708 are supported. For MPEG-TS containers, CEA-708 is supported. For other container types, no embedded caption formats are supported.

    CEA-708 captions are embedded in the H.264 SEI user data of the stream. Elastic Transcoder supports a maximum of one embedded format per output.

  • Sidecar Caption Formats: Elastic Transcoder supports dfxp, scc, srt, and webvtt. Fmp4 containers with Smooth playlists support only dfxp, and Elastic Transcoder creates a file with the extension . Fmp4 containers with MPEG-DASH playlists support only webvtt, and Elastic Transcoder creates a file with the extension . If you want ttml or smpte-tt compatible captions, specify dfxp as your output format.

(Video Only) Captions Filename Pattern

The prefix for caption filenames, in the form -, where:

  • is a description of the video.

  • is a literal value that Elastic Transcoder replaces with the two- or three-letter code for the language of the caption in the output file names.

If you don't include in the file name pattern, Elastic Transcoder automatically appends "" to the value that you specify for the . In addition, Elastic Transcoder automatically appends the count to the end of the segment files.

For example, suppose you're transcoding into srt format. When, you enter "Sydney-{language}-sunrise", and the language of the captions is English (en), the name of the first caption file will be .

(Video Only) Captions Filename Preview

The name of the first caption file, based on the value that you entered for Captions Filename Pattern. The preview uses the English ISO code "en" to show how will look in your file name.

(Optional) Output Encryption

You can specify encryption settings for any output files that you want to use for a transcoding job. This includes the output file and any watermarks, thumbnails, album art, or captions that you want to use. You must specify encryption settings for each file individually.

Output Encryption

The encryption settings, if any, that you want Elastic Transcoder to apply to your output files. If you choose to use encryption, you must specify a mode to use. If you choose not to use encryption, Elastic Transcoder will write an unencrypted file to your Amazon S3 bucket.

(Required for file-level Encryption) Encryption Mode

The specific encryption mode that you want Elastic Transcoder to use when encrypting your output files individually. Elastic Transcoder supports the following Encryption Mode options:

  • s3: Amazon S3 creates and manages the keys used for encrypting your files.

    For more information, see Protecting Data Using Server-Side Encryption in the Amazon Simple Storage Service Developer Guide.

  • s3-aws-kms: Amazon S3 calls AWS KMS, which creates and manages the keys that are used for encrypting your files. If you specify s3-aws-kms and you don't want to use the default key, you must add the AWS-KMS key that you want to use to your pipeline.

    For more information, see Protecting Data Using Server-Side Encryption with AWS KMS-Managed Keys in the Amazon Simple Storage Service Developer Guide.

  • aes-cbc-pkcs7: A padded cipher-block mode of operation.

  • aes-ctr: AES Counter Mode.

  • aes-gcm: AES Galois Counter Mode, a mode of operation that is an authenticated encryption format, meaning that a file, key, or initialization vector that has been tampered with will fail the decryption process.

If you chose one of the AES-encryption modes, you must also specify the following three values (all three must be base64-encoded):

  • Encryption Key

  • Encryption Key MD5

  • Encryption Initialization Vector

If you chose one of the AES-encryption modes, and you want Elastic Transcoder to generate a -bit AES encryption key for you, do not specify values for the Encryption Key, Encryption Key MD5, or Encryption Initialization Vector. Once Elastic Transcoder has generated the key, you can retrieve the key by calling . The key is not included in the object.

Important

For the AES modes, your media-specific private encryption keys and your unencrypted data are never stored by AWS; therefore, it is important that you safely manage your encryption keys. If you lose them, you won't be able to decrypt your data.

(Optional) Encryption Key

If you want Elastic Transcoder to generate a key for you, leave this field blank. Once Elastic Transcoder has generated the key, you can retrieve the key by calling Read Job. The key is not included in the Create Job Response object.

If you choose to supply your own key, you must encrypt the key by using AWS KMS. The key must be base64-encoded, and it must be one of the following bit lengths before being base64-encoded:

, , or .

If you configured Elastic Transcoder to generate a key for you, Elastic Transcoder leaves this field blank in the Create Job response. To retrieve your generated data encryption key, submit a Read Job request.

For more information about encrypting your key with AWS KMS, see Encrypting and Decrypting Data in the AWS Key Management Service Developer Guide.

(Required if an Encryption Key is supplied) Encryption Key MD5

The MD5 digest of the key that you want Elastic Transcoder to use to encrypt your output file, and that you want Elastic Transcoder to use as a checksum to make sure your key was not corrupted in transit. The key MD5 must be base64-encoded, and it must be exactly 16 bytes before being base64-encoded.

If Elastic Transcoder is generating your key for you, you must leave this field blank.

(Required if an Encryption Key is supplied) Encryption Initialization Vector

The series of random bits created by a random bit generator, unique for every encryption operation, that you want Elastic Transcoder to use to encrypt your output files. The initialization vector must be base64-encoded, and it must be exactly 16 bytes before being base64-encoded.

If Elastic Transcoder is generating your key for you, you must leave this field blank.

For more information, go to Initialization Vector.

(Video/Thumbnails Only) Watermarks

Information about the watermarks that you want Elastic Transcoder to add to the video during transcoding. You can specify up to four watermarks for each output. Settings for each watermark must be defined in the preset that you specify in Preset for the current output.

Watermarks are added to the output video in the sequence in which you list them in the job output—the first watermark in the list is added to the output video first, the second watermark in the list is added next, and so on. As a result, if the settings in a preset cause Elastic Transcoder to place all watermarks in the same location, the second watermark that you add will cover the first one, the third one will cover the second, and the fourth one will cover the third.

For more information about watermarks, see Watermarks.

Preset Watermark ID

The ID of the watermark settings that Elastic Transcoder uses to add watermarks to the video during transcoding. The settings are in the preset specified by Preset for the current output. In that preset, the value of Watermarks Id tells Elastic Transcoder which settings to use.

Input Key for Preset Watermark Id

The name of the .png or .jpg file that you want to use for the watermark. To determine which Amazon S3 bucket contains the specified file, Elastic Transcoder checks the pipeline specified by Pipeline; the Input Bucket object in that pipeline identifies the bucket.

If the file name includes a prefix, for example, logos/128x64.png, include the prefix in the key. If the file isn't in the specified bucket, Elastic Transcoder returns an error.

(FLAC/MP3/MP4 Only) Album Art

The album art to be associated with the output file, if any.

To remove artwork or leave the artwork empty, you can either set Artwork to null, or set the Merge Policy to "Replace" and use an empty Artwork array.

To pass through existing artwork unchanged, set the Merge Policy to "Prepend", "Append", or "Fallback", and use an empty Artwork array.

Note

Album art is available for audio-only outputs in , , or containers.

Album Art Merge Policy

A policy that determines how Elastic Transcoder will handle the existence of multiple album artwork files.

  • Replace: The specified album art will replace any existing album art.

  • Prepend: The specified album art will be placed in front of any existing album art.

  • Append: The specified album art will be placed after any existing album art.

  • Fallback: If the input file contains artwork, Elastic Transcoder will use that artwork for the output. If the input does not contain artwork, Elastic Transcoder will use the specified album art file.

Album Art Artwork

The file to be used as album art. There can be multiple artworks associated with an audio file, to a maximum of 20.

Album Art Input Key

The name of the file to be used as album art. To determine which Amazon S3 bucket contains the specified file, Elastic Transcoder checks the pipeline specified by PipelineId; the InputBucket object in that pipeline identifies the bucket.

If the file name includes a prefix, for example, , include the prefix in the key. If the file isn't in the specified bucket, Elastic Transcoder returns an error.

Album Art Format

The format of album art, if any. Valid formats are and .

Album Art Max Width

The maximum width of the output album art in pixels. If you specify , Elastic Transcoder uses 600 as the default value. If you specify a numeric value, enter an even integer between 32 and 4096, inclusive.

Album Art Max Height

The maximum height of the output album art in pixels. If you specify , Elastic Transcoder uses 600 as the default value. If you specify a numeric value, enter an even integer between 32 and 3072, inclusive.

Album Art Sizing Policy

A value that controls scaling of the output album art:

0 thoughts on “Elastic Transcoder Formats For Essays

Leave a Reply

Your email address will not be published. Required fields are marked *