Opened 6 weeks ago
Last modified 36 hours 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: | color_primaries regression |
Cc: | MasterQuestionable | 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 (5)
comment:1 by , 6 weeks ago
Priority: | normal → important |
---|
comment:3 by , 6 weeks 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
comment:4 by , 9 days ago
This change (regression?) probably breaks many expectations and scripts/pipelines that people might have.
E.g. ffmpeg's own wiki says "On ffmpeg command-line this is what options such as colorspace and color_trc do; you can also put them on the output side to modify what space the output is in" (https://trac.ffmpeg.org/wiki/colorspace), but apparently now on the "output side" they do nothing at all.
Likewise, Academy Sofware Foundation "encoding guidelines" page (https://academysoftwarefoundation.github.io/EncodingGuidelines/Quickstart.html) in all the ffmpeg command line examples puts color_trc and color_primaries on the output side. I've spent quite some hours yesterday puzzled why examples there do not work properly, before thinking of "let's try ffmpeg 6.0 instead of 7.1"
comment:5 by , 36 hours ago
Cc: | added |
---|---|
Keywords: | color_primaries regression added |
͏ See also: https://trac.ffmpeg.org/ticket/11309
͏ Possible regression window:
͏ https://github.com/FFmpeg/FFmpeg/commits/master/fftools?since=2024-09-16&until=2024-10-10
͏ Bravo the unnecessary complexity... wreaks havoc again.
͏ https://trac.ffmpeg.org/ticket/9898#comment:24
͏ Relevant reading:
͏ https://trac.ffmpeg.org/ticket/11020#comment:3
͏ https://trac.ffmpeg.org/ticket/11182#comment:22
Okay, yes, I can reproduce this