chore: document multicodec master variant selection seam (closes #64) - #88
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
birme
commented
Sep 8, 2026
birme
left a comment
Contributor
Author
There was a problem hiding this comment.
Verdict: APPROVE (posted as comment — author account cannot self-approve)
Docs-only deliverable for #64. Every technical claim and file:line reference in docs/multicodec-variant-selection.md was spot-checked against the actual locked dependency code and verified accurate.
Verified against dependencies
- Locked versions match the doc:
@eyevinn/hls-vodtolive4.1.5,eyevinn-channel-engine5.0.0. index.js:227-250— per-variant loop;usageProfile.pushone-per-variant (232-241);_loadMediaManifest(url, streamItem.get("bandwidth"), ...)keyed by bandwidth only (246). ✓index.js:2600/2603/2624-2625—_loadMediaManifest,let bw = bandwidth,this.segments[bw] = []. ✓index.js:2632if (!this.segmentsInitiated[bw]);2844sets= true;2845-2846else branchSegments for ${bw} already initiated, skipping— first-writer-wins confirmed. ✓index.js:898-900getBandwidths()returnsObject.keys(this.segments);1155-1157getUsageProfiles()returns the flatusageProfilearray. ✓- Constructor
index.js:26signature andoptsparse block62-85— no codec option present.load()index.js:198— all four args are manifest injectors, no codec selector. ✓ session.js:1516-1523— engine iteratesgetUsageProfiles(), emits one#EXT-X-STREAM-INF ... CODECSline per profile, all pointing at the samemaster<bw>.m3u8. Call sites1737(new HLSVod) and1751/1760(load(...)with only loaders) confirm no codec is passed in. ✓- docker-fast
utils.ts:11-17andplugin_demo.ts:86-88—codecsareChannelProfileoutput-emission strings only, not input filters. ✓ - Fixture
master.m3u8: two variants at BANDWIDTH=2000000 withavc1.4d401fandhvc1.1.6.L93.90; characterization testmulticodec_master.test.tspresent. ✓
Conclusion supported
The doc's conclusion — the fix belongs in @eyevinn/hls-vodtolive (bandwidth-only segment index + first-writer-wins collision are internal to the library; no engine/docker-fast hook can disambiguate) and there is no existing codec-preference mechanism — is fully supported by the code read. Correctly scopes #65.
Gates
npm run lint→ clean.npm run pretty→ "All matched files use Prettier code style!" (markdown is not ignored; the doc passes prettier).- No unit-test run required for a docs-only change.
- No trademarks / commercial names in the doc.
- Commit message
chore: document multicodec master variant selection seam (closes #64)follows the required format.
No findings. LGTM.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds a written trace/finding (
docs/multicodec-variant-selection.md) documenting exactly where a multicodec (HEVC+AVC) master-manifest variant is selected across the engine and@eyevinn/hls-vodtolive, so the implementation ticket (#65) can be scoped to the right repo.Finding (grounded in the versions locked in this repo:
@eyevinn/hls-vodtolive4.1.5,eyevinn-channel-engine5.0.0)The mismatch originates inside
@eyevinn/hls-vodtolive, where variants are reduced to a bandwidth-only index:index.js:246—_loadMediaManifest(url, streamItem.get("bandwidth"), ...)keys the media load by bandwidth only.index.js:2603/2624-2625— segments stored inthis.segments[bw].index.js:2632/2844-2846—segmentsInitiated[bw]guard: the first variant in master order wins the bucket, the second colliding variant is skipped.getUsageProfiles()index.js:1155-1157— still emits ONE profile per input variant, so BOTH codecs are advertised at the colliding bandwidth even though only one variant's segments survive.getBandwidths()index.js:898-900— collapses collisions to one key.getUsageProfiles()ateyevinn-channel-engine/dist/engine/session.js:1516-1523, all colliding profiles pointing at the samemaster<bw>.m3u8.Which repo must change:
@eyevinn/hls-vodtolive(the bandwidth-keyed index / first-writer-wins collision handling is internal to the library; there is no engine/docker-fast hook to disambiguate — a fix needs the library to key by bandwidth+codec).Codec preference: none exists today. No input-variant codec filter in the
HLSVodconstructor orload(); thecodecsstrings inChannelProfileare used only for output manifest emission, not input filtering.PROOF
npm run lint→ cleannpm run pretty→ All matched files use Prettier code style!Closes #64