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? Many thanks, Andras AndrĂ¡s On Fri, Aug 7, 2020 at 2:59 PM Nick Couchman <[email protected]> wrote: > On Thu, Aug 6, 2020 at 8:57 AM Andras Sali <[email protected]> wrote: > > > Hi, > > > > Has the use of a lossless version of WebP encoding been investigated > > instead of PNG? > > > > According to the below benchmark (not sure how up-to-date), with a fairly > > low compression setting (q=0, m=1) webp still needs on average less > bytes / > > pixel than PNG reference (Table 1), whilst being x2 faster for encoding > > (Table 2): > > > > https://developers.google.com/speed/webp/docs/webp_lossless_alpha_study > > > > In general Guacamole performance is quite good, but when starting to > scroll > > it can lag substantially more than a direct RDP connection (even if the > RDP > > server is on the same host as guacamole server) - before the lossy WebP > > kicks in. I would be curious if trying to use WebP consistently (also for > > lossless, not just for high-framerate lossy setup) might improve somewhat > > the responsiveness. > > > > Has anyone investigated this, or does this sound like a bad idea? > > > > > So, first, guacamole-server (guacd) already supports the use of WebP if the > correct libraries are installed at compile time. Beyond this, guacd uses a > variety of metrics to determine the best image format to use for sending > images to the remote system, based on the available libraries on the system > running guacd as well as the available image format support sent by the > client. Once the list of supported formats is negotiated between client > and server, guacd makes decisions on which format to use based on how much > of the screen is being updated, resource utilization on the server, and > network link characteristics. > > There is no support for setting the image format to a specific format for > the guacd instance. The only way to accomplish this would be to tweak the > the client such that it only sends a certain image format as its supported > format, which would require tweaking the client-side code. > > -Nick >
