FORUMS: list search recent posts

Color hue shift after export in After Effects CS5. (Not Gamma problem) How to fix?

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Shoukei Tam
Color hue shift after export in After Effects CS5. (Not Gamma problem) How to fix?
on Nov 18, 2017 at 8:16:07 am

Hello!

I've been struggling to fix this problem for a long time. Here is what I've been experiencing:
Whenever I export my videos using After Effects, the colors of the video will always turn out to have a different hue and saturation.



The change in colors are exceptionally noticeable in the green and red colors in the video. In the image above, the screenshot on the left is from the original video and on the right is an MP4 h264 version of it exported out of After Effects. Notice that the red color of the arm(left) has a more yellowish hue making it look orange(right). Whereas the green color of the jacket (the thing that the fist is punching) has a more bluish hue and looks darker compared to the original. The original video is a 25.8GB lossless MOV file that was exported out of Adobe Animate CC using the "Export Video..." option. The MP4 is exported with using 8-bit Project Setting and no Color Management.

I've tried different codecs in After Effects but they all produce the same color-shifted result. I've also tried exporting it with the different After Effects Color Management and Working Space settings but all that also produced the same results except for one Working Space, namely "Apple RGB", that produced a close color hue which was still different from the original colors. The only export format that preserves the original colors is .AVI lossless (probably because there are not codecs used) but the file size is too big for me to work with or upload to Youtube. I've also tried encoding the lossless file in Adobe Media Encoder hoping to get a smaller-sized video file without any shift in colors but the output was exactly the same as when I exported it using After Effects.

I'm using After Effects CS5 64-bit with Windows 8.1 Pro 64-bit. As for hardware(might not be relevant but just in case), I am using Intel Core i5-2400 and Zotac NVIDIA GeForce GTX 1050 Graphics Card. Thinking that it might be a problem with my computer, I even used my brother's computer to do an export of the video but the output still had the same color shifts. My brother's computer has Windows 10 and he uses After Effects CC 2017. So I guess it's not an After Effects version issue.

Can anyone tell me what is causing this color change and how I can export my video with After Effects without any color change in other video formats besides lossless?

-Shoukei

http://jessthedragoon.aarqee.com


Return to posts index

Dave LaRonde
Re: Color hue shift after export in After Effects CS5. (Not Gamma problem) How to fix?
on Nov 19, 2017 at 1:09:26 am

I hate go rain on your parade, but that's gonna happen going to mp4. You can't expect perfection when you compress the bejeezus out of a nice-looking video file. They look nice because they're big files.

Dave LaRonde
Promotion Producer
KGAN (CBS) & KFXA (Fox) Cedar Rapids, IA


Return to posts index

Chris Wright
Re: Color hue shift after export in After Effects CS5. (Not Gamma problem) How to fix?
on Nov 19, 2017 at 6:37:20 am

I don't know exactly what is going on, first guess would be 16-235 from 0-255. what media player are you using to playback? does it look the same if you use VLC with openGL video output enabled or when you import it back in again?

as a last resort, you can also create a correction lut with iwltap, a free lut generator. just render out a corrected palette trillions of colors as a png and then click generate lut.


Return to posts index


Shoukei Tam
Re: Color hue shift after export in After Effects CS5. (Not Gamma problem) How to fix?
on Nov 19, 2017 at 9:05:16 am

Thanks for the reply guys!
@Dave
I don't think compressing files is to blame. I've tried exporting the .MOV lossless with Avidemux into the same MP4 H264 format but the colors didn't change.
@Chris
I use VLC to play the video files. The screenshots here were taken from VLC playing those files. I practically searched the whole internet to find the solution (or at least the cause) and what I found was the color space (or color matrix?) of the exported video was not BT 709. So I tried exporting the lossless video into a MP4 h264 in ffmpeg command prompt with the colormatrix=bt601:bt709 setting and there was no color change in the exported video. I'm not sure if color space has anything to do with "16-235-from 0-255" you mentioned.

I discovered something else last night. I played the MP4 with wrong colors on my Lenovo laptop(also has an NVDIA graphics card) and the colors looked correct! I even test-exported the .MOV on my laptop using AE and the exported product had the correct colors too! However, when I uploaded the exported MP4 to Youtube from my laptop, the colors looked incorrect on Youtube on my laptop, but correct on Youtube on my computer. I played the MP4 converted on my laptop on my computer and the colors looked correct on my computer. I couldn't be any more mystified.

