Page Index Toggle Pages: [1] 2  Send TopicPrint
Hot Topic (More than 10 Replies) SIP Crackle / Jitter (Read 15425 times)
TheBashar
YaBB Newbies
*
Offline


Phoner ist großartig!

Posts: 9
Joined: 25. Apr 2007
Gender: Male
SIP Crackle / Jitter
25. Apr 2007 at 23:17
Print Post  
Phoner (and PhonerLite) are really great.  The only major issue I have with them is the audio quality suffers from extensive crackles which I think are caused by jitter.  Is there any way to improve this?  An adjustable jitter buffer that could be increased perhaps?

Thanks,
Steve
  
Back to top
 
IP Logged
 
JB
God Member
*****
Offline


Phoner-Support

Posts: 1691
Location: bei Bremen & Göttingen
Joined: 27. May 2004
Gender: Male
Re: SIP Crackle / Jitter
Reply #1 - 25. Apr 2007 at 23:25
Print Post  
Hello Bashar,

I do not know, where these crackles may come from, but maybe disabling the direct-sound option can help. Please try it.

If it is a problem which can be solved by a jitter control, this is a topic for Heiko, the author of phoner and phoner lite. He will then write something about it here.

Sincerely, Jens
  
Back to top
 
IP Logged
 
TheBashar
YaBB Newbies
*
Offline


Phoner ist großartig!

Posts: 9
Joined: 25. Apr 2007
Gender: Male
Re: SIP Crackle / Jitter
Reply #2 - 26. Apr 2007 at 00:45
Print Post  
JB wrote on 25. Apr 2007 at 23:25:
maybe disabling the direct-sound option can help.


Thank you for the suggestion.  I went back and tested more carefully.  I made a mistake in my initial report.  Phoner Lite suffers from extensive crackle / jitter.  Phoner itself has much less jitter / crackle and is quite acceptable.  I cannot imagine why they would be different since they use the same internals.

Phoner Lite does not seem to have an option to disable direct-sound, so I could not test it.

I tested Phoner with direct-sound disabled and after 5-10 seconds it would consume 100% CPU and I would have to kill it.

Thanks again!
  
Back to top
 
IP Logged
 
Phoner Admin
YaBB Administrator
*****
Offline



Posts: 11421
Location: Germany
Joined: 12. Oct 2003
Gender: Male
Re: SIP Crackle / Jitter
Reply #3 - 26. Apr 2007 at 07:07
Print Post  
First question: Do you really use the latest version of Phoner (2.02) and PhonerLite (1.29)?
Did you messure the jitter with an external tool like Wireshark?
In which direction the sound quality is bad? What codec is in use?
  
Back to top
WWW  
IP Logged
 
TheBashar
YaBB Newbies
*
Offline


Phoner ist großartig!

Posts: 9
Joined: 25. Apr 2007
Gender: Male
Re: SIP Crackle / Jitter
Reply #4 - 26. Apr 2007 at 11:17
Print Post  
Quote:
First question: Do you really use the latest version of Phoner (2.02) and PhonerLite (1.29)?
Did you messure the jitter with an external tool like Wireshark?
In which direction the sound quality is bad? What codec is in use?


Hi,

I tested with both the latest stable and the latest beta versions of both Phoner and PhonerLite.  No, I measured the crackle with my ear and guessed that it was caused by jitter.  I didn't actually notice the statistics tab until I retested just now.  Jitter reached 18 in a 30s test, but I don't know whether that is good or bad.  I originally planned to record an audio clip of the crackling, but PhonerLite doesn't seem to have the record function like Phoner.  I am testing against an echo server that is in place when the conference call is not in session - so I can't tell if it is the outbound or inbound or both that is responsible for the jitter.  The codec used in both directions is u-law.  It seems to always choose that one no matter its position on the list.  I tried all six permutations of echo cancellation and silence suppression.  They don't seem to change the crackle.  I can perform a Wireshare capture if need be, but I don't have the knowledge to interpret it myself.

Thanks,
Steve
  
Back to top
 
IP Logged
 
Phoner Admin
YaBB Administrator
*****
Offline



Posts: 11421
Location: Germany
Joined: 12. Oct 2003
Gender: Male
Re: SIP Crackle / Jitter
Reply #5 - 26. Apr 2007 at 11:32
Print Post  
Quote:
I didn't actually notice the statistics tab until I retested just now.  Jitter reached 18 in a 30s test, but I don't know whether that is good or bad.

