ffmpeg png optimization like libpngquant? The png codec in ffmpeg can result large pngs in certain cases. I know pngs are supposed to be non-lossy but there are libraries such as libpngquant that difference between the pixel and the value predicted by the average filter. 

Ffmpeg doesn't seem to support these libraries. It will be great if it could. Does anyone know if this is planned? How easy is it to port libpngquant over to ffmpeg's png encoder?
I'm not aware of anyone working on this.

Is this the library you're referring to - https://pngquant.org/lib/?

This appears to generate a palette and then perform the usual PNG encoding upon the palettized image. If so, this can already be reproduced in FFmpeg.

ffmpeg -i image -filter_complex palettegen[pal];[0][pal]paletteuse,format=pal8 out.png


See docs for paletteuse for dithering options.



If the specific algorithm were to be added to FFmpeg, it would be as a libav filter, not as changes to the PNG encoder. Although given existing functionality, most acceptable way forward is to improve the palettegen/use filters if their quality isn't acceptable.