Adaptive RTP Jitter buffer or aubuf #184
Replies: 3 comments 5 replies
-
From my observations and tests reordered packets are very rare. I think only for PLC/Opus FEC, pakets have to be in order but also Opus can only handle one lost paket at a time. So we can keep an optional small RTP reorder buffer with 2-3 pakets for PLC/FEC and handle jitter (network spikes etc.) within adaptive aubuf. A more complicated approach could be this: |
Beta Was this translation helpful? Give feedback.
-
Another problem in my opinion is "software" jitter. The RTP socket and decoder are running in re_main thread. So any timer or FD (network etc.) callback introduces jitter. Maybe we can run the RTP fd_listen in a separate worker re thread (re_thread_init()). For sending pakets we already have a separate thread (audio_txmode thread). |
Beta Was this translation helpful? Give feedback.
-
Another kind of jitter is coming from audio buffer output. How steady are audio frames read. E.g. by the pulse player, alsa player. I am currently investigating the "output jitter" for different audio players. Here is a branch for ajb.c:
Currently we are evaluating a new audio module for pulseaudio that uses the native (async) API. The jitter is better because we set the minimum request size of pulseaudio to
These jitter values are relatively low. So I am not sure if it is worth to add these extra code for the output jitter. TODO: More tests with full CPU load, e.g. full HD video + Opus audio SIP calls on imx6. |
Beta Was this translation helpful? Give feedback.
-
@sreimers You told us that you plan to make aubuf something more intelligent. The audio frames already have timestamps and the aubuf may do the jitter and reorder handling by using the timestamp of the auframe struct.
Question: Doesn't the decoder need the RTP packets in order?
Ref: baresip/baresip#1659
Beta Was this translation helpful? Give feedback.
All reactions