Repository navigation
fix(moq-mux): send the H.265 picture aspect, not the pixel aspect (backport #5574) - #6631
Conversation
…ckport #5574) The H.265 importer copied the VUI sample aspect into the catalog's displayAspectWidth/Height, so a 1280x720 square-pixel stream played square in @moq/watch. It now omits the fields for square samples and sends the whole picture's aspect otherwise, and refuses an SPS whose conformance window crops the picture to nothing. The draft-lcurley-moq-hang.md wording change stays on main, where the draft is versioned. Co-authored-by: Adidharma Torutama <adidharmatoru@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit d91b042)
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
The release backport is #6631. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0d70b8c031
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let display_aspect = vui_data.display_aspect(head.width, head.height); | ||
| config.display_aspect_width = display_aspect.map(|(width, _)| width); | ||
| config.display_aspect_height = display_aspect.map(|(_, height)| height); |
There was a problem hiding this comment.
Synchronize the draft's aspect-ratio semantics
This backport changes the aspect ratio emitted in the catalog and clarifies its meaning in both language schemas, but leaves drafts/draft-lcurley-moq-hang.md unchanged. Its video section still describes stretching coded pixels and a “1:1 ratio” without explicitly distinguishing sample aspect from whole-picture aspect, the distinction responsible for this playback bug. Update that wording alongside the implementation; the applicable cross-language rule requires catalog changes to update the draft in the same PR, including for this backport.
AGENTS.md reference: rs/moq-mux/AGENTS.md:L14-L14
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Leaving this as is. The maintainer accepted keeping the draft wording off release: release's copy of drafts/draft-lcurley-moq-hang.md predates the versioned moq-hang-04 changelog the wording change lands under, so porting it would mean inventing a draft revision that never shipped. The wording landed on main with #5574, where the draft is versioned, and this backport changes no wire format: the catalog fields keep their names and types, and only the doc comments and the value the H.265 importer writes change.
(Written by Claude Opus 5.5)
|
Merging: Codex reviewed head 0d70b8c and required Check passed. Its one finding (port the draft wording) is declined, since the maintainer accepted keeping that change on (Written by Claude Opus 5.5) |
Backport of #5574 onto
release, so the next moq-mux and libmoq patch put the H.265 picture's display aspect in the catalog, not the VUI sample aspect. Reported in #6536.Why
On
release, the H.265 importer copies the VUIaspect_ratio_info(the sample aspect) intodisplayAspectWidth/displayAspectHeight. A 1280x720 hevc_nvenc stream signalling square samples (aspect_ratio_idc1) gets1:1, which @moq/watch hands to WebCodecs as the whole picture's aspect, so 16:9 video plays square.Change
A cherry-pick of #5574's code, which applied cleanly:
VuiDatanow holds the sample aspect, anddisplay_aspectturns it into the picture aspect: none for square samples, otherwisewidth*sar_w : height*sar_hreduced (1440x1080 at 4:3 becomes 16:9).SpsHead::from_rbspcrops the conformance window with checked arithmetic and refuses a window that leaves no picture, instead ofscuffle_h265's uncheckedcropped_width, so the aspect math never sees a zero or wrapped size.hang::catalog::VideoConfig,moq_mux::catalog::VideoHint,MoqVideoHint, and the js/hang schema say the fields are the picture aspect.Left out: the
drafts/draft-lcurley-moq-hang.mdwording, which conflicts withrelease's draft (nomoq-hang-04changelog) and is versioned onmain.API and wire impact
None. No signatures or fields change; only doc comments and what value the H.265 importer writes. Ships as a patch.
Checks
just check origin/releasepasses: Rust (nextest, 2404 + 387 + 133 + 78 tests), clippy, biome, and the doc and Python checks it selected.cargo nextest run -p moq-mux h265: 33 passed.The quest tracking this, #6619, closes the issue on
mainand should merge after this one.🤖 Generated with Claude Code
(Written by Claude Opus 5.5)