

# Color conversion with 3D LUTs
3D LUTs3D LUTs

MediaConvert added support for color conversion with 3D LUTs.

When you convert a video from one color space to another, AWS Elemental MediaConvert automatically maps colors from your input color space to your output color space. To optionally specify your own custom color mapping, use **3D LUTs** (3D lookup tables).

3D LUTs contain color mapping information for a specific input or set of inputs. You receive 3D LUTs as .cube files from your color grader as part of your video production workflow.

3D LUTs are tools for color transformation in video processing workflows. They allow you to apply precise color adjustments to your video content, ensuring consistent color appearance across different displays and viewing environments. Some reasons to include 3D LUTs in your workflow might include any of the following:
+ Apply cinematic or broadcast-grade color grading to your content
+ Control color mapping when you convert between different color spaces
+ Ensure consistent colors across different content
+ Correct color imbalance or exposure shifts in source footage
+ Apply creative or stylized color treatments

**Topics**
+ [

# Configuring a job with 3D LUTs
](3d-lut-use.md)
+ [

# 3D LUTs job settings requirements
](3d-lut-requirements.md)
+ [

# Troubleshooting
](3d-lut-troubleshooting.md)

# Configuring a job with 3D LUTs
Configuring 3D LUTs

MediaConvert only applies color space conversions with your 3D LUTs to sets of inputs and outputs that match the settings that you specify. You can apply custom color mapping to some of your outputs, and apply default color mapping to others.

For example, you might include a 3D LUT that specifies a **Rec. 601** input color space and a **Rec. 709** output color space. When your job settings meet the requirements listed in the previous section, MediaConvert applies your custom color mapping for all **Rec. 601** inputs that result in **Rec. 709** outputs.

Specify a separate 3D LUT for each combination of input and output color space conversion that you need. In a single job, you can include up to 8 different 3D LUT settings. MediaConvert uses default color mapping for inputs or outputs with color spaces not included in your 3D LUT or job settings.

## MediaConvert console


To specify a 3D LUT by using the MediaConvert console:

1. Open the [Create job](https://console.aws.amazon.com/mediaconvert/home#/jobs/create) page in the MediaConvert console.

1. On the **Create job** page, provide transcode instructions and job settings. For more information, see [Tutorial: Configuring job settings](setting-up-a-job.md). 

1. Turn on the **Color corrector** preprocessor under the **Encoding settings** of your video output.

1. Specify an output color space under **Color space conversion**.

1. Choose **Global processing** under **Job settings**.

1. Turn on **3D LUTs**.

1. Under **Input color space**, enter the color space for your input or inputs that you want to apply this 3D LUT to.

1. (Optional) If you entered **HDR10** or **P3D65 (HDR)** for **Input color space**, optionally enter a value for **Input mastering luminance**. Use to select inputs with a specific luminance. Enter the same value that you enter for **Maximum luminance**, which is under the input's **Video selector**, **Video correction**, settings. 

   If you enter `0` for **Input mastering luminance**, or keep blank, your 3D LUT will apply to all of your **HDR10** or **P3D65 (HDR)** inputs.

1. Under **Output color space**, enter the color space for your output or outputs that you want to apply this 3D LUT to.

1. (Optional) If you entered **HDR10** or **P3D65 (HDR)** for **Output color space**, optionally enter a value for **Output mastering luminance**. Use to select outputs with a specific luminance. Enter the same value that you enter for **Maximum luminance**, which is under the output's **Video** settings. 

   If you enter `0` for **Output mastering luminance**, or keep blank, your 3D LUT will apply to all of your **HDR10** or **P3D65 (HDR)** outputs.

1. Under **3D LUT file input**, enter the URL for your 3D LUT .cube file.

## API, SDK, or AWS Command Line Interface (AWS CLI)


To specify a 3D LUT by using the API, SDK, or AWS Command Line Interface (AWS CLI), include `ColorConversion3DLUTSettings` in your job settings JSON.

The following is an excerpt of a job settings JSON that specifies a 3D LUT for an **HDR 10** to **P3D65 (HDR)** workflow:

```
{
  "Settings": {
    "Inputs": [...],
    "OutputGroups": [
      {
        "Name": "File Group",
        "OutputGroupSettings": {...},
        "Outputs": [
          {
            "VideoDescription": {
              "CodecSettings": {... },
              "VideoPreprocessors": {
                "ColorCorrector": {
                  "ColorSpaceConversion": "FORCE_P3D65_HDR",
                  "MaxLuminance": 3000
                }
              }
            },
            "AudioDescriptions": [...],
            "ContainerSettings": {...}
          }
        ]
      }
    ],
    "ColorConversion3DLUTSettings": [
      {
        "InputColorSpace":"HDR10",
        "InputMasteringLuminance": 0,
        "OutputColorSpace": "P3D65HDR",
        "OutputMasteringLuminance": 3000,
        "FileInput": "s3://amzn-s3-demo-bucket/HDR10_to_P3D65HDR.cube"
      }
    ]
  }
}
```

# 3D LUTs job settings requirements
Requirements

When you include 3D LUTs as part of your MediaConvert job, you must also include the following settings:

**Input color space**  
Specify which inputs use this 3D LUT, according to the input's color space. 

**Input mastering luminance**  
(Optional) Include **Input mastering luminance** only when your input has an **HDR10** or **P3D65 (HDR)** color space. Otherwise, keep blank. Use to select between inputs with different mastering luminances.

**Output color space**  
Specify which outputs use this 3D LUT, according to the output's color space.

**Output mastering luminance**  
(Optional) Include **Output mastering luminance** only when your output has an **HDR10** or **P3D65 (HDR)** color space. Otherwise, keep blank. Use to select between outputs with different mastering luminances.

**.cube file**  
Specify an Amazon S3, HTTP, or HTTPS URL for your .cube file. MediaConvert accepts .cube files up to 8MB in size.

**Color corrector**  
Specify an output color space in the **Color corrector** preprocessor for your video output.

# Troubleshooting


The following is a list of issues you might encounter while working with 3D LUT files and troubleshooting tips:

**File access errors**  
Ensure your 3D LUT file is accessible to MediaConvert and check your permissions.

**Format validation errors**  
Verify that your 3D LUT file is in a supported format.

**File size errors**  
Confirm your 3D LUT file is under the 8MB limit.

**Color appearance issues**  
Check that you specified the correct input and output color space settings for your content.