- Citrix Workspace Vdi
- Citrix Workspace Vs Vdi
- Citrix Workspace Vdi Login
- Citrix Workspace Vdi Client
- Citrix Vdi Vs Vda
- Citrix Workspace Vdi Black Screen
- Census Vdi Citrix
List of topics
1. Background
2. HDX Realtime Webcam Video Compression
3. HDX Generic USB Redirection
4. Default Behavior
5. Webcam compatibility
6. Known Issues
7. Advanced Configuration
8. Troubleshooting
1. Background
Webcams can be used by applications running within the Citrix Virtual Apps and Desktops session either by HDX RealTime Webcam Video Compression or by using HDX Generic USB Redirection technology. Users can choose between the two based on their specific requirements. HDX RealTime Webcam Video Compression is generally recommended since it offers superior bandwidth efficiency.
Important Note: Webcam Video Compression is a feature implemented both in CWA and VDA. Hence, the version combination is critical to determine the resultant set of supported features.
Only the following Citrix Receiver / Workspace app OS and versions support optimized Webcam Video Compression:
Platform | Version | Comments |
Workspace app for Windows | Any | Both 32 and 64-bit apps in the VDA as long as the VDA is 7.17 or higher, otherwise only 32-bit |
Receiver for Windows | 4.9 (any CU) | Only 32-bit apps in the VDA |
Workspace app for MAC | Any | Both 32 and 64-bit apps in the VDA as long as the CWA is 2006 or higher and the VDA is 7.17 or higher, otherwise only 32-bit |
Workspace app for Linux | Any | Only for 32-bit apps in the VDA |
Workspace app for Chrome | Any | Some ARM Chromebooks don't support H.264 encoding - in that case, only 32-bit apps in the VDA can use the optimized HDX RealTime Webcam Video Compression |
HDX Webcam redirection and Citrix Hooks:
It is important to understand that Windows Server VDAs and Workstation VDAs have different approaches to HDX RealTime Webcam redirection.
In Windows 10 VDAs, you need to explicitly whitelist your application name (e.g. Zoom.exe) in the registry HKLMSOFTWARECitrixCtxHookAppInit_DllsCtxMFPlugin
See Section 8.5 below.
If you don't, HDX will leverage DirectShow which is the legacy multimedia framework in that Windows OS version. When DirecShow is used, some webcam functionality might be lost (like being able to toggle between front and rear webcams).
In Windows Server VDAs, you don't need to whitelist the app name. HDX will use Media Foundation by default, the latest multimedia framework in that Windows OS versions.
In some scenarios, if you can't redirect your webcam still, you can remove all hooking to the application (e.g. Zoom.exe) by using the 'UviProcessExcludes' registry key with the value set to the application (e.g. badapp1.exe). See CTX107825 for guidance.
2. HDX RealTime Webcam Video Compression
With HDX RealTime Webcam Video Compression, the video data is captured on the user device; it is then compressed and sent to the XenApp/XenDesktop session. Installation of the device drivers for the webcam is not required on the Virtual Delivery Agent (VDA). Device drivers are only required on the client device. It is recommended that the latest drivers are obtained directly from the webcam manufacturer’s website.
Sometimes, default drivers are installed when the device is first plugged in, but these drivers might be old and not offer the video color space that the client’s codec is looking for, which might lead to higher CPU consumption on the user device as a result of color space conversion.
Note: 64-bit Application support for HDX RealTime Webcam Video Compression requires XenApp / XenDesktop 7.17 or later, and also Receiver for Windows 4.11 or later
Further information regarding configuration of HDX RealTime Webcam Video Compression is available on the Citrix documentation site - see HDX video conferencing and webcam video compression.
3. HDX Generic USB Redirection
With HDX Generic USB Redirection technology, the webcam is virtually detached from the client device and attached to the XenApp/XenDesktop session. This provides all the native functionalities of the webcam in the XenApp/XenDesktop session. HDX Generic USB Redirection requires the device drivers for the webcam to be available on both the client device as well as on the VDA.
Bandwidth usage for webcams using HDX Generic USB Redirection technology can vary based on the vendor and model of the device, but it is significantly higher compared to use it over HDX RealTime Webcam Video Compression. HDX Generic USB for webcams is recommended to be used only under LAN conditions where bandwidth and latency are not constraints.
Refer the following link regarding more information on HDX Generic USB Redirection configuration:
Configure USB Support.
4. Default Behavior
By default, webcams use HDX RealTime Webcam Video Compression technology. However, end users can override the default behavior and explicitly choose to use HDX Generic USB Redirection from the Desktop Viewer preferences tab of Citrix Workspace app, if the administrator has enabled remoting of USB devices through policies.
Important note on Integrated Webcams (e.g. Surface devices) : Integrated webcams are generally not detected as USB devices in Device Manager on the Client, but rather under System devices.
If you go to Device Manager on the Client, then View->Sort by Connection, see if your cameras show up under a USB Hub device. If they do, then they should appear on Desktop Viewer.
4.1 Whether to use Webcam Video Compression or Generic USB Redirection
HDX RealTime Webcam Video Compression is the default and preferred way of using webcams with XenApp/XenDesktop, except when an “optimized” solution is available such as the HDX RealTime Optimization Pack for Microsoft Skype for Business and Lync. HDX RealTime Webcam Video Compression uses significantly less bandwidth compared to HDX Generic USB Redirection and works well over WAN connections.
HDX Generic USB is recommended only when there are application compatibility issues with HDX RealTime Webcam Video Compression or when advanced native functionalities of the webcam such as auto-focus are required. For better performance, Citrix recommends a XenDesktop VDA to have at least two virtual CPUs.
4.2 Configuring HDX RealTime Webcam Video Compression
HDX RealTime Webcam Video Compression feature is available on XenDesktop 5.0 and later versions with Online Plug-in for Windows version 12.0 and later version or Receiver for Linux 12.0 and later version. It is also supported on Mac and Chrome Receivers.
With Workspace app for Linux, it has to be explicitly enabled. Refer the following link regarding information on how to configure this - Citrix Documentation - Optimize.
HDX RealTime Webcam Video Compression is enabled by default on the VDA and on the Windows client and no additional configurations are required.
Policies
HDX webcam video compression requires that the following machine policy settings are enabled (all are enabled by default).
- Multimedia conferencing
- Windows Media Redirection
4.3 Dependency on Windows Media Redirection
HDX RealTime Webcam Video Compression uses the same underlying technology as Windows Media Redirection. Enable Windows Media Redirection in Studio for HDX RealTime Webcam Video Compression to be functional. If Windows Media Redirection is disabled, HDX RealTime Webcam Video Compression will not work.
4.4 Application Compatibility
HDX RealTime Webcam Video Compression is compatible with most unified communications clients. The feature has been tested for compatibility with the following applications:
- Cisco Webex Meetings and Webex Teams
- GoToMeeting
- Google Hangouts and Meet
- Microsoft Teams
- Microsoft Skype for Business 2015, 2016 and 2019
- Microsoft Skype 7 or higher
- IBM Sametime
- Adobe Connect
- Media Foundation-based video applications on W8.x or higher and WS2012 R2 and higher (see section 8.5)
Note: 64-bit Application support requires XenApp / XenDesktop 7.17 or later, and also Receiver for Windows 4.11 or later, and Receiver for Chrome.
The 7.17 VDAs and 4.11 Receiver for Windows (or higher versions of both) now include both 64-bit and 32-bit H.264 compression encoder/decoders. This means customers using 64-bit video conferencing hosted applications, such as Skype for Business x64, Google Chrome browser, and Google Hangouts, are now supported. Note that these 64-bit video conferencing apps must support H.264 for this feature to work.
Some ARM Chromebooks don't support H.264 encoding - in that case, only 32-bit apps in the VDA can use the optimized HDX RealTime Webcam Video Compression.
5. Webcam Compatibility
HDX RealTime Webcam Video Compression is not directly dependent on specific models of webcams. Any webcam that is DirectShow compatible (including integrated ones) can be used with HDX RealTime Webcam Video Compression. Most Windows Driver Model (WDM) compatible webcams can be used. However, webcam bandwidth consumption can vary from webcam to webcam. Different webcams offer different frame rates and have different levels of brightness and contrast. Citrix used the following webcams for initial feature validation:
- Microsoft LifeCam VX models (2000, 3000, 5000, 7000)
- Creative LIVE! CAM Optia Pro
- Logitech QuickCam Messenger
- Logitech C600, C920
- HP Deluxe Webcam
Adjusting the contrast of the webcam can reduce upstream traffic significantly. This can be accomplished if the webcam ships with a system tray utility that runs on the user device.
6. Known Issues
Caution! Refer to the Disclaimer at the end of this article before using Registry Editor.
If Citrix GoToMeeting with HDFaces or Skype for Business (either hosted or when in fallback mode with RTOP) does not recognize the webcam of the user, edit the system registry.
For 32-bit devices, access HKEY_CLASSES_ROOTCLSID{860BB310-5D01-11d0-BD3B-00A0C911CE86}InstanceCitrix HDX Web Camera.
For 64-bit devices, access HKEY_CLASSES_ROOTWow6432NodeCLSID{860BB310-5D01-11d0-BD3B-00A0C911CE86}InstanceCitrix HDX Web Camera.
Add a string value named DevicePath.
Set REG_SZ as the data type and Citrix Client as the value [Reference 263277].HDX RealTime Webcam Video Compression does not automatically reconnect if the session connection is interrupted mid-conference. The user must restart the video conference [Reference 233296].
- On XenApp 7.17 or older (Windows Server VDA) with Receiver for Windows 4.11 or older, only one webcam can be used with HDX RealTime Webcam Video Compression at a time; if the client device has multiple webcams configured, only the first one successfully detected is used in the XenApp session.
- XenApp 7.18 and Receiver for Windows 4.12 added support for multiple webcams when connecting to Windows Server VDAs. Applications dynamically detect a webcam being plugged in or removed on the client. Users don't have to restart the application to detect these changes.
- On XenDesktop (VDI), multiple webcams are supported, along with client-side webcam switching.
- Linux Receiver / Workspace app does not support multiple webcam enumeration when the VDA is a Windows Server. Only the default camera is enumerated.
- In XenApp 7.18 or higher, actual webcam names are displayed instead of the generic Citrix HDX Camera (which is the way they are still displayed in 7.15 LTSR, for example).
Citrix Workspace Vdi
Double Hops:
- Xenapp 7.15 LTSR and double hops - [internal ref. LD1143] when installing Citrix Receiver 4.10 or higher, or any version of Citrix Workspace app in the VDA, webcam functionality will break if H264 encoding is used. Only Citrix Receiver for Windows 4.9 LTSR can be installed in a 7.15 VDAs for H264 encoding. This is because both Receiver/Workspace app and the VDA rely on (and are packed with) the same codec library (CtxVideoCodec.dll), and installing Receiver/Workspace app in the VDA will overwrite the dll of the 7.15 VDA with a newer version. As a work-around (if you must install 4.10+ or Workspace app in the VDA), you can try to disable H.264 encoding, and enable Theora using the following registry setting (on the client or on the VDA)
DWORD EnableDeepcompress_Client – set it to 0 to disable H.264 encoding (and use Theora instead). By default HDX always prefer H.264. Set it to 1 to go back to H264 default behavior.
ii. If you want to disable H264 on the VDA side instead, it is also possible by setting:
HKLMSoftware Wow6432NodeCitrixHDXRealTime
DWORD EnableDeepcompress_Server – set it to 0 to disable H.264 support.
Please note that when H.264 is disabled, the webcam resolution must be integral multiple of 16. So, 1920*1080 is not supported. User can use other resolution like 1280*720, so apply the defaultwidth and defaultheight regkeys described in 7.1
HDX RealTime Webcam Video Compression supports ICA double-hop for webcams.
7. Advanced Configuration
High Definition
In XenDesktop 7.16 and XenApp 7.18 VDAs (with Receiver for Windows 4.10 or higher) support was added for native resolutions beyond 352x288 (CIF).
This enhancement allows high-def webcam native resolutions for virtual sessions, up to 1080p.
Citrix Receiver now queries the webcams on the client for their list of supported capabilities (media type information and resolutions). Then, the HDX PnP virtual channel is used to send this information to the VDA. Server will then offer this list to the hosted application trying to use the webcam.
Media types that aren’t supported will be filtered out and not offered to the application.
At the moment, HDX supports the RGB formats, YUV420 formats and YUY2 packed formats.
Application running on the VDA picks the desired media type and resolution from the list that was offered.
(If for some reason this media type negotiation fails, HDX falls back to our legacy way of webcam redirection, which is to use hard coded 352x288 CIF resolution).
The selected media type and resolution is then sent to the client and the webcam uses that to start the webcam feed.
The existing registries keys on the client to control the resolution will be honored, and this mechanism can be utilized to enforce a given resolution (see section 7.1 below).
If Bandwidth consumption is a concern, High Definition can be disabled by applying the following registry key (either on the VDA or Client):
On the VDA | Or on the Client/Workspace App |
HKLMSoftwareCitrixHDXRealTime Name: Enable_HighDefWebcam Type: REG_DWORD Data: 0 = Disable the high definition webcam streaming | HKCUSoftwareCitrixHDXRealTime Name: Disable_HighDefWebcam Type: REG_DWORD Data: 1 = Disable the high definition webcam streaming |
7.1 Resolution
As of XenApp 7.18 and XenDesktop 7.17 (with Receiver for Windows 4.10 or higher), all supported resolutions by the webcam are presented to the hosted app trying to access it, so it can pick the desired resolution.
By default, Citrix Receiver for Windows 4.10 or older and non-Windows Receivers use CIF resolution (352 x 288) to stream webcam video to the XenApp/XenDesktop host.
A scaling function allows applications to request resolutions other than the default. The CIF frames are scaled appropriately on the VDA before delivering them to the application.
To manually adjust (and force) the webcam video resolution, create (on the Client) under HKEY_CURRENT_USERSoftwareCitrixHDXRealTime two DWORD values named
- DefaultWidth
- DefaultHeight
The resolution directly affects the bandwidth consumed and the overall quality of the video.
Some Webcams (specially integrated) might not support CIF, and Webcam detection might fail on an older VDA (like 7.15 LTSR).
Editing the Registry for a known supported resolution (like 640 x 480 or 1280 x 720) might fix the issue.
Note that the higher the resolution, the higher the bandwidth consumption between Workspace app and the VDA.
Try a lower known supported resolution (e.g. 480p) to avoid high network traffic.
You can find this by launching the Camera app in Windows 10 and clicking on Settings:
Client-side registry:
7.2 Frame Rate
The preferred video frame rate can be adjusted by creating (on the Client) a DWORD (32-bit) value named FramesPerSecond under HKEY_CURRENT_USERSoftwareCitrixHDXRealTime. Because it is possible to input a value that the webcam does not support (e.g 31 FPS), the actual frame rate might be different as seen by the hosted application (e.g. 10 FPS). When this key is not present, a default value of 15 frames per second is selected. The actual frame rate used is dependent upon the Webcam.
For example, an old WebCam device might only support up to 10 fps in 1280*720 resolution for I420, NV12, YV12, YUY2 video format (the formats supported in H.264 encoding, plus RGB with Theora encoding). To confirm this, use a third-party tool (like DumpVCap or GraphStudioNext) to verify.
--DumpVcap output-- |
Major Type Sub Type Format Type FixedSamples Temporal Compression Sample Size Max Input Size Min Output Size Max Output Size Min-Max FPS |
Video YUY2 VideoInfo Fixed NotTemporal 1843200 1280x720 1280x720 1280x720 5.00-10.00 {none} Video YUY2 VideoInfo2 Fixed NotTemporal 1843200 1280x720 1280x720 1280x720 5.00-10.00 {none} Video MJPG VideoInfo Fixed NotTemporal 2764800 1280x720 1280x720 1280x720 5.00-30.00 {none} Video MJPG VideoInfo2 Fixed NotTemporal 2764800 1280x720 1280x720 1280x720 5.00-30.00 {none} |
From the output, it is clear that at 1280*720 resolution, the WebCam device can support 5~10 fps for YUY2 video format and 5~30 fps for MJPG video format (but not supported in HDX). In this case, only up to 10FPS can be used by the hosted app.
Most modern webcams like the integrated ones in a Surface device (e.g. OV5693) support at least 640x480 (480p 4:3) or 640x360 (wide 360p 16:9) and 15-30 FPS (see SETTINGS screenshot above).
7.3 Bandwidth
The bandwidth usage can be tweaked by creating a client-side DWORD (32-bit) value named TargetBitrate under HKCUSoftwareCitrixHDXRealTime. Values are in bits per second, so if 300 kbps is desired, the value should be set to 300000. When this key is not present, the default value is 350000.During testing, somewhere between 250000 and 300000 was found to be the minimum values for the default CIF (352x288) resolution or 480p that still produced acceptable video quality. If the resolution and frame rate are set to lower values then it might be possible to lower the bit rate and reduce bandwidth consumption. Lastly, setting the bit rate to zero has special meaning – zero indicates that the codec should operate in VBR mode.
However, during production testing, the codec would generate excessive video artifacts so VBR mode is NOT recommended.
7.4 Encoders
Citrix Workspace app for Windows supports H.264 (Default) and Theora (legacy) encoders. If for whatever reason you want to disable H264 (not recommended), the following registry key on either VDA or the client can be used:
On the VDA | Or on the Client |
HKLMSoftwareWow6432NodeCitrixHdxRealTime Or HKLMSoftwareCitrixHdxRealTime DWORD EnableDeepcompress_Server – set it to 0 to disable H.264 support. | HKCUSoftwareCitrixHdxRealTime DWORD EnableDeepcompress_Client – set it to 0 to disable H.264 encoding. By default HDX always prefer H.264 decoding. Set it to 1 to go back to default behavior. |
8. Troubleshooting
8.1. Device Manager on the Client would list the same webcam names as done by the Citrix Workspace app Desktop Viewer. Although keep in mind that there is no single designated place where they show inside Device Manager. This is device specific. Most common place is under Imaging Devices. Integrated webcams might show in other places (e.g. Device Manager/System devices)
8.2. Citrix Workspace app Desktop Viewer preferences should list all the available webcams on the client. If that drop down does not show webcams at all, that means the Client cannot access the locally attached webcams
In this scenario, redirection will not work. If you run into this problem, try launching apps like Skype for Business, Skype or GoToMeeting LOCALLY to confirm that webcam devices are not available on the endpoint either.
This can happen because of various reasons, most commonly device drivers not installed correctly because of which Windows cannot recognize webcams.
For HDX Realtime webcam video compression, the device drivers are not needed on the VDA, only on the Client.
For Generic USB redirection, drivers are needed at both the VDA and on the Client machine.
Important : in some cases, integrated webcams like in a Surface Book will not show in Desktop Viewer preferences. This does not mean they cannot be redirected.
8.3. Make sure the following Computer policies 'Windows media Redirection' and 'Multimedia Conferencing' are Enabled in Studio.
By default, all multimedia policies explicitly set on the Controller are stored in these registries:
Computer policies:
HKEY_LOCAL_MACHINESoftwarePoliciesCitrixMultimediaPolicies
User policies:
HKEY_LOCAL_MACHINESoftwarePoliciesCitrix{User Session ID}UserMultimediaPolicies
To locate the current user session ID, issue the qwinsta command on the Windows command line.
Keep in mind that these two policies are Enabled by default, and policies that are enabled by default will not show under those regkeys (only policies that are explicitly configured will).
the following registry entries should be seen on the VDA:
Information on the MediaPropertyData values can be found here.
8.5 If some apps on the VDA can display the webcam, but some other app or self-preview window shows a black or grey screen instead of the video feed, you might need to whitelist the application. This applies to Workstation VDAs only (Windows 10 / Windows 7).
Add a key with the name of your app executable (e.g. myapp.exe) under:
HKEY_LOCAL_MACHINESOFTWAREWOW6432NodeCitrixCtxHookAppInit_DllsCtxMFPlugin
and
HKEY_LOCAL_MACHINESOFTWARECitrixCtxHookAppInit_DllsCtxMFPlugin
After editing this key, a VDA reboot is required.
Disclaimer
- How the softphone application is delivered to the virtual/published desktop
- How the audio is delivered to and from the user’s headset, microphone, and speakers, or USB telephone set
Citrix Workspace Vdi Login
- Optimized-for-Speech codec for fast encode of real-time audio and bandwidth efficiency
- Low latency audio stack
- Server-side jitter buffer to smooth out the audio when network latency fluctuates
- Packet tagging (DSCP and WMM) for QoS
- DSCP tagging for RTP packets (Layer 3)
- WMM tagging for Wi-Fi
The Workspace app (former Citrix Receiver) versions for Windows, Linux, Mac, Android and Chrome also are VoIP capable.
Citrix Workspace app for Windows offers:
- Client-side jitter buffer - Ensures smooth audio even when network latency fluctuates
- Echo cancellation - Allows for greater variation in the distance between microphone and speakers for workers who do not use a headset
- Audio plug-n-play - Audio devices do not need to be plugged in before starting a session, they can be plugged in at any time
- Audio device routing - Users can direct ringtone to speakers but the voice path to their headset
- Multi-stream ICA - Enables flexible Quality of Service (QoS)-based routing over the network
- ICA supports 4 TCP and 2 UDP streams; one of the UDP streams supports real-time audio over RTP
For a summary of XenApp and XenDesktop audio features, see the Citrix Documentation - Audio Features.
For a summary of Citrix Workspace app capabilities, see Citrix Workspace app Feature Matrix.
2.1. Delivering Softphone Applications to the Virtual Desktop
There are three methods by which a softphone can be delivered to the virtual desktop:
- The application can be installed in the virtual desktop image.
- The application be streamed to the virtual desktop using Microsoft App‑V. This approach has manageability advantages because the virtual desktop image is kept uncluttered. Once streamed to the virtual desktop, the application executes in that environment just as if it had been installed in the usual manner. [Note that not all applications are compatible with App-V.]
- In addition, Citrix App Layering can be used.
2.2. Delivering Audio to and from the User Device
HDX RealTime supports three methods of delivering audio to and from the user device:
- the optimized Citrix Audio Virtual Channel
- Generic USB Redirection.
- A third hybrid mode known as Composite USB Redirection is also supported (see 2.2.3)
The Citrix Audio Virtual Channel is generally recommended as it is designed specifically for audio transport, but Generic USB Redirection is useful to support audio devices with buttons and/or a display, that is HID devices, if the user device is on a LAN or LAN-like connection back to the XenApp/XenDesktop VDA server.
2.2.1 Citrix Audio Virtual Channel
The bidirectional Client Audio Mapping Virtual Channel (CTXCAM) enables audio to be delivered very efficiently over the network.
HDX takes the audio from the user’s headset or microphone, compresses it, and sends it over ICA to the softphone application on the virtual desktop. Likewise, the audio output of the softphone is compressed and sent in the other direction to the user’s headset or speakers.
This compression is independent of the compression used by the softphone itself (such as Opus, G.729 or G.711). It is done using the HDX Optimized-for-Speech codec (“Medium Quality”). Its characteristics are ideal for voice-over-IP (VoIP). It features quick encode time (~34 msec) and it consumes only [approximately] 32 kilobits per second of network bandwidth (16 kbps in each direction). Note that this codec must be explicitly selected in the Studio console as it is not the default audio codec; the default is the HD Audio codec (“High Quality”) which is excellent for high fidelity stereophonic soundtracks but is slower to encode compared to the Optimized-for-Speech codec.
Bandwidth guidelines for audio playback and recording:
- High quality (default)
- Bitrate : ~100 kbps [VBR min 75 ; max 175 kbps] for playback / ~70 kbps for microphone capture
- Number of Channels : 2 (Stereo) for playback / 1 (mono) for microphone capture
- Frequency : 44100 Hz
- Bit-depth : 16-bit
- Medium quality (recommended for VoIP)
- Bitrate : ~ 16 kbps [min 10 ; max 40 kbps] for playback / ~16 kbps for microphone capture
- Number of Channels : 1 (Mono) for both playback and capture
- Frequency : 16000 Hz (wideband)
- Bit-depth : 16-bit
- Low quality
- Bitrate : ~ 11 kbps [min 10 ; max 20 kbps] for playback / ~11 kbps for microphone capture
- Number of Channels : 1 (Mono) for both playback and capture
- Frequency : 8000 Hz (narrowband)
- Bit-depth : 16-bit
Bit-rate
When digitizing an audio signal, the bit-rate is defined as the number of bits per unit of time required to encode the audio. It is measured in kilobits per second.
HDX uses lossy codecs for audio compression, which means the perceived quality is directly proportional to the bitrate used for the encoding process.
The target bitrates described in the section above can be modified via registry keys in the VDA (Windows 7 or 10 only), resulting in different levels of quality for audio playback (at the expense of more bandwidth).
When setting the Audio quality to 'High Quality', create this key in the VDA to modify the target bit-rate: | When setting the Audio quality to 'Medium Quality', create this key in the VDA to modify the target bit-rate: |
HKLMSOFTWARECitrixAudio REG_DWORD MaxVorbisQuality Value: 0 to 10 (default is 2) | HKLMSOFTWARECitrixAudio REG_DWORD MaxSpeexQuality Value: 0 to 10 (default is 5) |
Value | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
Bitrate [kbps] for High Quality | 64 | 80 | 96 | 112 | 128 | 160 | 192 | 224 | 256 | 320 | 500 |
Bitrate [kbps] for Medium Quality | 4 | 6 | 8 | 10 | 13 | 16 | 20 | 24 | 28 | 34 | 42 |
UDP Audio
(Note: UDP Audio is not available when using Citrix Gateway Service)
Audio over UDP provides excellent tolerance of network congestion and packet loss, and is preferred over TCP when available. XenDesktop 5.5 introduced the 'Audio over UDP Real-time Transport' user policy setting. This capability is also available in XenApp 7.6 or higher.
When this policy is configured in Studio, the Audio stream is effectively pulled out and delivered out-of-band from ICA TCP - Workspace app is communicating directly to the VDA over ICA RTP/UDP.
For this policy to be enforced, Audio Quality policy in Studio must be configured to use Medium Quality.
By default, the Audio virtual channel would start on a regular ICA TCP connection, and then an ICA module starts initializing corresponding ICA RTP sessions. Both VDA and Workspace app would do handshake over UDP before they start sending data over RTP. UDP handshake confirms that data can flow over UDP in each direction. If the UDP handshake fails then the Audio virtual channel would continue to use ICA TCP to send and receive the data.
Windows Workspace app
Please note that for UDP Audio to work, you will need to configure GPOs on the client-side also. See CTX121613.
The GPO when applied will eventually set these regkeys on the Client machine:
BYOD
If you also have unmanaged endpoints (BYOD), you will need to edit the default.ica file in Storefront, as described here.
AudioBandwidthLimit=1-
EnableRtpAudio=true
EnableUDPThroughGateway=true [if you have a gateway, otherwise false]
RtpAudioHighestPort=16509
RtpAudioLowestPort=16500
These settings are not available currently when using Citrix Cloud with Workspace. You will need to push the regkeys in the screenshot above using other tools.
Linux Workspace app
See here for the online documentation.
1. Set the following options in the ClientAudio section of module.ini: Set EnableUDPAudio to True.
By default, this is set to False, which disables UDP audio.
2. Specify the minimum and maximum port numbers for UDP audio traffic using UDPAudioPortLow and UDPAudioPortHigh respectively. By default, ports 16500 to 16509 are used.
Note: these settings can also be deployed by modifying the ICA file template in Storefront as described here, in case you do not want to modify the .ini file.
Note: Linux Workspace app does not support DTLS encryption for RTP Audio, hence if a Gateway is in place the Audio virtual channel will fall back to TCP.
Resultant Set of Policies
When you set the Audio quality on the Client, the Server (or default.ica) cannot upgrade it.
The Server (or default.ica) can, however, downgrade the resulting quality.
If UDP audio is enabled but the resultant quality is not medium, audio transmission will use TCP not UDP.
HDX Monitor
You can run HDX Monitor in the VDA ( Windows 7 or 10 VDAs only) to confirm if Audio over RTP is in use . Values should be set to True:
Note: Windows Server VDAs do not expose RTP Audio info via WMI to HDX Monitor.
EDT and Audio
Audio over RTP is still preferred over EDT, since EDT is a reliable protocol (despite using UDP as the underlying transport).
EDT guarantees packet delivery thanks to a custom layer of congestion and flow control, which is less optimal for VoIP.
When EDT is in use, and Audio over RTP is also configured, the Audio virtual channel is de-multiplexed from the rest of the ICA virtual channels and delivered over RTP out-of-band from the EDT transport.
EDT is still preferred over TCP for HDX Audio.
UDP Audio and ICA Encryption
When no Citrix Gateway is in place, if Workspace app detects ICA encryption other than 'Basic' or 'RC5 (128) bit Logon Only' in use, it will not respond to the first handshake message sent by the VDA. No UDP packets
will be sent over the network. The VDA will eventually time out and will not enable RTP audio.
If a Citrix Gateway is in place, only the leg Workspace app-to-front-end virtual server can be encrypted with DTLS. The leg back-end SNIP-to-VDA will be restricted with the same limitation described above (Basic or RC5 Logon Only).
For more information on Secure ICA, see here.
UDP Ports
By default this feature uses UDP port range 16500-16509 and picks up the first available port pair. During VDA installation, it opens up the UDP port range on the VDA side. RTP is used in conjunction with RTCP.
In a Windows 10 VDA, RTP will use an even port (e.g. 16500) and RTCP will use the odd port (16501).
In a Windows Server VDA, Audio is handled by the Generic Virtual Channel service CtxSvcHost.exe [-g AudioSvcs] using a single multiplexed UDP port:
On the client side, it doesn’t explicitly open up any UDP ports during installation of Citrix Workspace app for Windows. During connection setup, Citrix Workspace app uses UDP hole punching to open up the UDP port automatically. Corporate firewalls need to also open up the necessary port range for Audio-over-UDP to work.
Important : When Citrix Gateway is not in the path, audio data transmitted with UDP is not encrypted. If Citrix Gateway is configured to access Citrix Virtual Apps and Desktops resources, then audio traffic between the endpoint device and Citrix Gateway is secured using DTLS protocol. See section 3.5 below.
Firewall Considerations
By default, Windows Firewall blocks inbound UDP traffic. During server/VDA installations, the default UDP port range would be opened up for both inbound and outbound traffic for the specific processes on the VDA. If the administrator wants to specify a different range for server using a machine level policy then that range would need to be explicitly opened up by an administrator.
External corporate firewalls need to be explicitly opened up to handle UDP/RTP traffic.
Since UDP is a stateless protocol, there is no concept of connection tear down, and most firewalls have default timeouts for UDP traffic (~30 sec - 2 minutes). This could result in UDP port closing if no traffic is detected. Make sure your firewall has a long enough timeout value for traffic destined to the Gateway (or VDA).
Also note that some Firewalls might have 2 UDP timeout values, udp-timeout and udp-stream-timeout.
(Stream means the connection tracking mechanism has detected packets in both directions). Please refer to your vendor's documentation.
On most client end point devices, there is normally no need to open up the UDP ports explicitly. During UDP handshake as the client sends the first UDP packet, the firewall creates a rule Src ip. Src port, Dest ip. Dest port and would allow UDP packet coming from dst ip, dst port thus effectively opening up the UDP port dynamically.
Some thin client devices running Windows 7 Embedded have shown to close its UDP 'hole punched' firewall port very quickly, on the order of 1-2 minutes. This behavior causes RTP audio to be blocked if audio is not continuously playing, causing UDP packets to be sent which keep the port open. To mitigate this problem it will be necessary to open up the firewall ports on the client device, if such behavior is observed.
To enable UDP Audio, refer to the following links:
- Citrix Blog - Introducing UDP transport in HDX
2.2.2 Generic USB Redirection
Citrix Generic USB Redirection technology (CTXGUSB virtual channel) provides a generic means of remoting USB devices, including composite devices (audio plus HID) and isochronous USB devices. This approach is generally limited to LAN-connected users because the USB protocol tends to be sensitive to network latency and requires considerable network bandwidth. Isochronous USB redirection has been found to work very well with some softphones, providing excellent voice quality and low latency, but it is generally preferred to use the Citrix Audio Virtual Channel which is optimized for audio traffic.
The primary exception is when using an audio device with HID buttons such as a USB telephone attached to the user device that is LAN-connected to the data center. In this case, Generic USB Redirection offers the advantage of supporting buttons on the phone set or headset that control features by sending a signal back to the softphone (not an issue with buttons that work locally on the device).
Generic USB is not enabled by default and requires configuration.
2.2.3 Composite USB Redirection (hybrid mode)
In Citrix Receiver for Windows 4.7 and earlier, HDX allowed generic redirection of USB devices, where all the interfaces of the device were redirected as a single device. This resulted in sub-optimal Audio performance, so instead the Admin would configure the Audio virtual channel and the sound quality would be fine but they lose the functionality of HID buttons.
Starting with Citrix Receiver for Windows 4.8, we now allow splitting of composite USB device redirection. A composite USB device consists of multiple interfaces, each having its own functionality. Examples of composite USB devices include HID devices that consist of audio and buttons, like a Plantronics headset.
Composite USB redirection is available both in XenDesktop and XenApp sessions. In a desktop session, split devices are displayed in the desktop viewer. In an application session, split devices are displayed in the Connection Center.
You can configure composite USB redirection in using the Group Policy Object administrative template, and the registry.
See here for detailed info.
Citrix Workspace Vdi Client
3. System Configuration Recommendations
3.1 Client Hardware and Software
For optimal audio quality, Citrix recommends the latest version of Citrix Workspace app and a good quality headset with built-in acoustic echo cancellation (AEC). Bi-directional audio VoIP is currently supported by the Citrix Workspace app versions for Windows, Linux, Mac, Android and Chrome. See here for more details.
In addition, Dell Wyse offer VoIP support for ThinOS (WTOS).
3.2 CPU Considerations
Monitor CPU utilization on the VDA to determine if it is necessary to assign (at least) two virtual CPUs to each virtual machine. Real-time voice and video are data intensive and configuring two virtual CPUs reduces the thread switching latency. Therefore, it is generally recommended to configure (at least) two vCPUs in a XenDesktop VDI environment.
Note: Having two virtual CPUs does not necessarily mean doubling the number of physical CPUs, because physical CPUs can be shared across sessions.
It is possible to configure the Citrix Audio Service with CPU priority 'high' to help mitigate audio choppiness dramatically. The command line to change the CPU priority can be found here. Because this will be reset after a reboot, it should be run as a start-up script. Please note, do not change the priority to 'Realtime'.
Note: the HDX Audio service in Windows Server is CtxSvcHost.exe, but this service is leveraged by multiple virtual channels (Smart Card, Flash, BCR, Teams, NSAP and others). Each virtual channel will have its own PID. More info here.
Citrix Gateway Protocol (CGP), which is used for the Session Reliability feature, also increases CPU consumption. Improvements in XenDesktop 5.5 greatly reduced the CPU impact of Session Reliability / Citrix Gateway Protocol (CGP). Nevertheless, on high quality network connections, this feature could be disabled to further reduce CPU consumption on the VDA.
Neither of the preceding steps might be necessary on a powerful server.
Important: If you are using a Citrix Gateway to encapsulate Audio RTP with DTLS, CGP and Session Reliability must be turned on. Session Reliability is configured both as a Studio policy and in Storefront.
3.3 LAN/WAN Configuration
Proper configuration of the network is critical for good real-time audio quality. VLANs typically need to be configured because excessive broadcast packets can introduce jitter. IPv6-enabled devices may generate a lot of broadcast packets; IPv6 can be disabled on those devices if IPv6 support is not needed. Routers need to be configured to support QoS.
3.4 Settings for use WAN Connections
Voice chat can be used over both LAN and WAN connections. On a WAN connection, audio quality depends on the latency, packet loss, and jitter on the connection. If delivering softphones to users on a Wide Area Network (WAN) connection, Citrix recommends using the Citrix SD-WAN between the data center and the remote office to maintain a high Quality-of-Service (QoS). SD-WAN supports Multi-Stream ICA, including UDP. Also, in the case of a single TCP stream, it is possible to distinguish the priorities of various ICA virtual channels to ensure that high priority real-time Audio data gets preferential treatment. Citrix SD-WAN can notoriously improve MOS scores.
Use Director or the HDX Monitor to validate your HDX configuration.
3.5 Remote User Connections
(Note: Audio over RTP is not available when using Citrix Gateway Service)
NetScaler Gateway 11 supports DTLS to deliver UDP/RTP traffic natively (without encapsulation in ICA TCP). Traffic is encrypted using Basic ICA encryption (on by default) between the VDA and the Citrix Gateway backend virtual server, and is encrypted with DTLS between the frontend virtual server and Workspace app for Windows (only platform supported). CGP/Session Reliability must be enabled on the VDA and in Storefront.
Firewalls must be opened bidirectionally for UDP traffic over Port 443 from Workspace app to the Gateway's front-end virtual server.
The Gateway back-end SNIP will communicate with the VDA using RTP/UDP ports 16500-16509.
Workspace app for Windows is the only platform capable of handling RTP Audio over DTLS.
More info can be found here:
- Citrix Blog - Audio through a NetScaler Gateway
- Citrix Documentation - Support for DTLS in NetScaler
3.6 Codec Selection and Bandwidth Consumption
Between the user device and the Virtual Delivery Agent (VDA) in the data center, Citrix recommends using the Optimized-for-Speech codec setting, also known as Medium Quality audio.
Between the VDA platform and the IP-PBX, the softphone uses whatever codec is configured or negotiated. For example:
- G711 provides very good voice quality but has a bandwidth requirement of 80 to 100 kilobits per second per call (depending on Network Layer2 overheads).
- G729 provides good voice quality and has a low bandwidth requirement of 30 to 40 kilobits per second per call (depending on Network Layer 2 overheads).
Citrix Vdi Vs Vda
Additional Resources
- CTX130912 - Testing and Using Audio and Video with Microsoft Lync 2013 and XenDesktop using Optimization Pack for Lync 1.7
- CTX201116 - Remote Access with Citrix HDX RealTime Optimization Pack
- CTX132979 - Technical Support of Microsoft Skype/Lync on XenApp/XenDesktop
- CTX123015 - How to Configure Automatic Redirection of USB Devices
- CTX200291 - How to Apply DSCP Marking for the CloudBridge Appliance with QOS Enabled
- CTX124634 - XenDesktop Support for Avaya Softphones
- CTX138408 - XenDesktop, XenApp and Citrix Receiver Support for Microsoft’s VDI Plug-in for Skype for Business and Lync
- Latest compatibility information – http://community.citrix.com/citrixready