

# Working with image insertion (overlays)
Image insertionFind information about the new image inserter features

You can now use the image inserter for still image overlays on individual inputs and outputs and for motion image overlays in AWS Elemental MediaConvert. This guide shows you how.

With the image inserter feature, you can insert a still image or motion image at a specified time. You can also display it as an overlay on the underlying video for a specified duration. This feature includes fade-in and fade-out capability and adjustable opacity.

You can set up an output with multiple overlays. Each overlay is independent of the others. For example, you can place a motion image logo in the video frame for the duration of the video, and include a still image HDR indicator only for portions of the file that are HDR. Each overlay has its own settings for opacity, fade-in and fade-out times, position on the frame, and length of time on the video. You can set up overlays to appear on the underlying video at the same time, or to overlap each other.

**Topics**
+ [

# Choosing between input and output overlays
](choosing-between-input-overlay-and-output-overlay.md)
+ [

# Configuring input overlays
](setting-up-still-graphic-overlays-in-inputs.md)
+ [

# Configuring output overlays
](setting-up-still-graphic-overlays-in-outputs.md)
+ [

# Placing your image overlay
](placing-your-still-graphic-overlay.md)
+ [

# Sizing your overlay for scaling
](about-overlay-scaling.md)
+ [

# Understanding overlay layers
](using-multiple-overlays.md)
+ [

# Requirements for the overlay file
](requirements-for-the-overlay-file.md)

# Choosing between input and output overlays
Choosing between input and output overlays

You can add still image overlays to your inputs, your outputs, or both. Where you specify your image overlays affects where in your transcoded assets the overlays appear. 

The following diagram shows how input and output overlays appear in the video files that are created by a job. Input overlays appear on all outputs, but only in the portions of the outputs that come from the input that has the overlay. Output overlays appear throughout an entire output, but only on the outputs that have the overlay.

**Note**  
In this diagram, all overlays are specified for the entire duration of the input or output. You can instead specify a shorter overlay duration within that time.

