I’m trying to convert a JPEG to a TIFF using the following command:
ffmpeg -i test.jpg -filter:v scale=in_range=full -pix_fmt rgba -color_range full test.tiff
When I read the metadata of the JPEG file using ffprobe, I can see that both the color_range and color_space fields are known:
...
color_range=pc
color_space=bt470bg
color_transfer=unknown
color_primaries=unknown
...
However, after creating the TIFF file, inspecting it shows that the same fields are now unknown:
...
color_range=unknown
color_space=unknown
color_transfer=unknown
color_primaries=unknown
...
This seems very odd to me given that I’m specifically forcing the color range value in the output frame header to “full”, almost as though it’s being ignored by the TIFF encoder.
Furthermore, when converting to another format (e.g., JPEG XL), I do see the metadata getting populated accordingly. For example, here’s the ffprobe output when I run ffmpeg -i test.jpg test.jxl, which implicitly uses the libjxl encoder:
...
color_range=pc
color_space=gbr
color_transfer=iec61966-2-1
color_primaries=bt709
...
Any ideas why the native TIFF encoder would be behaving in this manner? For reference, I’m using FFmpeg version 6.1.2.