[jitsi-dev] Change Jitter Buffer Behaviour


#1

Hi everybody

For a bachelor thesis we have to be able to change the behavior for the
jitter buffer in jitsi. Basicially we wan't do disable the adaptive jitter
buffer and set a fix jitter buffer size.

We found out, that everything regarding the jitter buffer is done inside
libjitsi, specifically in the class 'AudioMediaStreamImpl' based on the
property RECEIVE_BUFFER_LENGTH in libjitsi's Configuration Service.

I have no clue, how to change those values from jitsi itself, without
having to rebuild the whole libjitsi project (where I'm sure I will run
into multiple ant or maven problems, when trying to rebuild a complete,
runnable, Jitsi Package). I was therefore hoping, you could provide me with
some insights or other ideas to achieve our goal.

Another thought we had was to rebuild and repack the whole libjitsi project
and replace the libjitsi library inside the Jitsi installation folder, but
well... It sounds like a bad idea :slight_smile:

Thanks in advance
Max


#2

Hi Max,

Hi everybody

For a bachelor thesis we have to be able to change the behavior for the
jitter buffer in jitsi. Basicially we wan't do disable the adaptive
jitter buffer and set a fix jitter buffer size.

Some of the jitter buffer parameters are configurable via these properties:
net.java.sip.communicator.impl.neomedia.adaptive_jitter_buffer_*

We have code here which passes these to the FMJ Registry:
https://github.com/jitsi/libjitsi/blob/master/src/org/jitsi/impl/neomedia/MediaServiceImpl.java#L1612

For the supported names, refer to the code here:
https://sourceforge.net/p/fmj/code/HEAD/tree/fmj/src.rtp/net/sf/fmj/media/rtp/AudioJitterBufferBehaviour.java#l157

If you need anything more though, you will need to rebuild libjitsi/jitsi, which shouldn't be a problem.

Regards,
Boris

···

On 10/05/16 11:13, Max Obrist wrote:


#3

Hi Boris
thanks for for the quick answer. I now came arround trying this out, but it
seems to have no effect for me.

I added the following lines to the end of the setupFMJ method inside
MediaServiceImpl (Where you pointed me to):

Registry.set("adaptive_jitter_buffer_ENABLE", true);
Registry.set("adaptive_jitter_buffer_MIN_SIZE", 1);
Registry.set("adaptive_jitter_buffer_MAX_SIZE", 1);

But when I check the technical call details during a phone with another
client, the jitter buffer is still at 4 packets.
When I attach my debugger to
https://sourceforge.net/p/fmj/code/HEAD/tree/fmj/src.rtp/net/sf/fmj/media/rtp/AudioJitterBufferBehaviour.java#l155
and
check the values that are read from the registry, MIN_SIZE ist still at 4
and MAX_SIZE at 16. Any Idea what I'm doing wrong?

Regards
Max

···

On Tue, May 10, 2016 at 6:37 PM Boris Grozev <boris@jitsi.org> wrote:

Hi Max,

On 10/05/16 11:13, Max Obrist wrote:
> Hi everybody
>
> For a bachelor thesis we have to be able to change the behavior for the
> jitter buffer in jitsi. Basicially we wan't do disable the adaptive
> jitter buffer and set a fix jitter buffer size.

Some of the jitter buffer parameters are configurable via these properties:
net.java.sip.communicator.impl.neomedia.adaptive_jitter_buffer_*

We have code here which passes these to the FMJ Registry:

https://github.com/jitsi/libjitsi/blob/master/src/org/jitsi/impl/neomedia/MediaServiceImpl.java#L1612

For the supported names, refer to the code here:

https://sourceforge.net/p/fmj/code/HEAD/tree/fmj/src.rtp/net/sf/fmj/media/rtp/AudioJitterBufferBehaviour.java#l157

If you need anything more though, you will need to rebuild
libjitsi/jitsi, which shouldn't be a problem.

Regards,
Boris

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


#4

Hi Boris
thanks for for the quick answer. I now came arround trying this out, but
it seems to have no effect for me.

I added the following lines to the end of the setupFMJ method inside
MediaServiceImpl (Where you pointed me to):

Registry.set("adaptive_jitter_buffer_ENABLE", true);
Registry.set("adaptive_jitter_buffer_MIN_SIZE", 1);
Registry.set("adaptive_jitter_buffer_MAX_SIZE", 1);

But when I check the technical call details during a phone with another
client, the jitter buffer is still at 4 packets.
When I attach my debugger to
https://sourceforge.net/p/fmj/code/HEAD/tree/fmj/src.rtp/net/sf/fmj/media/rtp/AudioJitterBufferBehaviour.java#l155 and
check the values that are read from the registry, MIN_SIZE ist still at
4 and MAX_SIZE at 16. Any Idea what I'm doing wrong?

Not really. My initial idea was to add properties to your jitsi properties file, which used to work (although the last time I tries was probably a couple of years ago).

Since you're building the project now, you might as well rebuild FMJ with the modifications you need. You should be able to build it with "mvn -f m2/jitsi/pom.xml install" (also don't forget to change libjitsi's dependency to SNAPSHOT to pick up the changes).

Boris

···

On 11/05/16 02:55, Max Obrist wrote:

Regards
Max

On Tue, May 10, 2016 at 6:37 PM Boris Grozev <boris@jitsi.org > <mailto:boris@jitsi.org>> wrote:

    Hi Max,

    On 10/05/16 11:13, Max Obrist wrote:
     > Hi everybody
     >
     > For a bachelor thesis we have to be able to change the behavior
    for the
     > jitter buffer in jitsi. Basicially we wan't do disable the adaptive
     > jitter buffer and set a fix jitter buffer size.

    Some of the jitter buffer parameters are configurable via these
    properties:
    net.java.sip.communicator.impl.neomedia.adaptive_jitter_buffer_*

    We have code here which passes these to the FMJ Registry:
    https://github.com/jitsi/libjitsi/blob/master/src/org/jitsi/impl/neomedia/MediaServiceImpl.java#L1612

    For the supported names, refer to the code here:
    https://sourceforge.net/p/fmj/code/HEAD/tree/fmj/src.rtp/net/sf/fmj/media/rtp/AudioJitterBufferBehaviour.java#l157

    If you need anything more though, you will need to rebuild
    libjitsi/jitsi, which shouldn't be a problem.

    Regards,
    Boris

    _______________________________________________
    dev mailing list
    dev@jitsi.org <mailto:dev@jitsi.org>
    Unsubscribe instructions and other list options:
    http://lists.jitsi.org/mailman/listinfo/dev

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