Opened 2 years ago
Closed 2 years ago
#9682 closed defect (duplicate)
vf_subtitles: color is displayed wrong (drawutils doesn't take into account bt709?)
Reported by: | Gregory Beauregard | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | git-master | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug: ffmpeg subtitles filter renders the wrong color. I think this is due to ff_draw_color
in drawutils.c not taking into account bt709 color space when converting from RGB. I've attached a sample with ASS subtitles where the color subtitle color is matched to a video element and the pink color in the subtitles matches perfect in mpv, but mismatches when encoded with ffmpeg subtitles filter.
How to reproduce:
ffmpeg -report -i bad_fontcolor.mkv -vf subtitles=bad_fontcolor.mkv -c:v libx264 -b:v 3M -sn out.mkv
Version used is ffmpeg master built on march 7, 2022. Sample and full log report is attached.
and https://github.com/FFmpeg/FFmpeg/blob/13a153d801011c4ec82b90af1351e10dcf1754e1/libavfilter/drawutils.c#L141-L182 where it doesn't seem to take into account bt709 when converting the color from RGB. If this is indeed the problem there are filters other than vf_subtitles that are in principle affected by this.
Attachments (2)
Change History (3)
by , 2 years ago
Attachment: | bad_fontcolor.mkv added |
---|
comment:1 by , 2 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
duplicate of https://trac.ffmpeg.org/ticket/9491
sample