Skip to content

fix: improve initial video quality by setting x-google-start-bitrate for all video codecs#1120

Merged
xianshijing-lk merged 1 commit into
mainfrom
sxian/CLT-3068/fix-initial-video-quality-blurriness-by-setting-x-google-start-bitrate
Jun 30, 2026
Merged

fix: improve initial video quality by setting x-google-start-bitrate for all video codecs#1120
xianshijing-lk merged 1 commit into
mainfrom
sxian/CLT-3068/fix-initial-video-quality-blurriness-by-setting-x-google-start-bitrate

Conversation

@xianshijing-lk

@xianshijing-lk xianshijing-lk commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Apply x-google-start-bitrate SDP hint to all video codecs (VP8, VP9, AV1, H264, H265), not just SVC codecs
  • Use 90% of target bitrate as start bitrate to prevent initial blurriness
  • Degradation preference already defaults to maintainResolution

Problem

Video starts blurry for 5-15 seconds before improving. This is caused by WebRTC's bandwidth estimator starting at ~300kbps and slowly ramping up to the target bitrate.

Solution

x-google-start-bitrate: Tell WebRTC to start at 90% of target bitrate instead of ramping up from ~300kbps. Applied consistently to all video codecs.

Note, The PR only addresses the x-google-start-bitrate fix (changing from SVC-only to all video codecs, and using 0.9 multiplier)

  • The maintainResolution default was already in place in Flutter SDK, so no change was needed for that part

Test plan

  • Verify video quality is sharp from the start when publishing
  • Test with VP8, VP9, H264, AV1 codecs
  • Verify bandwidth estimator adapts properly if network can't handle the start bitrate

🤖 Generated with Claude Code

@xianshijing-lk xianshijing-lk force-pushed the sxian/CLT-3068/fix-initial-video-quality-blurriness-by-setting-x-google-start-bitrate branch from 1043367 to 09169af Compare June 29, 2026 10:08
…for all video codecs

- Apply x-google-start-bitrate SDP hint to all video codecs (VP8, VP9, AV1, H264, H265), not just SVC codecs
- Use 90% of target bitrate as start bitrate to prevent initial blurriness
- Degradation preference already defaults to maintainResolution

This addresses the issue where video starts blurry for several seconds before improving, by telling WebRTC's bandwidth estimator to start at a higher bitrate instead of ramping up from ~300kbps.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@xianshijing-lk xianshijing-lk force-pushed the sxian/CLT-3068/fix-initial-video-quality-blurriness-by-setting-x-google-start-bitrate branch from 09169af to 28a19aa Compare June 30, 2026 03:08

@cloudwebrtc cloudwebrtc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@xianshijing-lk xianshijing-lk merged commit 6bdbc3e into main Jun 30, 2026
17 checks passed
@xianshijing-lk xianshijing-lk deleted the sxian/CLT-3068/fix-initial-video-quality-blurriness-by-setting-x-google-start-bitrate branch June 30, 2026 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants