[Spice-devel] [spice-devel]How to reduce the image resolution or definition ?

David Jaša djasa at redhat.com
Tue May 3 14:52:44 UTC 2016


Hi,

This code comment suggests that during streaming, JPG quality adjustment
takes place:

/*
 * Adjusting the stream jpeg quality and frame rate (fps):
 * When during_quality_eval=TRUE, we compress different frames with different
 * jpeg quality. By considering (1) the resulting compression ratio, and (2) the available
 * bit rate, we evaluate the max frame frequency for the stream with the given quality,
 * and we choose the highest quality that will allow a reasonable frame rate.
 * during_quality_eval is set for new streams and can also be set any time we want
 * to re-evaluate the stream parameters (e.g., when the bit rate and/or
 * compressed frame size significantly change).
 */
- taken from https://cgit.freedesktop.org/spice/spice/tree/server/mjpeg-encoder.c#n122

That should do pretty much exactly what you want - adjust stream
bandwidth to available network throughput, albeit by using jpeg quality
instead of downscaling. That's better approach IMO as b/w savings can be
as big as with downscaling but CPU load will be significantly lower.

Regards,

David


On Út, 2016-04-12 at 17:18 +0800, hongzhen_luo at sina.com wrote:
>  Hello  
> 
> 
>        Could you tell  me how to reduce the image resolution or
> definition ?
> 
>        I plan to reduce the image definition so that  decrease data
> transmission from server to client .
> 
>        For example ,I assume if I have a low bandwidth in my network
> environment,but it's stable , I want to reduce the image definition
> to ensure a small quantity of data were sent  between the server and
> client  ,for the client can be worked normally (such as basic
> operation).
> 
> 
>       But I don't know how to modify and control it (which functions
> or attributes),  if you know that ,please help  me . Thank you very
> much ...
> 
> Best Regards 
> 
> 
> 
> 
>  
> 
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel




More information about the Spice-devel mailing list