

# Handling complex color space conversions
Video – complex color space conversion

**Important**  
Read [Which section to read](#color-space-which-section) to determine if you should read this section.

You can control how MediaLive takes the color space and color space metadata in a video source and manipulates it in the video output. You can set up each output video encode to convert or pass through the color space, and to include or omit the color space metadata. 

All video belongs to a specific color space. The color space defines the range of color for the video. Video can include color space metadata. This metadata provides information about the color space. When the color space metadata is missing, the video still has a color space, but it is impossible for a video processor such as MediaLive to manipulate the color space.

You can control how MediaLive takes the color space and color space metadata in a video source and manipulates it in the video output. You can set up each output video encode to convert or pass through the color space, and to include or omit the color space metadata.

**Default behavior**

The default behavior is to pass through the color space and pass through the color space metadata.

**Topics**
+ [

## Which section to read
](#color-space-which-section)
+ [

# Options for handling color space
](color-space-handling-options.md)
+ [

# General information about color space
](about-color-metadata.md)
+ [

# General procedure for handling color space
](color-space-general-procedure.md)
+ [

# Assess the color spaces in the sources
](color-space-assess-inputs.md)
+ [

# Handling color space metadata in the inputs
](color-space-input-handling.md)
+ [

# Configuring color space handling in each output
](color-space-output-handling.md)
+ [

# Results for different color space handling
](colorspace-output-results.md)
+ [

# Reference: Location of fields
](colorspace-fields.md)

## Which section to read


There are two sections in this guide about handling color space in MediaLive — this section, and the section [Handling a straightforward color space conversion](color-space-simplified.md). 

Read the requirements in [Determine if this section applies to your channel](color-space-simplified.md#color-space-simplified-which-section) in [Handling a straightforward color space conversion](color-space-simplified.md). If your content doesn't meet all those requirements, then follow the procedures in this section instead. 

This section provides procedures for dealing with complicated situations that include the following:
+ Assessing the accuracy of the color space metadata in content.
+ Cleaning up the metadata in content.
+ Content that is one input, where the color space switches within the input.
+ Converting content that is a combination of supported and unsupported color spaces.

These requirements often apply to content that is a VOD file that you are converting to a live stream. The VOD file might have been created by stitching together several different sources, each with a different color space. It might contain older content with an unknown color space and/or with missing or inaccurate metadata.

# Options for handling color space
Options for handling

All video belongs to a specific color space. The color space defines the range of color for the video. Video can include color space metadata. This metadata provides information about the color space. When the color space metadata is missing, the video still has a color space, but it is impossible for a video processor such as MediaLive to manipulate the color space.

You can control how MediaLive takes the color space and color space metadata in a video source and manipulates it in the video output. 

You can set up each output video encode to handle the color space in different ways:


| Option | Handling of color space  |  Handling of color space metadata  | 
| --- | --- | --- | 
| Pass through and include | Pass through | Pass through (corrected or original) | 
| Pass through and remove | Pass through | Remove | 
| Convert and include  | Convert | Generate new color space metadata | 
| Convert and remove | Convert | Remove | 

**Scope of handling in outputs**

You can set up each output in the channel for different handling. For example, you can set up one output to convert the color space to HDR10, set up one output to convert to HLG, and set up another output to pass through the color space. For more information, see [Passing through the color space](color-space-options-passthrough.md) and [Converting the color space](color-space-options-convert.md) .

# General information about color space
General information

Following is some general information about color space.

**Topics**
+ [

# Definition
](color-space-definitions.md)
+ [

# Supported color space standards
](color-space-standards.md)
+ [

# Passing through the color space
](color-space-options-passthrough.md)
+ [

# Converting the color space
](color-space-options-convert.md)
+ [

# Input and output requirements
](color-space-input-output-requirements.md)

# Definition


There are four components to color space:
+ The specific *color space* that applies to the video content. The color space specifies a range of pixel colors that can apply to the content.
+ The *color space metadata*, which identifies the color space being used. If this metadata is present, the content is said to be *marked* for a color space. 
+ The *brightness function* that applies to the color space. The brightness function controls the brightness of each pixel. The brightness is also known as gamma tables, electro-optical transfer function (EOTF), and transfer function. 
+ The *brightness metadata*, which identifies the brightness function being used.
+ The *display metadata * that applies to the color space. Not all standards have this metadata.

The video might use a specific *color space* and a specific *brightness function*. The video might also carry *color space metadata *that describes aspects of the color.

# Supported color space standards
Supported color spaces

Each color space standard follows a specific standard for the color space, and specific standards for the three sets of color data. 

To read this table, find a color space in the first column, then read across to identify the standards for the color space and the three sets of color data.


|  MediaLive term for the color space   |  Complies with this color space standard   |  Complies with this brightness function standard   |  Complies with this standard for display metadata   | 
| --- | --- | --- | --- | 
|  Rec. 601 or Rec. 601   |  Rec. 601   |  BT.1886   |  Not applicable. This color space doesn't include display metadata.  | 
|  Rec. 709 or Rec. 709   |  Rec. 709   |  BT.1886   |  Not applicable. This color space doesn't include display metadata.  | 
|  HDR10   |  Rec. 2020  |  SMPTE ST 2084 (PQ)   |  SMPTE ST 2086   | 
|  HLG or HLG 2020   |  Rec. 2020  |  HLG rec. 2020   | Not applicable. This color space doesn't include display metadata. | 
|  Dolby Vision 8.1  |  Rec. 2020  |  SMPTE ST 2084 (PQ)  |  Proprietary Dolby Vision 8.1 metadata (RPU), on a per-frame basis, and SMPTE ST 2086 on a per-stream basis.  | 

# Passing through the color space
Passthrough

You can set up to *pass through* the color space from the source to a MediaLive output. You can set up to include or remove the color space metadata. For passthrough to produce the desired quality in the video output, the color space metadata must be accurate. 

Here are the possible combinations for passthrough:
+ Pass through the color space, pass through the color space metadata without correcting it (because you know that it is accurate).
+ Pass through the color space, pass through the color space metadata after correcting it.
+ Pass through the color space, remove the color space metadata without correcting it. You might want to remove the color space metadata because the downstream system can't handle it properly. 

  When MediaLive removes the metadata, the source still has a color space but it doesn't have information that identifies the color space. Removing the metadata doesn't necessarily degrade the color. Removing it might only mean that the downstream player can't implement enhancements to make the color even richer.

**Default behavior**

The default behavior is to pass through the color space and pass through the uncorrected color space metadata.

# Converting the color space
Conversion

You can set up to *convert* the color space itself—to change the pixels in the video. MediaLive can perform specific color space conversions. 

MediaLive can convert only color spaces that it supports. See [Supported color space standards](color-space-standards.md). 

Here are the possible combinations for conversion:
+ Convert the color space, and include color space metadata. MediaLive will convert the color space metadata to accurately describe the new color space.
+ Convert the color space, but omit the color space metadata. You might want to remove the color space metadata because the downstream system can't handle it properly.

  When MediaLive removes the metadata, the source still has a color space but it doesn't have information that identifies the color space. Removing the metadata doesn't necessarily degrade the color. Removing it might only mean that the downstream player can't implement enhancements to make the color even richer.

**Warning**  
If the content provider can't tell you what color space applies to the input, you shouldn't try to convert the color space. Doing so might degrade the video quality. You should pass through the color space. You should also remove the color space metadata, so that the downstream system doesn't read information that might be inaccurate.

MediaLive converts from one color space to another based on the metadata in the source content. MediaLive doesn't examine the video to try to determine whether it actually matches the color space identified in the metadata. 

## Supported types of conversion


The following table identifies the color spaces in the source that can be converted to a specific color space in a MediaLive output.


|  Any of these color spaces in the source  |  Can be converted to this color space in the output  | 
| --- | --- | 
|  Rec. 709, HLG, HDR10   |  Rec. 601  | 
|  Rec. 601, HLG, HDR10  |  Rec. 709  | 
| Rec. 601, Rec. 709, HLG | HDR10 | 
| Rec. 601, Rec. 709, HDR10 |  HLG  | 
|  HDR10 If MediaLive encounters a portion of non-HDR10 content, it passes through the color space and color space metadata for that portion,  | Dolby Vision 8.1 | 

# Input and output requirements


**Topics**
+ [

## Supported inputs
](#color-space-supported-inputs)
+ [

## Supported output types
](#color-space-supported-outputs)
+ [

## Supported output codecs
](#color-space-supported-output-codecs)

## Supported inputs


MediaLive can work with the supported color space in all [supported types of input](inputs-supported-formats.md) with the following notes:
+ Handling Elemental Link inputs: MediaLive can't read the color space metadata in a source from an AWS Elemental Link device. The workaround when you set up the input is to specify the color space that applies, as described in [Scenario B – Metadata can be corrected with force](color-space-scenario-correct.md).
+ Converting to Dolby Vision 8.1: 
  + The video source must be HD or 4K resolution. In other words, the source must be 1080p or better.
  + The video source must be HDR10. If MediaLive encounters a portion of non-HDR10 content, it passes through the color space and color space metadata for that portion,
  + The video source can't be a file. This means that the source can't be a VOD asset in an MP4 file or a VOD asset in a transport stream.

  These constraints are stipulated by Dolby Vision 8.1, and relate to the minimal video quality required to produce Dolby Vision 8.1 outputs that meet the Dolby Vision 8.1 standard.

## Supported output types


All color space types except Dolby Vision 8.1 can be set up in all MediaLive output group types.

Dolby Vision 8.1 can be set up only in the following output group types:
+ Archive
+ CMAF Ingest
+ HLS
+ UDP

## Supported output codecs


The following table specifies the supported codecs for the MediaLive output color spaces.


|  Output color space   | AV1 | AVC (H.264) | HEVC (H.265) | 
| --- | --- | --- | --- | 
|  Rec. 601  | Yes | Yes | Yes | 
|  Rec. 709  | Yes | Yes | Yes | 
|  HDR10   | Yes |  | Yes | 
|  HLG  | Yes |  | Yes | 
|  Dolby Vision 8.1  |  |  | Yes | 

**Supported video profile for HDR10 or Dolby Vision 8.1 outputs**

For HDR10 or Dolby Vision 8.1 outputs, the video profile must include the term *10BIT*.

# General procedure for handling color space


The procedure for handling color space in the channel is the same for both passing through and converting the color space in the outputs.

1. You must assess the color space in all the inputs, and determine if you can handle the color space according to your preference. See [Assess the color spaces in the sources](color-space-assess-inputs.md).

1. You must assess the source to make sure the color space metadata is correct. 
   + For passthrough: If you plan to include the color space metadata, you must assess it. If the metadata isn't correct, downstream players won't handle the color space correctly. 
   + For conversion: MediaLive reads this metadata to determine the color space of the source, so that it can apply the correct conversion formula. Therefore, even if you plan to remove the metadata in the outputs, you must assess the metadata. 

   See [Assess the color space metadata in the sources](color-space-input-procedure.md).

1. If you need to correct the color space metadata, you do so in the input. You configure each input separately. 

   See [Options for correcting metadata](color-space-cleanup-scenarios.md).

1. Set up the output to pass through or convert the color space, and to include or omit the color space metadata. See [Configuring color space handling in each output](color-space-output-handling.md).

# Assess the color spaces in the sources


1. Speak to the content provider of each input. Obtain the following information:
   + The names of the color spaces that apply to the content.
   + Whether each input consists of only one color space or several color spaces.
   + Whether the color space metadata is accurate. (You will use this information in the [next section](color-space-input-procedure.md).)

1. Read the following information to determine if there are reasons not to pass through or not to convert the color space.

**Topics**
+ [

## Unknown color space
](#color-space-unknown)
+ [

## Restrictions on passthrough
](#color-space-restrictions-passthrough)
+ [

## Restrictions on conversion
](#color-space-restrictions-conversion)

## Unknown color space


If the content provider can't tell you what color space applies to the input, you shouldn't try to convert the color space. Doing so might degrade the video quality. 

You might be able to pass through the color space. In this case, you should remove the color space metadata, so that the downstream system doesn't read information that might be inaccurate.

## Restrictions on passthrough


**Passthrough of supported color spaces**

MediaLive can pass through color spaces that it supports. 

**Passthrough of unsupported color spaces**

MediaLive might be able to pass through color spaces that it doesn't support. Any of the following might apply:
+ MediaLive might be able to ingest the input, and to pass through the color space and the color space metadata. 
+ Or it might ingest the input but produce unacceptable output. 
+ Or it might fail to ingest the input, so that the event follows the input loss behavior routine (for example, it might display a slate in the output). 

**Passthrough and the output codec**

Even if MediaLive supports the color space that you want to pass through, there might be a restriction because of the output codec.

If you want to pass through the color space in even one output, then every input in the channel must be in color spaces that are supported by the codec for the output. For information about codecs, see [Supported output codecs](color-space-input-output-requirements.md#color-space-supported-output-codecs).

For example, you have an output where you want to pass through the color space. You want to encode that output with H.264. Assume that one of the channel inputs includes content in Dolby Vision 8.1. However, the Dolby Vision color space (from the input) can't be included in H.264. MediaLive will accept the configuration, but the portions of the output in the unsupported color space will be degraded.

The workaround is to choose an output codec that is supported by all the color spaces in all the inputs.

Note how the rule for passthrough in a channel is based on the color space for all the inputs.

## Restrictions on conversion


Even if MediaLive supports conversion to a specific color space, there might be a restriction because of the output codec.

If you want to convert to a specific color space in an output, then the codec you set in that output must support that color space. 

For example, you have an output where you want to encode with H.264, and you want to convert all the source color spaces to HDR10. However, HDR10 can't be included in H.264. MediaLive won't let you configure in this way. When you choose H.264, the option for HDR10 is removed from the field where you specified the output color space.

The workaround is to choose an output codec (H.265) that is supported with the color space conversion.

Note how the rule for conversion in a channel is based on the color space and codec for the individual output. 

# Handling color space metadata in the inputs
Configuring color space metadata

You must assess the color space of the MediaLive inputs and determine if the color space metadata needs to be cleaned up. You must perform this assessment in order to decide about the correct handling for the outputs.

**Topics**
+ [

# Assess the color space metadata in the sources
](color-space-input-procedure.md)
+ [

# Options for correcting metadata
](color-space-cleanup-scenarios.md)
+ [

# Set up inputs to correct metadata
](color-space-input-setup.md)

# Assess the color space metadata in the sources
Step 1: Assess the metadata

Before you can set up the outputs, you must determine if you need to modify the color space metadata in the inputs. To make this decision, you must assess the quality of the metadata in the inputs. 

**Important**  
The handling on the input side of the event is about changing the color space metadata, not changing the color space itself. The handling is about changing the metadata to correctly identify the color space in the input, in preparation for the planned handling in the outputs.  
The conversion of the video to a different color space occurs in [Configuring color space handling in each output](color-space-output-handling.md).

**To assess the inputs**

1. You should have already obtained information about the accuracy of the color space metadata in all the inputs. 

1. Make a note of the presence and accuracy of the metadata for all the color spaces in all the inputs.

   The color space metadata is accurate if the following applies:
   + It is present in the input and it accurately identifies the color space, which means that the color space is accurately marked.

   The color space metadata might be present, but it might be inaccurate in one or more ways:
   + Incorrect: The metadata doesn't match the color space.
   + Unknown: The metadata marks the color space as *unknown*.
   + Not supported: The metadata specifies a color space that MediaLive [doesn't support](color-space-standards.md). MediaLive doesn't read this metadata.
   + Missing: All or part of the video might not have color space metadata. 

1. This step applies only for the following situation:
   + The input is for a MediaLive device such as AWS Elemental Link.
   + The input color space is HDR10. 
   + You plan to pass through the color space to the output.

   Obtain the values for the Max CLL and Max FALL for the content. 

   MediaLive can't read the metadata from an AWS Elemental Link device. But you will be able to enter the color space and the display metadata (Max CLL and Max FALL) manually, in the channel configuration.

   You don't need these values if you plan to convert this input from HDR10 to another color space.

# Options for correcting metadata
Step 2: Correcting metadata

In step 1, you assessed the status of the color space metadata in the MediaLive inputs. You must now decide if you can clean up any inaccurate metadata. 

MediaLive can clean up the color space metadata for any color space except Dolby Vision 8.1 or an unsupported color space.

**Note**  
If you want to convert the color space in your channel, the metadata for all the inputs must be either accurate or cleaned up. If there is even one input that you can't clean up, you won't be able to convert the color space in the outputs. You will have to set up to pass through the color space.  
If you want to pass through the color space and include its metadata, the metadata for all the inputs must be either accurate or cleaned up. The downstream system reads this metadata, so it must be accurate. If there is even one input that you can't clean up, you can pass through the color space, but you should omit the color space in the output.

**Topics**
+ [

# Scenario A – Metadata is accurate
](color-space-scenario-pass.md)
+ [

# Scenario B – Metadata can be corrected with force
](color-space-scenario-correct.md)
+ [

# Scenario C – Correct the metadata with fallback
](color-space-scenario-correct-one.md)
+ [

# Scenario D – Metadata can't be corrected
](color-space-scenario-correct-multiple.md)

# Scenario A – Metadata is accurate
Accurate metadata

During assessment of the MediaLive input, you might have determined the following:
+ The content is in one color space, the color space is supported, and the color space metadata is accurate.
+ Or different portions of the content are in different color spaces, and the color space metadata is accurate for each portion.

You have these options for handling the metadata in the output:

**Include the metadata**

Follow the procedure in [Set up inputs to correct metadata](color-space-input-setup.md), and set the key fields as follows:
+ **Color space **field – Set to **FOLLOW** 
+ **Color space usage **field – MediaLive ignores this field.

During processing, MediaLive will read the metadata, in order to identify the color space. 

**Remove the metadata**

You might have already decided to remove the color space metadata even though it is accurate. For example, the color space might change frequently within the input, or between one input and another. You know that there is a system downstream of MediaLive that can't handle changes in the metadata. 

You can still convert or pass through the color space. It is safe to convert the color space because the metadata is reliable. 

Follow the procedure in [Set up inputs to correct metadata](color-space-input-setup.md), and set the key fields as follows:
+ **Color space **field – Set to **FOLLOW** 
+ **Color space usage **field – MediaLive ignores this field.

During processing, MediaLive will read the metadata, in order to identify the color space. 

# Scenario B – Metadata can be corrected with force
Correct metadata with force

During assessment of the MediaLive input, you might have determined the following:
+ The content is in one color space, and that is a supported color space.
+ The color space metadata is inaccurate. It could be any combination of inaccurate, missing, unknown, or unsupported (inaccurately marked as a color space that MediaLive doesn't support). 

Note that this is the scenario that always applies if the input is from an AWS Elemental Link device.

You have this option for handling the metadata in the output:

**Correct the metadata**

You can correct the metadata. Follow the procedure in [Set up inputs to correct metadata](color-space-input-setup.md), and set the key fields as follows:
+ **Color space **field – Set to the color space that has unacceptable metadata. 
+ **Color space usage **field – Set to **FORCE**

During processing, MediaLive will create metadata of the specified color space for all missing, unmarked, and unknown metadata. It will also change all existing metadata to the specified color space. (It will *force* the metadata.)

After ingest, all the content in the input will be consistently marked as one color space.

# Scenario C – Correct the metadata with fallback
Correct metadata with fallback

During assessment of the MediaLive input, you might have determined the following:
+ Different portions of the content are in different color spaces. All those color spaces are supported.
+ The metadata for one color space is either inaccurate everywhere, or is sometimes accurate and sometimes inaccurate. 
+ The metadata for content for all the other color spaces is accurate. 

For example, the input has Rec. 601 content that has portions that are inaccurately marked. It also has portions that are missing, unknown, or unsupported. The input also has HDR10 content and HLG content that is accurately marked.

You have this option for handling the metadata in the output:

**Correct the metadata**

Follow the procedure in [Set up inputs to correct metadata](color-space-input-setup.md), and set the key fields as follows:
+ **Color space **field – Set to the color space that has inconsistent metadata (Rec. 601 in the above example).
+ **Color space usage **field – Set to **FALLBACK**

During ingest, MediaLive will create metadata of the specific color space for all missing, unmarked, and unknown video content. It won't change any supported color space metadata. (It will *fall back *to the existing metadata.) Therefore, it won't change the accurately marked Rec. 601 or the accurately marked HDR10 or HLG content. 

After ingest, all the content in the input will be consistently marked, even though the content is in several color spaces.

# Scenario D – Metadata can't be corrected
Uncorrectable metadata

During assessment of the MediaLive input, you might have determined the following:
+ Different portions of the content are in different color spaces. All those color spaces are supported.
+ The metadata is inaccurate for more than one color space. (Compare this to scenario C, where the metadata is inaccurate only for one color space.)

Or you might have determined the following:
+ The content provider can't provide accurate information about the color space or its metadata.

You have this option for handling the metadata in the output:

**Remove the metadata**

There is no way to clean up this content because MediaLive can correct the metadata for only one color space. In this scenario, the metadata is inaccurate in different types of color space.

You can't force the color space metadata. For example, you can't force it to Rec. 601, because sometimes will correctly identify the accompanying color space, but sometimes it won't. Inaccurate metadata will result in an inaccurate conversion (if you convert the color space in the output), or in an inferior viewing experience (if you pass through the color space in the output).

Follow the procedure in [Set up inputs to correct metadata](color-space-input-setup.md), and set the key fields as follows:
+ **Color space **field – Set to **FOLLOW** 
+ **Color space usage **field – MediaLive ignores this field.

During processing, MediaLive won't read the metadata. 

You won't be able to convert the color space in any outputs, even for other inputs that have correct color space metadata.

# Set up inputs to correct metadata
Step 3: Set up inputs

In the previous step, you identified how to correct color space metadata in each MediaLive input. This section describes how to set up each input for the required correction.

**Note**  
This section assumes that you are familiar with creating or editing a channel, as described in [Creating a channel from scratch](creating-channel-scratch.md). 

**To set up each input attached to the channel**

1. On the **Create Channel** page, in the **Input attachments** section, for **Video selector**, choose **Video selector**. 

1. Set the appropriate values for **Color space** and **Color space usage**. See the table after this procedure.

1. This step applies only if you chose **HDR10** and the attached input is for a MediaLive device such as AWS Elemental Link, and you plan to convert the content to another color space. You must specify the values for the Max CLL and Max FALL for the content. You should have obtained this information from the content provider.

   In the **Max CLL** field and the **Max FALL** field, enter the values.

In the following table, each row shows a valid combination of the two fields and the result of that combination. 


|  **Color space** field  |  **Color space usage** field  | Result | 
| --- | --- | --- | 
|  **FOLLOW**   |  This field is ignored.  | Passthrough. MediaLive doesn't change the color space metadata.  | 
|  **REC\$1601** or  **REC\$1709** or **HDR10** or **HLG** or **Dolby Vision 8.1**  |  **Force**   | Cleanup. MediaLive marks all the content as using the specified color space.  | 
|  **REC\$1601** or **REC\$1709** or **HDR10** or **HLG** or  **Dolby Vision 8.1**  |  **Fallback**   |  Cleanup. MediaLive marks the content as using the specified color space only for portions of the content that are unmarked or marked as unknown or marked with an unsupported color space.   | 

# Configuring color space handling in each output
Configuring outputs

In [Options for handling color space](color-space-handling-options.md), you should have identified how you want to handle the color space in each MediaLive output. When you [assessed the inputs](color-space-input-handling.md), you might have adjusted your plan. You should now have a clear plan for handling the color space in the outputs.

**Topics**
+ [

# Decide about enhanced VQ mode
](color-space-output-config-vq.md)
+ [

# Set up outputs to process color space
](colorspace-output-setup.md)

# Decide about enhanced VQ mode
Step 1: Set up enhanced VQ

You must decide if you should enable enhanced VQ mode in each MediaLive output. This mode applies only to outputs that use H.264. 

In the following table, find the planned handling in the first column, then read across to identify the action to take. To enable enhanced VQ mode, see [Setting up enhanced VQ mode](video-enhancedvq.md).


| Planned conversion | Details | Action | 
| --- | --- | --- | 
|  Convert to SDR  |  The inputs contain both SDR and HDR content.    |  You must enable the mode.  | 
| Convert to SDR |  The inputs contain only SDR content. For example, all the inputs are Rec. 709, and you want to convert the content to Rec. 601.  | You don't need to enable the mode. | 
| Any handling | There is no HDR10 or HLG in any of the inputs. | You don't need to enable the mode. | 
| Any handling | You have already enabled enhanced VQ to improve the video quality. | Leave the mode enabled. | 

# Set up outputs to process color space
Step 2: Set up outputs

Follow this procedure to configure color space handling in each MediaLive output. You can set up each output with different color space handling. For example, you can create one output that passes through the original color space, and another that converts it.

**Note**  
This section assumes that you are familiar with creating or editing a channel, as described in [Creating a channel from scratch](creating-channel-scratch.md). 

**Topics**
+ [

## Setting up for passthrough
](#colorspace-output-setup-passthrough)
+ [

## Setting up to convert
](#colorspace-output-setup-convert)

## Setting up for passthrough


You can set up to pass through the source color space in one or more outputs. The key fields to set are **Color space** and **Color metadata**.

1. On the **Create channel **page, in the **Output groups **section, choose the output that contains the video.

1. Display the **Stream settings **section, and choose the **Video **section.

1. For **Codec settings**, choose a codec. For information about the color spaces that each codec supports, see [Supported output codecs](color-space-input-output-requirements.md#color-space-supported-output-codecs).

1. Choose **Codec details**. More fields appear. Choose **Additional settings**. More fields appear. 

   In **Color metadata**, choose **Insert** or **Ignore** to specify how you want to handle the color space metadata.

1. Choose **Color space**. The **Color space settings** field appears. Choose **Color space passthrough**. (Or choose **Don't include**, which is equivalent to **Color space passthrough**.)

## Setting up to convert


You can set up to convert the color space in one or more outputs. There are several fields that must each be set in a specific way.

You can set up to convert the source color space in one or more outputs. 

1. On the **Create channel **page, in the **Output groups **section, select the output that contains the video.

1. Display the **Stream settings **section, and choose the **Video **section.

1. Complete the **Width** and **Height** fields to specify a valid resolution. Make a note of whether you are specifying an SD, an HD, or a UHD resolution.

1. In **Codec settings**, choose a codec. For information about the color spaces that each codec supports, see [Supported output codecs](color-space-input-output-requirements.md#color-space-supported-output-codecs).

1. Choose **Codec details**. More fields appear. Set the **Profile**, **Tier**, and **Level** fields, if they appear for the codec that you chose:
   + If the resolution is SD, enter values that suit your requirements. 
   + If the resolution is an HD or UHD resolution, set the tier and level to suit your requirements, and set the profile as follows:
     + If the output color space will be an HDR color space, you must choose one of the profiles that has **10BIT** in the name.
     + If the output color space will be an SDR color space, you can choose any profile.

1. Choose **Color space**. The **Color space settings** field appears. 

   Set the field to the color space to convert to.

   If you choose **HDR10**, the **Max CLL** and **Max FALL** fields appear. Complete these fields to set the display metadata. 

1. Go back to **Codec details** and choose **Additional settings**. More fields appear, including **Color metadata**. In **Color metadata**, choose **Insert** or **Ignore** to specify how you want to handle the color space metadata.

# Results for different color space handling
Results in outputs

This section describes how MediaLive handles the color space and color space metadata that it encounters in the source input, depending on how you set up the color space in the output.

**Topics**
+ [

# Result when passing through color space
](colorspace-output-passthrough.md)
+ [

# Result when converting color space to SDR
](colorspace-output-sdr.md)
+ [

# Result when converting color space to HDR10
](colorspace-output-hdr10.md)
+ [

# Result when converting color space to Dolby Vision 8.1
](color-space-output-dolby81.md)
+ [

# Result when removing color space metadata
](colorspace-output-remove.md)

# Result when passing through color space
Passthrough

Read this section if you set up one or more MediaLive outputs to [pass through the color space](colorspace-output-setup.md#colorspace-output-setup-passthrough). The following table shows how MediaLive handles each type of color space that it encounters in the source.


|  Color space that MediaLive encounters  |  How MediaLive handles the color space  | 
| --- | --- | 
|  Content in any color space that MediaLive supports  |  Doesn't touch the color space or brightness (the pixel values) in the output. Passes through any of the three sets of metadata that are present.  | 
|  Content in a color space that MediaLive supports, but that isn't supported for the output codec.  | This conversion isn't supported. After conversion, the color map of the content will be completely wrong. | 
| Content marked with unknown or an unsupported color space |  Doesn't touch the color space or brightness (the pixel values) in the output. Leaves the content as marked with the unknown color space.  Passes through any brightness metadata and display metadata.  | 
|  Content with no color space metadata  |  Doesn't touch the color space or brightness (the pixel values) in the output. Leaves the content as unmarked (no color space metadata).  | 

# Result when converting color space to SDR
Conversion to SDR

Read this section if you set up one or more MediaLive outputs to [convert the color space](colorspace-output-setup.md#colorspace-output-setup-convert) to Rec. 601 or Rec. 709. The following table shows how MediaLive handles each type of color space that it encounters in the source.

[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/medialive/latest/ug/colorspace-output-sdr.html)

# Result when converting color space to HDR10
Conversion to HDR10

Read this section if you set up one or more MediaLive outputs to [convert the color space](colorspace-output-setup.md#colorspace-output-setup-convert) to HDR10. The following table shows how MediaLive handles each type of color space that it encounters in the source.


|  Color space that MediaLive encounters  |  How MediaLive handles the color space  | 
| --- | --- | 
|  Content in an SDR color space  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/medialive/latest/ug/colorspace-output-hdr10.html) This conversion fits the smaller SDR color space into the larger HDR color space and maps the pixels to new code values that represent the same color.  The conversion doesn't actually make the existing color richer. However, the bright parts of the content are brighter, and the dark parts are darker.  | 
| Content in HDR10 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/medialive/latest/ug/colorspace-output-hdr10.html)  | 
| Content in HLG |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/medialive/latest/ug/colorspace-output-hdr10.html)  | 
| Content in Dolby Vision 8.1 | This conversion isn't supported. After conversion, the color map of the content could be completely wrong. | 
| Content marked with an unknown or unsupported color space |  We can't make any promises about how MediaLive will handle source content that is in an unsupported color space. Any of the following might apply: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/medialive/latest/ug/colorspace-output-hdr10.html)  | 
|  Content with no color space metadata  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/medialive/latest/ug/colorspace-output-hdr10.html)  | 

# Result when converting color space to Dolby Vision 8.1
Conversion to Dolby Vision 8.1

Read this section if you set up one or more MediaLive outputs to [convert the color space](colorspace-output-setup.md#colorspace-output-setup-convert) to Dolby Vision 8.1. The following table shows how MediaLive handles each type of color space that it encounters in the source.

[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/medialive/latest/ug/color-space-output-dolby81.html)

# Result when removing color space metadata
Removal of metadata

Read this section if you set up one or more MediaLive outputs to [pass through the color space](colorspace-output-setup.md#colorspace-output-setup-passthrough) or [convert the color space](colorspace-output-setup.md#colorspace-output-setup-convert) and you chose to remove the color space metadata. The following table shows how MediaLive handles each type of color space that it encounters in the source.


|  Color space that MediaLive encounters  |  How MediaLive handles the color space  | 
| --- | --- | 
|  Content in any color space that MediaLive supports Content with no color space metadata  | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/medialive/latest/ug/colorspace-output-remove.html)The output won't contain any color space metadata, brightness metadata, or display metadata. | 
| Content marked with an unknown or unsupported color space |  We can't make any promises about how MediaLive will handle input that is in an unsupported color space. Any of the following might apply: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/medialive/latest/ug/colorspace-output-remove.html)  | 

# Reference: Location of fields


Read this section if you know how to handle color space in MediaLive, and you only need a reminder of where the fields are located in the MediaLive Console.

[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/medialive/latest/ug/colorspace-fields.html)