

# Converting the color space
<a name="color-space-simplified-options-convert"></a>

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

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.

**Topics**
+ [Supported types of conversion in MediaLive](color-space-simplified-supported-conversions.md)
+ [Getting ready to use 3D LUTs files with MediaLive](color-space-process-with-lut.md)
+ [Input requirements](color-space-simplified-supported-inputs.md)
+ [Output requirements](color-space-simplified-input-output-requirements.md)
+ [Handling of metadata when converting](color-space-simplified-options-metadata.md)

# Supported types of conversion in MediaLive
<a name="color-space-simplified-supported-conversions"></a>

You can configure a channel to use the standard MediaLive color corrector when converting the color space. Or you can use a [3D LUTs color corrector file](color-space-process-with-lut.md) that you provide. 

The following table shows which conversions MediaLive supports. Read across each row. 


|  From any of these color spaces in the source  |  To this color space in the output  | Supported? | 
| --- | --- | --- | 
|  Rec. 709, HLG, HDR10   |  Rec. 601  | Yes | 
|  Rec. 601, HLG, HDR10  |  Rec. 709  | Yes | 
| Rec. 601, Rec. 709, HLG | HDR10 | Yes | 
| Rec. 601, Rec. 709, HDR10 |  HLG  | Yes | 
|  Rec. 601, Rec. 709, HLG, HDR10  | Dolby Vision 8.1 | Yes | 
| Dolby Vision 8.1 | Any color space supported by MediaLive | Not supported | 

# Getting ready to use 3D LUTs files with MediaLive
<a name="color-space-process-with-lut"></a>

You can configure a channel to use a 3D LUTs color correct file for conversion, instead of using the standard MediaLive color corrector file for conversion. 

You provide a list of 3D LUTs files. Each 3D LUTs file contains color mapping information for a specific source/output combination. For example, one file contains information for converting Rec. 709 to HDR10.

## Using 3D LUTs files
<a name="color-space-simplified-using-lut-files"></a>

These rules apply to using 3D LUTs files:
+ **Sourcing of 3D LUTs files. **You must provide the 3D LUTs files. MediaLive doesn't have built-in files.
+ **One file for each combination.** You must provide a file for each source/output combination. For example, a file for converting Rec. 601 to HDR10.
+ **Maximum 8 files. **You can provide a maximum of 8 files for each channel. This means that MediaLive supports up to 8 source/output conversion combinations.
+ **Global application. **MediaLive uses a specific file in all the outputs where that file applies. For example, if there is a file to convert Rec. 601 to HDR10, MediaLive uses that file in every output that it applies to. You can't configure some outputs to use the standard mechanism for conversion.

## Contents of the 3D LUTs files
<a name="color-space-simplified-lut-files-contents"></a>

The following rules apply to the contents of the files:
+ **Format.** You must make sure that each 3D LUTs file follows the .cube 3D LUTs format. 
+ **Maximum one file per combination.** You can provide only one 3D LUTs file for each combination. You can't configure some outputs to use a different 3D LUTs file. When MediaLive reads the list of 3D LUTs files, it uses the first file that it finds for a source/output combination.
+ **HDR10 luminance. **MediaLive supports conversion of HDR10 content with a maximum luminance of 1000 nits to 4000 nits, but it only supports one maximum luminance. When MediaLive reads the list of 3D LUTs files, it finds the first file for each conversion from HDR10. Even if you one file for 1000 nits and one for 4000 nits (for example), MediaLive uses only the first file it encounters. Therefore the following guidelines apply:
  + You should make sure that all the HDR10 content in all the inputs in one channel have the same maximum luminance. If a source has a different maximum luminance, MediaLive will convert the content, but the outputs will have sub-optimal luminance.
  + In each 3D LUTs file for converting from HDR10, make sure that the luminance handling is appropriate for the luminance of the source. 

# Input requirements
<a name="color-space-simplified-supported-inputs"></a>

MediaLive can work with the [supported color space](color-space-simplified-standards.md) in all [supported types of input](inputs-supported-formats.md) with the following notes.

**Elemental Link input**

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 [Configuring the inputs](color-space-simplified-setup-input.md).

**Source when converting to Dolby Vision 8.1**
+ The video source must be HD or 4K resolution. In other words, the source must be 1080p or higher.
+ The video source can't be a file. This means that the source can't be a VOD asset in an MP4 file or in a transport stream file.

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.

# Output requirements
<a name="color-space-simplified-input-output-requirements"></a>

**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
+ SRT caller
+ UDP

**Supported output codecs**

The following table specifies the supported video codecs for the output color spaces. A value of Yes means that when the video output uses this codec, you can convert to the specified color space.


|  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*.

# Handling of metadata when converting
<a name="color-space-simplified-options-metadata"></a>

When you set up in MediaLive to convert the color space, you can set up to include or omit the color space metadata.
+ Include color space metadata. MediaLive will convert the color space metadata to accurately describe the new color space.
+ 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.