

# Working with color space
<a name="hdr-working-with"></a>

You can control how Elemental Live handles the color space in a video source. You can set up an event to perform one of these actions on the color space:
+ You can set up to *pass through* the color space. Elemental Live doesn't touch the color space or the color space metadata.

  In this case, you might need to adjust the color space metadata in the input. For example, you might want to do this if you know that the color space metadata is incorrect or missing.
+ You can set up to *remove* the color space metadata, because you aren't interested in including it in the outputs. Elemental Live doesn't touch the color space but it removes the metadata.
+ You can set up to *convert* the color space itself—to change the pixels in the video.Elemental Live changes both the color space and the color space metadata.

You can set up each output in the event for different handling. For example, you can set up one output to remove the color space metadata, one to convert it to a different color space, and another to convert it to a second different color space.

By default, Elemental Live doesn't convert the color space (in the output) or change the color space metadata (in the input). It passes through the source color space and metadata to the output.

**Topics**
+ [Color space versus video resolution](color-space-vs-resolution.md)
+ [General information about color space](about-color-metadata.md)
+ [Configuring the handling in the input](hdr-input-handling.md)
+ [Configuring color space handling in each output](hdr-output.md)
+ [The results of different types of conversions](color-space-conversion-results.md)
+ [Location of HDR fields on the web interface](hdr-location-of-fields-on-the-web-interface.md)
+ [Location of HDR fields in the XML](hdr-location-of-fields-in-the-xml.md)

# Color space versus video resolution
<a name="color-space-vs-resolution"></a>

Color space refers to the range of color. Elemental Live supports the following color spaces:
+ SDR (standard dynamic range)
+ HDR (high dynamic range) 

Resolution refers to the video pixel count. Elemental Live supports the following resolutions:
+ SD (standard definition).
+ HD (high definition).
+ UHD (ultra-high definition). For UHD, Elemental Live supports resolutions up to 4K.

The following combinations of color space and resolution are typically used:
+ SDR color space can be associated with SD, HD, and UHD video.
+ HDR color space can be associated with HD or UHD video. 

HDR isn't typically associated with SD content, but Elemental Live *does* support this combination.

# General information about color space
<a name="about-color-metadata"></a>

Following is some general information about color space.

**Topics**
+ [Definitions](color-space-definitions.md)
+ [Color space standards](color-space-standards.md)
+ [Requirements for inputs](color-space-inputs-requirements.md)
+ [Requirements for outputs](color-space-output-requirements.md)
+ [Support for conversion and passthrough](color-space-conversions.md)

# Definitions
<a name="color-space-definitions"></a>

There are four aspects 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, lookup tables (LUT), 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 source video might use a specific *color space* and a specific *brightness function*. The source video might also carry *color space metadata *that describes aspects of the color.

# Color space standards
<a name="color-space-standards"></a>

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


****  

|  Elemental Live term for the color space   |  Complies with this color space standard   |  Complies with this brightness function standard   |  Complies with this standard for display metadata   | 
| --- | --- | --- | --- | 
|  601 or Rec\$1601   |  SDR rec. 601   |  BT.1886   |  Not applicable. This color space doesn't include display metadata.  | 
|  709 or Rec\$1709   |  SDR rec. 709   |  BT.1886   |  Not applicable. This color space doesn't include display metadata.  | 
| SDR 2020 | rec.2020 | 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 5.0. Only a Dolby Vision-compliant downstream player can handle this color space | A Dolby implementation of the ITP color representation format specified in the Rec. ITU-R BT.2100 | SMPTE ST 2084 (PQ)  | Proprietary Dolby Vision metadata (RPU), on a per-frame basis | 
| Dolby Vision 8.1. Both a Dolby Vision-compliant and an HDR10-compliant downstream player can handle the color space | rec.2020 | SMPTE ST 2084 (PQ) | Proprietary Dolby Vision metadata (RPU), on a per-frame basis, and SMPTE ST 2086 on a per-stream basis | 

Note that HDR10 and HLG use the same color space. They use different brightness functions and display metadata standards.

# Requirements for inputs
<a name="color-space-inputs-requirements"></a>

**Supported input types**

AWS Elemental Live can work with the color space in all [supported input types](ref-inputs-and-codecs.md).

**Input requirements for producing Dolby Vision outputs**

