#969 closed enhancement (fixed)
Improvement in jitter buffer algoritm for low bandwidth network (thanks Emil Sturniolo for the suggestion)
Reported by: | bennylp | Owned by: | nanang |
---|---|---|---|
Priority: | normal | Milestone: | release-1.6 |
Component: | pjmedia | Version: | trunk |
Keywords: | Cc: | ||
Backport to 1.x milestone: | Backported: |
Description (last modified by nanang)
On low bandwidth network, high jitter and frame lost are usually the issues. The first issue is basically jitter buffer (JB) responsibility area.
One simple way to detect jitter is by detecting the existence of burst, i.e: number of incoming frames from network between two playout clockticks, where without jitter, it should be always equal to one. Current JB uses such mechanism to measure actual burst level and use the burst level to manage the latency (due to clock drift) by periodically dropping/discarding frames. However as clock drift usually increases the latency very smoothly, JB will only drop/discard a frame at least every 200ms.
In fact, it's been reported that as the burst is rather extreme in low bandwidth network, discard rate of 200ms seems to be insufficient as frequently JB tends to get full (high latency). Moreover, when it is full, it will drop 1/4th of its size when new frame arrives. This causes large portion of a conversation to be dropped. So, the issues identified here are latency and audio cut.
A better algorithm to optimize latency and avoid bulk drops, let's say progressive discard algorithm, will progressively discard frames as the buffer fills up.
The algorithm specifications:
- Instead of dropping large consecutive frames, it should discard frames in spread.
- The discard rate/aggressiveness should be adaptive to the network condition, notice some useful real-time indicators such as latency/size, burst level.
- JB discards a frame by marking the frame with specific internal frame type, such as PJMEDIA_JB_DISCARDED_FRAME.
- Discarded frames will not be returned to application, it will just get ignored/skipped in GET operation. So application will never get a frame with type PJMEDIA_JB_DISCARDED_FRAME.
- Avoid discarding back-to-back frames.
- Pass jbuf_test (of pjmedia_test), it may also need a test case of periodic large-burst spikes.
Change History (6)
comment:1 Changed 15 years ago by bennylp
- Milestone changed from release-1.5 to release-1.6
comment:2 Changed 15 years ago by nanang
- Description modified (diff)
- Summary changed from Improvement in jitter buffer algoritm to make space for new frames when it is full (thanks Emil Sturniolo for the suggestion) to Improvement in jitter buffer algoritm for low bandwidth network (thanks Emil Sturniolo for the suggestion)
comment:3 Changed 15 years ago by nanang
comment:4 Changed 15 years ago by bennylp
Related to this, in r3067:
- make maximum PLC generated frames configurable (PJMEDIA_MAX_PLC_DURATION_MSEC)
comment:5 Changed 15 years ago by nanang
- Resolution set to fixed
- Status changed from new to closed
In r3111: minor update, removed 'experimental feature' comment on progressive discard.
In r3065: