Knowledge Base
Searching in : Article
ID: AR01M00832
Applies to: NoMachine Software
Added on: 2015-01-30
Last Update: 2019-04-05

Finding the most suitable configuration for multimedia playing in virtual desktops

NoMachine connections to virtual desktops on Linux can use two different methods to compress and send data traffic. The default one is the X11 vector graphics mode (previously known as “lightweight” mode) which doesn't use video streaming techniques that usually require a larger bandwidth and a more powerful HW on both client and server to perform video encoding/decoding operations.

To enhance the multimedia experience, especially when the connection is over the internet, it's suggested to disable the X11 vector graphics mode as explained here:

https://www.nomachine.com/AR02L00779

When the X11 vector graphics mode is disabled, NoMachine uses a combination of video and image encoding based on standard codecs and a number of techniques developed by NoMachine. Frames are encoded into a video stream optimized by means of a compression and decompression algorithm of real-time image and audio data respectively. VP8, H.264 and MJPEG encoding are supported.

In general VP8 and H.264 are suitable for all situations, while MJPEG can be an alternative when the end-user's computer is less powerful and the user is experiencing slow responsiveness. 

Display encoder can be changed on the server, either from the Performance panel in the 'Server preferences' area of the NoMachine User Interface or from the node configuration file (node.cfg) by setting the DisplayServerVideoCodec key.

In case of slow bandwidth, decreasing the quality level of images could help but if you need to have a perfect image without quality loss, you need to increase the display quality instead. It's also suggested to disable the multi-pass encoding to avoid the 'out of focus' effect: multi-pass is an encoding technique which uses multiple passes to reach progressively the best definition of the image.

Quality level and multi-pass encoding can be tuned from the NoMachine menu inside the session  in the Display -> Change settings panel. (Ctrl+alt+0 or click on the right upper corner of the window to open the NoMachine menu).

When connections are via the NX protocol and the X11 vector graphics mode is disabled, NoMachine uses UDP by default for transmitting video and audio streams. UDP is typically used for applications that need a fast and efficient transmission of data in real-time, such as games or VOIP and with a certain tolerance in case of data packet loss.

TCP grants that all data are transferred intact and arrive to the other end in the same order. UDP instead doesn't have an error-check mechanism and doesn't retransmit data in case of packet loss.  UDP has in general a faster speed transmission especially when the connection is over the internet. For connections over a LAN the difference could be not so relevant.

Only benchmark tests made in the specific environment where NoMachine is used can reveal if UDP helps to speed up performances since they are dependent from a great number of factors such as bandwidth, latency, jitter, packet loss and router capabilities.

UDP communication uses a port in the 4011-4999 range.  Such port must be open between client and server. If the port is not available traffic will fall back to TCP communication.

UDP can be disabled and enabled for each session from the NoMachine User Interface in the 'Advanced' connection settings for the NX protocol.