Activity › Forums › Adobe After Effects › Color hue shift after export in After Effects CS5. (Not Gamma problem) How to fix?
-
Color hue shift after export in After Effects CS5. (Not Gamma problem) How to fix?
Eugene Vdovin replied 7 years, 9 months ago 3 Members · 19 Replies
-
Chris Wright
November 22, 2017 at 8:56 pmI tested both AE(no color management) and vlc(opengl) before exporting, both exact same pixels.
I tested all 3 types of alpha mattes, premultiplied, straight, none. all same pixels.
I encoded h.264 with AME, same pixels.
I imported the AME h.264 back into AE, same pixels.
I imported the quicktime h.264 back into AE, same pixels.
I opened the quicktime h.264 into VLC opengl, same pixels
I opened the AME h.264 in VLC opengl, same pixels.I also double checked all colors with a pixelsampler down to the RGB pixel code. same pixels.
So you have a wonky setting somewhere.
-
Shoukei Tam
November 23, 2017 at 7:53 amYour test results sound like what happened when I used my laptop to export and view the video. The colors look correct on VLC and AE. The only place where the colors look wrong on my laptop is on Youtube.
Also, I did one more test and I found something else. This test was all done on my desktop PC. I rendered the MOV I sent you in different dimensions. With VLC output set to Automatic, all of them are displayed with correct colors. I then set my VLC output back to OpenGL to play back those videos and found out that only those that are smaller than 720p are displayed in correct colors. The ones that are 720p and above (meaning HD) are color-shifted. Same goes when I import those videos into AE – HD videos, wrong colors in preview. Smaller than HD videos, correct colors in preview. However, on youtube, they all have the correct colors. I didn’t view them on Youtube on my laptop because I know they’ll most likely get displayed with the wrong colors.
I then did a 2nd pass export test. I imported a 1080p video from the test above back into AE, which obviously had wrong colors in AE’s preview, and exporting it out in the same format. The product had seemingly twice the amount of color hue shift. Here’s a screenshot:

1) 1080p MP4 h264 video that was exported out of AE earlier
2) Video no. 1 exported out of AE. Has more amount of color shift
Does AE export exactly what is shown in its preview? If it doesn’t then it is more than just a display issue and maybe has something to do with AE’s exporting codec. If it does, video no. 1 and 2 should have the exact same colors.
Could it be a hardware problem or some kind of OpenGL setting that I missed? What do you think?https://youtube.com/jessthedragoon
-
Chris Wright
November 23, 2017 at 3:06 pmyou must have a 3rd party video decoder from librafilter or something that’s hijacking the decode.
-
Shoukei Tam
November 24, 2017 at 12:47 amLibrary filter? I just imported the video in and exported it. I did nothing else. How do I check if there’s a library filter set somewhere in AE?
https://youtube.com/jessthedragoon
-
Chris Wright
November 24, 2017 at 2:12 amyou can view vlc’s codec properties to get video codec info.
you can try mpc-hc video player. its internal filter-video settings has a 0-255 setting.
you can also try ‘codec tweak tool’ if the wrong one is used. windows uses a merit based system to decide what codec to use.when I played your file in vlc, it said apple quicktime RLE video.
mpc-hc player said ‘original apple specs’ ‘format:RLE codec ID rle’ -
Shoukei Tam
November 24, 2017 at 5:02 amThe lossless MOV doesn’t get displayed with the wrong colors anywhere because it is lossless. Only HD encoded videos get displayed with wrong colors in VLC and AE. As for MPC-hc player, anything bigger than 640×360 gets displayed with the wrong colors. Display stats is disabled on my MPC-hc. I don’t know why.
I don’t think it’s a player issue. The HD and SD videos were all rendered in the same format and encoding. Only different dimensions. The codec info in VLC all display the same thing for all those videos, which is H264 – MPEG-4 AVC (part 10) (avc 1). The only difference is the size of the video. I noticed one thing though. In VLC the Decoded format for those videos is Planar 4:2:0 YUV whereas for the lossless MOV it is 32 bits RGB. Can this possibly affect the colors? Also, is it possible to view version/settings for OpenGL in windows?
https://youtube.com/jessthedragoon
-
Shoukei Tam
December 1, 2017 at 3:08 pmOk just in case there are AE users out there who encounter this same problem, I’ll post all my findings and best solution here.
It seems like this problem has already been addressed before on this thread: https://forums.adobe.com/thread/769015
After searching the internet and asking around, I found out that the color shifts are caused by how After Effects interprets and encodes videos. I did further testing by exporting the video out of AE in SD and HD and then importing them back into AE to see if the colors are right. It turned out that only the HD ones have the color shift. From this, the problem seems to have something to do with the colormatrix (or color space) standards for SD and HD videos. SD videos use BT.601 whereas HD videos use BT.709. This led me to this thread which states in detail about the compatibility of these color spaces and how video editing programs process them: https://forum.doom9.org/showthread.php?p=1566691
In that thread it says After Effects ignores color matrix flags and uses BT.601 regardless of whether the video is SD or HD, or HD tagged with the BT.709 color matrix. This explains why SD videos don’t get the color shift when imported into AE.Anyway, to counter this problem if After Effects is all you’ve got, here’s a solution (workaround is you will):
-If you have a large raw video file (say like an MOV) and you want to size it down so that it is easier to work with in AE, use other video encoders that tag your video with the appropriate color space during encoding to convert your video first. This will cause the color to shift in the same amount in reverse in hue, meaning instead of the reds looking more orange than original, it will look more magenta than the original. So when it is imported back into After Effects, the colors will offset back to original. I highly recommend using the FFmpeg codec. You might need to be familiar with command prompt to use it.
-DO NOT import AE-exported videos back into AE to work with (unless it is an SD video)Also if you’re going to upload your videos to Youtube, exporting it this way should not cause color shifts when viewed on Youtube.
This might sound like a crude fix but this is the best solution I’ve found so far.
https://youtube.com/jessthedragoon
-
Chris Wright
December 1, 2017 at 6:53 pmfine that it works for you. I already attempted to force the color management with AE’s utility profile converter from .601 to .709. There’s a 3d color transform in your example that is not 100% fixable by standard means.
-
Eugene Vdovin
November 12, 2018 at 8:23 pmHi. I also faced this problem. Thank you for describing it here. To complete my project using video files previously exported from AE using H264 codec having incorrect colors, I created a LUT file that contains inverse matrix conversion to return incorrect colors to their original state. I’m attaching it here, maybe someone will need it: 12882_fixaeh264codeccolormatrixproblem.cube.zip
Reply to this Discussion! Login or Sign Up