[FFmpeg-trac] #9167(undetermined:closed): Color changed when an image converting to video

FFmpeg trac at avcodec.org
Wed Mar 31 07:03:08 EEST 2021


#9167: Color changed when an image converting to video
-------------------------------------+-------------------------------------
             Reporter:  kvsico       |                    Owner:
                 Type:  defect       |                   Status:  closed
             Priority:  normal       |                Component:
                                     |  undetermined
              Version:  unspecified  |               Resolution:  invalid
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by pdr0):

 Replying to [comment:21 kvsico]:

 >
 > After using libx264rgb, I have another problem: Chorome can't play the
 video file libx264rgb.mp4, it shows a black video, here is my cmd:
 >
 > ffmpeg -y -t 4 -loop 1 -i 1.png -c:v libx264rgb libx264rgb.mp4.
 >



 If it's for chrome, chrome does not have a 10bit pipeline yet either, so
 there is no benefit

 You would have to either use Balling's suggestion , or use a "normal" 709
 conversion for AVC.  Eitherway, if you test a bunch of colors, they will
 be off slightly from expected rounding errors during the 8bit
 RGB=>YUV=>RGB round trip


 "normal" 709
 ffmpeg -y -t 4 -loop 1 -i 1.png -vf out_color_matrix=bt709 -x264opts
 colormatrix=bt709 709.mp4

 Balling's suggestion
 ffmpeg -y -t 4 -loop 1 -i 1.png -color_primaries bt709 -color_trc
 iec61966_2_1 -colorspace smpte170m 2.mp4

 You might be able to use VP9 in RGB mode, not sure if chrome supports it,
 I'll check later

--
Ticket URL: <https://trac.ffmpeg.org/ticket/9167#comment:22>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list