[FFmpeg-user] RGB-YUV color shift
Chris Bouchard
chris.bouchard at framestore.com
Fri Feb 15 12:50:18 CET 2013
> > Is your original problem only reproducible when encoding
> > to prores or also if you encode with a yuv420p encoder?
> > (For example -vcodec mpeg4 -qscale 2)
I have found the same colour shift, and that using
-vf colormatrix=bt601:bt709 will fix the colours to
be almost 100% accurate for conversions from RGB to YUV.
Let's say 98% accurate; most people wouldn't notice.
However there is definitely something else going on with ffmpeg's
pixel format conversions: specifically
when converting to yuv420p. I have noticed a very slight green tint
being applied when you convert
pixel formats from e.g. yuv422p to yuv420p.
NO COLOUR SHIFT:
-pix_fmt yuv422p -vcodec libx264
SUBTLE GREEN TINT:
-pix_fmt yuv420p -vcodec libx264
Whatever options you use a grey image will go slightly green when ffmpeg
converts it to 420. The problem seems to get worse if you scale
the video down as well as convert pixel formats, so it could be
an issue in the scaler. Definitely something dodgy with the pixel format
conversion to 420.
It's interesting that YouTube doesn't exhibit this problem,
so their engineers have somehow got around it. But other
video sites like Vimeo and my ffmpeg encodes
do have this issue...
Any thoughts from experts would be very welcome!
More information about the ffmpeg-user
mailing list