Conversation
This was referenced Sep 17, 2026
gwdp
marked this pull request as ready for review
September 17, 2026 18:08
gwdp
force-pushed
the
gwdp/h264-encode-level-cap
branch
4 times, most recently
from
September 22, 2026 00:16
9af9441 to
4b43e82
Compare
gwdp
force-pushed
the
gwdp/h264-encode-level-cap
branch
from
September 22, 2026 01:03
4b43e82 to
97b2c20
Compare
This branch has not been deployed
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.
Why
The temporary 1280 cap from #161 was a guess at a symptom. The cause is the negotiated level: libwebrtc builds its VideoToolbox session from
profile-level-idin the offer, and past that level's frame size (MaxFS, H.264 Table A-1) it encodes zero frames while the session stays connected.Browsers advertise Level 3.1, which allows 3600 macroblocks. A 1206x2622 screen is 12464.
Level limits were listed as ruled out in #161. That was wrong; the earlier test rested on a "1920 holds" datapoint that did not reproduce.
How
H264LevelPolicymapslevel_idcto MaxFS and finds the largest long edge that fits--max-dimensionis clamped the same way; asking past the level yields no picture rather than a bigger one--max-dimensionceiling from fix(client): cap the max size picker at--max-dimension#162 staysTest Plan