Created Video Rendering Options (markdown)

Kasm 2021-02-15 13:20:56 -05:00
parent a77989129c
commit 79f0cc00fe

@ -0,0 +1,57 @@
# Summary
KasmVNC works well with defaults, however, there are a lot of controls that have been added over time that provide a fine grain level of control of how KasmVNC renders the screen under different conditions.
## How To Set Rendering Options
There are two ways to control rendering options. You can pass them as arguments to vncserver when starting the service. This is similar to option VNC flavors, but KasmVNC has more capabilities and thus more optional arguments. The arguments covered in this page should be at the end of the vncserver command, as shown in this example.
`vncserver $DISPLAY -depth 24 -geometry 1200x900 -FrameRate=30 -websocketPort 8443 -cert $HOME/.vnc/self.pem -sslOnly -interface 0.0.0.0 **[OPTIONS]**`
The other option is to pass the options in when connecting to KasmVNC. KasmVNC has added the ability for the client to dynamically control options on connection. Most rendering options can be set dynamically by the client. Not all options have been exposed yet in the KasmVNC web interface, but the code is there for all these options to be set by the client.
## Dynamic image quality
-DynamicQualityMin [0-9] (default 7)
The minimum quality setting for JPEG/WEBP encoding. Rendering will automatically degrade JPEG quality when there is a lot of motion in a particular block. This setting controls the minimum quality to use when there is a high degree of change. The accepted values are 0-9 where 0 is low and 9 is high.
-DynamicQualityMax [0-9] (default 8)
The maximum quality setting for JPEG/WEBP encoding. Rendering will automatically degrade JPEG quality when there is a lot of motion in a particular block. This setting controls the maximum quality to use when there is no or little motion. The accepted values are 0-9 where 0 is low and 9 is high.
-TreatLossLess [0-10] (default 10)
Treat lossy JPEG/WEBP image blocks at this quality level or higher as lossless. By default, KasmVNC will send periodic lossy full frame updates. This allows overriding this behavior by not setting lossy updates no a block by block basis depending on the quality of the last update.
-PreferBandwidth
Prefer bandwidth over quality. Sets various options for lower bandwidth use. This is off by default. This is a shortcut to adjust a number of options with a single flag. The settings used by this option are chosen by the KasmVNC team to set the best values for good bandwidth saving options without compromising the quality too much. Other settings can still be overridden.
-RecThreads [0-?] (default 0)
Use this many threads to compress rects in parallel. Default is 0, which automatically sets threads to match the core count.
## Video Mode
KasmVNC detects full screen video by looking for high rates of change on at least a certain percentage of the screen. Once switched to video mode, KasmVNC will drop back down to normal mode after the change threshold drops below that threshold for a certain period of time. These times and thresholds are all tunable with smart thresholds. Once in Video Mode, KasmVNC scales the resolution down server side, then scales the updates back up on the client side. For example, if the native resolution of the client is 4k, KasmVNC will send 4k until it goes into Video Mode. Once in Video Mode KasmVNC will scale the updates down to the resolution set by MaxVideoResolution, if that is lower than the client's native resolution. Scaling was chosen as the primary way to decrease bandwidth and increase frame rate. The KasmVNC development team tried numerous combinations of settings and methods and found that scaling the images down but keeping the JPEG/WEBP quality high provided the best quality while decreasing bandwidth utilization.
-JpegVideoQuality [0-9] (default -1)
The JPEG quality to use when in video mode. The accepted values are 0-9 where 0 is low and 9 is high. A value of -1, default, keeps the quality level used in normal mode.
-WebpVideoQuality [0-9] (default -1)
The WEBP quality to use when in video mode. The accepted values are 0-9 where 0 is low and 9 is high. A value of -1, default, keeps the quality level used in normal mode.
-MaxVideoResolution [resolution] (default "1920x1080")
When in Video Mode, downscale the screen to this maximum size. Keeps aspect ratio with client's actual resolution.
-VideoTime [seconds] (default 5)
Number of seconds that a high rate of change most occur before switching to video mode. Setting to 0 forces Video Mode at all times.
-VideoOutTime [seconds] (default 3)
When in Video Mode, high rates of change must subside for this many seconds before dropping out of video mode.
-VideoArea [percent] (default 45)
The percent of the screen that must be seeing high rates of change to meet the threshold of Video Mode. This percentage of the screen must see rapid changes for the amount of time specified by VideoTime.
-PrintVideoArea
Print the detected video area % value. This is useful when trying to tune your settings for your particular use case.
-VideoScaling [0-2] (default 2)
The scaling method to use in video mode. 0 = nearest, 1 = bilinear, 2 = progressive bilinear