There are specific requirements for a source that you plan to convert to Dolby Vision. These requirements are stipulated by Dolby Vision, and relate to the minimal video quality required to produce Dolby Vision outputs that meet the Dolby Vision standard::
+ The video source must be HD or 4K resolution. In other words, the source must be 1080p or better.
+ The video source must be in the HDR10 color space.

# Requirements for outputs
<a name="color-space-output-requirements"></a>

**Supported output types**

You can include any color space in any video in any supported output type. The main consideration in choosing to convert to a color space in an output is whether the intended downstream player can handle the color space.

**Output requirements for HDR10 or Dolby Vision**

There are specific requirements for converting to HDR10 or Dolby Vision outputs. 


****  

| Requirement | Applies to converting to HDR10 | Applies to converting to Dolby Vision | 
| --- | --- | --- | 
| Codec must be HEVC. | Yes | Yes | 
| Profile must include the term Main10. | Yes | Yes | 
| For HD outputs, the event must run on an L800 series appliance. | No | Yes | 
| For 4K outputs, the event must run on an appliance in the L730 series, the L840 series, or the L880 series. | No | Yes | 
| You must obtain a license from the [AWS Elemental Support Center Activations](https://console.aws.amazon.com/elemental-appliances-software/home?region=us-east-1#/activations). Note that pass through of Dolby Vision doesn't require a license.  | No | Yes | 

# Support for conversion and passthrough
<a name="color-space-conversions"></a>

## Handling of supported color spaces
<a name="color-space-supported-handling"></a>

Elemental Live can read the color space information of any supported color space. It can convert the color space or pass through the color space as follows:


****  

|  Supported color space   | Pass through | Convert  | 
| --- | --- | --- | 
|  601  | Yes | Yes, to any supported color space except Dolby Vision. | 
|  709   | Yes | Yes, to any supported color space except Dolby Vision. | 
| SDR 2020 | Yes | Yes, to any supported color space except Dolby Vision. | 
|  HDR10   | Yes | Yes, to any supported color space. If you want to convert to Dolby Vision, see [Requirements for inputs](color-space-inputs-requirements.md) and [Requirements for outputs](color-space-output-requirements.md). | 
|  HLG  | Yes | Yes, to any supported color space except Dolby Vision. | 
| Dolby Vision 5.0 | No. See the note after this table. | No. | 
| Dolby Vision 8.1 | Yes | No. | 
| Unsupported color space | Yes | No. | 

### Ingesting Dolby Vision 5.0
<a name="color-space-dv5-handling"></a>

Elemental Live can't ingest video in the Dolby Vision 5.0 color space. An event with this type of input will fail immediately when ingest starts.

## Handling of unsupported color spaces
<a name="color-space-unsupported-handling"></a>

We can't make any promises about handling of video that uses an unsupported color space. Any of the following might apply:
+ Elemental Live might be able to ingest the input and 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). 

Elemental Live is never able to convert an unsupported color space to another color space. 

# Configuring the handling in the input
<a name="hdr-input-handling"></a>

You must decide what you need to do with *color space metadata* in the input. You might need to clean up the metadata to ensure that Elemental Live handles the color space correctly in the output.

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

If you plan to *pass through* the color space to the outputs, you should do one of the following:
+ Clean up the color space metadata, if the content provider tells you that it is missing or inaccurate.
+ Leave the metadata as is, if the color space metadata is correct.

If you plan to *convert* the color space in the outputs, you should do one of the following:
+ Clean up the color space metadata, if the content provider tells you that it is missing or inaccurate.
+ Leave the metadata as is, if the color space metadata is correct.

If you plan to remove the metadata, there is no need to work with the color space metadata in the input. 

The following table specifies the handling that is available for color spaces in the input.


****  

|  Color space   | Elemental Live can correct the color space metadata | 
| --- | --- | 
|  601  | Yes | 
|  709   | Yes | 
| SDR 2020 | Yes | 
|  HDR10   | Yes | 
|  HLG  | Yes | 
| Dolby Vision 5.0 | No | 
| Dolby Vision 8.1 | No | 
| Unsupported color space | No | 

To decide how to handle the color space metadata, use the following three steps.

**Topics**
+ [Step 1: Decide on the input handling](color-space-input-procedure.md)
+ [Step 2: Choose a clean-up scenario](color-space-cleanup-scenarios.md)
+ [Step 3: Set up each input](color-space-event-input-setup.md)

