Skip to content

quest(m2): mp4-atom dOps channel mapping - #5819

Closed
kixelated wants to merge 2 commits into
mainfrom
quest/m2/mp4-atom-dops-mapping
Closed

kixelated wants to merge 2 commits into
mainfrom
quest/m2/mp4-atom-dops-mapping

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Finishes quest/m2/mp4-atom-dops-mapping.md. The library work is kixelated/mp4-atom#246; this PR is the consumer side and the bump.

Changes

  • dOps: decode and encode any channel mapping family kixelated/mp4-atom#246: Dops decodes and encodes any channel mapping family as channel_mapping: Option<OpusChannelMapping> (None is family 0), checking the table against the output channel count and the RFC 7845 §5.1.1 stream rules on both paths. Family 0 encodes byte-identically.
  • moq-mux fMP4 import: the importer used to rely on mp4-atom refusing a nonzero family. It now refuses a table itself with opus::Error::UnsupportedMappingFamily, so a surround track is never imported as stereo with its table dropped. The regression test builds a real family 1 dOps and fails without the check.
  • Export writes channel_mapping: None; it already refuses a description with a table.
  • Deletes the quest and unblocks quest/m2/cmaf-opus-surround.md, whose plan now names both refusals to replace.

Remaining before ready

The workspace temporarily patches mp4-atom to the dops-channel-mapping branch, which cargo deny refuses (unknown-git = "deny"), so CI will fail on that. Once #246 merges and release-plz cuts 0.17.0, replace the patch with mp4-atom = "0.17" in rs/moq-mux/Cargo.toml.

Public API and wire impact

  • moq-mux: no API change. An fMP4 Opus track with a dOps mapping table fails with UnsupportedMappingFamily instead of mp4-atom's generic decode error.
  • mp4-atom (breaking, 0.17): new Dops::channel_mapping field and OpusChannelMapping type.
  • Wire: none.

Open decisions

  1. Dops shape (in Make some automation for publishing NPM packages. #246). Recommended: Option<OpusChannelMapping> beside output_channel_count. Alternatives: a flat channel_mapping_family: u8 plus an optional table, which mirrors the spec but allows family 0 with a table; or an enum replacing output_channel_count, which drops the redundant count but breaks every caller harder.
  2. Table field name (in Make some automation for publishing NPM packages. #246). Recommended: channel_mapping, mirroring the spec. Alternative: table, which reads better at call sites.

Checks

  • mp4-atom: cargo check, clippy -D warnings, fmt --check, and cargo test --all-targets with and without --all-features.
  • moq: just check passes against the patched branch; the new regression test fails without the import check. cargo deny check sources fails on the temporary patch, as expected.

Follow-ups

  • quest/m2/cmaf-opus-surround.md is unblocked once this lands: import and export the table through opus::Mapping.
  • mp4-atom does not check that family 0 declares one or two channels (RFC 7845); moq's Opus config checks its own head, so it is left as is.

(Written by Claude Opus 5.5)

🤖 Generated with Claude Code

kixelated and others added 2 commits October 16, 2026 17:50
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mp4-atom now decodes any dOps channel mapping family (kixelated/mp4-atom#246), so the Opus importer can no longer rely on it refusing a table. Refuse one explicitly until surround import lands, and point the workspace at the mp4-atom branch until it releases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated

Copy link
Copy Markdown
Collaborator Author

Started unattended from the quest. Library work is in kixelated/mp4-atom#246 (draft). This PR stays a draft until #246 releases and the temporary branch patch becomes mp4-atom = "0.17". The Dops shape and the table field name are open for the maintainer; the PR body has the options and recommendations.

(Written by Claude Opus 5.5)

@kixelated

Copy link
Copy Markdown
Collaborator Author

Closing in favor of folding this quest into quest/m2/cmaf-opus-surround.md (#5891). On its own this PR only swaps mp4-atom's generic decode error for UnsupportedMappingFamily, which does not justify a breaking mp4-atom 0.17; the payoff is surround Opus. The surround quest now carries the #246 Dops shape, the facts settled here, and the two open decisions (shape and field name), so the mp4-atom bump and the moq-mux import/export land together in one PR. kixelated/mp4-atom#246 stays open for that work.

(Written by Claude Opus 5.5)

@kixelated kixelated closed this Oct 18, 2026
@kixelated
kixelated deleted the quest/m2/mp4-atom-dops-mapping branch October 22, 2026 06:01
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.

1 participant