I imported all those exported videos back into AE and the colors are as they look on VLC. Can this still be a problem with AE? Or system graphics settings on my devices??

-Shoukei

http://youtube.com/jessthedragoon


Return to posts index

Dave LaRonde
Re: Color hue shift after export in After Effects CS5. (Not Gamma problem) How to fix?
on Nov 19, 2017 at 3:53:41 pm

[Shoukei Tam] "Can this still be a problem with AE? Or system graphics settings on my devices?"

Nope. It's the encoder you originally used. If you're not using the H.264 preset available to you in Adobe Media Encoder, you should.

Dave LaRonde
Promotion Producer
KGAN (CBS) & KFXA (Fox) Cedar Rapids, IA


Return to posts index

Chris Wright
Re: Color hue shift after export in After Effects CS5. (Not Gamma problem) How to fix?
on Nov 19, 2017 at 5:03:00 pm

imho, its the playback device, not the encoder that is causing the issue.
Did you make sure that VLC's playback output was seting to OpenGL?

there's metadata inside the codec called 16-235 that will change the hues.
quicktime and vlc often read this metadata and change the playback output.
After Effects ignores the metadata. That is why it looks correct with it.

Youtube is a separate issue, although related slightly.

To recap with instructions:
1. set your graphics driver to 0-255 in its control panel.
2. fix VLC with video output 'openGL', or strip the metadata for quicktime player with JES extensify
It will strip the quicktime gamma atom tag. Go to color settings and tick allow changes. Remove both the Ganma and Color. Goto Manual and then press update to apply the changes.
http://download.cnet.com/JES-Extensifier/3000-13631_4-76083103.html

3 youtube click re-touch panel, don't save it after the retouch then cancel, it will transform it from 16-235 to 0-255. it will fix the colors in a few hours.

4. if youtube 'fix' still doesn't work after a few hours, I made a reverse lut that has worked for a lot of people that will make the image temporarily darker, then youtube lightens it again.

fixmyyoutube lut download
https://f1.creativecow.net/10598/fixmyyoutube

it doesn't work with adjustment layers directly
you have to use it in the dropdown for the export in adobe media encoder. or you can NEST it first.
its a premiere bug.

also it needs to be copied in both premiere-lumetri-technical and adobe media encoder-lumetri-technical


Return to posts index


Shoukei Tam
Re: Color hue shift after export in After Effects CS5. (Not Gamma problem) How to fix?
on Nov 20, 2017 at 3:04:48 pm

In VLC, after setting the Output setting from OpenGL to Automatic the colors were still off. I updated my VLC thinking that it could be a player version issue. After updating it, there were a few changes in its settings. In the new version of VLC, there is an additional setting called "Use hardware YUV->RGB conversions" on top of the OpenGL setting. Since it is a color issue I'm experiencing, I decided to uncheck that option and the colors displayed correctly!

Thank you for pointing me to the output setting in VLC, Chris.

Now that this problem is practically solved, I could just move on from here but there are still a few questions I'd like to address:
1) Some videos that I convert using other video encoders like Avidemux don't have this color issue with the "Use hardware YUV->RGB conversions" option enabled or disabled. How come this setting affect videos converted using After Effects?

2) I did further testing to the AE exported versions by importing them back into AE (as you suggested earlier, Chris) and the colors looked incorrect - like in the screenshot on the right in the image I posted earlier. But when I export it again after importing it, the colors look correct on VLC. Versions exported by other video encoders show the correct colors when imported into AE. Here is a screenshot of the video codec info of the exported videos imported into AE.

The infolist on the left is the codec info of the AE exported video, which shows incorrect colors when imported back into AE, whereas on the right is the codec info of one that was exported using FFmpeg command prompt, which shows correct colors when imported into AE. It seems like a display problem in AE. What is causing this and how do I get AE to display the colors correctly?

-Shoukei

http://youtube.com/jessthedragoon


Return to posts index

Chris Wright
Re: Color hue shift after export in After Effects CS5. (Not Gamma problem) How to fix?
on Nov 20, 2017 at 4:19:16 pm

Without a color bar test with ffmpeg, I couldn't say if it encodes 16-235 or 0-255.
AE with no color management encodes 0-255 directly from your monitor's OS calibration.
you can fiddle with AE to use color management 16-235, 0-255 sRGB or effect utility profile converter to burn in relative pixel colors, but that would be a last resort as you start to muddle the issue which is usually a bad video player.