# Step 1: Decide on the input handling
<a name="color-space-input-procedure"></a>

If you plan to pass through or convert the color space on the output side of the event, you must decide whether you need to change the color space metadata in the input. 

**Note**  
If you plan to remove the color space metadata from *all* the outputs, there is no need to review the inputs. Skip to [Converting color space: Procedure A](colorspace-output-procedure.md).

**To decide how to handle the color space metadata**

Follow this procedure for each input.

1. Contact the content provider of the input source to find out the following information:
   + Whether the input source contains a combination of different color spaces. 
   + The name of the color space or color spaces in the input source.
   + Whether the color space metadata is accurate. It is accurate if it correctly identifies the color space and if it isn't missing. The content is most likely to be one of the following:
     + Correctly marked.
     + Unmarked (no color space metadata is present). In this case, try to find out what the probable color space is.

     The content might also be one of the following:
     + Incorrectly marked.
     + Marked as *unknown*.
     + Marked with a color space that Elemental Live [doesn't support](color-space-conversions.md) and therefore doesn't read.
   + If the color space metadata isn't accurate or is missing, and if the color space is HDR10, obtain the values that the content provider intends for the HDR10 master display metadata.
   + If you plan to convert the color space to HDR10 or Dolby Vision, find out whether the source video is Full Range or Video Range. You will need this information in order to correctly set the **Video Range** field in the output.

   If the content provider can't provide accurate information about the color space or its metadata, you might choose at this point to remove the color space metadata. Move on to the next input. Or if this is the only input, stop reading this section and go to [Configuring color space handling in each output](hdr-output.md).

1. Make a note of the information:
   + The names of the color spaces.
   + If applicable, the values for the HDR10 display metadata.
   + If applicable, whether the source video is full range or video range. 

# Step 2: Choose a clean-up scenario
<a name="color-space-cleanup-scenarios"></a>

Read the following scenarios to decide if you need to clean up the color space metadata in each input. 

The following rules apply:
+ If you are planning to convert the color space on the output side, keep in mind that the conversion will apply only to marked content. So if you use cleanup to insert missing metadata, you can increase the percentage of the content that gets converted in the output. 
+ The cleanup options don't convert the color space. Instead, cleanup options work on the metadata that is attached to the video.
+ You should only clean up the color space if you are sure that all the unmarked portions use the color space that you choose. If the cleanup results in marking content as being in a specific color space when it isn't, then the video color quality will be degraded in the output. 

**Topics**
+ [Scenario A – Pass through accurate metadata](#color-space-scenario-pass)
+ [Scenario B – Convert accurately marked color space](#color-space-scenario-convert)
+ [Scenario C – Remove metadata](#color-space-scenario-remove)
+ [Scenario D – Correct the metadata](#color-space-scenario-correct)
+ [Scenario E – Correct the metadata in one color space](#color-space-scenario-correct-one)
+ [Scenario F – Correct the metadata in multiple color spaces](#color-space-scenario-correct-multiple)

## Scenario A – Pass through accurate metadata
<a name="color-space-scenario-pass"></a>

The details of this scenario are the following:
+ Intended handling in the output – Pass through the color space.
+ Status of the input – The video content is any combination of color spaces—SDR, HDR, or both. 
+ Status of the input color space metadata – The metadata is correct. 

Recommendation:
+ **Color Space **field – Set to **FOLLOW** 
+ **Force Color** field – Elemental Live ignores this field.

During ingest, Elemental Live will retain (pass through) the metadata. 

## Scenario B – Convert accurately marked color space
<a name="color-space-scenario-convert"></a>

The details of this scenario are the following:
+ Intended handling in the output – Convert the color space and metadata.
+ Status of the input color space – The video content is any combination of color spaces—SDR, HDR, or both. 
+ Status of the input color space metadata – The metadata is correct. 

Recommendation:
+ **Color Space **field – Set to **FOLLOW**. 
+ **Force Color **field – Elemental Live ignores this field.

During ingest, Elemental Live will retain (pass through) the metadata. 

## Scenario C – Remove metadata
<a name="color-space-scenario-remove"></a>

The details of this scenario are the following:
+ Intended handling in the output – Remove the color space metadata.
+ Status of the input – The video content is any combination of color spaces—SDR, HDR, or both. 
+ Status of the input color space metadata – The metadata can be of any quality. 

Recommendation:
+ **Color Space **field – Set to **FOLLOW**. 
+ **Force Color **field – Elemental Live ignores this field.

During ingest, Elemental Live will retain (pass through) the metadata. You plan to remove the metadata, so you don't care about its quality.

## Scenario D – Correct the metadata
<a name="color-space-scenario-correct"></a>

The details of this scenario are the following:
+ Intended handling in the output – Convert or pass through the color space.
+ Status of the input – The video content is one color space. For example, the content is all REC\$1601.
+ Status of the input color space metadata – Some of the metadata is missing, marked as *unknown*, or marked as a color space that Elemental Live doesn't support. 

  In addition, some of the metadata is wrong. For example, it is marked as HDR10, but in fact, it is REC\$1601.

So in this scenario, the video content is all one color space, but the color space metadata doesn't correctly indicate that fact.

Recommendation:
+ **Color Space **field – Set to the color space that applies to the video content.
+ **Force Color **field – Set to **FORCE**.

During ingest, Elemental Live will create metadata of the specified color space for all missing, unmarked, and unknown metadata. 

It will also force all existing metadata to match the specified color space. Therefore, all the content in the input will be consistently marked as belonging to one color space.

## Scenario E – Correct the metadata in one color space
<a name="color-space-scenario-correct-one"></a>

The details of this scenario are the following:
+ Intended handling in the output – Convert or pass through the color space.
+ Status of the input – The video content is any combination of color spaces—REC\$1601, REC\$1709, HDR, and HLG. 
+ Status of the input color space metadata – The metadata for the video content of one color space is a mixture of acceptable and unacceptable. The metadata for that content is missing, marked as *unknown*, or marked as a color space that Elemental Live doesn't support. But in fact, all that content should be marked as one specific color space, for example, as REC\$1601.

  The metadata for content for any other color space is correct. For example, the metadata for REC\$1709 content and HDR10 content is correct.

Recommendation:
+ **Color Space **field – Set to the color space that has unacceptable metadata. 
+ **Force Color **field – Set to **FALLBACK**.

During ingest, Elemental Live will create metadata of the specific color space for all missing, unmarked, and unknown video content. It will retain existing metadata.

If you clean up the metadata in this way, Elemental Live might be able to handle the color space appropriately in the output. However, if the color map of the output is wrong in whole or in part, the video source was probably in a color space that Elemental Live can't handle.

## Scenario F – Correct the metadata in multiple color spaces
<a name="color-space-scenario-correct-multiple"></a>

The details of this scenario are the following:
+ Intended handling in the output – Convert or pass through the color space.
+ Status of the input – The video content is in *more than one* color space. For example, the content is a mix of REC\$1601, REC\$1709, and HDR10.
+ Status of the input color space metadata – The metadata for one color space is missing, wrong, marked as *unknown*, or marked as a color space that Elemental Live doesn't support. For example, the color space is REC\$1601, but its corresponding metadata is unreliable.

  In addition, the metadata for one or more other color spaces is also missing, wrong, unknown, or not supported. For example, the color space of that content is HLG, but its corresponding metadata is unreliable.

Recommendation:

There is no way to clean up this content because you can only mark all the content as one type of color space. But in this scenario, the metadata is incorrect in different types of color space.

If you force the color space, some of it will be forced to be correct, but some of it will be forced to incorrect information. Inaccurate metadata will result in an inaccurate conversion (if you convert in the output), or in an inferior viewing experience (if you pass through in the output).

The best recommendation we can provide is to remove the metadata on the output side, as described in [scenario C](#color-space-scenario-remove).

If you remove the metadata, Elemental Live might be able to handle the color space appropriately in the output. However, if the color map of the output is wrong in whole or in part, the video source was probably in a color space that Elemental Live can't handle.

# Step 3: Set up each input
<a name="color-space-event-input-setup"></a>

**To set up each input in the event**
**Note**  
This section assumes that you are familiar with creating or editing an event. 

1. On the **Event **page, in the **Input** section, open the **Advanced** section. More fields appear.

1. In the **Video selector** section, set the appropriate values for **Color Space** and **Force Color**.

   In the following table, each row shows a valid combination of the two fields and the result of that combination.     
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/elemental-live/latest/ug/color-space-event-input-setup.html)

## Tips for HDR master display information
<a name="color-space-input-display-data"></a>

The HDR Master Display Information fields appear in the color space fields if you set the **Color Space** field to HDR10. Take the appropriate action:
+ Complete these fields only if your plan is to pass through this color space to the output, and only if the content provider has told you that the content currently doesn't include this metadata. For details about a field on the web interface, choose the question mark next to the field. 

  If the content provider has told you that the content already contains the metadata, leave these fields blank.

  Make sure to obtain values used in the color grading process for the input. You can't use the defaults or null values and expect to obtain valid color results. It's better to set the fields to null values, rather than to make up values.
+ Don't complete these fields if your plan is to convert from this HDR10 color space to another color space.

### Red, green, blue, white point x and y
<a name="hdr-input-RGB"></a>

Your content provider might provide numbers like this for X and Y points:
+ G (x=0.265, y=0.690)
+ B (x=0.150, y=0.060)
+ R (x=0.680, y=0.320)

You must convert these numbers to numbers like this: 
+ G (13250, 34500)
+ B (7500, 3000)
+ R (34000, 16000)

To convert between the two formats, divide each number by 0.00002 as per the HEVC specification.

For example, 0.265 divided by 0.00002 is 13250.

### Max luminance and min luminance
<a name="hdr-input-cll-fall"></a>

The maximum and minimum luminance are given in units of **0.0001 candelas per square meter**. Your content provider might provide this value in candelas per square meter instead. If so, then convert these numbers by multiplying by 10,000, then entering the result in the web interface.

For example, a value of 1000.0000 cd/m2 for max luminance would be converted to 10,000,000 and entered as that in the web interface.

# Configuring color space handling in each output
<a name="hdr-output"></a>

After you have set up each input in the event, you must configure the outputs for the desired handling of color space. You can do the following:
+ Convert the color space in the content to a different color space in the output. See [Color space standards](color-space-standards.md) for the supported conversions.
+ Remove the color space metadata. Elemental Live doesn't touch the color space itself, it only removes the color space metadata. 

  You might choose to remove the color space metadata in situations such as the following:
  + The pixel data and color space data in the input is incorrect, so that the downstream player can't use it to enhance the color.
  + The color space (and its metadata) changes frequently within the input, or between one input and another, and you know that there is a system downstream of AWS Elemental Live that can't handle changes in the metadata. 

  Keep in mind that removing metadata doesn't necessarily make the color poorer. Removing it might only mean that the downstream player can't implement enhancements to make the color even richer.
+ Pass the color space metadata and the color space through to the 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**  
Elemental Live converts from one color space to another based on the metadata in the content. Elemental Live doesn't examine the video to try to determine whether it actually matches the color space identified in the metadata. Therefore, to successfully convert, the metadata must be as accurate as possible. To correct the metadata, see [Configuring the handling in the input](hdr-input-handling.md).

**Topics**
+ [Passing through color space](colorspace-output-passthrough.md)
+ [Converting color space: Procedure A](colorspace-output-procedure.md)
+ [Converting color space: Procedure B](colorspace-output-hdr10.md)
+ [Removing color space metadata](colorspace-output-remove.md)

# Passing through color space
<a name="colorspace-output-passthrough"></a>

You can pass through any color space that Elemental Live supports, except for Dolby Vision 5.0. You can pass through both color spaces that Elemental Live supports, and color spaces that it doesn't support, so long as the output type supports the passed-through color space standard.

**Note**  
This section assumes that you are familiar with creating or editing an event. 

**To set up each output**

Follow this procedure in each output. 

1. On the **Event **page, in the **Output groups **section, choose the output group, and choose the output that contains the video.

1. Open the **Advanced** section. More fields appear.

1. Leave **Insert Color Metadata** checked. You should never remove the color metadata if you are passing through the color space.

1. Scroll down to the **Preprocessors ** section and turn on **Color Corrector**. More fields appear.

1. Set **Color Space Conversion** to **None**, which means you don't want to convert the color space.

The following table shows how Elemental Live handles each type of color space that it encounters. Each row in the table describes a different handling.


|  Color space metadata that Elemental Live encounters  |  How Elemental Live handles the color space  | 
| --- | --- | 
|  Content in any color space that Elemental Live supports  |  It doesn't touch the color space or brightness (the pixel values) in the output. It passes through any of the three sets of metadata that are present.  | 
| Content marked with unknown or an unsupported color space |  It doesn't touch the color space or brightness (the pixel values) in the output. It leaves the content as marked with the unknown color space.  It passes through any brightness metadata and display metadata.  | 
|  Content with no color space metadata  |  It doesn't touch the color space or brightness (the pixel values) in the output. It leaves the content as unmarked (no color space metadata).  | 

# Converting color space: Procedure A
<a name="colorspace-output-procedure"></a>

Follow this procedure to convert to one of these color spaces:
+ 601
+ 709
+ SDR2020
+ HLG

For information about the source color spaces that you can convert to one of these color spaces, see [Support for conversion and passthrough](color-space-conversions.md).

For information about the results of conversion, see [The results of different types of conversions](color-space-conversion-results.md).

**Note**  
This section assumes that you are familiar with creating or editing an event. 

**To set up each output**

Follow this procedure in each output. 

1. On the **Event **page, in the **Output groups **section, choose the output group, and choose the output that contains the video.

1. Open the **Advanced** section. More fields appear.

1. Scroll down to the **Preprocessors ** section and turn on **Color Corrector**. More fields appear.

1. Complete fields in the **Video** section as described in the following table


|  Field  |  Description  | 
| --- | --- | 
|  **Video Codec**  |  Choose any codec.  | 
|  **Advanced**, then **Insert Color Metadata**  |  Leave this field checked.  You should never remove the color metadata if you are converting the color space.  | 
|  **Video Range**  |  Choose the correct option. For details, choose the icon above the field.  | 
|  **Preprocessors**, then **Color Space Conversion**  |  Choose the correct conversion: **Force 601** **Force 709** **Force SDR2020** **Force HLG 2020**  | 

# Converting color space: Procedure B
<a name="colorspace-output-hdr10"></a>

Follow this procedure to convert to one of these color spaces:
+ HDR10
+ Dolby Vision

For information about the source color spaces that you can convert to one of these color spaces, see [Support for conversion and passthrough](color-space-conversions.md).

For information about the results of conversion, see [The results of different types of conversions](color-space-conversion-results.md).

**To set up each output**
**Note**  
This section assumes that you are familiar with creating or editing an event. 

Follow this procedure in each output. 

1. On the **Event **page, in the **Output groups **section, choose the output group, and choose the output that contains the video.

1. Open the **Advanced** section. More fields appear.

1. Scroll down to the **Preprocessors ** section and turn on **Color Corrector**. More fields appear.

1. Complete fields in the **Video** section as described in the following table.


|  Field  |  Description  | 
| --- | --- | 
|  **Video Codec**  |  If you are converting to HDR10, choose **MPEG-4 AVC (H.264)** or **HEVC (H.265)**. If you are converting to Dolby Vision, choose **HEVC (H.265)**.  | 
|  **Advanced**, then **Insert Color Metadata**  |  Leave this field checked.  You should never remove the color metadata if you are converting the color space.  | 
|  **Advanced**, then **Profile** This field is towards the end of the **Advanced** section  |  Choose a profile that includes the term **Main10**.  | 
|  **Preprocessors**, then **Video Range**  |  Choose the correct option, according to the information you [obtained from the content provider](color-space-input-procedure.md): [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/elemental-live/latest/ug/colorspace-output-hdr10.html)  | 
|  **Preprocessors**, then **Color Space Conversion**  |  Choose the correct conversion: **Force HDR10**  **Dolby Vision Profile 5** **Dolby Vision Profile 8.1**  | 
|  **Preprocessors**, then **HDR Master Display Information**  |  These fields appear after you complete the **Color Space Conversion**. You can optionally complete the **HDR Master Display Information** fields. For information about master display information, see [Tips for HDR master display information](#hdr-tips-for-hdr-master-display-information).   | 

## Tips for HDR master display information
<a name="hdr-tips-for-hdr-master-display-information"></a>

The HDR Master Display Information fields appear if you are converting to HDR10 or Dolby Vision. Take the appropriate action:
+ If you have previously converted similar content to HDR10 and a color grading specialist in your organization has given you metadata, then enter it here. The values to enter here depend on the downstream player, so there is no point to asking your content provider for values.

  For details about a field on the web interface, choose the question mark next to the field. 
+ If you don't have metadata to use, set all fields to null values. It's better to set the fields to null values, rather than to make up values or to use the default values.

### Red, green, blue, white point x and y
<a name="hdr-output-rgb"></a>

Your color grader might provide numbers like this for X and Y points:
+ G (x=0.265, y=0.690)
+ B (x=0.150, y=0.060)
+ R (x=0.680, y=0.320)

You must convert these numbers to numbers like this: 
+ G (13250, 34500)
+ B (7500, 3000)
+ R (34000, 16000)

To convert between the two formats, divide each number by 0.00002 as per the HEVC specification.

For example, 0.265 divided by 0.00002 is 13250.

### Max luminance and min luminance
<a name="hdr-output-cll-fall"></a>

The maximum and minimum luminance are given in units of **0.0001 candelas per square meter**. Your color grader might provide this value in candelas per square meter instead. If so, then convert these numbers by multiplying by 10,000, then entering the result in the web interface.

For example, a value of 1000.0000 cd/m2 for max luminance would be converted to 10,000,000 and entered as that in the web interface.

# Removing color space metadata
<a name="colorspace-output-remove"></a>

Follow this procedure in each output where you want to remove the color space metadata.

You might choose to remove the color space metadata in situations such as the following:
+ The pixel data and color space data in the input is incorrect, so that the downstream player can't use it to enhance the color.
+ The color space (and its metadata) changes frequently within the input, or between one input and another, and you know that there is a system downstream of AWS Elemental Live that can't handle changes in the metadata. 

Keep in mind that removing metadata doesn't necessarily make the color poorer. Removing it might only mean that the downstream player can't implement enhancements to make the color even richer.

**Note**  
This section assumes that you are familiar with creating or editing an event. 

**To set up each output**

1. On the **Event **page, in the **Output groups **section, choose the output group, and choose the output that contains the video.

1. Open the **Advanced** section. More fields appear.

1. Set **Insert Color Metadata** to unchecked.

1. Scroll down to the **Preprocessors ** section and turn on **Color Corrector**. More fields appear.

1. Set **Color Space Conversion** to **None**, which means you don't want to convert the color space.

The following table shows how Elemental Live handles each type of color space it encounters.


|  Color space metadata that Elemental Live encounters  |  How Elemental Live handles the color space  | 
| --- | --- | 
|  Content in any color space that Elemental Live supports Content with no color space metadata Content with unknown or unsupported color space metadata  | It doesn't touch the color space or brightness (the pixel values) in the output.It removes all the metadata. The output won't contain any color space metadata, brightness metadata, or display metadata. | 

# The results of different types of conversions
<a name="color-space-conversion-results"></a>

Following is information about how Elemental Live handles the different types of conversion of the color space.

**Topics**
+ [Converting one SDR color space to another](color-space-convert-f.md)
+ [Converting an SDR color space to HDR](color-space-convert-a.md)
+ [Converting one HDR color space to another](color-space-convert-b.md)
+ [Converting an HDR color space to SDR](color-space-convert-c.md)
+ [Converting HDR10 to Dolby Vision 5.0 or 8.1](color-space-convert-d.md)
+ [Converting other color spaces to Dolby Vision 5.0 or 8.1](color-space-convert-e.md)
+ [Converting a mixed color space to one color space](color-space-convert-g.md)

# Converting one SDR color space to another
<a name="color-space-convert-f"></a>

You can convert an SDR color space to another SDR color space. In this case, Elemental Live makes the following changes:
+ It changes pixels to values that represent the same color as the original values. The video now fits in the larger color space.
+ It changes the color space metadata to identify the new color space. 
+ It applies the same brightness function to the video, because all the SDR color spaces use the same function.

After the conversion, the video complies completely with the new color space.

# Converting an SDR color space to HDR
<a name="color-space-convert-a"></a>

You can convert an SDR color space to HDR10 or HLG color space. In this case, Elemental Live makes the following changes:
+ It changes the pixel values, if necessary, to fit the colors into the different color space.
+ It changes the color space metadata to identify the new color space. 
+ It applies the new brightness function to the video.
+ If converting to HDR10, it calculates display metadata for the video. 

After the conversion, the video fits in the new color spaces, but the color is not any richer than before the conversion. However, the bright parts of the video are brighter, and the dark parts are darker.

# Converting one HDR color space to another
<a name="color-space-convert-b"></a>

You can convert video between the HDR10 color space and the HLG color space, in either direction. In this case, Elemental Live makes the following changes:
+ It changes the pixel values, if necessary, to fit the colors into the different color space.
+ It changes the color space metadata to identify the new color space. 
+ It applies the new brightness function to the video.
+ If converting to HDR10, it calculates display metadata for the video. 

After the conversion, the video complies completely with the new color space. The color will be slightly different, but probably not more or less rich. The color will match the new brightness function.

# Converting an HDR color space to SDR
<a name="color-space-convert-c"></a>

You can convert HDR10 or HLG video to an SDR color space. In this case, Elemental Live makes the following changes:
+ It changes the pixel values, if necessary, to fit the colors into the smaller color space.
+ It changes the color space metadata to identify the new color space. 
+ It applies the new brightness function to the video.
+ It removes any display metadata because the SDR color spaces don't include display metadata.

After the conversion, the video complies completely with the new color space. The color will be less rich. The color will match the new brightness function.

# Converting HDR10 to Dolby Vision 5.0 or 8.1
<a name="color-space-convert-d"></a>

You can convert video in the HDR10 color space to Dolby Vision 5.0 or 8.1.

If you convert the video to Dolby Vision 5.0, video players that are Dolby Vision-compliant will be able to play it. If you convert the video to Dolby Vision 8.1, video players that are Dolby Vision-compliant and video players that are HDR10-compliant will be able to play it. 

When you convert a suitable video to Dolby Vision, Elemental Live makes the following changes:
+ It doesn't change the pixel values, because HDR10 and Dolby Vision both use the same color space.
+ It changes the color space metadata to identify the new color space. 
+ It applies the new brightness function to the video.
+ It calculates the Dolby Vision display metadata for the video. 

After the conversion, the video fits in the new color spaces, but the color is not any richer than before the conversion, because the color space hasn't changed. However, the bright parts of the video are brighter, and the dark parts are darker.

# Converting other color spaces to Dolby Vision 5.0 or 8.1
<a name="color-space-convert-e"></a>

You shouldn't convert non-HDR10 video to Dolby Vision. For example, you shouldn't convert SDR 601 to Dolby Vision. Converting a non-HDR10 video to Dolby Vision doesn't comply with the usage intended by Dolby Vision. After conversion of the color space, the color map of the video will be completely wrong.

The only color space that you should convert to Dolby Vision is HDR10.

# Converting a mixed color space to one color space
<a name="color-space-convert-g"></a>

The video in your input or inputs might contain a mix of color spaces. You can still set up to convert these color spaces to one color space. 

In this case, Elemental Live makes the following changes to the pixel values:
+ For color spaces where it supports conversion, Elemental Live changes the pixel values to values that are appropriate to the new color space. See [the sections](color-space-conversion-results.md) that describe the other conversions.
+ It doesn't change the pixel values for video in unsupported color spaces, or video that has no color space metadata. See [Handling of unsupported color spaces](color-space-conversions.md#color-space-unsupported-handling) for more information.
+ It doesn't change the pixel values for Dolby Vision 8.1 video because Elemental Live doesn't read the color space metadata for Dolby Vision. On the input side, Elemental Live treats Dolby Vision 8.1 as an unknown color space.
+ Keep in mind that Elemental Live [can't ingest Dolby Vision 5.0](color-space-conversions.md#color-space-dv5-handling), so the handling is irrelevant.

Elemental Live makes the following changes to the metadata:
+ If it converts the color space, it changes the color space metadata to identify the new color space. It applies the new brightness function to the video. 
+ If it leaves the color space unchanged, it also leaves the metadata unchanged. 

# Location of HDR fields on the web interface
<a name="hdr-location-of-fields-on-the-web-interface"></a>
+ Input > Video Selector > Color Space
+ Input > Video Selector > Force Color
+ Input > Video Selector > HDR Master Display Information group of fields
+ Stream > Video > Video Codec
+ Stream > Video > Insert Color Metadata (near the top of the tab)
+ Stream > Video > Profile (near the bottom of the tab)
+ Stream > Video > Preprocessors > Color Corrector > Color Space Conversion 

# Location of HDR fields in the XML
<a name="hdr-location-of-fields-in-the-xml"></a>

<a name="input-video-selector"></a>[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/elemental-live/latest/ug/hdr-location-of-fields-in-the-xml.html)