Skip to content

fix(moq-hls): account for audio groups in master variants - #2264

Merged
kixelated merged 1 commit into
mainfrom
codex/fix-hls-master-variants
Jul 15, 2026
Merged

fix(moq-hls): account for audio groups in master variants#2264
kixelated merged 1 commit into
mainfrom
codex/fix-hls-master-variants

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Summary

  • Add the maximum selectable audio bitrate to each video variant's BANDWIDTH.
  • Split audio renditions into homogeneous codec groups and emit one accurate video variant per group.
  • Cover combined bandwidth and mixed AAC/Opus groups with regression tests.

The root cause was that master rendering treated a video rendition as the complete playable HLS variant. It therefore advertised only the video bitrate and copied the first audio codec even though the referenced audio group could select other renditions.

Closes #2250.

Public API changes

  • None. The master-playlist renderer is private to moq-hls.
  • Cross-package synchronization is not applicable because this does not change the MoQ wire protocol, catalog format, or public API.

Test plan

  • cargo test -p moq-hls (24 passed)
  • cargo clippy -p moq-hls --lib -- -D warnings
  • cargo fmt --all -- --check
  • git diff --check

(Written by GPT-5)

Co-Authored-By: Codex <codex@openai.com>

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @kixelated, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@kixelated
kixelated marked this pull request as ready for review July 15, 2026 04:56
@kixelated
kixelated merged commit 81ac702 into main Jul 15, 2026
2 checks passed
@kixelated
kixelated deleted the codex/fix-hls-master-variants branch July 15, 2026 04:57
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 08f9ae9c-763c-4f6a-b2a7-0070d5a0554c

📥 Commits

Reviewing files that changed from the base of the PR and between 11f4c37 and d2a109d.

📒 Files selected for processing (1)
  • rs/moq-hls/src/export/master.rs

Walkthrough

HLS master playlist generation now groups audio renditions by codec, assigns codec-specific group IDs when needed, and calculates group bandwidths. Video stream entries are rendered per audio group with matching CODECS, AUDIO, and combined bandwidth attributes. Audio-only playlists continue to emit stream entries for each audio rendition. Tests cover multi-codec group IDs and video stream attributes.

✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch codex/fix-hls-master-variants

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@moq-bot moq-bot Bot mentioned this pull request Jul 15, 2026
srstrong pushed a commit to id3as/moq that referenced this pull request Jul 15, 2026
@moq-bot moq-bot Bot mentioned this pull request Jul 15, 2026
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.

moq-hls: calculate master-playlist BANDWIDTH and CODECS across audio groups correctly

1 participant