diff --git a/README.md b/README.md index 9ac8840..f4861f8 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,8 @@ cargo run -p ec-node -- wt-publish \ --control-endpoint-addr-out /tmp/la-nbc-control-endpoint.json ``` +`wt-publish` defaults to `--passthrough=true` so relay and archive retain exact CMAF fragment bytes. + Watch (web): ```txt diff --git a/crates/ec-node/src/main.rs b/crates/ec-node/src/main.rs index 37a7eaa..b4b68b3 100644 --- a/crates/ec-node/src/main.rs +++ b/crates/ec-node/src/main.rs @@ -435,7 +435,7 @@ struct WtPublishArgs { transcode: bool, /// Transmit fMP4 fragments directly (passthrough mode). /// When false, the importer may reframe into CMAF fragments. - #[arg(long, default_value_t = false, action = clap::ArgAction::Set)] + #[arg(long, default_value_t = true, action = clap::ArgAction::Set)] passthrough: bool, /// Danger: disable TLS verification for the relay. #[arg(long, default_value_t = false)] diff --git a/evolution/proposals/ECP-0072-cmaf-seedbox-invariant.md b/evolution/proposals/ECP-0072-cmaf-seedbox-invariant.md new file mode 100644 index 0000000..d33a44d --- /dev/null +++ b/evolution/proposals/ECP-0072-cmaf-seedbox-invariant.md @@ -0,0 +1,26 @@ +# ECP-0072: CMAF Seedbox Invariant For Relay Archive + +## Context + +Archive replay currently stores and serves relay groups exactly as received, but many existing broadcasts were published in `legacy` container mode. Those bytes are not browser-HLS compatible, so archive playback fails despite a valid timeline and object store. + +## Decision + +Make `wt-publish` default to CMAF passthrough (`--passthrough=true`) so: + +- relay subscribers and archive workers observe the same CMAF fragment bytes (`moof+mdat`); +- archive replay can serve those exact bytes without re-encoding; +- the archive acts as a history seedbox of previously played chunks. + +Update the NixOS module default `services.every-channel.ec-node.passthrough = true` to keep host deployments aligned with the seedbox invariant. + +## Rationale + +- Zero-transform archive path is simpler and more auditable. +- Exact-byte retention avoids drift between live and replay. +- Browsers can play CMAF fragments via standard HLS tooling; no custom legacy converter is required for new streams. + +## Reversibility + +- Operators can explicitly set `passthrough = false` per host to revert to legacy framing. +- Existing archived legacy data remains readable for timeline/index use, but may require separate migration tooling for browser playback. diff --git a/nix/modules/ec-node.nix b/nix/modules/ec-node.nix index 0771cf1..c69eecc 100644 --- a/nix/modules/ec-node.nix +++ b/nix/modules/ec-node.nix @@ -60,8 +60,8 @@ in passthrough = lib.mkOption { type = lib.types.bool; - default = false; - description = "Whether to transmit fMP4 fragments directly (moq-mux passthrough)."; + default = true; + description = "Whether to transmit CMAF fMP4 fragments directly (seedbox-compatible passthrough)."; }; tlsDisableVerify = lib.mkOption {