Skip to content

feat(playback): accept HLS subtitle renditions on copy remuxes - #732

Closed
Quick104 wants to merge 1 commit into
fix/phone-subtitle-mount-deadlinefrom
feat/remux-subtitle-renditions
Closed

Quick104 wants to merge 1 commit into
fix/phone-subtitle-mount-deadlinefrom
feat/remux-subtitle-renditions

Conversation

@Quick104

@Quick104 Quick104 commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: Silo-Server/silo-server#1406
Validation tasks: changes #323 C4; changes #324 C4

When the server copy-remuxes a file to HLS (server_remux_hls) and the viewer picks an embedded text subtitle, the phone and TV apps got the track as a whole-file sidecar, which the server extracts by reading the entire source. The server can carry the track as a WebVTT SUBTITLES rendition of the remux playlist instead, as it already does for transcodes, once a client lists hls_remux_subtitle_renditions_v1 next to hls_subtitle_renditions_v1. The apps now ask for it and accept the result.

Approach

Validation

  • ./gradlew testDebugUnitTest: pass, 6,629 tests, 0 failures. New tests cover the feature gate on start and replan requests, a copy-remux rendition plan that mounts no sidecar, and a rendition candidate committing without a sidecar artifact.
  • ./gradlew :android-shared:lintDebug :androidApp:lintDebug :androidTvApp:lintDebug: pass, no new findings.
  • :androidApp:assembleDebug and :androidTvApp:assembleDebug: pass.
  • Not run locally: the supply-chain scripts (no Ruby on the build machine; this change touches no build, dependency or workflow file), release bundles and release lint. CI runs them.
  • No device or emulator run.

Evidence

Evidence: https://evidence.siloserver.org/r/silo-android/pr-732/

Risks

A server that doesn't advertise the feature gets the same requests as before.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • The Evidence section shows every change a user can see, or says there is none.

AI Disclosure

  • Harness: Claude Code in T3 Code
  • Tool(s): Claude Code
  • Model(s): claude-opus-5-5
  • Involvement: Fully AI-generated. Nobody has verified it by hand yet, and no device or emulator run happened.
  • Adversarial review: a separate Claude Code agent (claude-opus-5-5) reviewed the whole original branch, which included this change, read-only. For this change it checked rendition track IDs, the feature gate and older servers, and reported nothing to fix.

🤖 Generated with Claude Code

Note

Accept HLS subtitle renditions on SERVER_REMUX_HLS plans

Adds the hls_remux_subtitle_renditions_v1 protocol feature so copy remuxes can carry HLS subtitle renditions, gated on both the base hls_subtitle_renditions_v1 client feature and the server advertising the remux feature.

  • Adds PlaybackDelivery.carriesHlsSubtitleRendition() (true for SERVER_TRANSCODE_HLS and SERVER_REMUX_HLS) and replaces the transcode-only delivery checks in PlaybackDecisionResponseV3.validateForMedia3, PlaybackSessionManager.kt, and PlaybackV3Session.kt
  • Adds gatedForHlsRemuxSubtitleRenditions() extensions on start and replan requests; SequencedPlayback.kt applies the gate when building start and replan wire bodies
  • Documents the new capability in README.md and covers validation, gating, projection, and staged-replan commit in unit tests
  • Risk: servers that advertise the remux feature but do not support it will get plans with SERVER_REMUX_HLS subtitle renditions; check the hls_remux_subtitle_renditions_v1 advertisement path in /api/v2 features and server_features.

Macroscope summarized d3a4ad0.

A server_remux_hls plan extracted the selected embedded text track as a
whole-file sidecar. The server can carry it as a WebVTT SUBTITLES rendition
of the remux playlist instead, once the client lists
hls_remux_subtitle_renditions_v1 next to hls_subtitle_renditions_v1.

SequencedPlayback adds the feature to start and replan requests only when
the server advertises it (in its /api/v2 capability features or a
decision's server_features) and the request already lists
hls_subtitle_renditions_v1, the same gate buffering_quality_v1 uses, so
Cast contexts never ask. validateForMedia3, the session projection and the
staged-replan subtitle check accept hls_rendition on server_remux_hls as
well as server_transcode_hls. A failed rendition mount still replans with
subtitle_hls_rendition_failed for the sidecar plan.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-triage silo-triage Bot added the size/M 50–199 added + deleted lines (all files); change volume, not priority. label Oct 30, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T13:32:09.729070Z d3a4ad0 PR opened
🔒 Security Review ✅ Completed 2026-10-30T13:33:05.058414Z d3a4ad0 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 122 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5cd32f35-4509-4f4c-a126-f237e61230f9
Commits

Reviewing files that changed from the base of the PR and between c7a3caf and d3a4ad0.

Files selected for processing: 9
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/PlaybackSessionManager.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/player/PlaybackV3Session.kt
  • android-shared/src/androidUnitTest/kotlin/org/siloserver/silo/common/player/HlsSubtitleRenditionTest.kt
  • android-shared/src/androidUnitTest/kotlin/org/siloserver/silo/common/player/PlaybackSessionManagerStagedReplanTest.kt
  • docs/playback/README.md
  • shared/src/commonMain/kotlin/org/siloserver/silo/model/playback/PlaybackProtocolV3.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/repository/SequencedPlayback.kt
  • shared/src/commonTest/kotlin/org/siloserver/silo/model/playback/HlsSubtitleRenditionProtocolTest.kt
  • shared/src/commonTest/kotlin/org/siloserver/silo/repository/SequencedPlaybackTest.kt
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@macroscopeapp

macroscopeapp Bot commented Oct 30, 2026

Copy link
Copy Markdown

The visible playback change is that embedded text subtitles on copy-remux HLS are carried as playlist renditions instead of whole-file sidecars; evidence is missing for Android phone, tablet, foldable (folded and open), and Android TV. Please add before-and-after playback recordings using the same subtitle-bearing remux sample, showing subtitle selection and when subtitles appear, and identify the device and build or commit for each capture.

Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness.

Posted via Macroscope — Visible change evidence

@silo-triage silo-triage Bot added enhancement New feature or request impact: playback Can't play, stalls, or wrong media priority: P2 Limited scope, workaround exists, or polish stacked Stacked on another open PR or branch labels Oct 30, 2026
@Quick104

Copy link
Copy Markdown
Contributor Author

Superseded by #770, which combines this change with the rest of the stack for review.

@Quick104 Quick104 closed this Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request impact: playback Can't play, stalls, or wrong media priority: P2 Limited scope, workaround exists, or polish size/M 50–199 added + deleted lines (all files); change volume, not priority. stacked Stacked on another open PR or branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant