[jitsi-users] Sound glitches during VOIP call


#1

Hello,

I’m using Jitsi to do one-to-one VOIP calls. We are both using
@jit.si XMPP accounts, with everything set to default. Calls are working
but I’m constantly hearing sound glitches. I’m having this problem
with Jitsi 2.0 and 2.2 on Ubuntu 10.04, installed from the debian/ubuntu
repository (http://download.jitsi.org/deb).

On my end, during a call, without any other CPU-consuming application
running, the CPU usage of Jitsi goes to approximatly 70% (which I
found too high but it works). Whenever I do something that raise a bit
my CPU usage, like switching to another desktop or loading a web page,
more sound glitches occur. I tried disabling the ZRTP encryption but
nothing changed. I tried to record a call, and the recorded file is
glitch-free, sound is perfect. My JRE package is openjdk-6-jre
6b24-1.11.5-0ubuntu1~10.04.2.

Any ideas? I’m not sure how to debug this problem, so feel free to ask
me other informations that would be missing. Thank you for your help.

    — gillux


#2

This sounds like a sound card/driver issue... if the recorded sound makes
it to a file just fine is probably means that the audio stream is received
via the XMPP (or whatever channel Jitsi uses at the time) channel just
fine, but struggles to reach your speakers without glitches, something goes
wrong during that last translation stage. Sounds like a problem lots of
mplayer (multimedia player) users have with slow framerates, that almost
always turn out to be the fault of the audio card, and not the video card.

Do other sound streaming applications (like internet radio through the
browser etc) work fine, or do they also make your CPU very busy? I would
look into the default sound server Ubuntu uses (pulse audio?) and
experiment with disabling it or switching to ALSA and seeing how Jitsi
reacts.

My 2 cents - good luck!

-A

···

On 26 May 2013 23:42, <gillou.ray@free.fr> wrote:

<snip>

On my end, during a call, without any other CPU-consuming application
running, the CPU usage of Jitsi goes to approximatly 70% (which I
found too high but it works). Whenever I do something that raise a bit
my CPU usage, like switching to another desktop or loading a web page,
more sound glitches occur. I tried disabling the ZRTP encryption but
nothing changed. I tried to record a call, and the recorded file is
glitch-free, sound is perfect. My JRE package is openjdk-6-jre
6b24-1.11.5-0ubuntu1~10.04.2.


#3

Thank you for your answer, A.

I never experienced such glitches neither overly intensive CPU usage
with other apps. I removed Pulse Audio a long time ago, I’ve been always
using ALSA only. So far ALSA did a great job, flawlessly playing and
mixing sound from every application. For instance Ekiga runs fine.

You mentioned video card, but I’m not using video at all - only audio.

The best thing I came up with to efficiently produce glitches is to
quickly move my mouse pointer around windows so that the focus
constantly change between windows, along with their decoration. I’m
using Gnome. However this method seems to be 'too much' as it also makes
Jitsi to drop packets. Recording reveals cuts. I checked the 'Technical
Call Info' window by pressing the 'i' button during a call. After some
seconds of intensive mouse moving it showed:

Packets decoded with FEC : 0
Packets currently being discarded : 11%
Number of discarded packets : 70 (0 late, 67 full, 3 shrink, 0 reset)
Adaptive jitter buffer : enabled
Jitter buffer : ~140ms; currently in queue: 12/15 packets
Jitter : ↓ 1 ms ↑ 0 ms

Compare to a mouse-moving-less call:

Packets decoded with FEC : 0
Packets currently being discarded : 0%
Number of discarded packets : 0 (0 late, 0 full, 0 shrink, 0 reset)
Adaptive jitter buffer : enabled
Jitter buffer : ~40ms; currently in queue: 0/4 packets
Jitter : ↓ 0 ms ↑ 0 ms

Perhaps it should be noted that I’m using two sound cards: laptop’s
internal and USB external. The external sound card is set as default. I
tried to use the internal one only, unplugged the external one, used
both by setting input and output from both… It did not changed much,
but the internal sound card seems to produce slightly less glitches.

But I discovered something interesting. Whenever I select an output
device other than 'default' in the options, I can see the following
message on the console that repeats precisely when the glitches occur:

Expression 'PaAlsaStream_WaitForFrames( stream, &framesAvail, &xrun )'
failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 4465 15:05:29.973
致命的: [152]
org.jitsi.impl.neomedia.jmfext.media.renderer.audio.PortAudioRenderer.error
() Failed to process Buffer.
org.jitsi.impl.neomedia.portaudio.PortAudioException: Internal
PortAudio error at org.jitsi.impl.neomedia.portaudio.Pa.WriteStream
(Native Method) at
org.jitsi.impl.neomedia.jmfext.media.renderer.audio.PortAudioRenderer.process
(PortAudioRenderer.java:893) at
org.jitsi.impl.neomedia.jmfext.media.renderer.audio.PortAudioRenderer.process
(PortAudioRenderer.java:795) at
net.sf.fmj.media.BasicRendererModule.processBuffer
(BasicRendererModule.java:690) at
net.sf.fmj.media.BasicRendererModule.scheduleBuffer
(BasicRendererModule.java:861) at
net.sf.fmj.media.BasicRendererModule.doProcess
(BasicRendererModule.java:317) at net.sf.fmj.media.RenderThread.process
(BasicRendererModule.java:1153) at net.sf.fmj.media.util.LoopThread.run
(LoopThread.java:85)

Which reminded me I occasionally use the Mixxx music player that uses
PortAudio too and it runs fine. (It doesn’t use microphones however.
And Mixxx uses the Ubuntu libportaudio2 package 19+svn20100802-0ubuntu2,
whereas Jitsi rolls up its own, presumably more recent version of
PortAudio, right?)

Hope this helps!

    — gillux

···

On Mon, 27 May 2013 06:25:20 +0100 ix4svs@gmail.com wrote:

<snip>

Do other sound streaming applications (like internet radio through the
browser etc) work fine, or do they also make your CPU very busy? I
would look into the default sound server Ubuntu uses (pulse audio?)
and experiment with disabling it or switching to ALSA and seeing how
Jitsi reacts.


#4

Hey gillux,

Could you tell us a bit more about your config?

Also, have you tried using pulse audio?

Emil

···

On 28.05.13, 03:01, gillou.ray@free.fr wrote:

On Mon, 27 May 2013 06:25:20 +0100 > ix4svs@gmail.com wrote:

<snip>

Do other sound streaming applications (like internet radio through the
browser etc) work fine, or do they also make your CPU very busy? I
would look into the default sound server Ubuntu uses (pulse audio?)
and experiment with disabling it or switching to ALSA and seeing how
Jitsi reacts.

Thank you for your answer, A.

I never experienced such glitches neither overly intensive CPU usage
with other apps. I removed Pulse Audio a long time ago, I’ve been always
using ALSA only. So far ALSA did a great job, flawlessly playing and
mixing sound from every application. For instance Ekiga runs fine.

You mentioned video card, but I’m not using video at all - only audio.

The best thing I came up with to efficiently produce glitches is to
quickly move my mouse pointer around windows so that the focus
constantly change between windows, along with their decoration. I’m
using Gnome. However this method seems to be 'too much' as it also makes
Jitsi to drop packets. Recording reveals cuts. I checked the 'Technical
Call Info' window by pressing the 'i' button during a call. After some
seconds of intensive mouse moving it showed:

Packets decoded with FEC : 0
Packets currently being discarded : 11%
Number of discarded packets : 70 (0 late, 67 full, 3 shrink, 0 reset)
Adaptive jitter buffer : enabled
Jitter buffer : ~140ms; currently in queue: 12/15 packets
Jitter : ↓ 1 ms ↑ 0 ms

Compare to a mouse-moving-less call:

Packets decoded with FEC : 0
Packets currently being discarded : 0%
Number of discarded packets : 0 (0 late, 0 full, 0 shrink, 0 reset)
Adaptive jitter buffer : enabled
Jitter buffer : ~40ms; currently in queue: 0/4 packets
Jitter : ↓ 0 ms ↑ 0 ms

Perhaps it should be noted that I’m using two sound cards: laptop’s
internal and USB external. The external sound card is set as default. I
tried to use the internal one only, unplugged the external one, used
both by setting input and output from both… It did not changed much,
but the internal sound card seems to produce slightly less glitches.

But I discovered something interesting. Whenever I select an output
device other than 'default' in the options, I can see the following
message on the console that repeats precisely when the glitches occur:

Expression 'PaAlsaStream_WaitForFrames( stream, &framesAvail, &xrun )'
failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 4465 15:05:29.973
致命的: [152]
org.jitsi.impl.neomedia.jmfext.media.renderer.audio.PortAudioRenderer.error
() Failed to process Buffer.
org.jitsi.impl.neomedia.portaudio.PortAudioException: Internal
PortAudio error at org.jitsi.impl.neomedia.portaudio.Pa.WriteStream
(Native Method) at
org.jitsi.impl.neomedia.jmfext.media.renderer.audio.PortAudioRenderer.process
(PortAudioRenderer.java:893) at
org.jitsi.impl.neomedia.jmfext.media.renderer.audio.PortAudioRenderer.process
(PortAudioRenderer.java:795) at
net.sf.fmj.media.BasicRendererModule.processBuffer
(BasicRendererModule.java:690) at
net.sf.fmj.media.BasicRendererModule.scheduleBuffer
(BasicRendererModule.java:861) at
net.sf.fmj.media.BasicRendererModule.doProcess
(BasicRendererModule.java:317) at net.sf.fmj.media.RenderThread.process
(BasicRendererModule.java:1153) at net.sf.fmj.media.util.LoopThread.run
(LoopThread.java:85)

Which reminded me I occasionally use the Mixxx music player that uses
PortAudio too and it runs fine. (It doesn’t use microphones however.
And Mixxx uses the Ubuntu libportaudio2 package 19+svn20100802-0ubuntu2,
whereas Jitsi rolls up its own, presumably more recent version of
PortAudio, right?)

Hope this helps!

    — gillux

_______________________________________________
users mailing list
users@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/users

--
https://jitsi.org