Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Exporting RGB workspace with H264 codec loses color contrast

Contributor ,
Sep 26, 2017 Sep 26, 2017

I have a hex value that I'm working with (#60A630) on a project in After Effects. I have tried several RGB color spaces and export color management options... but every time, I get a color that does not reflect the source file.

I believe I have read that H264 (which is the codec I have to use) uses the YUV color space. So, there is some translation going on... and I don't know how to account for it.

Is there a way I can ensure that my hex value is translated properly—so that what I see in the source file, is what I can expect in the rendered video?

6.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Sep 26, 2017 Sep 26, 2017

If you're striving for absolutely-precise colors, you probably won't get it in H.264.

For one thing, it's 8-bit color.  There will be inevitable differences between the colors in a 16 or 32 bit comp and H.264.

For another thing, H.264 uses 4-2-0 color sampling, aka color resolution.  You can think of a video picture as being in two layers:  a black & white layer, and a color layer.  The B&W layer has a full-resolution image -- every pixel on the screen is represented in B&W.  But you can cheat on

...
Translate
LEGEND ,
Sep 26, 2017 Sep 26, 2017

If you're striving for absolutely-precise colors, you probably won't get it in H.264.

For one thing, it's 8-bit color.  There will be inevitable differences between the colors in a 16 or 32 bit comp and H.264.

For another thing, H.264 uses 4-2-0 color sampling, aka color resolution.  You can think of a video picture as being in two layers:  a black & white layer, and a color layer.  The B&W layer has a full-resolution image -- every pixel on the screen is represented in B&W.  But you can cheat on the color layer.  In rare video codecs you'll have 4-4-4 color sampling, meaning for each & every B&W pixel there's a corresponding color pixel.  It's far more common to have codecs using 4-2-2 color sampling -- for every two B&W pixels, there's one color pixel.  Amazingly, it looks really good, and you can't tell... and there are a boatload of codecs that are 4-2-2.

Then there's 4-2-0 color sampling.  For every FOUR B&W pixels there's one color pixel.  As you can guess, there's a lot of averaging of color values going on.  Oh, it's good enough to fool the human eye, but it won't fool a computer.  And you don't notice it unless there are hard, well-defined edges with lots of color contrast.  It's a virtual lock you'll notice it then.

So long story short -- H.264's the wrong codec for precise color reproduction.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Sep 26, 2017 Sep 26, 2017

Thanks Dave. We are delivering videos to mobile phones via MMS... and the way we do this is by using H264 to get the files small enough to pass mobile carrier file size limits... so H264 isn't something we can change—that is what is supported by all (most) mobile devices. So now I'm looking in to RGB to YUV conversion... because our END product needs to deliver "brand-approved" colors. Actually, it's more important (this whole thing was kicked off by our client's accessibility department complaining about low contrast ratios) that the contrast meet a AA standard. So... we'll work with client to find an RGB that, when converted to YUV, still provides enough contrast.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 26, 2017 Sep 26, 2017

Well, as long as the client likes it, you're okay.  And the client looks at the files on just one phone.  Because colors will look different on iPhones, Samsung phones, etc.

Consistent color is beyond your control once it's in the real world.  Just walk into a Best Buy and look at all the big, fancy TV sets on the same channel.  You'll be hard-put to see any consistency!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Sep 26, 2017 Sep 26, 2017

Ha! I wish that was how they were testing. They are using this app: Colour Contrast Analyser to evaluate color values.

I emailed the developers and heard back from this morning as having KNOWN issues with MacOS color profiles. So...

Client is using that desktop widget/app and to sample pixels from whatever monitors, operating systems, media players they are using to evaluate. The funny (sad) addition to this problem is that we use Vimeo to share assets before we launch the mobile delivery campaigns. And, of course, Vimeo does their own encoding magic to hosted videos on their platform... The same pixel from a video in Vimeo is read differently by this tool depending on the web browser.

Ah... accessibility. Thanks again Dave for your help.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 22, 2023 Oct 22, 2023

Hi Dave, which video format would you suggest to use for the closest results to colours of the source files?
I am also interested in this topic, however, I just saw this conversation 6 years later 🙂
I use AE for this project and I should upload files to Instagram with very vivid colors.
For Posts the maximum size is 650 MB, for Stories it is about 4 GB.
Which video format would you recommend for the closest color-matching results?
Thank you in advance!
Ben

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 24, 2023 Nov 24, 2023

Following for updates. I'm in the same boat.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 28, 2019 Sep 28, 2019

i think adobe community make my hardware work best and everything so cool

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 03, 2025 Jan 03, 2025
LATEST

I too am waiting for any ideas to export my Adobe RGB 1998 files into any format I can export to that yield closest to original color-wise etc, maintain as many of the 16-bits as possible (10 is fine).  None of the YUV Apple codecs do the job (any ideas on tricks here, I directly upload things to youtube for one), even Prores 4444 XQ.  8-bit RGB uncompressed is the best I have found, closest to original color color but not as rich, may lack slight contrast.  Apply YUV just not good color-gamut wise.  Can anyone suggest help, advice, or tricks to try?  Most of my footage interpreted as "preserve RGB" and project settings are 16-bit using Adobe 1098 color space for wide gamut.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines