1

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.

Giacomo1968
59.1k23 gold badges180 silver badges225 bronze badges
asked Nov 29 at 6:11
New contributor
Ewen Crawford is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
3
  • 2
    Hello, well, start by using newer ffmpeg, it's on 8 now. Commented 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. Commented Nov 29 at 17:42
  • Homebrew exists. superuser.com/questions/1914131/… Commented Nov 29 at 18:18

1 Answer 1

0

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
answered Nov 29 at 17:42

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.