[FFmpeg-user] Reducing image2pipe png decoder latency

Maxim Khitrov max at mxcrypt.com
Thu Dec 12 15:04:29 EET 2019


On Thu, Dec 12, 2019 at 1:42 AM Ted Park <kumowoon1025 at gmail.com> wrote:
>
> Are you able to make it so the image generator program doesn’t compress the images beforehand? I think avoiding format conversions and avoiding any alpha channel would be faster, maybe what you want as the end result can be approximated without it is possible without it.

The generator program is just for testing. The production version has
to transport these images over the network first, so compression is
important.

Losing the alpha channel is not ideal. I can do that by encoding both
images to JPG and blending the two together, but the top image is
mostly blank, so that just results in a dark background. Send the
background, overlay, and a separate grayscale alpha mask for the
overlay, all as JPGs, is another option, but that increases image
encoding time and bandwidth requirements.

Also, it looks like I made a mistake when testing PNG-only stream. I'm
now seeing the same 10+ frame latency with a single PNG input as with
JPG background and PNG overlay, which actually makes me feel a little
better since that eliminates the filter graph as the source of the
delay (unless it's the RGB -> YUV conversion?). I think it has to be
the PNG decoder.

-Max


More information about the ffmpeg-user mailing list