-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serverside - force quality settings #176
Comments
I tried with the standard config file under: while only changing: I can still set whatever I want when connecting from the client. |
@mmcclaskey |
In order to lock-in lossless, besides the options you've changed, you need to change UI lets you set anything, but it doesn't change stream quality settings you set in server config (with client overrides disabled). I'll cover WebRTC UDP later. |
Can you post the example config to represent lossless? |
@ledestin |
@ledestin hey there, it would be very nice if you could help me out as I don't get what to set. |
@ledestin I really cannot figure it out. |
@mmcclaskey maybe you can help? |
@ledestin @mmcclaskey @lyarwood @koying @lhchavez |
@ne0YT did you make any progress on this issue? |
@john-deng sadly not at all. You're trying the same? |
@ne0YT Yes, I am. Not only this issue, but a lot more. I think we may contribute to this project, and things will get much easier if we can get some help from Kasmtech, e.g. hold the community meeting to discuss key features and issues. @mmcclaskey |
This setting does not restrict everything. Current logging does not provide any feedback explicitly on what settings are applied or not applied when the client sends the changes. @clbr, could you please do the following
Initial testing does show that video mode is not altered by the client changing the Preset mode. When the preset is set to Extreme, it should disable video mode and that is not happening as expected. Once the above two items are addressed we can fully test that all settings that should be blocked are being blocked. Here is my /etc/kasmvnc/kasmvnc.yml file... runtime_configuration:
allow_client_to_override_kasm_server_settings: false
logging:
log_writer_name: all
log_dest: logfile
# 0 - minimal verbosity, 100 - most verbose
level: 100
encoding:
max_frame_rate: 60
full_frame_updates: none
rect_encoding_mode:
min_quality: 7
max_quality: 8
consider_lossless_quality: 10
rectangle_compress_threads: auto
video_encoding_mode:
jpeg_quality: -1
webp_quality: -1
max_resolution:
width: 1920
height: 1080
enter_video_encoding_mode:
time_threshold: 5
area_threshold: 45%
exit_video_encoding_mode:
time_threshold: 3
logging:
level: off
scaling_algorithm: progressive_bilinear |
We have an internal branch now that logs all client settings. Re the original question, for lossless you have to set the dynamic quality min and max to 9 in your server config. You may also need to disable the video mode and possibly some other settings. UDP you cannot force on, as it depends on client support. |
Hey there |
Sorry, I work on the server directly. I don't use vncserver or the config, I pass options directly to Xvnc on the command line, so I don't really know what the lossless yaml config would be. |
@mmcclaskey can you do this? :) |
@ne0YT , I am not sure what you are asking for. @clbr has created a feature branch that logs settings applied by the client, to include logging when settings from the client are ignored. This has not been merged to master yet, but the change is just logging, it still works exactly the same. I also have a branch on the docs that adds more detail on the yaml configuration allow_client_to_override_kasm_server_settings. The docs list which client settings are blocked when this is set to true. |
@mmcclaskey I don't need to enforce the settings but want to make it the standard if someone connects without setting anything to have the same settings as if he sets "lossless" as it works the best for my situation not only from quality but even from performance. so I want to figure out which settings represent this in kasmvnc.yml "for lossless you have to set the dynamic quality min and max to 9 in your server config. You may also need to disable the video mode and possibly some other settings" so is there a way for me to figure this out myself rn what else is needed? |
There is confusion on terminology. @clbr referred to lossless in reference to traditional VNC, which basically just increases the JPEG/webp quality level all the way up and disables dynamic quality. Normally, KasmVNC will vary the jpeg/webp compression quality based on how much motion is happing at any given time. By setting the quality to 9 and setting treatlossless to 9, you are effectively getting as close to lossless with traditional VNC as possible. Technically, it is not lossless because even a setting of 9 is lossy. See this for reference of Client preset settings https://www.kasmweb.com/kasmvnc/docs/latest/clientside.html#present-modes. The extreme mode is set here, which is close to traditional lossless https://github.com/kasmtech/noVNC/blob/68135beedd40c2654f2d41bba821165ddf0d09d7/app/ui.js#L2044 KasmVNC has a truly lossless mode that uses QOI image format rather than JPEG. It is truly lossless but takes up a lot more bandwidth and is more suited to local LAN. This is in the client pre defined modes, see link above for that. Here is the client side code that sets that mode To do what you want, you will need to modify the front end so that it defaults to either extreme or lossless. Because there is no way to do what you want with only server side settings. Because the client always sends the settings it wants, so the server either needs to take the client settings or ignore them. All the client settings are stored in local storage, so you may be able to get away with just setting values in local storage, just open up dev tools and look at local storage values. Play with the control panel and you will see them change. |
@mmcclaskey do you have an idea where / how to inject a simple .js to do this wihtout changing the code, os I cna still update KASM normally? |
Sorry, I can't assist in developing your project, but I am happy to see others adapt KasmVNC for their unique requirements. The following configuration would force near lossless and keep the client from changing it. runtime_configuration:
allow_client_to_override_kasm_server_settings: false
logging:
log_writer_name: all
log_dest: logfile
# 0 - minimal verbosity, 100 - most verbose
level: 100
encoding:
max_frame_rate: 60
full_frame_updates: none
rect_encoding_mode:
min_quality: 9
max_quality: 9
consider_lossless_quality: 9
rectangle_compress_threads: auto
video_encoding_mode:
jpeg_quality: 9
webp_quality: 9
max_resolution:
width: 1920
height: 1080
enter_video_encoding_mode:
time_threshold: 100
area_threshold: 100%
exit_video_encoding_mode:
time_threshold: 3
logging:
level: off
scaling_algorithm: progressive_bilinear |
@mmcclaskey thank you very much for the configs :) |
Is your feature request related to a problem? Please describe.
I want to forcefully enable "lossless" as the quality mode and enable "webrtc_udp "
Describe the solution you'd like
It would be great to be able to just pass this as a variable to the vncserver- command.
The text was updated successfully, but these errors were encountered: