Repository navigation
feat(mux): fill the catalog's VR fields on import - #7308
Conversation
Quest-Claim: 357a19cfd54e0c70
Pin moq-mux to kixelated/mp4-atom#254, which stores a field-less trun run as a count, so a moof of many such runs decodes without one entry per sample. Migrate the sample resolver, the segment-start scan, and the per-track fragment rewrite to `Trun.samples`, and test that a moof of 1000 u32::MAX-sample runs decodes and resolves only up to the mdat. Swap the git pin for mp4-atom 0.17.0 once it is published. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An inherited trun run can claim u32::MAX samples in four bytes, so walking every sample for a sync flag before the resolver bounds them would trade the old per-sample allocation for a multi-billion step loop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mp4-atom now decodes a nonzero dOps family instead of refusing it, so the fMP4 importer refuses the table itself until surround Opus lands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Quest-Claim: 7f161c8f3d778853
…moq-dev/moq into quest/m2/mux-vr-fields
Swaps the git pin for the published crate and adapts to the changes released since: trun composition offsets widen to i64, the ES descriptor gains its optional fields, and dref keeps typed entries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MP4 import reads Spherical Video V2 st3d/sv3d and Matroska import reads StereoMode/Projection into the rendition's projection and stereo, deriving fov from symmetric equirectangular bounds. Opus channel mapping family 2 imports as layout "ambisonic". What the catalog cannot describe (cubemap, mesh, pose, cropped or uncentred bounds, other stereo packings, zeroth order or non-diegetic stereo ambisonics) is refused. Finishes quest/m2/mux-vr-fields.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The mdat budget reset per traf, so a moof repeating a forged field-less run across many trafs multiplied the walk. One budget now spans them all. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 57 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: 594fa406934cdfd025954e08e6e54abca1bbd25f.
No actionable findings from this review. MP4 and Matroska spatial metadata map consistently to the catalog's representable projection/stereo subset, including symmetric longitude bounds and explicit refusal of unsupported pose, crops and packing. Opus family-2 channel validation matches the catalog's ambisonic layout. The earlier local segment-scan amplification finding is fixed: the mdat-derived budget now spans the entire moof rather than resetting per traf, and the sample resolver stops on invalid or overlapping ranges.
Direction: sharing the equirectangular conversion and rejecting unrepresentable metadata is preferable to silently labeling spatial media as flat/plain channels. Keeping fMP4 Opus mappings explicitly refused until the separate mapping-table work lands avoids losing decoder information. The disclosed family-3 parsing limitation is pre-existing and remains outside this change.
Verification limits: static GitHub review, including an independent fMP4 resolver/budget pass. I did not execute tests, media playback, the gate or cross-language interop, nor audit mp4-atom's external implementation; reported passing checks are not independently verified.
(Written by OpenAI)
|
Landing
(Written by Claude Opus 5.5) |
#7308 moved moq-mux to mp4-atom 0.17.0, so the bump quest no longer carries 0.17's breaking changes; it waits only on the 0.17.x release with the sgpd bound. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y fills #7308 fills projection, stereo, and the ambisonic layout from MP4 st3d/sv3d, Matroska, and Opus family 2, so the CLI flags and moq_mux::catalog::Spatial duplicate it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
Finishes quest/m2/mux-vr-fields.md: the moq-mux importers fill the hang catalog's spatial fields from moq-dev/moq#5543.
st3d/sv3dthrough mp4-atom 0.17'sspatialfield (fmp4::spatial), likecolrandpasp.StereoModeandProjection(ProjectionType,ProjectionPrivate,ProjectionPose*) fill the same fields (matroska_spatial).codec::spatial::equirectangularderives the catalogfovfrom theequibounds (0.32 fixed point): VR180 bounds of 0.25 each give 180, full coverage leaves it absent (360).layout: "ambisonic"(From<opus::Config> for AudioConfig), so raw Opus, Matroska, FLV, and TS OpusHeads all get it.opus::Mapping::newrefuses family 2 at zeroth order, with RFC 8486's non-diegetic stereo pair, or with a count RFC 8486 forbids (UnsupportedChannelCount).fmp4::Error::UnsupportedSpatial,mkv::Error::UnsupportedSpatial): cubemap, mesh (including Google's mesh VR180), unknown projections, nonzero pose, asymmetric or vertically cropped bounds, bounds leaving no picture, and stereo packings other than mono, left-right, and top-bottom with the left eye first (st3dright-left/custom; Matroska right-eye-first, checkerboard, interleaved, anaglyph, laced). Also refused in MP4: a repeated or undecodablest3d/sv3d/proj/projection box, and ansv3dwithoutproj.trunsamples), swaps its git pin for the now-released crate (reverting itsdeny.tomlallow-git), and adapts to the other 0.17 breaks:TrunEntry::ctsisi64,EsDescriptorhas new optional fields, andDrefkeeps typedentries. Codex's review also found that feat(mux)!: adopt mp4-atom's counted trun samples #7043's segment keyframe scan reset itsmdatbudget per traf, so it now spans the whole moof.quest/m1/cut-audit/fmp4-sample-resolver.md.Public API:
UnsupportedSpatialvariants on the non-exhaustivefmp4::Errorandmkv::Error, plus the breakingmp4_atom0.17 re-export (CHANGELOG updated). MoQ wire: none.Decisions
Decided by the maintainer on 2026-10-30.
Choices made without asking
fovabsent (the catalog's "absent means 360") rather than writing360.st3dmono and MatroskaStereoMode 0leavestereoabsent, and a rectangular MatroskaProjectionType 0leavesprojectionabsent.ProjectionwithoutProjectionPrivatecovers the whole sphere, as FFmpeg reads it. A private payload that isn't a version 0equibody (20 bytes) is refused.ProjectionType, including rectangular, since it would rotate the picture. A NaN pose counts as nonzero.opus::Mapping::new, so it applies wherever an OpusHead is parsed (including the MSF consumer and exporters), not just the importers. That keepsFrom<opus::Config>infallible.vexu/hfov, Matroska's deprecatedOldStereoMode, and codec-level stereo SEI.Testing
just check origin/main: passes on8aad742a58(flake skipped: the local Nix builder can't create user namespaces). After the review fix:cargo clippy -p moq-mux --all-targets --all-features -D warningsandcargo test -p moq-mux --all-features(1877 passed) pass.spherical_boxes_fill_projection_and_stereocovers 360 mono, VR180 left-right withequibounds, and flat top-bottom, across every sample entry.spherical_boxes_the_catalog_cannot_describe_are_refusedcovers cubemap, mesh VR180, asymmetric bounds, vertical crop, yaw/roll pose, right-left, custom, a repeatedst3d, andsv3dwithoutproj.projection_and_stereo_mode_fill_the_catalogand..._are_refused.opus_family_two_is_ambisonic(first order accepted; 1, 6, and 5 channels refused) and raw Opusfamily_two_is_ambisonic.codec::spatialandMapping::new.fieldless_runs_do_not_stall_the_segment_scangains a 1000-traf case.Suggested follow-ups
Mapping::parsestill reads it as a table, so it imports as plain channels or fails as an invalid table. It should be refused, or carried asambisonic.projection/stereo/layoutback intosv3d/st3d, MatroskaProjection, and family 2 heads (out of scope per the Plan).Review
quest review), gpt-6.1-sol, medium effort.8aad742a58: one finding. [P1] the segment keyframe scan's budget reset per traf, allowing CPU amplification. Fixed in594fa40693.594fa406934cdfd025954e08e6e54abca1bbd25f: no findings.(Written by Claude Opus 5.5)
🤖 Generated with Claude Code