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.
-
2Hello, well, start by using newer ffmpeg, it's on 8 now.Destroy666– Destroy6662025年11月29日 09:27:11 +00:00Commented Nov 29 at 9:27
-
@Destroy666 Unfortunately my OS's binary package repository does not have pre-built binaries of later FFmpeg versions and I don't feel like building from source due to the maintenance overhead.Ewen Crawford– Ewen Crawford2025年11月29日 17:42:31 +00:00Commented Nov 29 at 17:42
-
Homebrew exists. superuser.com/questions/1914131/…Destroy666– Destroy6662025年11月29日 18:18:14 +00:00Commented Nov 29 at 18:18
1 Answer 1
Why not try using the -map_metadata 0 parameter in your command as suggested here on the Video Production Stack Exchange like this:
ffmpeg -i test.jpg -map_metadata 0 -filter:v scale=in_range=full -pix_fmt rgba -color_range full test.tiff
You must log in to answer this question.
Explore related questions
See similar questions with these tags.