Skip to content

Upgrade hls.js and set in low latency mode. v6.0.112#3924

Merged
xiaozhihong merged 6 commits intoossrs:developfrom
winlinvip:dev/hlsjs-ll
Feb 5, 2024
Merged

Upgrade hls.js and set in low latency mode. v6.0.112#3924
xiaozhihong merged 6 commits intoossrs:developfrom
winlinvip:dev/hlsjs-ll

Conversation

@winlinvip
Copy link
Copy Markdown
Member

@winlinvip winlinvip commented Jan 6, 2024

HLS typically has a delay of around 30 seconds, roughly comprising three segments, each lasting 10 seconds. We can reduce the delay to about 5 seconds by lowering the segment duration to 2 seconds and starting playback from the last segment, achieving a stable delay.

Of course, this requires setting the OBS's GOP to 1 second, and the profile to baseline, preset to fast, and tune to zerolatency. Additionally, updating a few configurations in the hls.js player is necessary, such as setting it to start playback from the last segment, setting the maximum buffer, and initiating accelerated playback to reduce latency.


Co-authored-by: chundonglinlin chundonglinlin@163.com

@winlinvip winlinvip added the EnglishNative This issue is conveyed exclusively in English. label Jan 6, 2024
@winlinvip
Copy link
Copy Markdown
Member Author

winlinvip commented Jan 6, 2024

image

@xiaozhihong xiaozhihong changed the title Upgrade hls.js and set in low latency mode. Upgrade hls.js and set in low latency mode. v6.0.112 Feb 5, 2024
@xiaozhihong xiaozhihong added the RefinedByAI Refined by AI/GPT. label Feb 5, 2024
@xiaozhihong xiaozhihong merged commit 22c2469 into ossrs:develop Feb 5, 2024
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