Opened 7 days ago

Last modified 7 days ago

#11238 new defect

-color_trc and -color_primaries flags don't work

Reported by: owztue Owned by:
Priority: important Component: undetermined
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

How to reproduce:
Any video input would do i think (at least h264 in mp4 with yuv420p), but you can also test it with one of ffmpeg's test source:

% ffmpeg -f lavfi -i smptebars -c:v rawvideo -pix_fmt uyvy422 -t 3 rawvid.avi

And then reencode the result to h264:

% ffmpeg -i rawvid.avi -c:v libx264 -pix_fmt yuv420p -color_range "tv" -colorspace "bt709" -color_trc "bt709" -color_primaries "bt709" vid-reenc.mp4

and now output of ffprobe -show_streams vid-reenc.mp4 has

yuv420p(tv, bt709/unknown/unknown, progressive),
color_range=tv
color_space=bt709
color_transfer=unknown
color_primaries=unknown

I don't know when this problem emerged, but version built on 03/May/2024 doesn't have this problem and all the flags are set correctly with the same commands above. I'm on 09/Oct/2024 master-latest build now.

Change History (3)

comment:1 by owztue, 7 days ago

Priority: normalimportant

comment:2 by Balling, 7 days ago

Where is -vf scale? You need to set -vf=scale=out_color_matrix=bt709.

Version 0, edited 7 days ago by Balling (next)

comment:3 by Balling, 7 days ago

-color_trc bt709 -color_primaries bt709 now has to be put before the -i assuming the input has no those options set, avi file does not

Note: See TracTickets for help on using tickets.