feat: add packet_buffer_init_video config parameter#2
Draft
Rajiv91 wants to merge 1 commit into
Draft
Conversation
Add a new YAML config parameter `packet_buffer_init_video` that sets the initial size of the SFU's circular packet buffer for video, independently of the existing `packet_buffer_size_video` (max capacity). Under degraded networks (WiFi/5G congestion), H.264 packets arrive in bursts of 1,000-2,500 that exceed the default initial bucket size (300, grown to 600). The existing growth logic uses average PPS which doesn't reflect burst peaks, so the bucket never grows large enough. This new parameter allows deployments to start the bucket at the right size. If not set or zero, falls back to InitPacketBufferSizeVideo (300) — preserving existing behavior for all current users. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
packet_buffer_init_videothat sets the initial size of the SFU's circular packet buffer for video, independently ofpacket_buffer_size_video(max capacity)InitPacketBufferSizeVideo(300) if not set — zero impact on existing deploymentsFor a more detailed analysis, please go to number 4 on the list:
https://www.notion.so/irisai/Low-quality-network-investigation-33645056d4d380d4b1e5f3e825077d9d
Cross-repo PRs
fix/livekit-packet-buffer-size(passespacket_buffer_init_video: 2400in the encoder's LiveKit config)Test plan
packetNotFoundCounterrors (vs 134,000+ without the fix)🤖 Generated with Claude Code