![\[Input and output overlays for a job’s video files, set for the duration of the input or output.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/ImageInserter.png)


## Input overlays
Input overlays

Choose input overlay for the following situations:
+ You want the same overlays on every output.
+ You want an overlay on only the parts of your outputs that correspond to individual inputs.

These examples are situations where you would use input overlay:
+ Some of your inputs already have your logo as an overlay and some of them don't. You want to add the logo only to the inputs that don't already have it.
+ Some of your inputs are programming that you want your logo on. Other inputs are advertisements or blank slates that you don't want your overlay on.
+ Your job has only one input. Your overlay should appear for the entire duration of the video and on every output of the job.

## Output overlays
Output overlays

Choose output overlay for the following situations:
+ You want overlays on some outputs but not others.
+ You want different overlays on different outputs.
+ You have multiple inputs, but you want the same overlay across all of them.

These examples are situations where you would use output overlay:
+ You set up one of your outputs with high definition. You want to include an HD indicator in the corner of the frame on this output only.
+ You are stitching together several films as separate inputs to create a single-asset film marathon. You want to put a image on all of them indicating that they are part of the larger marathon.

# Configuring input overlays
Configuring input overlays

Because you are setting up an input overlay, set up image insertion in each input where you want the service to overlay imagess on your video. The overlays that you specify appear in every output. For information about setting up an overlay that appears on only specific outputs, see [Choosing between input and output overlays](choosing-between-input-overlay-and-output-overlay.md).

When don't specify overlay start time and duration, the service puts the overlay on the entire part of the output that corresponds to the input.

**To set up a still image overlay in an output**

1. Open the AWS Elemental MediaConvert console at [https://console.aws.amazon.com/mediaconvert](https://console.aws.amazon.com/mediaconvert).

1. Specify your input files, as described in [Tutorial: Configuring job settings](setting-up-a-job.md).

1. For each input that you want to have a image overlay, do the following:

   1. On the **Create job** page, in the **Job** pane on the left, under **Inputs**, choose the appropriate input.

   1. In the **Image inserter** section to the right of the **Job** pane, choose **Add image**, and then specify the overlay settings.

      For **Image location**, specify an input file that is stored in Amazon S3 or on an HTTP(S) server. For Amazon S3 inputs, you can specify the URI directly or choose **Browse** to select from your Amazon S3 buckets. For HTTP(S) inputs, provide the URL to your input file. For more information, see [HTTP input requirements](http-input-requirements.md).

For details about the more complex input image overlay settings, see the following topics:

[Sizing overlays](about-overlay-scaling.md)

[Layering overlays](using-multiple-overlays.md)

# Configuring output overlays
Configuring output overlays

Because you're setting up an output overlay, set up image insertion in each output where you want the service to overlay images on your video. For information about setting up an overlay that appears on all outputs, or on portions that correspond to only one input, see [Choosing between input and output overlays](choosing-between-input-overlay-and-output-overlay.md).

If you don't specify overlay start time and duration, the service puts the overlay on the entire output.

**To set up a still image overlay in an output**

1. Open the AWS Elemental MediaConvert console at [https://console.aws.amazon.com/mediaconvert](https://console.aws.amazon.com/mediaconvert).

1. Set up your output groups and outputs for video and audio, as described in [Tutorial: Configuring job settings](setting-up-a-job.md) and [Creating outputs](output-settings.md).

1. For each output that you want to have a image overlay, do the following:

   1. On the **Create job** page, in the **Job** pane on the left, under **Output groups**, choose the appropriate output.

   1. Under **Encoding** settings, under the **Video** tab, find the **Preprocessors** section.

   1. Choose **Image inserter**. This displays an **Add image** button.

   1. For each image overlay that you want to include in the output, choose **Add image**, and then specify the overlay settings.

      For **Image location**, specify an input file that is stored in Amazon S3 or on an HTTP(S) server. For Amazon S3 inputs, you can specify the URI directly or choose **Browse** to select from your Amazon S3 buckets. For HTTP(S) inputs, provide the URL to your input file. For more information, see [HTTP input requirements](http-input-requirements.md).

For details about the more complex output image overlay settings, see the following topics:

[Sizing overlays](about-overlay-scaling.md)



[Layering overlays](using-multiple-overlays.md)

# Placing your image overlay
Placing overlays

Whether your still image overlay is in input or output, set up the **Start time** and **Duration**. The following image shows how to specify settings so that an overlay starts two minutes into the video and remains on the video for two minutes. In the default settings, the overlay begins at the first frame of the input or output. The overlay remains on the video for the duration of the input or output.

![\[Image overlay start time at two minutes into the video and remaining on the video for two minutes.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/PlacingOverlay.png)


**Start time**  
Provide the timecode for the first frame that you want to have the overlay appear on. If you set up your overlay to fade in, the fade-in begins at the start time.



When you provide your start time, choose one of the following timelines to suit the overlay that you're using:
+ For input overlays, **Start time** is relative to the input timeline. This timeline is affected by the input **Timecode source** setting.
+ For output overlays, **Start time** is relative to the output timeline. This timeline is affected by the job-wide **Timecode configuration**, **Source** setting.

For more information about the input and output timelines, and the timecode settings that affect them, see [How MediaConvert uses timelines to assemble jobs](specifying-inputs.md#how-mediaconvert-uses-timelines-to-assemble-jobs).

**Tip**  
For simplest setup, specify **Start time** counting from 00:00:00:00 as the first frame, and set both of the following settings to **Start at 0**:  
**Timecode configuration**, **Source**, under the job-wide settings.
**Timecode source**, in the **Video selector** settings for each input.

**Duration**  
Specify the length of time, in milliseconds, for the overlay duration to remain. This duration includes fade-in time, but not fade-out time, as the following image shows.

![\[Overlay fade-in time when the overlay is at full opacity, and the time when the overlay is fading out.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/OverlayFadeinFadeoutDuration.png)


# Sizing your overlay for scaling
Sizing overlays

In jobs that scale the video resolution, whether your overlay scales with your video depends on where you specify the image overlay. Motion image overlays and input overlays scale with the video; output overlays don't.

For example, suppose that the input video for your job is 1080 x 1920 and you specify three outputs at 720 x 1280, 480 x 640, and 360 x 480. Your square logo would be 10% of the width of your frames, and your overlay images would have the following resolutions:
+ For a motion image overlay or an input image overlay, provide an image that is 108 x 108. The service appropriately sizes each overlay on each output.
+ For an output image overlay on your 720 x 1280 output, provide an image that is 72 x 72.
+ For an output image overlay on your 480 x 640 output, provide an image that is 48 x 48.
+ For an output image overlay on your 360 x 480 output, provide an image that is 36 x 36.

# Understanding overlay layers
Layering overlays

The **Layer** setting specifies how overlapping image overlays appear in the video. The service overlays images with higher values for **Layer** on top of overlays with lower values for **Layer**. Each overlay must have a unique value for **Layer**; you can't assign the same layer number to more than one overlay.

The following illustration shows how the value for **Layer** affects how a image overlay appears in relation to other overlays. The triangle has the highest value for **Layer** and appears on top, obscuring the video frame and all image overlays with lower values of **Layer**.

![\[The underlying video is obscured by three image overlays: a blue rectangle with a Layer value of 1, a green ring with a Layer value of 2, and an orange triangle with a Layer value of 3. Where the rectangle and ring overlap, the ring obscures the rectangle. Where the triangle and ring overlap, the triangle obscures the ring. In the transparent portion of the ring, the underlying video and a corner of the rectangle show through.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/ImgIns-Layer.png)


**To specify a value for the **Layer** setting**

1. Set up your image overlay as described in [Image insertion](graphic-overlay.md).

1. For **Layer**, enter a whole number from 0 to 99. 
**Note**  
You can use each number only once. Each image overlay must have its own layer.

# Requirements for the overlay file
Requirements

Set up the image files that you want to insert over your video as follows:
+ **File type**: Use .png or .tga.
+ **Aspect ratio**: Use any aspect ratio; it doesn't need to match the aspect ratio of the underlying video.
+ **Size in pixels**: Use any size. If the overlaid image is larger than the output video frame, the service crops the image at the edge of the frame.
**Note**  
In jobs that scale the video resolution, whether your overlay scales with your video depends on where you specify the image overlay. For more information, see [Sizing overlays](about-overlay-scaling.md).