linphone-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-users] Packet Size Control


From: Mike Dawson
Subject: Re: [Linphone-users] Packet Size Control
Date: Tue, 24 Jan 2012 14:55:48 +0430

Dear All,

Sorry this took a while to get back to - did quite a lot of testing.

For anyone else looking to control ptime/ packet size:

1. One can check the valid ptime combos in the source code of the codec
files in libmediastreamer (msspeex.c, gsm.c etc).  I settled on using
100ms (that's 5x less VPN overhead than 20ms so acceptable for me).

2. Interestingly enough the source code is looking for ptime:100 but
only using ptime=100 for send_fmtp and recv_fmtp in linphonerc has the
desired effect.

3. Linphone seems to save the parameters for a format by it's position
in the codec list sometimes - so if I have speex codec and then switch
it's position with the gsm codec, the format parameters are fixed to the
positions, not the codecs.

All this was checked on the shiny new Linphone3.5 - not sure if it holds
true in Linphone3.3

Regards,

-Mike

On Tue, 2011-12-13 at 22:29 -0500, Dragos D wrote:
> I think it should be overwritten.
> But you should also be able to use:
> send_fmtp=ptime=200 for example in the speex section(s) in .linphonerc.
> Dragos
> 
> 2011/12/13 Mike Dawson <address@hidden>:
> > Excellent - will try compiling that.  Does this mean that the ptime
> > parameter to the codec from .linphonerc will not be actioned?  I tested with
> > setting ptime to 250ms on speex send_fmtp but need to test a few other
> > combos to be sure.  Perhaps 250ms was invalid.
> >
> > Thanks,
> >
> > -Mike
> >
> >
> > On Wed, Dec 14, 2011 at 1:40 AM, Dragos D <address@hidden> wrote:
> >>
> >> In audiostream.c
> >> after
> >>        if (pt->send_fmtp!=NULL)
> >> ms_filter_call_method(stream->encoder,MS_FILTER_ADD_FMTP,
> >> (void*)pt->send_fmtp);
> >>        if (pt->recv_fmtp!=NULL)
> >>
> >> ms_filter_call_method(stream->decoder,MS_FILTER_ADD_FMTP,(void*)pt->recv_fmtp);
> >>
> >> You add:
> >>
> >>  
> >> ms_filter_call_method(stream->encoder,MS_FILTER_ADD_ATTR,(void*)"ptime:60");
> >> //dd
> >>
> >> You can use 60 or 80, 100...
> >>
> >> Dragos
> >>
> >> On Tue, Dec 13, 2011 at 4:25 PM, Dragos D <address@hidden> wrote:
> >> > Yes, it is about ptime and I am looking into the code now... :-)
> >> >
> >> > 2011/12/13 Mike Dawson <address@hidden>:
> >> >> Dear Dragos,
> >> >>
> >> >> Does this relate to the ptime parameter?  Is there somewhere specific
> >> >> to
> >> >> start looking in the code for this?
> >> >>
> >> >>
> >> >> http://lists.gnu.org/archive/html/linphone-developers/2010-09/msg00032.html
> >> >>
> >> >> or more possibly even:
> >> >> http://www.mail-archive.com/address@hidden/msg01231.html
> >> >>
> >> >>
> >> >> Many Thanks,
> >> >>
> >> >> -Mike
> >> >>
> >> >> 2011/12/13 Dragos D <address@hidden>
> >> >>>
> >> >>> I'll have to check the code...
> >> >>>
> >> >>> On Dec 13, 2011 10:51 AM, "Mike Dawson" <address@hidden> wrote:
> >> >>>>
> >> >>>> Hi Dragos,
> >> >>>>
> >> >>>> Thanks for the reply there - so is there a parameter that would be
> >> >>>> used
> >> >>>> for that in .linphonerc - I checked over the docs
> >> >>>>
> >> >>>> http://www.linphone.org/eng/documentation/dev/tuning-linphone.html
> >> >>>>
> >> >>>> Is there something to go in the rtp section or do I have to add to
> >> >>>> the
> >> >>>> protocol sections?
> >> >>>>
> >> >>>> Many Thanks,
> >> >>>>
> >> >>>> -Mike
> >> >>>>
> >> >>>> 2011/12/13 Dragos D <address@hidden>
> >> >>>>>
> >> >>>>> You don't increase the frame size,  you just pack more encoded
> >> >>>>> frames in
> >> >>>>> rtp.
> >> >>>>> Dragos
> >> >>>>>
> >> >>>>> On Dec 13, 2011 8:47 AM, "Mike Dawson" <address@hidden> wrote:
> >> >>>>>>
> >> >>>>>> Dear All,
> >> >>>>>>
> >> >>>>>> I have a situation that I think might be common: I want to run SIP
> >> >>>>>> sessions over a VPN.  I am using mostly the speex codec.  The VPN
> >> >>>>>> is
> >> >>>>>> running over UDP and the issue is that with a small packet being
> >> >>>>>> sent
> >> >>>>>> more frequently the packet overhead is increasing bandwidth usage
> >> >>>>>> 2-3x.
> >> >>>>>>
> >> >>>>>> So what would be helpful would be to pass a parameter to the codec
> >> >>>>>> to
> >> >>>>>> try and increase the frame size so that fewer larger packets go out
> >> >>>>>> (and
> >> >>>>>> reduce the overhead loss).
> >> >>>>>>
> >> >>>>>> I noticed:
> >> >>>>>>
> >> >>>>>>
> >> >>>>>>
> >> >>>>>> http://lists.gnu.org/archive/html/linphone-developers/2010-04/msg00078.html
> >> >>>>>>
> >> >>>>>> But not sure if that applies to audio only - looks like according
> >> >>>>>> to
> >> >>>>>> speex doc this should be possible:
> >> >>>>>>
> >> >>>>>> http://www.speex.org/docs/manual/speex-manual/node13.html
> >> >>>>>>
> >> >>>>>> Does anyone have any hints on where to look for module parameters
> >> >>>>>> or
> >> >>>>>> what to do if they don't yet exist - I guess I would have to modify
> >> >>>>>> some
> >> >>>>>> source.
> >> >>>>>>
> >> >>>>>> Many Thanks,
> >> >>>>>>
> >> >>>>>> -Mike
> >> >>>>>>
> >> >>>>>> 14:24:08.996504 IP user2-Aspire-S3.local.36666 >
> >> >>>>>> static.1.2.3.4.clients.your-server.de.openvpn: UDP, length 141
> >> >>>>>> 14:24:08.996647 IP6 fe80::76de:2bff:fe3d:7b08.mdns > ff02::fb.mdns:
> >> >>>>>> 0
> >> >>>>>> PTR (QM)? 254.255.128.10.in-addr.arpa. (45)
> >> >>>>>> 14:24:08.996792 IP user2-Aspire-S3.local.36666 >
> >> >>>>>> static.1.2.3.4.clients.your-server.de.openvpn: UDP, length 125
> >> >>>>>> 14:24:08.996825 IP user2-Aspire-S3.local.mdns > 224.0.0.251.mdns: 0
> >> >>>>>> PTR
> >> >>>>>> (QM)? 254.255.128.10.in-addr.arpa. (45)
> >> >>>>>> ^C14:24:09.096979 IP ASUS.local.63816 > 239.255.255.250.1900: UDP,
> >> >>>>>> length 133
> >> >>>>>>
> >> >>>>>>
> >> >>>>>> 14:24:56.316471 IP user1-Satellite-A300.local.7078 >
> >> >>>>>> user2-Aspire-S3.local.7078: UDP, length 18
> >> >>>>>> 14:24:56.341113 IP user2-Aspire-S3.local.7078 >
> >> >>>>>> user1-Satellite-A300.local.7078: UDP, length 58
> >> >>>>>> 14:24:56.345263 IP user1-Satellite-A300.local.7078 >
> >> >>>>>> user2-Aspire-S3.local.7078: UDP, length 18
> >> >>>>>> 14:24:56.355261 IP user1-Satellite-A300.local.7078 >
> >> >>>>>> user2-Aspire-S3.local.7078: UDP, length 18
> >> >>>>>> 14:24:56.362484 IP user2-Aspire-S3.local.7078 >
> >> >>>>>> user1-Satellite-A300.local.7078: UDP, length 58
> >> >>>>>>
> >> >>>>>>
> >> >>>>>>
> >> >>>>>>
> >> >>>>>> _______________________________________________
> >> >>>>>> Linphone-users mailing list
> >> >>>>>> address@hidden
> >> >>>>>> https://lists.nongnu.org/mailman/listinfo/linphone-users
> >> >>>>>
> >> >>>>>
> >> >>>>> _______________________________________________
> >> >>>>> Linphone-users mailing list
> >> >>>>> address@hidden
> >> >>>>> https://lists.nongnu.org/mailman/listinfo/linphone-users
> >> >>>>>
> >> >>>>
> >> >>>>
> >> >>>> _______________________________________________
> >> >>>> Linphone-users mailing list
> >> >>>> address@hidden
> >> >>>> https://lists.nongnu.org/mailman/listinfo/linphone-users
> >> >>>>
> >> >>>
> >> >>> _______________________________________________
> >> >>> Linphone-users mailing list
> >> >>> address@hidden
> >> >>> https://lists.nongnu.org/mailman/listinfo/linphone-users
> >> >>>
> >> >>
> >> >>
> >> >> _______________________________________________
> >> >> Linphone-users mailing list
> >> >> address@hidden
> >> >> https://lists.nongnu.org/mailman/listinfo/linphone-users
> >> >>
> >>
> >> _______________________________________________
> >> Linphone-users mailing list
> >> address@hidden
> >> https://lists.nongnu.org/mailman/listinfo/linphone-users
> >
> >
> >
> > _______________________________________________
> > Linphone-users mailing list
> > address@hidden
> > https://lists.nongnu.org/mailman/listinfo/linphone-users
> >
> 
> _______________________________________________
> Linphone-users mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/linphone-users





reply via email to

[Prev in Thread] Current Thread [Next in Thread]