[FFmpeg-user] Trying to get lossless PNG -> VP9 (yuv) -> PNG

Kirk Liberty kirk.liberty at gmail.com
Sun Jul 29 01:16:06 EEST 2018

I'm experimenting with using video codecs for compressing still images
to reduce the size of my personal database. I'm usoing 24 bit PNGs as
the source files and everything is fine using rgb video codecs but I'm
having trouble getting yuv codecs to work. My plan is to use the YCgCo
colorspace to get lossless conversion of rgb->yuv->rgb; but my images
are coming out faded.

The commands I ran:
ffmpeg -i Ash.png -c:v  libvpx-vp9 -lossless 1 -colorspace ycgco
-color_range pc -pix_fmt yuv444p ash.ivf
ffmpeg -i ash.ivf ash.ivf.png

I've also tried it with x264 (same result):
ffmpeg -i Ash.png -c:v  libx264 -crf 0 -colorspace ycgco -color_range
pc -pix_fmt yuv444p

Uploaded files:
Ash.png         http://0x0.st/sWsV.png
ash.ivf         http://0x0.st/sWsy.ivf
ash.ivf.png     http://0x0.st/sWst.png

More information about the ffmpeg-user mailing list