

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