#7571 closed enhancement (wontfix)

Information about input color space

Reported by: Ilya87 Owned by:
Priority: normal Component: ffmpeg
Version: unspecified Keywords: color space
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug: ffmpeg even with -loglevel debug provides no data about input colorspace that will be used later by encoder.
How to reproduce:

% ffmpeg -loglevel 5 -i bd.mkv
ffmpeg version 4.1
built on Antergos Linux
Using the command -vf colorspace=all=bt601-6-625:iall=bt601-6-625 I found out that ffmpeg treats input video as BT.601 (I compared first screenshot made with -frames:v 1 default.png with screenshot made using this filter). Why not BT.709? Where does ffmpeg get the information?

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

Attachments (1)

bd1.mkv (54.9 KB) - added by Ilya87 11 months ago.

Download all attachments as: .zip

Change History (16)

comment:1 Changed 11 months ago by richardpl

It guess input colorspace if it is not properly marked. Look at setparams filter how to force input colorspace for filters.

Changed 11 months ago by Ilya87

comment:2 Changed 11 months ago by Ilya87

It's good about correct guess, but I think that this info (even it is guessed) should be shown using debug or other command.

comment:3 Changed 11 months ago by Ilya87

The input is blu-ray part, can it have bt.601?

comment:4 follow-up: Changed 11 months ago by richardpl

Dunno, you can see which colorspace frame use with showinfo filter.

comment:5 in reply to: ↑ 4 Changed 11 months ago by Ilya87

Replying to richardpl:

Dunno, you can see which colorspace frame use with showinfo filter.

In description I see it shows pixel format, not colorspace

comment:6 Changed 11 months ago by richardpl

Because your ffmpeg is older than mine, update it ASAP.

comment:7 Changed 11 months ago by richardpl

And documentation is not in sync.

comment:8 Changed 11 months ago by Ilya87

Last edited 11 months ago by Ilya87 (previous) (diff)

comment:9 Changed 11 months ago by richardpl

ffmpeg -i bd.mkv -vf showinfo -f null -

You need 4.1 or newer.

comment:10 Changed 11 months ago by Ilya87

I have 4.1 and it says color_range:unknown color_space:unknown color_primaries:unknown color_trc:unknown

But guessed is BT.601

Last edited 11 months ago by Ilya87 (previous) (diff)

comment:11 Changed 11 months ago by richardpl

Yes, use: ffmpeg -i bd.mkv -vf setparams=colorspace=bt709,rest_of_filtering ....

comment:12 Changed 11 months ago by Ilya87

I still don't understand why I should set bt709 and maybe it's a bug already if ffmpeg chooses incorrect input color space?

comment:13 Changed 11 months ago by richardpl

Nope, your input just lacks necessary metadata either in container or in video.

comment:14 Changed 11 months ago by Ilya87

In this case ffmpeg must explicitly declare that color space is guessed and may be incorrect and it is recommended to set it manually.

comment:15 Changed 10 months ago by richardpl

  • Resolution set to wontfix
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.