[FFmpeg-user] Default RGB to YUV conversion
Florian Friedrich
florian at ff.de
Fri Dec 5 18:05:18 CET 2014
Hi,
after trying many different command lines and testing encodes, I'm questioning the (default) method of ffmpeg for converting RGB-sources to YUV.
Which matrix is used by default to convert RGB sources to YUV (or YCbCr, more accurately) and how can it be influenced?
Colormatrix-parameters seem to have no influence on the actual encode, they are VUI for the decoder only.
But here is the problem: It is needed to do a proper RGB->YUV conversion according to the parameters of the decoder later on. In other words, it does not make sense to convert RGB to YUV with a 601 matrix if it is decoded with 709.
FFMPEG does not seem to use the output matrix for the initial conversion. I'm saying that because of several tests I made where a filter "-vf colormatrix=bt601:bt709" in the command line produced more accurate results. However, we don't want to have a conversion RGB->YUV(601)->YUV(709) going on which is lossy, especially in a 8 Bit domain. So how do we use 709 or other matrices in the initial conversion?
Part of this discussion already happened in the topic:
FFMPEG introduces color shift to DNxHD MOVs<http://article.gmane.org/gmane.comp.video.ffmpeg.user/38310>
So maybe it's a development issue, but I'm posting this topic here since it's entirely possible that I have not found a existing conversion option.
Thanks for reading,
Florian
More information about the ffmpeg-user
mailing list