[FFmpeg-trac] #11541(avcodec:new): All NVENC encoders change bt709 color space to bt470bg when pixel format is not specified

FFmpeg trac at avcodec.org
Mon Apr 7 21:29:45 EEST 2025


#11541: All NVENC encoders change bt709 color space to bt470bg when pixel format is
not specified
-------------------------------------+-------------------------------------
             Reporter:  fmnijk       |                    Owner:  (none)
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:  avcodec
              Version:  git-master   |               Resolution:
             Keywords:  colorspace   |               Blocked By:
  NVENC scale                        |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Comment (by fmnijk):

 If it's not related to pixel format, why does the color space change when
 I add the pixel format parameter?

 To demonstrate:

 First command:
 ffmpeg -y -i input_%04d.exr -vf "scale=out_color_matrix=bt709" -c:v
 av1_nvenc output.mp4
 Result:
 "color_space": "bt470bg",  # Should be bt709

 Second command:
 ffmpeg -y -i input_%04d.exr -vf
 "scale=out_color_matrix=bt709,format=yuv420p" -c:v av1_nvenc output.mp4
 Result:
 "color_space": "bt709"

 The only difference is adding format=yuv420p to the filter chain, which
 fixes the issue. This strongly suggests there is a bug in how NVENC
 encoders handle color space when no format filter is explicitly specified.
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/11541#comment:5>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list