Repository navigation
quest: move HLS record removal to m0 as a declared-grid export #7616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1460470
quest: move HLS record removal to m0 as a declared-grid export
kixelated 660caa7
Merge remote-tracking branch 'origin/main' into iterate-7616
kixelated 37fa8bb
quest(m0): widen the Goal to cover the HLS grid's breaking change
kixelated cbbe7ae
Merge remote-tracking branch 'origin/main' into HEAD
kixelated ad5fb72
quest: align m1 references with the m0 HLS grid
kixelated 726a49b
Merge remote-tracking branch 'origin/main' into iterate-7616-c757
kixelated 5b8f229
quest(m0): name the archive doc the HLS grid makes stale
kixelated File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| # [L] HLS export cuts segments on a declared grid, without records | ||
|
|
||
| ## Goal | ||
|
|
||
| hang drops the per-rendition `hls` catalog field, the `<track>.hls` record | ||
| tracks, and A/V segment alignment. The catalog gains a `media` section with | ||
| `media.join.interval`, and the root `clock` moves to `media.clock` in the same | ||
| break. moq-mux, moq-c, and `@moq/publish` declare the interval. The HLS/DASH | ||
| export and the HLS recorder read the media tracks directly and number segments | ||
| on that grid from each group's first-frame pts. An HLS-only viewer of an | ||
| on-demand publisher starts its capture and gets a playlist. | ||
|
|
||
| ## Plan | ||
|
|
||
| Decided 2026-11-02 (maintainer): the removal moves to m0, decoupled from | ||
| [Consumers by start](/quest/m1/time-addressing/consumers.md). That quest had | ||
| planned it (2026-10-27) to follow the time-addressing chain, cutting segments | ||
| from group start timestamps. Here the export uses each group's first-frame | ||
| pts instead, so nothing waits on groups by start. Once groups are addressed by | ||
| start, consumers.md swaps the first-frame pts for the group start. | ||
|
|
||
| - **Catalog.** A `media` section holds what applies to every audio and video | ||
| track. `media.join.interval` promises that each one starts a group at least | ||
| that often outside a pause, and is the export's grid, so every rendition | ||
| shares segment numbers. It is fixed for the broadcast instance, since the | ||
| numbering depends on it. Nested so a later join mechanism that is not a | ||
| fixed grid can sit beside it. moq-mux declares it from its GOP hint, moq-c | ||
| from `group_duration_us` ([moq-dev/moq#7068](https://github.com/moq-dev/moq/pull/7068)), | ||
| which declares the `hls` duration today, and `@moq/publish` from its GOP | ||
| setting. A broadcast without an interval is not HLS-renderable. | ||
| - **Clean break (maintainer, 2026-11-02).** No record fallback in the export, | ||
| and no records emitted for old exports. `hang::hls`, the `hls` field in Rust | ||
| and the JS zod schema, `<track>.hls` tracks, and A/V segment alignment are | ||
| deleted; `moq_mux::hls` shrinks to declaring the interval. | ||
| - **Segmentation (maintainer, 2026-10-27/28, carried over unchanged).** HLS | ||
| numbers segments by position, so every edge and every reload must derive the | ||
| same consecutive numbers from timestamps alone; a pts grid is the only | ||
| stateless rule that does. Rejected: one platform grid (long-GOP publishers | ||
| overrun it constantly), per-edge counting (failover renumbers), and a | ||
| publisher counter (per-producer state again). | ||
| - Each group belongs to one segment, numbered by grid line: the first line | ||
| it contains, so segment N starts at the group containing pts | ||
| N × interval. A group containing no line joins the segment of the group | ||
| before it, or after a gap, the segment of the line it starts after. The | ||
| edge trims each segment to its own groups. The media sequence number is N. | ||
| - Whole groups only. Never split a group: a segment starting mid-GOP is not | ||
| independent. | ||
| - A segment with no groups is `EXT-X-GAP`, so numbering never skips across a | ||
| pause or an overrun. A group overrunning the interval is listed at its | ||
| first line, so its `EXTINF` understates the media; document the deviation | ||
| beside the fixed target duration's overrun rule in | ||
| `rs/moq-hls/src/export/rendition.rs`. | ||
| - The target duration is the interval (2026-10-28). A segment can run up to | ||
| twice the interval even without an overrun, since the group containing a | ||
| line can start up to one interval before it; regular GOPs never do. One | ||
| whose rounded `EXTINF` exceeds the target is listed under the overrun | ||
| rule. Rejected: twice the interval, which doubles every player's | ||
| hold-back. | ||
| - DASH lists the same segments by `$Time$`. | ||
| - Pin the segmentation with table-driven tests over pauses that end between | ||
| lines or past the next one, unequal GOPs, and overruns. | ||
| - **On-demand capture (maintainer, 2026-11-02, moved from consumers.md).** | ||
| The exporter requests record tracks today, but on-demand capture starts from | ||
| media-track demand, so an HLS-only viewer never starts it. Prove with a test | ||
| that an HLS-only viewer of an on-demand publisher (a default | ||
| `moq import capture`, whose audio has been on demand since | ||
| [moq-dev/moq#7238](https://github.com/moq-dev/moq/pull/7238)) starts capture | ||
| and gets a playlist with both renditions. | ||
| - Convert the HLS recorder (`rs/moq-cli/src/hls/record.rs`). Update the hang | ||
| draft and the HLS, CLI, and archive docs this makes stale, including | ||
| `doc/concept/archives.md`, whose HLS paragraph says a recording needs its | ||
| `hls` record tracks. | ||
|
|
||
| Public API: breaking. `hang::hls` and the per-rendition `hls` field are | ||
| deleted, `clock` moves to `media.clock`, and `moq_mux::hls` shrinks to | ||
| declaring the interval. Wire: hang drops the `hls` field and the record | ||
| tracks, adds `media.join.interval`, and moves `clock` to `media.clock`. | ||
|
|
||
| ## Related | ||
|
|
||
| - [Consumers by start](/quest/m1/time-addressing/consumers.md) - later swaps the first-frame pts for group starts | ||
| - [HLS and DASH segment conformance](/quest/m1/hls-conformance.md) - the nightly probes validate this segmentation | ||
| - [HLS export follows a resolution change](/quest/m1/hls-reinit-same-codec.md) - its hand-over race is reconsidered without records |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.