You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@guacamole.apache.org by "Jimmy (Jira)" <ji...@apache.org> on 2020/11/02 21:56:00 UTC

[jira] [Commented] (GUACAMOLE-1201) Audio Input issues - Recording at an incorrect rate and Having much noise

    [ https://issues.apache.org/jira/browse/GUACAMOLE-1201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17224979#comment-17224979 ] 

Jimmy commented on GUACAMOLE-1201:
----------------------------------

I checked the guacamole server and the guacamole client in detail and I found the following facts:
 # The FreeRDP can use the *WAVE_FORMAT_ALAW* and *WAVE_FORMAT_PCM* audio codecs when using the pulse library and the FreeRDP uses it because the *WAVE_FORMAT_ALAW* codec is required by the remote server.
The guacamole uses only the *WAVE_FORMAT_PCM* audio codec.

 # In the Guacamole client, the sampleRate of AudioBuffer is 48000 in the toSampleArray(audioBuffer) function of AudioRecorder.js.
 # The process of handling RDP's "AUDIO_INPUT" virtual channel and the values of parameters such as the sample rate are the same in both the FreeRDP and the Guacamole Server except the audio codec.
 # The size of the audio packet and the average intervals for flushing the audio packet are different in the FreeRDP and the Guacamole Server.
*FreeRDP:* packet size=4408 bytes, interval = about 12 ms
*Guacamole*: packet size = 1764 bytes, interval = about 10 ms
Especially, the interval of FreeRDP is even, but that of Guacamole Server isn’t very even.

 

To check the issues, I tried the followings:
 * I changed the FreeRDP to use the WAVE_FORMAT_PCM codec, but the FreeRDP works without these issues.
 * I modified the getAudioContext() function in AudioContextFactory.js of the Guacamole Client to use 44100 sample rate, but I can still see these issues.

 

So, I think that the interval for flushing the audio packet will be a problem in the Guacamole Server.

Based on the size of the audio packet, the audio duration follows as below:

FreeRDP: (4408/4) *1000 / 44100 = about 25 ms

Guacamole: (1764/4) *1000 / 44100 = 10 ms

But there are 2 problems in the intervals for flushing the audio packet:
 * The average interval is 1/2 of the audio duration in the FreeRDP, but it’s the same as the audio duration in the Guacamole Server.
 * The intervals are even in the FreeRDP, but they aren’t very even in the Guacamole Server.

|*FreeRDP*|*Guacamole Server*|
|38|0|
|39|1|
|39|2|
|14|41|
|39|1|
|14|1|
|39|1|
|14|7|
|39|47|
|14|0|
|…|…|

 

I think that we need to consider the above 2 problems based on the audio process theory.

 

> Audio Input issues - Recording at an incorrect rate and Having much noise
> -------------------------------------------------------------------------
>
>                 Key: GUACAMOLE-1201
>                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-1201
>             Project: Guacamole
>          Issue Type: Bug
>          Components: guacamole-client, guacamole-server
>    Affects Versions: 1.0.0, 1.1.0, 1.2.0
>         Environment: FreeRDP 2.2.0, Apache Guacamole Server 1.3.0, Apache Guacamole Client 1.3.0
>            Reporter: Jimmy
>            Priority: Minor
>         Attachments: adobe-audition-crash-1.png, adobe-audition-crash-2.png, audacity-recorded-time.png, ms-voice-recorder.png
>
>
> I found some audio input issues when using Audacity and Adobe Audition.
> The test environment follows as below:
>  * *FreeRDP*: stable-2.0
>  * *Apache* *Guacamole* *Server*: staging/1.3.0
>  * *Apache Guacamole Client*: staging/1.3.0
>  * *Remote Server*: Windows 10 64 bit Version 2004 (OS Build 19041.572)
>  * Ubuntu 18.04 64 bit
>  * Audacity 2.3.3
>  * Adobe Audition 2020
>  
> The test case follows as below:
>  # Connect to the remote server (Windows 10, 64bit) over the Apache Guacamole Client.
>  # In the remote server, run Audacity.
>  # In Audacity, click the record button and start to record the audio.
>  # In Audacity, after 10 seconds, click the stop button.
>  # In Audacity, click the play button.
>  
> In step 5, we can see the following issues:
>  # The recording time is 10.5 seconds, but the actual recorded time is about 7.5 seconds. (see 'audacity-recorded-time.png' image.)
>  # The recorded audio has a lot of noise.
> FYI: When using Adobe Audition, the crash issue frequently occurs. (see 'adobe-audition-crash.png' image)
>  
> The weird things follow as below:
>  * When performing the above test case by using xfreerdp (2.2.0, c72055d74), we can't see the above two issues in Audacity.
>  * When performing the above test case by using mstsc (10.0.18362), we can't see the above two issues in Audacity.
> Especially, when using the Apache Guacamole Server & Client, we can't see the above two issues in Microsoft Voice Recorder. (see 'ms-voice-recorder.png' image)
>  
> For these audio input issues, I researched the followings:
>  * [http://apache-guacamole-general-user-mailing-list.2363388.n4.nabble.com/audio-support-in-RDP-td7508.html]
>  * https://issues.apache.org/jira/browse/GUACAMOLE-236
>  * https://issues.apache.org/jira/browse/GUACAMOLE-228
>  * [https://jira.glyptodon.com/browse/GUAC-1511]
>  
> But I didn't get any solution and workaround.
>  
> *Please let me know some solution or workaround to fix these issues.*
> Thanks.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)