Skip to content

RTC: audio packet jitter buffer. v7.0.48#4295

Merged
winlinvip merged 11 commits intoossrs:developfrom
chundonglinlin:feature/rtc-audio-jitter
Jul 17, 2025
Merged

RTC: audio packet jitter buffer. v7.0.48#4295
winlinvip merged 11 commits intoossrs:developfrom
chundonglinlin:feature/rtc-audio-jitter

Conversation

@chundonglinlin
Copy link
Member

@chundonglinlin chundonglinlin commented Feb 22, 2025

Rtp packets may be retransmitted, disordered, jittery, delayed, etc.There may be abnormalities when converting to rtmp.

To reproduce this problem, you need to set the network reordering by tc-ui. Note that you need a linux server, and start it by docker:

docker run --network=host --privileged -it --restart always -d \
    --name tc -v /lib/modules:/lib/modules:ro ossrs/tc-ui:1

Set up 5% packet reordering and a 1ms delay; then you will notice that the audio is stuttering, somewhat noisy, and lacks fluency.

curl http://localhost:2023/tc/api/v1/config/raw -X POST \
  -d 'tcset ens5 --direction incoming --delay 40ms --reordering 5% --port 8000'

Note: Even without network conditions, the natural state can also cause packet reordering, especially in public cloud platforms such as AWS EC2.

Note: You can use command curl http://localhost:2023/tc/api/v1/config/raw -X POST -d 'tcdel --all ens5' to reset the network condition settings.

Check the web console, you will see the reordering setup:

TC Settings

Then, publish stream via WHIP: http://localhost:8080/players/whip.html

And, play via HTTP-FLV: http://localhost:8080/players/srs_player.html

Finished by AI:


Co-authored-by: Haibo Chen 495810242@qq.com

@winlinvip winlinvip added the EnglishNative This issue is conveyed exclusively in English. label Feb 22, 2025
@winlinvip winlinvip force-pushed the develop branch 2 times, most recently from 195435d to 97e2b64 Compare July 1, 2025 14:39
@winlinvip winlinvip force-pushed the feature/rtc-audio-jitter branch from 6ac1399 to a4097d9 Compare July 12, 2025 13:26
@winlinvip winlinvip changed the title RTC: audio packet jitter buffer. RTC: audio packet jitter buffer. v7.0.48 Jul 17, 2025
@winlinvip winlinvip added the RefinedByAI Refined by AI/GPT. label Jul 17, 2025
@winlinvip winlinvip merged commit e712b12 into ossrs:develop Jul 17, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

EnglishNative This issue is conveyed exclusively in English. RefinedByAI Refined by AI/GPT.

Development

Successfully merging this pull request may close these issues.

3 participants