-
Notifications
You must be signed in to change notification settings - Fork 14
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
bad audio quality in Ubuntu 20.04 #7
Comments
I'm sorry you have encountered this issue. I was hoping that the audio issue would have been fixed or at least functional on Linux. Setting the following line to 48000 or otherwise trying to find the correct sample rate might help: If that does not fix the issue, you may try enabling opus. Currently the opus is disabled on Linux since it did not work earlier. You can try re-enabling it by removing this ifdef and using the windows version on linux (opus requires the sample rate to be 48000 in filter graph). This might solve the audio issues or make them worse. The permanent solution for this problem would involves getting the opus working, if it does not work currently. There are also DSP options in audio settings. Make sure those are all enabled. The speex AEC is not very good (but better than nothing), but that is currently not something I can do anything about. |
I did exactly as you wrote + using AEC and denoise, but have always echo problem |
What is your setup? Are you calling yourself or another computer? Is the echo present if you use headphones? |
here is my audio setup:
I called myself and auch call other computer |
Is the echo present if you use headphones? What I'm trying to understand is if you are dealing with a bug or if the echo cancellation is just not good enough. If I understood correctly, you are talking about a bug in audio quality on Linux? |
my headphone does not function well, so that I test only with 2 computer which are separately in different rooms. |
In that case, it seems Kvazzup still has an audio bug on Linux in Audio. Unfortunately I don't have a good quick solution for this one. It may take some time before this is fixed. |
Yes. I am trying to save audio data from microfon to file to know where audio problem is happened |
Thank you, that would be very helpful. The issue is probably either in audio input or audio output. |
But it is not easy in your framework. I tested it outside your framework, and showed the audio capturing works well. |
Here the input data is copied to sample: https://github.com/ultravideo/kvazzup/blob/2eacc81468a546fa644e3523db8ed8d8a58940d5/src/media/processing/audiocapturefilter.cpp#L158 Copying this data to file and listening would help with this issue by identifying if the issue is in Kvazzup input or output. |
how can I save it into file? Could you pls give me a short code, because I am very beginner with Qt? Thanks |
@polusto I saved it and replay well data. That means input is read correctly, but output is somehows not correctly |
@polusto i tested today morning with a headset and had also heavy echo and noise problems with audio. |
Newest master saves the state of the mic button, so you can close it as a temporary solution. If you want to help, can you save the audio data from this https://github.com/ultravideo/kvazzup/blob/ec7f69d3d7726927307a344c84578f4aa8889e8c/src/media/processing/audiooutputdevice.cpp#L167 That is the last point at which the data is handled by Kvazzup. |
@polusto i found the current SW architecture with separate modules for mic, screen share and camera is very good. what do you think? |
There is already a camera selection in the first page of settings, but it may not work on Linux due to a bug in Qt. I cannot comment on other solutions. |
Thanks. I really do not find any way to save raw audio data at the last point of Kvazzup into a file! |
I thought you saved the data at microphone? Why not use the same solution? You can use any method available in Qt or in c++. I don't have any code for it at them moment. Open a file stream and write the audio data there I guess. |
When I save data at microphone, the audio quality is very good and without any echo. I want to save raw data at this point for making sure if the audio quality will be changed after processing. Do you have any audio problem under Windows? |
@polusto to be honest, I am not able to solve this audio problem. Could you please help me? Thanks |
Now that I think about it, recording audio requires more effort than I first thought, because it needs a container with necessary information. I will fix this issue, but it probably take some time since I don't know what is causing it. I also have other responsibilities I must take care of. The audio on windows works fine. |
@polusto thanks for your help. |
I made a new release version 0.09 of Kvazzup that includes both the Windows binaries and the dependency libraries compiled with Visual Studio. Available here: https://github.com/ultravideo/kvazzup/releases/tag/v0.09 |
Which VS version do you use for creating libraries? |
Some of them are a bit older (maybe 2017), but VS 2019 should work. |
thanks |
I run your app in my laptop win 10, but have the following problem:
|
@polusto I have just developed a Audio Framework for testing qtAudio and AECProcessor and found that AECProcessor does not work properly under Linux, it makes the audio quality worse. I found other bugs in your framework:
|
Are you saying that without AECProcessor, the audio flow works? I can look at it at some point. As for the bugs:
|
@polusto in my test qt framework ( only read audio from mic and play it), without AEC (I.e. no use processFrameInput() and processEcho() methods) my output audio has echo but no noise! |
By screen sharing: can you change screen sharing mode to camera mode in realtime callings? |
@polusto One question about data flow from camera or screen sharing module to internet sender module? |
To keep these issue threads readable I will only answer questions related to audio quality in this issue. If you have issues with video or screen sharing, please make a new issue. It is very hard for me to keep track which issues are fixed and which are not if they are all discussed in one issue. |
Ok i move questions related video into another new issue |
I have managed to set up a virtual machine with Ubuntu and can replicate this audio issue. I will start working on the fix, but cannot say when it will be ready. |
Fine that you can identify this issue in Ubuntu. |
@polusto any success by bug-fix? |
I fixed few other bugs. I will update and close this issue when this bug is fixed. |
This issue is caused by audio output on Linux wanting smaller audio samples than Kvazzup currently supports. It will take some time to modify Kvazzup to support smaller audio samples. |
The audio quality should now be better on Linux. There are still some audio issue left however. The output filter cannot keep up with audio flow for some reason. I will continue to improve the audio flow next week. |
fine. I have just tested. It is much better than the old version. |
@polusto any improvement by audio quality? |
I have some improvements coming, they just need some testing and fine tuning. It may be that I input the echo frames to Speex DSP too soon, rendering the AEC useless. I found that they have a diagnostics tool for detecting this. If this does not solve it, I'm out of options. I would guess that it will at least another week before I can get everything finished, because new issues keep popping up. |
@polusto thanks for your update information |
@polusto did you fix this bug? If yes, I will be very happy for bring my app to work soon! |
I pushed improvements to audio to master. The main improvement was that the sample rate is now much higher. The sample rate for Speex AEC was not set causing it to down sample the rate to 8000 (instead of 48000). For the echo I managed to figure out that there needs to be less delay between the playback/speaker audio frames and the input/mic audio frames. The AEC is now works a little bit, but there is still much work to do to solve all the issues with it. If you are in a hurry, you can try changing the new playback delay or aec filter tail length variables to get better results. Currently, the recommended way to get rid of echo is to have one computer either muted or for one computer to have headphones connected. Either of these eliminates echo. In any case, the Speex AEC will probably never get rid of all the echo. I'm basically trying to get Speex AEC to do something to help a bit if that is not an option. Additional note: AEC does not and will never do anything when calling oneself. Only calls between two computers are supported for AEC. I have an important deadline coming in two weeks. I will try continuing to work on this as well, but I will have less time than before. |
@polusto best thanks for your update! It is also much improvement! |
@polusto do you have any improvement on audio quality? Thanks |
Unfortunately, I haven't had time to work on the audio. I've taken on the responsibility for uvgRTP repo which has taken much of my time. @Thanh-Binh What sort of audio issues are you experiencing at the moment? I am considering integrating RTAudio into Kvazzup to reduce audio latency, since Qt is not very good for real-time audio. After the latency has been reduced, I will try to get the timing of echo cancellation closer to optimal, but I wouldn't hold my hopes up for much improvement in echo removal since I don't have much hope for Speex and I am not aware of better alternatives. |
@polusto a big problem is echo, so that we can not use it comfortably |
@polusto why do you choose RTAudio? In other applications of mine, I am very happy with SFML audio! |
RTAudio is meant for real-time audio and is only focused on audio issues. SFML is a large framework and I try to avoid including large frameworks if I can avoid it, even if it would solve this issue. |
This issue is getting pretty long and I'm closing it since most issues have been fixed apart from the echo. For the echo issue, try the following if possible and you have not tried already:
Please note that AEC will never work with self calling. I feel my situation is such that putting more work into this is not guaranteed to improve the echo issue because I'm not at all confident that Speex DSP is good enough for this task, especially now that it is finally working and does not seem to help much. I will eventually get back to this (hopefully in the fall), but from my point of view there are more critical issues with Kvazzup (such as conferencing and SIP functionality). You may create a new issue, and I will eventually start working on it if I have ideas. You may also try to fix the issue, but I'm not sure what can be done outside adjusting playback delay. |
@polusto please let me know if your RTAudio integration is finished. |
@Thanh-Binh I created issues for both the AEC (#15) and RTAudio (#14). There you can follow the progress of the issue. You may also follow releases where I will probably mention at least RTAudio. Unfortunately, I have to start advancing Kvazzups main features at this point and it will probably be towards the end of this year when I can continue with audio issues unless there is something critical and relatively easy to fix. |
Ok |
Currently, audio quality is too bad with echo and noises.
Maybe sample rate for audio (16000) is set not correctly, or other problems
The text was updated successfully, but these errors were encountered: