After Effects import ffmpeg video has color errors
I create lots of 3D animations and do the final compositing work in After Effects. Usually, the frames of these animations are originally rendered out of my 3D software as separate PNG files, which I then import into After Effects as a "PNG Sequence."
However, the issue with this method is that the PNG files themselves usually take up lots of space on disk. I've been looking into alternative methods to losslessly compress them, such as by using ffmpeg:
ffmpeg -framerate 60 -i out%04d.png -c:v libx264rgb -qp 0 out.mp4
or:
ffmpeg -framerate 60 -i out%04d.png -c:v libx265 -preset ultrafast -x265-params lossless=1 out.mp4
And these output files actually do give me much smaller filesizes than storing the original PNG frames (for example, 1.92GB instead of 4.5GB). However, the issue is that After Effects does not seem to be able to import these video files output by ffmpeg correctly. For example, here's what original first PNG frame looks like:

However, when I import the ffmpeg video files into after effects cc 2019 or premiere pro cc 2019, here's what the x264 video's first frame looks like:

And the x265 first frame:

Clearly, After Effects isn't able to interpret the colors in the ffmpeg video file correctly, but I don't really understand why. If I open the video files in VLC Media Player, for example, the colors ARE interpreted correctly, so this must be a problem with Adobe's software.
Is it possible to fix this problem by changing import settings in After Effects? Are there special output settings I need to specify for ffmpeg to avoid this problem? If none of these, do you have recommendations for alternative codecs that After Effects interprets properly?
