Repository navigation
fix(media): name variants that repeat by the codecs that differ - #616
Conversation
Apple's bipbop example offers each picture with AAC, AC-3 and E-AC-3 audio,
and Ketch listed them as "540p · 2.2 Mbps (1)" and "(2)", so users could
not tell which was which. Variants whose names would repeat are now told
apart by the codecs that differ among them ("540p · 2.2 Mbps · E-AC-3"),
from the CODECS of HLS variants and DASH representations; numbers remain
for variants that declare the same codecs. IDs are unchanged.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: df41c1dc39
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Test Results 2 193 files ± 0 2 221 suites ±0 59m 45s ⏱️ + 3m 4s Results for commit fc2221e. ± Comparison against base commit 94bd6b5. This pull request removes 1 and adds 13 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
mp4a.<OTI> names other formats than AAC too: mp4a.A9 is DTS, mp4a.AD Opus, mp4a.A5 AC-3. Variant names now read the object type indication (MP4RA), keeping the manifest's spelling for types they do not name, and DTS's own sample entries (dtsc, dtsh, ...) read as DTS.
Found while listing real HLS streams with
ketch --list-files.Apple's fMP4 example (
img_bipbop_adv_example_fmp4/master.m3u8) offers each picture with AAC, AC-3 and E-AC-3 audio. Two of them round to the same bitrate, so Ketch listed them as540p · 2.2 Mbps (1)and540p · 2.2 Mbps (2): nothing told users that one is AAC and the other E-AC-3. The apps' Quality picker shows the same names.What changes
mediaVariantNamestakes each variant's codecs (HLSCODECS, DASHcodecs). When names would repeat, it adds the codecs that differ within that group, named as users know them (H.264, HEVC, AV1, VP9, AAC, AC-3, E-AC-3, Opus, …). Variants that declare the same codecs still get(1)/(2). Variant IDs don't change, so saved selections and--filesIDs still resolve.Before:
After:
Verification
ketch --list-fileson the Apple stream from this branch prints the "After" list above.Mp4TracksTest.mediaVariantNames_tellRepeatsApartByTheCodecsThatDiffer;./gradlew :library:core:jvmTest --tests '*Mp4TracksTest*' :library:hls:jvmTest :library:dash:jvmTestpasses.bbb_30fps(180p) all downloaded. ffprobe shows the expected tracks and durations, with video and audio merged into one MP4 where they are separate.