From 7d65bab60895bc4e6c11e1cd08e1724add4a8089 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Sun, 8 Nov 2026 17:50:48 -0800 Subject: [PATCH] quest: delete content protection until a consumer needs it Co-Authored-By: Claude Opus 5.5 --- quest/m3/README.md | 1 - quest/m3/drm/README.md | 23 ------------------ quest/m3/drm/bindings.md | 18 -------------- quest/m3/drm/import.md | 51 ---------------------------------------- quest/m3/drm/mp4-atom.md | 21 ----------------- quest/m5/README.md | 1 - quest/m5/drm-playback.md | 22 ----------------- 7 files changed, 137 deletions(-) delete mode 100644 quest/m3/drm/README.md delete mode 100644 quest/m3/drm/bindings.md delete mode 100644 quest/m3/drm/import.md delete mode 100644 quest/m3/drm/mp4-atom.md delete mode 100644 quest/m5/drm-playback.md diff --git a/quest/m3/README.md b/quest/m3/README.md index 347a11eb24e..4536d3edef8 100644 --- a/quest/m3/README.md +++ b/quest/m3/README.md @@ -74,7 +74,6 @@ federation) land. - [fMP4 and TS imports publish BCP-47 languages](/quest/m3/import-lang-iso639.md) - ISO 639-2 codes become `en`-style tags on audio and text - [HLS carries every audio language](/quest/m3/hls-audio-languages.md) - every `EXT-X-MEDIA` audio entry imports with its `LANGUAGE`, and exports write it back - [A refused follower asks a replacement handler](/quest/m3/follow-refused-retry.md) - a same-instance handler swap with identical route details re-asks a refused `Following`, while listeners still see no change -- [Content protection](/quest/m3/drm/README.md) - Common Encryption CMAF publishes unchanged, signalled in the hang `drm` section and MSF `contentProtections`, with license URLs from Rust, the CLI, and every binding - [iOS capture](/quest/m3/mobile-capture-ios.md) - Rust captures the camera and screen on iOS, setting the catalog rotation - [Android capture](/quest/m3/mobile-capture-android.md) - Rust captures through NDK/JNI on Android, reusing the existing codecs and setting the catalog rotation - [Latest readers use Range::live()](/quest/m3/readers-range-live.md) - after #6278, readers start at the live edge without waiting on `largest()` diff --git a/quest/m3/drm/README.md b/quest/m3/drm/README.md deleted file mode 100644 index b3521a0576f..00000000000 --- a/quest/m3/drm/README.md +++ /dev/null @@ -1,23 +0,0 @@ -# Content protection - -## Goal - -Common Encryption CMAF (`cenc` and `cbcs`) publishes over MoQ unchanged. -The hang catalog's `drm` section and the MSF catalog's CMSF `contentProtections` (draft-ietf-moq-cmsf section 4) signal each protected rendition's scheme, keys, DRM systems, and license servers. -Rust, the CLI, and every binding can set the license servers. -Key rotation, clear lead, and DRM for LOC tracks are out of scope. - -## Plan - -Imported from [#7766](https://github.com/moq-dev/moq/issues/7766) on 2026-11-03, whose reporter has a working prototype ([michaelstuurman/moq@fcf90470d](https://github.com/michaelstuurman/moq/commit/fcf90470d91bd3a868aea20448cf3e5bc4b54978)) that plays in Chrome with ClearKey. -Decided with the maintainer on 2026-11-03: - -- The hang catalog gets a root `drm` section, and the MSF catalog renders it into CMSF's fields, since MSF is always rendered from hang. A license URL needs a home that the hang catalog also carries. -- mp4-atom gains the protection boxes upstream, rather than moq-mux splicing a raw sample entry back into the init it encodes. -- `` hides protected renditions as unplayable. WebCodecs cannot decrypt, and browser playback through MSE and EME is [deferred](/quest/m5/drm-playback.md). - -## Required - -- [mp4-atom protection boxes](/quest/m3/drm/mp4-atom.md) - mp4-atom round-trips `encv`/`enca`, `sinf`, and `pssh`, released and bumped here -- [Protected CMAF import](/quest/m3/drm/import.md) - `moq publish import fmp4 --cmaf` passes CENC media through, signalled in hang `drm` and MSF `contentProtections`, with license URLs from Rust and the CLI -- [Protected CMAF in the bindings](/quest/m3/drm/bindings.md) - moq-ffi and every wrapper set license URLs on import and read each rendition's `drm` entries diff --git a/quest/m3/drm/bindings.md b/quest/m3/drm/bindings.md deleted file mode 100644 index 0549ab9d090..00000000000 --- a/quest/m3/drm/bindings.md +++ /dev/null @@ -1,18 +0,0 @@ -# [M] Protected CMAF in the bindings - -## Goal - -Every binding publishes and reads protected CMAF with the same reach as Rust: - -- moq-ffi's container importers take license and certificate URLs per DRM system. -- moq-ffi's catalog exposes each rendition's `drm` entries. -- Every wrapper the Cross-Package Sync table lists, and its `doc/lib` page, mirrors both. - -## Plan - -Decided with the maintainer on 2026-11-03: license URLs reach the bindings too, not only Rust and the CLI. -Mirror the Rust config shape and names [the import](/quest/m3/drm/import.md) lands. - -## Required - -- [Protected CMAF import](/quest/m3/drm/import.md) - the Rust config and the hang `drm` section the bindings expose diff --git a/quest/m3/drm/import.md b/quest/m3/drm/import.md deleted file mode 100644 index 04f99a48145..00000000000 --- a/quest/m3/drm/import.md +++ /dev/null @@ -1,51 +0,0 @@ -# [L] Protected CMAF import - -## Goal - -`moq publish ... import fmp4 --cmaf` publishes Common Encryption fMP4 (`cenc` and `cbcs`) unchanged, and both catalogs signal the protection: - -- Each protected rendition's per-track init keeps its `encv`/`enca` entry and the moov's `pssh` boxes, as CMSF section 4.2 requires. -- The hang catalog carries a root `drm` section that each protected rendition references. A dangling reference is refused, like a missing `initRef`. -- The MSF catalog renders that section as CMSF's `contentProtections` and per-track `contentProtectionRefIDs`, and parsing an MSF catalog maps them back. -- License and FairPlay certificate URLs are set from Rust and from a `moq publish` flag. -- `` hides protected renditions as unplayable. - -## Plan - -Start from the reporter's prototype ([michaelstuurman/moq@fcf90470d](https://github.com/michaelstuurman/moq/commit/fcf90470d91bd3a868aea20448cf3e5bc4b54978)), on the typed boxes from [mp4-atom](/quest/m3/drm/mp4-atom.md) instead of its entry swap. - -### Catalog - -- The section is hang's own, mirroring CMSF section 4.1 entries 1:1 so rendering MSF is a straight mapping. Renaming CMSF's members to hang's style is welcome (maintainer, 2026-11-03); propose the names in the PR. -- Each entry is one DRM system, one scheme, and one default KID. A CMSF entry names a single DRM system, and listing several KIDs in one entry would lose which key a track uses, so video and audio under separate keys get separate entries. -- Scheme, default KID, system ID, and `pssh` come from each init's `schm`, `tenc`, and `pssh`. Tracks with the same system, scheme, and key share an entry. -- License and certificate URLs are not in the media, so the publisher supplies them per DRM system through the importer's Rust config and a `moq publish` flag (maintainer, 2026-11-03: Rust, CLI, and [bindings](/quest/m3/drm/bindings.md)). A URL for a system the media does not carry is refused. -- A rendition's codec string names the codec `frma` wraps (`avc1...`, `mp4a...`), as MSE and EME expect. -- Leave out CMSF's authorization URL (section 4.1.1.4.4), which the draft gives no member name. Check `robustness`'s member name against the current draft. - -### Import - -Passthrough only. -Passthrough re-encodes each fragment, which moves `senc`, so point the fragment's `saio` at its IVs again. -Refuse, rather than publish undecryptable media: - -- encrypted input without passthrough, because unwrapping loses the per-sample IVs; -- an encrypted track whose edit list drops samples, because the kept samples' auxiliary information is not restated; -- an encrypted track without any `pssh`, because the catalog could not name its DRM system and, per CMSF section 4.1.2, would read as clear; -- CENC auxiliary information outside `senc`, or split over several `saio` boxes; -- key rotation (`pssh` in a `moof`, or `seig` sample groups); -- a clear lead (an `stsd` with both an encrypted and a clear entry), which stays refused as multiple codecs. - -### Tests and docs - -Fixtures: the prototype's ClearKey `cenc` file (ffmpeg's `cenc-aes-ctr` plus an added ClearKey `pssh`), and a `cbcs` file from Shaka Packager or Bento4, since ffmpeg cannot encrypt `cbcs`. -Keep both small. -Update `js/hang`'s catalog types, `drafts/draft-lcurley-moq-hang.md`, the catalog page under `doc/concept`, and `doc/bin/cli.md`. - -## Required - -- [mp4-atom protection boxes](/quest/m3/drm/mp4-atom.md) - the typed `encv`, `sinf`, and `pssh` atoms this builds on - -## Closes - -- [#7766](https://github.com/moq-dev/moq/issues/7766) - encrypted CMAF is refused and the MSF catalog can't signal CMSF content protection diff --git a/quest/m3/drm/mp4-atom.md b/quest/m3/drm/mp4-atom.md deleted file mode 100644 index e86d54d0b2f..00000000000 --- a/quest/m3/drm/mp4-atom.md +++ /dev/null @@ -1,21 +0,0 @@ -# [M] mp4-atom protection boxes - -## Goal - -[kixelated/mp4-atom](https://github.com/kixelated/mp4-atom) decodes and encodes Common Encryption's boxes as typed atoms, and this workspace pins the release that ships them: - -- `encv` and `enca` sample entries: the original entry's fields plus a `sinf` holding `frma`, `schm`, and `schi` with `tenc`. -- `pssh` as a child of `moov` and of `moof`. - -An encrypted init then round-trips byte-for-byte through `mp4_atom::Moov`. - -## Plan - -0.17.0 has `senc`, `saio`, and `saiz` but none of these. -They are what let [the import](/quest/m3/drm/import.md) keep the encrypted entry and the `pssh` boxes in the per-track init, without the prototype's encode-unwrapped-then-swap step (decided 2026-11-03). -Parse `moof`'s `pssh` too, even though key rotation stays out of scope, so the importer can refuse it rather than silently drop it. - -Cover `tenc` versions 0 and 1, since `cbcs` uses version 1's crypt and skip byte blocks and a constant IV. -Open the PR on kixelated/mp4-atom, release it through that repository's process, and bump `mp4-atom` in `[workspace.dependencies]` here, absorbing any API churn the bump brings. - -Changed 2026-11-07 (maintainer, /quest-plan from the API sweep of open PRs and remaining quests): [api-shape/media](/quest/m2/api-shape/media.md) stops moq-mux re-exporting `mp4_atom` before the cut, so this bump is not a moq-mux break. diff --git a/quest/m5/README.md b/quest/m5/README.md index a972d90f560..24bbba31050 100644 --- a/quest/m5/README.md +++ b/quest/m5/README.md @@ -77,7 +77,6 @@ lite-07; bitrate enforcement is not part of the next release. - [#2279](/quest/m5/2279-hang-typed-scte-35-ad-cue-signaling-carried-opaquely.md) - hang: SCTE-35 cues arrive immediately on an independent metadata track, optionally associated with a rendition - [CEA-608/708](/quest/m5/captions-cea.md) - captions carried inside video SEI become a real text rendition at import - [WebXR playback](/quest/m5/watch-webxr.md) - `` renders equirectangular and stereo renditions through WebXR layers on a headset -- [Protected playback in the browser](/quest/m5/drm-playback.md) - `` plays CENC renditions through MSE and EME, once a consumer asks - [Paced replay](/quest/m5/archive-paced-replay.md) - an archive consumer pushes stored groups to live subscribers on one shared clock, so any live player plays it - [Encoder feedback](/quest/m5/stats-encoder-feedback.md) - a Rust encoder reads its viewers' feedback and adapts its bitrate diff --git a/quest/m5/drm-playback.md b/quest/m5/drm-playback.md deleted file mode 100644 index 5e17bf3e58d..00000000000 --- a/quest/m5/drm-playback.md +++ /dev/null @@ -1,22 +0,0 @@ -# [L] Protected playback in the browser - -## Goal - -`` plays protected CMAF renditions through MSE and EME, using the hang catalog's `drm` section for the key system and license server, instead of hiding them. -Start once a consumer asks. - -## Plan - -Decided with the maintainer on 2026-11-03: plan browser playback, deferred until there is demand, and no native playback. -Native players have no CDM; only ClearKey would work without platform APIs, and no commercial DRM uses it. - -WebCodecs cannot decrypt, and EME only works on a media element fed through MSE. -Watch removed its MSE backend in [#2288](https://github.com/moq-dev/moq/pull/2288), so this brings back a second pipeline only for protected renditions. - -Open: -- how it shares latency control with the WebCodecs path; -- Safari's ManagedMediaSource with FairPlay's certificate URL. - -## Required - -- [Protected CMAF import](/quest/m3/drm/import.md) - the hang `drm` section this reads, and the renditions it stops hiding