[FFmpeg-trac] #9085(avcodec:reopened): JPEG: YCCK too green

FFmpeg trac at avcodec.org
Sun Mar 21 19:52:12 EET 2021


#9085: JPEG: YCCK too green
------------------------------------+------------------------------------
             Reporter:  Balling     |                    Owner:
                 Type:  defect      |                   Status:  reopened
             Priority:  normal      |                Component:  avcodec
              Version:  git-master  |               Resolution:
             Keywords:  mjpeg cmyk  |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
------------------------------------+------------------------------------

Comment (by pdr0):

 You can apply those equations, but you'd still get wrong colors unless you
 convert the ICC profile CMYK to sRGB. That sample
 "Channel_digital_image_CMYK_color.jpg" has a CMYK ICC profile attached

 As a workaround , you can pipe imagemagick to to ffmpeg (or ffplay) , and
 get close results to photoshop's CMYK to sRGB conversion. There are slight
 differences in the conversion, slightly different sRGB icc profiles you
 could use. For example, you could use sRGB2014.icc vs.
 sRGB_v4_ICC_preference.icc vs. sRGB_ICC_v4_Appearance.icc, etc...

 IM can read image sequences, but I believe it's memory bound when piped -
 entire sequence must fit in RAM (or at least it used to be , not sure if
 newer versions are any different), but it works. Or use batch conversion
 to individual sRGB png sequence first

 eg. img_000.jpg, img_001.jpg,...img_010.jpg

 convert.exe "img_%03d.jpg[0-10]" -profile "USWebCoatedSWOP.icc" -profile
 "sRGB2014.icc" rgb:- | ffmpeg -f rawvideo -s 500x333 -pix_fmt rgb24 -r 15
 -i - -c:v utvideo -an outsequence.avi

 I don't see any workarounds within ffmpeg only , and I don't see color
 management coming to ffmpeg any time soon

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


More information about the FFmpeg-trac mailing list