Skip to main content
Participating Frequently
December 22, 2010
Question

Color Shifts when rendering to H.264 Blu-ray

  • December 22, 2010
  • 12 replies
  • 24417 views

Since upgrading to After Effects CS5 I am seeing the following:

Whenever I render out a video file using the "H.264 Blu-ray" Output Module option, the resulting m4v video has a different color appearance than the After Effects composition from which it was rendered. The rendered file appears to have a yellow cast to it, especially evident in red highlights. This appearance is seen within After Effects (after importing the file and dropping it in a composition) as well as in VLC media player. In addition, a blu-ray disc created using the m4v file also has the yellow appearance when viewed on an HDTV. In other words, the color shift is consistant in various players as well as within After Effects itself.

Here is the bug report I submitted:

******BUG******
Concise problem statement:
Steps to reproduce bug:
1. Create a project with HDTV (Rec. 709) color space, 8 bit.
2. Import a 1920x1080 video file (any kind).
3. Render out to H.264 Blu-ray (using project color space).
4. Import the resulting m4v file and compare it to the original video.
Results: The color has been shifted; has a yellow cast to it.
Expected results: the color should appear the same for the rendered file as the original.

    This topic has been closed for replies.

    12 replies

    April 15, 2012

    Because HDTV standard is 709 and ths SDTV  is 601. so the color in the monitor will have different feeling.

    But if u use TV to watch the Effect will be the same.

    TV have an Y-cb-cr to RGB  Translate table. when HD mode . tv will switch convert table to 709.

    when signal change to SD mode . TV will auto switch to  601 table. so it will looks same.

    But monitor did't have this function . so u will find the color shift.

    if u  try to make it without shift in monitor. when u use TV to watch ur produce . u will find a lot of different

    FrankinMDAuthor
    Participating Frequently
    April 15, 2012

    nicycc, I didn't totally follow that, but if you are saying there is no problem then I disagree. Firstly, there is a shift when viewed on a HDTV exactly the same as I see on my computer monitor. Secondly, even if it only looked wrong on a computer monitor, that would still be unacceptable as so much hi def content is delivered to people's computers nowadays. Thirdly, this didn't happen with CS4 but only started with CS5. Fourthly, A.I.1's test conclusively shows an objective difference in color when rendering using Media Encoder to H264. As I said previously, this is no longer a concern for me as I have an alternative process for transcoding to H264, but anyone who uses Media Encoder to do this needs to know that the color can change (although maybe not on a Mac).

    Participant
    October 22, 2012

    I know I am resurecting an old thread but I have also had a lot of mind-blowing problems with output module's h264 color shift in AE 5.5...I believe I have pinpointed the reason and would like if someone could confirm or tell me I'm a fool...contrary to Adobe's claims, the h264 module does not seem to apply rec709 matrix to HD -size input video but rather rec601...since it also does not embed flags, players rely on the file's video size, which is 1920x1080, to determine which matrix to apply, and of course, they mistakingly apply the rec709, when it's actually rec601...those who encode to h264 SD, logically, don't see the problem because rec601 is the correct matrix for SD anyway...

    media encoder also doesn't embed flags, but applies the rec709 matrix correctly...

    hope the discussion picks back up...:-)

    cheers...

    Legend
    April 15, 2012

    I did a test converting to H.264/Blu-ray (default settings) in AE CS5.5.

    The coloured solids at the top are original, and the ones on the bottom are H264 Blu-ray compressed (from within AE CS5.5), imported back in to the AE5.5 composition.  Colour management is off.

    White/Greyscale turned out the same (ie. blocks that were RGB 255,255,255 stayed like that.  Same for blocks 128,128,128 and 200,200,200).

    The red was originally 200,0,0.  After conversion to H264 Blu-ray, the red block is 218, 19, 0 (according to AE CS5.5's Info Panel)

    The green was originally 0,200,0.  After conversion to H264 Blu-ray, green was 0,170,0.

    The blue was originally 0,0,200.  After conversion to H264 Blu-ray, blue was 0,12,210.

    No motion for the blocks shown.

    Render settings

    quality best

    format h.264 blu-ray

    channels RGB

    depth: millions of colors

    colour: premultiplied (matted)

    mainconcept h.264 20.00 Mbps

    default options (high, 4.1, vbr1, 20 target bitrate, max 24 bitrate)

    AE CS5.5.  Windows 7.  Project settings: 8 bits per colour channel.

    Andrew Yoole
    Inspiring
    April 15, 2012

    I just did a test myself.

    Mac Book Pro, OS X Lion, After Effects CS 5.5 (10.5.0.253)

    Project Settings:

    Rendered using the H.264 for BluRay Output Module, then reimported file, laid one on top of other, masked the upper half out, so upper area of pic is native content, lower half is H.264 file.  You can see where the mask occurs by looking at the blue lines to left and right of the comp.

    There is no difference in any of the colours - they all match up perfectly.

    Overlaying one image over the other in Difference mode demonstrates how little the files differ: a little edging due to compression artifacts, but basically no difference in the file colours whatsover.  There are occasional variances of just one or two RGB points in any of the colour channels, but these can probably be explained by compression/banding issues.

    Are you certain you have all colour management turned off in After Effects?

    Legend
    April 15, 2012

    Andrew Yoole wrote:

    Are you certain you have all colour management turned off in After Effects?

    It says it's off in Project Settings.  In Preferences->Previews there's 3 options for it (none of which say off - ie. they say Faster / more Accurate except ram preview / More Accurate).  Anyway it seems to give the same RGB values with each option of preview (ie. the red, green & blue coloured solids still show a different value after H264 Blu-ray compression.  I also tried turning OpenGL off for previews and it gave the results shown above too.  In the Output Module it also says colour management is off.  Exporting as uncompressed AVI instead of H264 Blu-ray gives identical RGB values as the source.

    April 14, 2012

    Hi Frankin,

    Did you solved the problem in the meanwhile (yellow tint on export) ?

    FrankinMDAuthor
    Participating Frequently
    April 14, 2012

    No, never solved. I finally resolved myself to exporting to lossless avi and using third party software to encode H264. Months after I'd "moved on", an Adobe support person contacted me to ask about reproducing the issue. Maybe it was selfish of me, but I didn't feel like taking the time to respond since I had found a reasonable (superior, actually) alternative. At any rate, I've never found anyone who could follow my simple test (described above) and report successful results, so it's hard for me to believe Adobe can't replicate the issue. The truth is, I'm better off with my current process than I would have been if the bug didn't exist, so hurray for "happy accidents".

    April 14, 2012

    Damn, could you say with third party software you use ? It would help me a lot

    I will use the same workflow than.

    FrankinMDAuthor
    Participating Frequently
    January 19, 2011

    I'm still trying to get an answer to this question.

    Dave_LaRonde
    Inspiring
    January 19, 2011

    FrankinMD wrote:

    I'm still trying to get an answer to this question.

    Well, here's my answer: it's time for Plan B.

    The reason: AE renders one frame at a time, making it incapable of multipass encoding.  In a long-gop codec like H.264, multipass encoding can greatly improve image quality.  I'm with Szalam on this score -- if I were doing serious work, I'd never consider rendering in H.264.  What if you need a quick 'n dirty, small-size file to show your progress to a client?  It'll do.

    Furthermore, H.264 is a DELIVERY codec; a final-use codec.  It won't withstand re-rendering without losing image quality.  What if you suddenly learn you need a copy of your AE render in.... oh, say, ProRes 422?  If all you have is an H.264 file, you'll have to live with the hit in image quality.  So again, I'm with Szalam in rendering in a lossless or uncompressed codec, and THEN compressing for delivery.

    I can't answer your question about H.264 color directly, but I know that a couple of other AE & H.264 shortcomings make it a less-than-ideal codec choice when rendering For The Ages.

    Participating Frequently
    January 20, 2011

    Dave,

    Thanks for the response; what you say makes a lot of sense. I agree that H.264 should be considered a delivery format only (well, aquisition format sometmes). My issue is that sometimes all you need is MPEG-4 (say, for a blu-ray) and it would save time if you could get it straight from AE. I know it wouldn't be the most efficient encode space-wise, for the reason you pointed out, but sometimes time is more important.

    When rendering For The Ages, it's hard to pick something that will be one size fits all, since you don't always know what frame size (for example) you will want your delivery format to be, so even a lossless AVI might need to be rendered again before encoding.

    As for Plan B, that's what I'll be doing for the time being, since I can't find a way around the color issue.

    I would still like to know what is happening with the H.264 color in After Effects, and I have the feeling some people are using AE to encode to it and don't realize what it is doing to their color. It would be nice if it were a known, rather than a hidden, issue (if it is an issue).


    I can assure you this isn't a widespread problem as I've rendered a  fair amount of h.264 directly out of AE and haven't noticed it. Nor have I heard anything from our testing department.

    I would still like to know what is happening with the H.264 color in  After Effects, and I have the feeling some people are using AE to encode  to it and don't realize what it is doing to their color. It would be  nice if it were a known, rather than a hidden, issue (if it is an  issue).

    Well, it really depends how you've configured ae for rendering, what OS version and platform you are on, and if you are using Color Management or not. If you don't have color management enabled, after effects assumes you are working in Rec709 RGB full swing and does a conversion to Rec709 YCrCb 16-235 and then compresses there. We use the transfer functions as defined in the h.264 specification in this case. Different players make different assumptions about converting from Rec709 into display, generally doing nothing.

    It's a whole different can of worms If you have color management enabled. For instance if you've color profiled your monitor, color correct in AE with CM on, render to h.264, and they play that in a non-color managed workflow, you may see some color shifting. That's because your monitor is shifted and AE was correcting for it in our comp window, but the h.264 player isn't correcting for the fact that your display isn't Rec709.

    --chris

    After Effects Engineering Manager

    FrankinMDAuthor
    Participating Frequently
    January 5, 2011

    I'm still looking for an answer to this question:

    Is is possible to render out an M4V file from After Effects and have the color stay true to the source comp?

    FrankinMDAuthor
    Participating Frequently
    December 29, 2010

    Szalam,

    Thank you; that is helpful info. I am currently looking into doing what you suggest. However, given that the intermediate-based workflow (despite its advantages) is significantly slower than rendering straight from AE, I would still like to know if it is possible to render an H.264 file from AE without the noticeable color shift I am seeing. If the answer is "no", then I know where I stand and can proceed with alternatives.

    FrankinMDAuthor
    Participating Frequently
    December 29, 2010

    Todd,

    Thank you for your response. I apologize for misunderstanding the nature of this forum; given some of the exchanges I have been reading here, it looked to me like the interaction was a bit more official than just people using their free time.

    I will certainly try that link you provided; in the meantime, if you or anyone else can shed any light on the question I have posed here, i.e. is it possible to render H.264 out of After Effects CS5 and have the color match the composition of origin, I would greatly appreciate it.

    Message was edited by: FrankinMD

    FrankinMDAuthor
    Participating Frequently
    December 29, 2010

    This question has been up for 6 days now and still no response. I see that other people are getting answers, often from Adobe employees. As an Adobe customer for years, I would appreciate the courtesy of a response, however brief it may be.

    If there is some other place where I should be posting these sorts of questions, please let me know.

    Thank you.

    Todd_Kopriva
    Inspiring
    December 29, 2010

    This is a user-to-user forum. If Adobe employees answer questions here, they are doing so on their free time. Also, virtually all of the Adobe employees are on a holiday break right now.  If you want a guaranteed immediate answer from an Adobe employee, you can contact Technical Support:

    http://www.adobe.com/support/contact/

    FrankinMDAuthor
    Participating Frequently
    December 28, 2010

    Are there any Adobe employees who could comment on this?

    Thanks.

    FrankinMDAuthor
    Participating Frequently
    December 27, 2010

    If someone could tell me just one After Effects workflow that results in an H.264 (.m4v) file that has color that is true to the composition that it was rendered from, I would greatly appreciate it. It really doesn't matter what the source video is or what color management is used, just so the final video keeps its color intact. If I could just see one workflow that works, that would be a great help.

    Thank you.

    Szalam
    Community Expert
    Community Expert
    December 29, 2010

    For the record, I never render H.264 from After Effects. Actually, I very rarely render any sort of compression with AE. I render a lossless file then use a different program (Adobe Media Encoder) to encode the final file. After Effects, because of the way it works frame by frame to render, can't do multipass compression. Multipass compression gets better-looking files at smaller file sizes.

    My suggested workflow would be to render uncompressed out of AE and compress using some other software.