Image Consistency, Gamma Shift Issue & NCLC Tags
- Aniket Bhattacharjee
- Apr 4
- 5 min read
Updated: Apr 14
NCLC Tags and Color Management in Video Processing
NCLC (Non-Consistent Luminance Coding) tags play a crucial role in video color management, ensuring accurate color representation across different playback environments. These metadata flags provide essential information to media players about how to correctly interpret color information in video files. Understanding how these tags work and how to implement them properly is vital for consistent color reproduction in professional video workflows, particularly when working with QuickTime (.mov) files and web delivery platforms.
Understanding NCLC Tags and Their Purpose

NCLC tags are defined in the ISO-23091 specification and serve as color metadata indicators in video files[3]. The acronym stands for Non-Consistent Luminance Coding, and in MP4 files, this metadata is also known as NCLX[3]. These tags don't alter the actual encoding of the video; rather, they provide guidance to decoders about how the color information should be interpreted during playback[3].
The primary purpose of NCLC tags is to ensure color consistency across different playback environments. Without proper color tags, the same video can appear dramatically different depending on the player, operating system, or display device being used. This is particularly important for professional video workflows where color accuracy is critical.
A typical NCLC tag consists of three numbers (e.g., NCLC 1-13-1), with each number representing a specific color property:
1. The first number typically represents color primaries (e.g., BT.709)
2. The second number indicates the transfer function (gamma)
3. The third number usually refers to the color matrix or space[3]
For example, in search result[2], a user discusses how Premiere Pro exports are tagged as NCLC 1-1-1 when working in gamma 2.2, questioning whether they should be tagged as 1-13-1 (for sRGB) or 1-4-1 (for gamma 2.2) instead.
Color Management Components
NCLC tags encompass four key color management components:
1. Color primaries (`color_primaries`) - Defines the chromaticity coordinates of the RGB primaries, such as BT.709, Rec.2020, or Display-P3[3]
2. Transfer function (`color_trc`) - Specifies the gamma or transfer characteristic used, such as sRGB, BT.709, or specific gamma values like 2.2[3]
3. Color range (`color_range`) - Indicates whether the video uses TV (limited) range or full range[3]
4. Color space (`color_space`) - Defines the color encoding system, such as YUV or RGB[3]
These tags help playback systems create the appropriate color transformations needed to correctly display the content on different devices and platforms.
Implementation of NCLC Tags in Video Processing
Command Line vs. API Implementation
Setting NCLC tags can be done through various methods, including command-line tools like FFmpeg or programmatically via APIs. However, there can be significant discrepancies between these approaches.
As demonstrated in search result[1], a user encountered issues when trying to set NCLC tags programmatically using FFmpeg's C API. While the FFmpeg command-line approach worked correctly:
```
ffmpeg -f lavfi -i color=#E51818:320x240:d=3 -color_primaries 1 -color_trc 13 -colorspace 0 srgb.mov
```
The equivalent C API implementation didn't yield the same results, despite setting similar parameters:
```c
codec_ctx->color_primaries = AVCOL_PRI_BT709;
codec_ctx->color_trc = AVCOL_TRC_IEC61966_2_1;
codec_ctx->colorspace = AVCOL_SPC_RGB;
```
Analysis tools like MediaInfo and ffprobe reported the tags as present in both cases, but video players only respected the tags in files generated via the command line[1]. This highlights the potential complexities in ensuring tags are not just present but properly implemented in the file container.
Transfer Function and Gamma Settings
The transfer function (color_trc) is particularly important as it relates to the gamma of the display. The search results indicate several common options:
1. sRGB: Set using `-color_trc iec61966-2-1`, which appears to be the most reliable option across platforms[3]
2. BT.709: Set using `-color_trc bt709`, which can produce inconsistent results across platforms[3]
3. Gamma 2.2: Set using `-color_trc gamma22`, which doesn't work correctly on all platforms, particularly Safari on macOS[3]
4. Linear: Set using `-color_trc linear`, which is rarely used for video but serves as a good test[3]
For web delivery, the EncodingGuidelines document specifically recommends using `-color_trc iec61966-2-1` (sRGB) as the most consistent option[3].
Professional Video Applications and NCLC Tags
Adobe Premiere Pro and Color Management
Adobe Premiere Pro's approach to color management and NCLC tagging can create confusion for content creators. As discussed in search result[2], there's a disconnect between the Viewer Gamma setting in Premiere and the NCLC tags applied to exports.
A user noted that while setting Premiere's projects to gamma 2.2 (which is considered a good compromise for web delivery), exports were still tagged as NCLC 1-1-1[2]. The user questioned whether they should be tagged as 1-13-1 (for sRGB) or 1-4-1 (for gamma 2.2) instead[2].
The response clarified that in Premiere Pro, the Viewer Gamma setting is meant for choosing the appropriate gamma for the viewing environment, while the exported output remains Rec.709 (which assumes playback on a display using the BT.1886 EOTF)[2]. This means the tagging applied to exported output and the Viewer Gamma setting are not linked, and the Rec.709 tag is intentionally applied[2].
This highlights an important distinction between:
1. The color space used for production and editing
2. The display environment compensation settings
3. The color tags applied to final exports
Apple's Color Management Approach
Apple's platforms incorporate dedicated color management systems. According to search result[4], both AV Foundation and QTKit automatically apply color management to video during playback on macOS. This system uses the values stored in the display profile to create a ColorSync transform that matches broadcast video color space to the specific characteristics of the display[4].
The color transformation is applied to each frame by the GPU during playback, ensuring accurate color representation across different Apple displays[4]. This integrated approach simplifies playback for end users but requires content creators to understand how their NCLC-tagged content will be interpreted by Apple's systems.
Cross-Platform Considerations for NCLC Tags
Web Browser Support
Web browser support for color management tags varies significantly, creating challenges for content targeted at web delivery. According to the encoding guidelines:
- Chrome on Windows and Safari/Chrome on iOS will always assume the display is sRGB, regardless of tags[3]
- Safari on macOS interprets bt709 parameters as roughly gamma 1.95, while Chrome treats it as sRGB[3]
- There is generally no support for BT.1886 (TV gamma of 2.4) across browsers[3]
For content creators targeting web delivery, these inconsistencies present significant challenges in ensuring color consistency across platforms.
### Recommended Encoding Approaches
For maximum compatibility across platforms, the encoding guidelines suggest:
1. Using sRGB transfer function (`-color_trc iec61966-2-1`) as the most reliable option[3]
2. Considering the use of `-color_trc unknown` with appropriate monitor calibration when gamma 2.4 is required[3]
3. Using appropriate flags to ensure color range and matrix are correctly specified:
```
-color_range tv -colorspace bt709 -color_primaries bt709
```
The guidelines also provide a comprehensive FFmpeg command for creating properly tagged QuickTime files:
```
ffmpeg -r 24 -start_number 1 -i inputfile.%04d.png -pix_fmt yuv420p -vf "scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709" -c:v libx264 -t 5 -qscale:v 1 -color_range tv -colorspace bt709 -color_primaries bt709 -color_trc unknown -movflags write_colr+write_gama -mov_gamma 2.4 outputfile.mov
```
This command illustrates the complexity involved in creating properly tagged video files for professional workflows[3].
Conclusion
NCLC tags are critical components of video color management that ensure accurate and consistent color reproduction across different playback environments. Their proper implementation requires understanding of color spaces, transfer functions, and the specific behaviors of various platforms and players.
For content creators and developers, several key recommendations emerge:
1. For web delivery, use sRGB transfer function (`-color_trc iec61966-2-1`) as the most reliable cross-platform option
2. Be aware of the differences between command-line encoding and API-based encoding when setting color tags
3. Understand that professional tools like Premiere Pro may have specific assumptions about color management that affect how exports are tagged
4. Test content across multiple platforms and players to ensure consistent color reproduction
5. Consider platform-specific behaviors, particularly the differences between macOS, Windows, and web browsers
As display technologies and color management systems continue to evolve, staying informed about NCLC tags and their implementation will remain important for anyone working with professional video content.
Citations:
[1] https://lists.ffmpeg.org/pipermail/libav-user/2022-August/013123.html
[2] https://community.adobe.com/t5/premiere-pro-beta-discussions/should-premiere-tag-exports-as-nclc-1-13-1-when-using-gamma-2-2/m-p/14941337
[3] https://github.com/AcademySoftwareFoundation/EncodingGuidelines/blob/main/WebColorPreservation.md
[4] https://developer.apple.com/library/archive/technotes/tn2227/_index.html
[5] https://www.blackpast.org/tag/civil-rights-organizations-nclc/
[6] https://academysoftwarefoundation.github.io/EncodingGuidelines/WebColorPreservation.html
[7] https://www.reddit.com/r/editors/comments/10c4bca/vlc_color_vs_quicktime_color_for_delivery/
[8] https://www.harriscountylawlibrary.org/ex-libris-juris/tag/NCLC
[9] https://forum.logik.tv/t/scripts-to-change-qt-nclc-tag-within-flame/1868
[10] https://poynton.ca/notes/misc/sde-nclc-vui-nclx.html
[11] https://www.steakunderwater.com/VFXPedia/__man/Resolve18-6/DaVinciResolve18_Manual_files/part287.htm
[12] https://forum.logik.tv/tag/nclc
[13] https://www.steakunderwater.com/VFXPedia/__man/Resolve18-6/DaVinciResolve18_Manual_files/part286.htm
[14] https://forum.logik.tv/t/quicktime-nlc-tags/4921
[15] https://community.adobe.com/t5/premiere-pro-discussions/quicktime-player-color-management-in-mac-os/td-p/10581537
[16] https://forum.blackmagicdesign.com/viewtopic.php?f=21&t=95658
[17] https://forum.logik.tv/t/nclc-tag-1-1-0/6744
[18] https://github.com/iina/iina/issues/3520
[19] https://forum.logik.tv/t/gamma-issues-with-mov-colorspace-metadata-in-quicktimes-nclc-tags/1352/18
---
Answer from Perplexity: pplx.ai/share
Comments