[FFmpeg-trac] #9132(ffmpeg:open): Wrong pixel format/output when converting video to yuv444p*
FFmpeg
trac at avcodec.org
Thu Mar 25 01:17:51 EET 2021
#9132: Wrong pixel format/output when converting video to yuv444p*
------------------------------------+----------------------------------
Reporter: viley | Owner:
Type: defect | Status: open
Priority: important | Component: ffmpeg
Version: git-master | Resolution:
Keywords: regression | Blocked By:
Blocking: | Reproduced by developer: 1
Analyzed by developer: 0 |
------------------------------------+----------------------------------
Comment (by JEEB):
Replying to [comment:8 Balling]:
> Replying to [comment:7 JEEB]:
> > Alright, this seems to be an issue in the scale filter not overriding
color metadata properly in case of a pixel format conversion :) Thus the
issue itself is much older, but it just never popped up until my change
started passing the information further.
>
> Or maybe because by default it uses libx264 and not -c:v libx264rgb?
I am not sure what that is a reference to? The encoder selection (and thus
which `pix_fmt` is selected by default as the output of the video filter
chain) is outside the scope of both:
1. my changes to ffmpeg.c (to actually pass on information provided by the
filter chain onwards), as well as
2. the issue identified in the `scale` video filter in this ticket.
Or would you say that f.ex. RGB→YCbCr conversion should still preserve the
color space value of `gbr` in the output AVFrame? :) (which is only there
due to there being a `av_frame_copy_props` call, which copies all the
metadata from the input AVFrame - which is not filtered afterwards
depending on whether it was just a scale job, or if the pix_fmt was
changed, etc etc)
To fix the `scale` filter bug there needs to be some logic added to not
pass on input metadata as-is in case of a conversion that would nullify
it, such as conversion from YCbCr to RGB or vice versa.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/9132#comment:9>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list