I use After EffectsCC and Media Encoder to make .mov files photoJPG format 50% compression. Black backgrounds always compress to RGB 22, 22, 22 and the colors are less saturated.
I also use Media Encoder and or ffmpeg to make .mp4 h264 files, same problem with the blacks and colors.
I can get darker blacks with After Effects CS4, RGB 16, 16, 16.
I would love to know a way to use compression and retain the original black and colors.
You need to check the respective color output ranges in the CoDec settings, especially with Quicktime, though by definition some specifications do not allow genuine black or white and use the legacy PAL/NTSC ranges. You can only avoid this by e.g. using newer standards, uncompressed formats or manually setting these options where available.