That is very, very bad!

Did you test with other softphones? They don't have this problem?
Please do a Wireshark trace and send me the file to my [urlmailto:info@phoner.de]mail address[/url]. You can analyze the RTP traffic with Wireshark. There you can see the jitter and other things.
  
Back to top
WWW  
IP Logged
 
TheBashar
YaBB Newbies
*
Offline


Phoner ist großartig!

Posts: 9
Joined: 25. Apr 2007
Gender: Male
Re: SIP Crackle / Jitter
Reply #6 - 26. Apr 2007 at 11:37
Print Post  
Quote:
That is very, very bad!

Did you test with other softphones? They don't have this problem?


Yes, I've been doing a softphone comparison so I've tested maybe 5-7 recently.  Some have minor crackles, but nothing is as bad in that category as PhonerLite.  In fact, Phoner itself has much much less crackles than PhonerLite.

I'll try to get you a Wireshark capture in about an hour.

Thanks,
Steve
  
Back to top
 
IP Logged
 
Phoner Admin
YaBB Administrator
*****
Offline



Posts: 11421
Location: Germany
Joined: 12. Oct 2003
Gender: Male
Re: SIP Crackle / Jitter
Reply #7 - 26. Apr 2007 at 12:52
Print Post  
Are you testing with a special provider? It would be good for me to reproduce this problem. I don't have a counterpart that sends with such high jitter.
  
Back to top
WWW  
IP Logged
 
Phoner Admin
YaBB Administrator
*****
Offline



Posts: 11421
Location: Germany
Joined: 12. Oct 2003
Gender: Male
Re: SIP Crackle / Jitter
Reply #8 - 26. Apr 2007 at 13:50
Print Post  
I got your Wireshark trace. I could see, that you make a call without any authorization. So I used your data and called there for my self. I can hear my voice absolutely clear - no crackle at all.
I don't know, what I can do for you.
  
Back to top
WWW  
IP Logged
 
TheBashar
YaBB Newbies
*
Offline


Phoner ist großartig!

Posts: 9
Joined: 25. Apr 2007
Gender: Male
Re: SIP Crackle / Jitter
Reply #9 - 26. Apr 2007 at 23:13
Print Post  
Quote:
I got your Wireshark trace. I could see, that you make a call without any authorization. So I used your data and called there for my self. I can hear my voice absolutely clear - no crackle at all.
I don't know, what I can do for you.


Thank you for looking in to the problem.

Can you see the jitter from the trace I sent?  Would having a contrasting trace of Phoner without crackles help?  Does the debug log from Phoner contain the jitter information like the statistics tab from PhonerLite?  Would  having an audio recording of PhonerLite with crackles help in anyway?

I appreciate how much more difficult it is debug a problem if you can't reproduce it, but I really think if the problem is markedly different in Phoner and PhonerLite and they rely on the same internals, it should be possible to figure out what is different.

I have some other testing I would like to do.  So far, I've used UDP.  I'd like to try TCP.  My router does not forward most ports.  Let me configure my laptop as the DMZ and see if that changes anything.

On a separate note, is the source to Phoner and PhonerLite available?

Thanks,
Steve
  
Back to top
 
IP Logged
 
Phoner Admin
YaBB Administrator
*****
Offline



Posts: 11421
Location: Germany
Joined: 12. Oct 2003
Gender: Male
Re: SIP Crackle / Jitter
Reply #10 - 27. Apr 2007 at 12:52
Print Post  
Quote:
Can you see the jitter from the trace I sent?  Would having a contrasting trace of Phoner without crackles help?  Does the debug log from Phoner contain the jitter information like the statistics tab from PhonerLite?  Would  having an audio recording of PhonerLite with crackles help in anyway?
I had absolutely the same jitter values like you. Maybe you are using different sound devices? Did you disable DirectSound in Phoner? I got no difference with Phoner or PhonerLite.

Quote:
I have some other testing I would like to do.  So far, I've used UDP.  I'd like to try TCP.  My router does not forward most ports.  Let me configure my laptop as the DMZ and see if that changes anything.
I tested with TCP too. But TCP is only used for signalling. The media (RTP) is still transmitted by UDP. You don't have any advantage by using TCP with this above problem.

