You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@guacamole.apache.org by Andras Sali <sa...@gmail.com> on 2021/01/06 15:43:27 UTC

Re: WebP Lossless instead of PNG?

In case someone follows this mailing list but not the github repository, I
have experimented with WebP lossless and seem to be getting good results
(our use-case is when the latency between gateway and remote desktop server
is low and bottleneck appears to be compression speed of PNG).

If there are interested parties in trying the modified configuration, there
is a simple (non-production, testing only) setup that can be tried in this
PR:

https://github.com/apache/guacamole-server/pull/322

Would be happy to get feedback how it works for others as well.


András


On Fri, Aug 7, 2020 at 6:01 PM Andras Sali <sa...@gmail.com> wrote:

> Many thanks for this insight Mike!
>
> Best,
>
> András
>
>
> On Fri, Aug 7, 2020 at 5:26 PM Mike Jumper <mj...@apache.org> wrote:
>
>> On Fri, Aug 7, 2020, 06:30 Andras Sali <sa...@gmail.com> wrote:
>>
>> > Hi Nick,
>> >
>> > Yes, thanks, I am aware that guacd already can use WebP if it's
>> available.
>> > However if I see correctly, it is only used for **lossy compression** -
>> the
>> > lossless flag is set to 0 (
>> >
>> >
>> https://github.com/apache/guacamole-server/blob/master/src/common/surface.c#L1794
>> > ).
>> >
>> > WebP also supports lossless compression using a separate algorithm (
>> >
>> >
>> https://developers.google.com/speed/webp/docs/webp_lossless_bitstream_specification
>> > ),
>> > which would be a direct alternative for PNG updates. In the benchmark I
>> > linked in my previous email, lossless webP encoding can be faster and
>> more
>> > efficient for many types of images than PNG (question if this is also
>> the
>> > case for screen updates).
>> >
>> > So I understand that guacd already intelligently switches between PNG /
>> > WebP Lossy depending on different metrics, however my question is
>> regarding
>> > using WebP Lossless instead of PNG. In this case the switching would be
>> > between WebP Lossless and / WebP Lossy depending on the metrics.
>> >
>> > Has this already been tried and discarded for some reason?
>> >
>>
>> Yes, waaayyy back when WebP support was first finding its way into
>> Guacamole, prior to the project moving to the ASF. There were mixed
>> results
>> in our own testing, showing that WebP would often compress worse and
>> slower
>> than PNG, resulting in increased latency and bandwidth usage.
>>
>> There was also a mysterious issue where libwebp would effectively ignore
>> the lossless quality setting and produce lossy images. By now, this may no
>> longer be a problem, however I suspect the negative performance
>> characteristics relative to PNG will still be there.
>>
>> If you would like to give it a try, by all means see whether things do
>> improve, however the answer to your question is "yes, lossless WebP was
>> investigated and ultimately rejected due to poor performance
>> characteristics compared to PNG."
>>
>> - Mike
>>
>