Return to posts index

Shoukei Tam
Re: Color hue shift after export in After Effects CS5. (Not Gamma problem) How to fix?
on Nov 21, 2017 at 2:28:35 am

I tried simulating output but the different color management options only affect the brightness and gamma of the video. The colors still look off. Utility profile converter uses the same working space options as color management so I guess it won't be any different from trying color management.
I never use color management at all in After Effects and is turned off by default. My NVDIA Graphics setting is already set to 0-255 so I guess AE already renders my videos in 0-255.
If a solution cannot be found, the only way is to work around this by not importing After-Effects-converted videos back into After Effects to work with. What do you think?

http://youtube.com/jessthedragoon


Return to posts index


Chris Wright
Re: Color hue shift after export in After Effects CS5. (Not Gamma problem) How to fix?
on Nov 21, 2017 at 2:53:54 am

don't set vlc to automatic, set it to openGL. this way vlc and after effects and premiere will all match without any weirdness going on.
if there is indeed a problem at this juncture, it is the difference that AE and vlc see the video, but the data is still the same regardless.
Make sure vlc has default colors and no filters as well!


Return to posts index

Shoukei Tam
Re: Color hue shift after export in After Effects CS5. (Not Gamma problem) How to fix?
on Nov 21, 2017 at 7:37:21 am

The colors are wrong when vlc is set to OpenGL. I've never changed any color settings or used any filters in VLC. What data is causing AE to see the colors wrongly?

http://youtube.com/jessthedragoon


Return to posts index

Chris Wright
Re: Color hue shift after export in After Effects CS5. (Not Gamma problem) How to fix?
on Nov 21, 2017 at 3:52:11 pm

strange...
can you post a 1 sec. lossless mov file out of animate cc? I will then export from AE and check in VLC.


Return to posts index


Shoukei Tam
Re: Color hue shift after export in After Effects CS5. (Not Gamma problem) How to fix?
on Nov 22, 2017 at 8:20:05 am

Ok. Here's the file: http://www.mediafire.com/file/j6pgpbw818hc3fd/myrice_colortest_ANIMATECC.mo...

This is a lossless file so it should look the same when imported into AE. Export it into mp4 (or video with any other encoding) and then import that encoded video back into AE and see if the colors are still the same.

http://youtube.com/jessthedragoon


Return to posts index

Chris Wright
Re: Color hue shift after export in After Effects CS5. (Not Gamma problem) How to fix?
on Nov 22, 2017 at 8:56:53 pm

I 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.


Return to posts index

Shoukei Tam
Re: Color hue shift after export in After Effects CS5. (Not Gamma problem) How to fix?
on Nov 23, 2017 at 7:53:16 am

Your 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?

http://youtube.com/jessthedragoon


Return to posts index


Chris Wright
Re: Color hue shift after export in After Effects CS5. (Not Gamma problem) How to fix?
on Nov 23, 2017 at 3:06:39 pm

you must have a 3rd party video decoder from librafilter or something that's hijacking the decode.


Return to posts index

Shoukei Tam
Re: Color hue shift after export in After Effects CS5. (Not Gamma problem) How to fix?
on Nov 24, 2017 at 12:47:50 am

Library 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?

http://youtube.com/jessthedragoon


Return to posts index

Chris Wright
Re: Color hue shift after export in After Effects CS5. (Not Gamma problem) How to fix?
on Nov 24, 2017 at 2:12:19 am

you 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'


Return to posts index


Shoukei Tam
Re: Color hue shift after export in After Effects CS5. (Not Gamma problem) How to fix?
on Nov 24, 2017 at 5:02:07 am

The 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 640x360 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?

http://youtube.com/jessthedragoon


Return to posts index

Shoukei Tam
Re: Color hue shift after export in After Effects CS5. (Not Gamma problem) How to fix?
on Dec 1, 2017 at 3:08:55 pm

Ok 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.

http://youtube.com/jessthedragoon


Return to posts index

Chris Wright
Re: Color hue shift after export in After Effects CS5. (Not Gamma problem) How to fix?
on Dec 1, 2017 at 6:53:03 pm

fine 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.


Return to posts index


Eugene Vdovin
Re: Color hue shift after export in After Effects CS5. (Not Gamma problem) How to fix?
on Nov 12, 2018 at 8:23:32 pm

Hi. 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

grossgrade.com


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]