Quote:
On a separate note, is the source to Phoner and PhonerLite available?
Sorry, but both applications are closed source only!
  
Back to top
WWW  
IP Logged
 
TheBashar
YaBB Newbies
*
Offline


Phoner ist großartig!

Posts: 9
Joined: 25. Apr 2007
Gender: Male
Re: SIP Crackle / Jitter
Reply #11 - 28. Apr 2007 at 22:43
Print Post  
Quote:
I had absolutely the same jitter values like you. Maybe you are using different sound devices?


Now that's odd.  You had the same jitter values but it did not result in audible crackles?  I had assumed that the difference between Phoner and PhonerLite was in the network handling.   But if the jitter is not the cause of the crackles, maybe it is in the connection to the sound device.

Changing the sound device in PhonerLite is difficult since you can only access it in the wizard.  I did retest with Phoner though, selecting both "default" and my specific sound device.  Neither selection resulted in the crackles I hear in PhonerLite.  I think I'm going to try to find a way to record a short PhonerLite call just so you don't think I'm making this up.

Quote:
Did you disable DirectSound in Phoner? I got no difference with Phoner or PhonerLite.


Phoner does not exhibit the problem when using DirectSound.  When I try to disable DS, Phoner goes crazy after about 10 seconds and eats the CPU.  I then have to kill it.  Since PhonerLite does not have any options regarding DirectSound, I assume it uses it all the time.  Can you confirm this?

I will try to get a recording of the crackles so you don't think I'm crazy.  I will also try to disable DirectSound on only the input or output sound device in Phoner to see if I can isolate the CPU hog problem to one or the other.

Thanks,
Steve
  
Back to top
 
IP Logged
 
Phoner Admin
YaBB Administrator
*****
Offline



Posts: 11421
Location: Germany
Joined: 12. Oct 2003
Gender: Male
Re: SIP Crackle / Jitter
Reply #12 - 30. Apr 2007 at 17:11
Print Post  
You can select the sound devices in PhonerLite by clicking with the right mouse button on the microphone and speaker button. That is all explained in the help file  Wink

There is one major difference between Phoner and PhonerLite: PhonerLite uses a fixed buffer size of 30 ms - in Phoner you can configure this at "Options/Communications/CAPI". If you select there a value of 240 (that is equal to 30 ms) the quality should be the same.
  
Back to top
WWW  
IP Logged
 
TheBashar
YaBB Newbies
*
Offline


Phoner ist großartig!

Posts: 9
Joined: 25. Apr 2007
Gender: Male
Re: SIP Crackle / Jitter
Reply #13 - 01. May 2007 at 03:50
Print Post  
Quote:
You can select the sound devices in PhonerLite by clicking with the right mouse button on the microphone and speaker button. That is all explained in the help file  Wink


Thanks!  It's nice to know where that function is accessed.

Quote:

There is one major difference between Phoner and PhonerLite: PhonerLite uses a fixed buffer size of 30 ms - in Phoner you can configure this at "Options/Communications/CAPI". If you select there a value of 240 (that is equal to 30 ms) the quality should be the same.


Bingo!  That's where the difference in crackles are coming from.  I ran a test with it set to 240 and I'm fairly sure the quality sounded the same as PhonerLite.  I don't suppose there is any way to make that dynamic based of the current jitter value, kind of like the dynamic send and receive buffer, is there?

On a separate note, I tested again and the 100% CPU hang that I mentioned earlier only seems to be triggered with _both_ microphone and speaker DirectSound disabled.  And, it seems to be more easily triggered by bumping the microphone.  So it might have something to do with clipping or overscale input or something like that.

Thanks for helping me isolate where the difference in audio quality was coming from.  Helps me not feel like I am going crazy!

Cheers,
Steve
  
Back to top
 
IP Logged
 
Phoner Admin
YaBB Administrator
*****
Offline



Posts: 11421
Location: Germany
Joined: 12. Oct 2003
Gender: Male
Re: SIP Crackle / Jitter
Reply #14 - 01. May 2007 at 07:19
Print Post  
That used block size has nothing to with jitter! Please don't mix jitter control with block size handling. The smaller the blocks are - the shorter is delay, but your PC and especially your sound device has more work to do.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint