Skip to content

feat(playback): add separate HLS audio and DV conversion - #3025

Closed
ManavA wants to merge 6 commits into
Silo-Server:mainfrom
ManavA:pr/native-hls-20261024
Closed

ManavA wants to merge 6 commits into
Silo-Server:mainfrom
ManavA:pr/native-hls-20261024

Conversation

@ManavA

@ManavA ManavA commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: N/A
Validation tasks: changes #1177 C3

Some native players need separate HLS audio to play HEVC reliably. Dolby Vision profile 7 also needs conversion for players that accept profile 8.1.

Approach

Add opt-in separate audio and profile 7 to 8.1 conversion with dovi_tool. Conversion discards the enhancement layer and requires current transcoding permission. Preserve the selected recipe through seek and recovery on integrated and remote workers.

Ordinary MPEG-TS copy uses the existing hls_copy_mpegts_v1 path. Separate audio keeps subtitle sidecars when copy-rendition negotiation would otherwise create a nested multivariant playlist.

Validation

  • Full Go tests, build/vet, formatting, API contracts and repository checks passed.
  • CI-pinned router and changed-line lint: zero issues.
  • All 839 Web test files (6,730 tests) passed across the full run and a retry of one timed-out file. This was not a single clean Web run.
  • Current-head device playback was not rerun; earlier conversion evidence and its limits are below. C3 needs revalidation after merge.

Evidence

Earlier conversion and separate-audio captures, from 2bb44cd. Current negotiation checks are listed above; these captures are not current-head device qualification.

Actual generated-media excerpts from 2bb44cd (real dovi_tool 2.3.4; selected ffprobe fields):

{"before":{"dv_profile":7,"el_present_flag":1,"bl_present_flag":1,"dv_bl_signal_compatibility_id":6},"after":{"dv_profile":8,"el_present_flag":0,"bl_present_flag":1,"dv_bl_signal_compatibility_id":1},"base_nal_bytes_unchanged":true}

The synthetic 256×256 sample used a public FFmpeg FATE RPU and signaled an enhancement layer without containing enhancement-layer pictures. This establishes sample conversion, not full dual-layer title or physical HDR output validation.

Manual update: Silo-Server/siloserver.org#301.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • Added tests cover meaningful contracts, policy, recovery and failure handling.
  • Evidence and verification limits are stated above.

AI Disclosure

  • Harness: Codex
  • Tool(s): Codex shell, patch, GitHub and agent tools
  • Model(s): gpt-6.1-sol for current preparation and review; earlier identifiers were not retained.
  • Involvement: Fully AI-generated; human verification pending.
  • Adversarial review: Earlier Sol and PR reviews found policy, buffering and recovery defects, which were fixed and tested. Sol reviewed the final upstream diff after removing the redundant MPEG-TS feature; no unresolved findings.

Note

Add separate-audio HLS and server DV7-to-DV8.1 conversion to playback

  • Adds server-side Dolby Vision Profile 7 to Profile 8.1 fragment conversion in dolby_vision_fragment.go, gated on an external dovi_tool (pinned v2.3.4 in the Dockerfile) with size limits (2 MiB init, 128 MiB fragment), two conversion slots, and strict input validation
  • Adds native separate-audio HLS: FFmpeg writes a video-only main playlist plus an independent audio playlist, with per-rendition pruning, recovery, acknowledgement, and media-time throttling in separate_audio_segments.go and transcode.go
  • Wires both features through V3 planning, recipe cards, stream-token claims, relay selection (relays must advertise the native-HLS renditions feature), and transcode-node start/segment/ack handlers
  • Both transformations are advertised and usable only when playback transcoding is enabled; disabled DV conversion returns terminal or 503 errors, and the transformation registry is re-probed when the policy changes
  • Risk: behavioral changes are concentrated in prepareLocalTransportV3/prepareRemoteTransportV3 in playback_v3.go (DV plans rejected when transcoding disabled, native recipe fields propagated) and handleSegment/handleSegmentDownloaded in server.go (audio segments served/recovered/acknowledged by media name instead of video ordinal). Subtitle renditions are disabled for separate-audio recipes in subtitle_rendition.go

Macroscope summarized 27d27f7.

@silo-triage silo-triage Bot added the size/XXXL 3000+ added + deleted lines (all files); change volume, not priority. label Oct 25, 2026
@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review.

Recent review info
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: b2ecfcf9-f59f-4a3a-96cb-1a6cbd36c845
Commits

Reviewing files that changed from the base of the PR and between 75ff017 and 27d27f7.

Files selected for processing: 1
  • contracts/api/v2/breaking-approvals.json

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.

Walkthrough

This pull request adds separate-audio HLS support and server-side Dolby Vision Profile 7-to-8.1 conversion. It updates playback planning, transcode execution, segment recovery and pruning, API and worker negotiation, container packaging, schemas, and documentation.

Changes: Native playback recipes

Layer / File(s) Summary
Negotiation and planning
contracts/api/v2/openapi.json, internal/playback/protocol_v3.go, internal/playback/plan_v3.go, internal/playback/dolby_vision_plan_v3.go, internal/playback/recipecard.go, internal/streamtoken/*
New fields, feature identifiers, transformations, recipe versions, and token claims carry separate-audio HLS and DV7-to-DV8.1 settings. Planning selects eligible recipes and preserves those settings during reconstruction.
Transcode runtime and media output
internal/playback/separate_audio_hls.go, internal/playback/transcode.go, internal/playback/dolby_vision_*.go, internal/playback/transformations_v3.go, Dockerfile, go.mod, licenses/dovi_tool-MIT.txt
The runtime creates separate audio and video HLS renditions, aligns timestamps, converts DV7 fragments, probes the toolchain, and applies transcode policy. The image installs dovi_tool 2.3.4 with checksum verification and its license.
Segment lifecycle
internal/playback/separate_audio_segments.go, internal/playback/segment_pruner.go, internal/playback/throttle.go, internal/playback/transcode_manager.go, internal/playback/transcode.go
Audio segments use independent generation-aware demand, acknowledgement, recovery, throttling, timeline, and retention state. Restart and stale-session checks guard recovery and pruning.
API, worker, and proxy integration
internal/api/handlers/*, internal/transcodenode/*, internal/proxy/*
Handlers and workers pass recipe fields, apply transcode policy, advertise capabilities, select compatible relays, serve audio media segments, and report acknowledgements by segment name and generation.
Validation and documentation
internal/playback/*_test.go, internal/api/handlers/*_test.go, internal/transcodenode/*_test.go, docs/*, contracts/api/v2/breaking-approvals.json
Unit, integration, real-tool, recovery, timestamp, routing, and capability tests cover the new paths. Protocol and API documentation describe negotiation, recipe versions, recovery, and conversion behavior.

Priority: Normal

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related issues

Possibly related PRs

Suggested labels: api-v2, impact: usability

Suggested reviewers: quick104

Merge Risk: Minimal · up to 27d27

The contract changes add only optional properties, and the updated approval file does not introduce a current contract-check risk.

Architecture risk: Low · up to 27d27

The change affects 6 systems.

Changed systems: internal, docs, contracts, Dockerfile, go.mod, licenses

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — internal (service) was modified; 55 changed files map to changed impact.
  • observed — docs (service) was modified; 4 changed files map to changed impact.
  • observed — contracts (api) was modified; 2 changed files map to changed impact.
  • observed — Dockerfile (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in go.mod: Added github.com/Eyevinn/mp4ff v0.60.0 to the direct dependency requirements.
  • observed — Modified behavior in internal/api/handlers/playback_native_hls_test.go: Adds a routing test with worker and proxy servers and a worker-only remux / proxy-only egress policy. It asserts that the older proxy is selected without separate-audio transformation, excluded when that transformation is added, and that a replacement proxy advertising native HLS rendition relay support is selected.
  • observed — Modified behavior in internal/api/handlers/playback_service.go: Capabilities now use the handler’s native feature list, which excludes playback.FeatureServerDV7ToDV81V3 when transcoding is disabled.
  • observed — Modified behavior in internal/api/handlers/playback_service.go: serverFeaturesForRequestV3 now has a PlaybackHandler receiver and uses its handler-specific native feature list for native API v2 requests; the non-native API v1 path remains unchanged.
Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 24.20% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 157 functions across 53 files. (1 skipped… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely identifies the two primary changes: separate HLS audio and Dolby Vision conversion.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The pull request description directly explains the separate-audio HLS and Dolby Vision Profile 7-to-8.1 conversion changes, their constraints, implementation approach, and validation results.
Full details: Docstring Coverage

Explanation

Docstring coverage is 24.20% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 157 functions across 53 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@silo-kody

silo-kody Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@silo-triage silo-triage Bot added enhancement New feature or request evidence-required Needs before-and-after evidence before the Evidence check passes go Pull requests that update go code impact: playback Can't play, stalls, or wrong media needs-review Needs maintainer review to resolve uncertain classification, scope, or changed evidence. priority: P3 Needs-info or parked labels Oct 25, 2026
@silo-triage

silo-triage Bot commented Oct 25, 2026

Copy link
Copy Markdown

The Evidence section describes checks but does not include their artifacts. Before marking this ready, please add sanitized before-and-after capability/playlist excerpts for the new HLS layouts and generated-media output showing the Dolby Vision profile conversion, with the tested commit. No web screenshots are needed for these backend changes.

Comment thread internal/playback/dolby_vision_hls.go Resolved
Comment thread internal/playback/separate_audio_hls.go Resolved
@silo-kody

silo-kody Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@ManavA

ManavA commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

Requested evidence for 2bb44cd. Capabilities and playlists use synthetic fixtures; conversion uses the real dovi_tool.

Capability, playlist and conversion excerpts
Tested commit: 2bb44cd75a4ce0ff6308615631eaefbcbb26c368.
Planner fixture evidence (actual PlanPlaybackV3 output excerpts):
before_feature_off:
{
  "hls_features": null,
  "delivery": "server_remux_hls",
  "transformations": []
}
mpegts:
{
  "hls_features": [
    "native_hls_playback_v1",
    "native_hls_mpegts_v1"
  ],
  "delivery": "server_remux_hls",
  "transformations": [
    {
      "name": "hls_mpegts",
      "executor": "server",
      "recipe_version": "1",
      "validated_claims": null
    }
  ]
}
separate_audio:
{
  "hls_features": [
    "native_hls_playback_v1",
    "native_hls_separate_audio_v1"
  ],
  "delivery": "server_remux_hls",
  "transformations": [
    {
      "name": "hls_separate_audio",
      "executor": "server",
      "recipe_version": "1",
      "validated_claims": null
    }
  ]
}
Actual BuildPlaybackManifest output, synthetic playlist/placeholder segment fixtures; PUBLIC_FIXTURE is a nonsecret literal:
muxed_fmp4_master:
#EXTM3U
#EXT-X-TARGETDURATION:2
#EXT-X-MAP:URI="segment/init.mp4?st=PUBLIC_FIXTURE"
#EXTINF:2.000,
segment/seg_00000.m4s?st=PUBLIC_FIXTURE
#EXT-X-ENDLIST

mpegts_master:
#EXTM3U
#EXT-X-TARGETDURATION:2
#EXTINF:2.000,
segment/seg_00000.ts?st=PUBLIC_FIXTURE
#EXT-X-ENDLIST

separate_audio_master:
#EXTM3U
#EXT-X-VERSION:7
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio",NAME="Selected audio",DEFAULT=YES,AUTOSELECT=YES,URI="master.m3u8?rendition=audio&st=PUBLIC_FIXTURE"
#EXT-X-STREAM-INF:BANDWIDTH=1,AUDIO="audio"
master.m3u8?rendition=video&st=PUBLIC_FIXTURE

separate_audio_audio:
#EXTM3U
#EXT-X-TARGETDURATION:2
#EXTINF:2.000,
segment/audio_00000.ts?st=PUBLIC_FIXTURE
#EXT-X-ENDLIST

Generated 256x256 Main 10 base + public FFmpeg FATE P7 RPU; real dovi_tool 2.3.4. Constructed source P7 config has EL signaling but no enhancement-layer pictures. ffprobe actual generated MP4 output:
generated_source_ffprobe:
{
  "codec_name": "hevc",
  "profile": "Main 10",
  "width": 256,
  "height": 256,
  "side_data_list": [
    {
      "side_data_type": "DOVI configuration record",
      "dv_version_major": 1,
      "dv_version_minor": 0,
      "dv_profile": 7,
      "dv_level": 6,
      "rpu_present_flag": 1,
      "el_present_flag": 1,
      "bl_present_flag": 1,
      "dv_bl_signal_compatibility_id": 6,
      "dv_md_compression": "none"
    }
  ]
}
generated_output_ffprobe:
{
  "codec_name": "hevc",
  "profile": "Main 10",
  "width": 256,
  "height": 256,
  "side_data_list": [
    {
      "side_data_type": "DOVI configuration record",
      "dv_version_major": 1,
      "dv_version_minor": 0,
      "dv_profile": 8,
      "dv_level": 6,
      "rpu_present_flag": 1,
      "el_present_flag": 0,
      "bl_present_flag": 1,
      "dv_bl_signal_compatibility_id": 1,
      "dv_md_compression": "none"
    }
  ]
}
No physical Roku, full dual-layer title, or HDR display validation is claimed.
Actual converted sample preservation:
{
  "after_base_nal_sha256": "4adcee6c782f54947d0ab9a724f4a5ccd0b3341d9c230fb9120476781740f8c0",
  "after_rpu_sha256": "65668e57535cdd71711c37e6f5cedb9069f9189cad192167157a68152ddbf33b",
  "after_sample_duration": 3003,
  "base_nal_bytes_unchanged": true,
  "before_base_nal_sha256": "4adcee6c782f54947d0ab9a724f4a5ccd0b3341d9c230fb9120476781740f8c0",
  "before_rpu_sha256": "3d84cbc7e65fc7148bab9f20ad15b3b4e73ad972bcc9f7dd81545990cc3b8da3",
  "before_sample_duration": 3003
}

@ManavA
ManavA marked this pull request as ready for review October 25, 2026 00:53
@coderabbitai coderabbitai Bot added api-v2 API v2 / Huma migration program (epic #135); long-running, stacked by phase impact: usability Core flow broken or severely blocked size/XXL 1000–2999 added + deleted lines (all files); change volume, not priority. labels Oct 25, 2026
@silo-triage silo-triage Bot removed the size/XXL 1000–2999 added + deleted lines (all files); change volume, not priority. label Oct 25, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 25, 2026

Copy link
Copy Markdown

The Validation tasks: line should be narrowed to changes #1177 C3.

#1177 C3 needs re-validation after merge. When transcoding is enabled, transcode-node capability snapshots now run a dovi_tool smoke test with a 3-second deadline; a cold /hw-capabilities lookup can add work to the failover path measured against the 10-second recovery bar. The PR must explain this effect on the previously validated recovery timing, and C3 needs re-validation after merge.

The other listed cases do not need re-checking for this diff: #1177 C1/C2 retain the tested defaults and unchanged capacity enforcement; #1246 C1/C2 use the unchanged Jellyfin compatibility routes without native recipe opt-in. #1246 C3's referenced public compatibility guide is not changed here.

Suggested line: Validation tasks: changes #1177 C3

Automated check: Macroscope check run agent (gpt-6-luna). No validation was performed.

Posted via Macroscope — v1 validation impact

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3


Review info
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: 91cd3e1a-ec4c-4d5d-9c5f-e257dcf9ec13
Commits

Reviewing files that changed from the base of the PR and between d2c12db and 2bb44cd.

Files ignored due to path filters: 1
  • go.sum is excluded by !**/*.sum
Files selected for processing: 56
  • Dockerfile
  • contracts/api/v2/openapi.json
  • docs/architecture/playback-protocol-v3.md
  • docs/design/schemas/playback-v3/v3/fixtures/valid/hls-subtitle-rendition-decision_response.json
  • docs/design/schemas/playback-v3/v3/fixtures/valid/learned-limit-decision_response.json
  • docs/playback-api.md
  • go.mod
  • internal/api/handlers/playback.go
  • internal/api/handlers/playback_native_hls_test.go
  • internal/api/handlers/playback_native_session_recipe_test.go
  • internal/api/handlers/playback_service.go
  • internal/api/handlers/playback_service_test.go
  • internal/api/handlers/playback_test.go
  • internal/api/handlers/playback_transcode_rehome.go
  • internal/api/handlers/playback_v3.go
  • internal/jellycompat/dv_strip_test.go
  • internal/playback/dolby_vision_fragment.go
  • internal/playback/dolby_vision_fragment_real_test.go
  • internal/playback/dolby_vision_fragment_test.go
  • internal/playback/dolby_vision_hls.go
  • internal/playback/dolby_vision_plan_v3.go
  • internal/playback/dolby_vision_probe.go
  • internal/playback/native_hls_codec.go
  • internal/playback/native_hls_codec_test.go
  • internal/playback/native_hls_v3.go
  • internal/playback/native_hls_v3_test.go
  • internal/playback/plan_v3.go
  • internal/playback/protocol_v3.go
  • internal/playback/recipecard.go
  • internal/playback/restart_locked_test.go
  • internal/playback/segment_pruner.go
  • internal/playback/separate_audio_aac_real_test.go
  • internal/playback/separate_audio_hls.go
  • internal/playback/separate_audio_hls_real_test.go
  • internal/playback/separate_audio_hls_test.go
  • internal/playback/separate_audio_recovery_real_test.go
  • internal/playback/separate_audio_segments.go
  • internal/playback/separate_audio_segments_test.go
  • internal/playback/separate_audio_timestamp_test.go
  • internal/playback/testdata/protocol_v3/hls-subtitle-rendition-decision_response.json
  • internal/playback/testdata/protocol_v3/learned-limit-decision_response.json
  • internal/playback/throttle.go
  • internal/playback/transcode.go
  • internal/playback/transcode_manager.go
  • internal/playback/transcode_manager_test.go
  • internal/playback/transcode_manifest_test.go
  • internal/playback/transformations_v3.go
  • internal/playback/transformations_v3_test.go
  • internal/proxy/capability_snapshot_test.go
  • internal/proxy/server.go
  • internal/streamtoken/token.go
  • internal/streamtoken/token_test.go
  • internal/transcodenode/restart_locked_test.go
  • internal/transcodenode/separate_audio_hls_test.go
  • internal/transcodenode/server.go
  • licenses/dovi_tool-MIT.txt

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

Comment thread internal/api/handlers/playback_v3.go Resolved
Comment thread internal/playback/separate_audio_hls.go Resolved
Comment thread internal/playback/transformations_v3.go Resolved
@silo-kody

silo-kody Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@macroscopeapp

macroscopeapp Bot commented Oct 25, 2026

Copy link
Copy Markdown

The capability excerpts are missing. This PR changes the /api/v2 playback capability response to advertise native_hls_mpegts_v1, native_hls_separate_audio_v1, and conditionally server_dv7_to_dv81_v1 (internal/api/handlers/playback_service.go, internal/api/handlers/playback_v3.go), but the evidence shows planner hls_features and manifests rather than the returned capability features list. Please add before-and-after capability response excerpts for the same request, including the transcode-disabled case for the conditional DV feature. The HLS playlist and conversion excerpts cover the other visible playback changes.

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

Posted via Macroscope — Visible change evidence

@ManavA

ManavA commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

Updated the requested capability response excerpts in the PR description. The disabled case omits the DV conversion feature. Also narrowed Validation tasks: to changes #1177 C3 and documented the cold 3-second smoke probe against the 10-second failover target; C3 still needs re-validation after merge.

@silo-kody

silo-kody Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@ManavA ManavA changed the title feat(playback): support native HLS layouts and DV conversion feat(playback): add separate HLS audio and DV conversion Oct 25, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments: 1
internal/playback/plan_v3.go: 1

767-767: Trivial · Maintainability & Code Quality · Low value

Optionally use the recipe-version constant.

The planner currently emits "1", which matches TransformationHLSSeparateAudioRecipeVersionV3. This is future-proofing only. No current mismatch or project rule requires the change.

♻️ Suggested fix
-						plan.Transformations = append(plan.Transformations, TransformationV3{Name: packaging, Executor: ExecutorServerV3, RecipeVersion: "1"})
+						plan.Transformations = append(plan.Transformations, TransformationV3{Name: packaging, Executor: ExecutorServerV3, RecipeVersion: TransformationHLSSeparateAudioRecipeVersionV3})

Review info
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: 5a70257d-b1ce-421c-a738-ee437e05da80
Commits

Reviewing files that changed from the base of the PR and between e2dbbdc and 75ff017.

Files ignored due to path filters: 1
  • go.sum is excluded by !**/*.sum
Files selected for processing: 26
  • Dockerfile
  • contracts/api/v2/openapi.json
  • docs/architecture/playback-protocol-v3.md
  • docs/design/schemas/playback-v3/v3/fixtures/valid/hls-subtitle-rendition-decision_response.json
  • docs/design/schemas/playback-v3/v3/fixtures/valid/learned-limit-decision_response.json
  • docs/playback-api.md
  • internal/api/handlers/playback.go
  • internal/api/handlers/playback_native_session_recipe_test.go
  • internal/api/handlers/playback_transcode_rehome.go
  • internal/api/handlers/playback_v3.go
  • internal/api/handlers/playback_v3_test.go
  • internal/api/handlers/playback_v3_union_test.go
  • internal/playback/native_hls_v3.go
  • internal/playback/native_hls_v3_test.go
  • internal/playback/plan_v3.go
  • internal/playback/protocol_v3.go
  • internal/playback/recipecard.go
  • internal/playback/subtitle_rendition.go
  • internal/playback/subtitle_rendition_test.go
  • internal/playback/testdata/protocol_v3/hls-subtitle-rendition-decision_response.json
  • internal/playback/testdata/protocol_v3/learned-limit-decision_response.json
  • internal/playback/transcode.go
  • internal/playback/transcode_manifest_test.go
  • internal/playback/transformations_v3.go
  • internal/streamtoken/token.go
  • internal/transcodenode/server.go

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

@silo-kody

silo-kody Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@ManavA

ManavA commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

Tested a local integration of this PR and #3036 (6f906c7c) on a C208X, Roku OS 16.0.4.842, using the 0.2.44 client.

A full-quality DV8 source played through the HDR10 recipe with HEVC video and E-AC-3 audio. Native Video diagnostics reported HDR10; playback continued beyond two minutes. Pause and resume passed. The separate HLS video/audio renditions also passed an independent FFprobe check (3840×2160 HEVC/PQ and six-channel E-AC-3).

Physical display HDR mode was not exposed by the device API. This does not qualify DV7 conversion or C3 failover; those remain separate checks.

@ManavA

ManavA commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

Real-source follow-up on local integration 6f906c7c:

  • DV7 input with BL/RPU/EL present produced a 3840×2160 HEVC/PQ HLS segment reporting profile 8, compatibility ID 1, BL/RPU present and EL absent. Selected TrueHD 7.1 became AAC 5.1 (~386 kbps).
  • HDR10-only negotiation produced 4K HEVC/PQ without DV configuration, with AAC 5.1 audio.
  • Client c158b36 played the same source on C208X / OS 16.0.4.842. Native Video reported HDR10 and AC-3, with position advancing past 100 seconds.

These are first-segment and short playback checks. Physical Dolby Vision output, full-title playback and C3 failover remain unqualified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-v2 API v2 / Huma migration program (epic #135); long-running, stacked by phase enhancement New feature or request evidence-required Needs before-and-after evidence before the Evidence check passes go Pull requests that update go code impact: playback Can't play, stalls, or wrong media impact: usability Core flow broken or severely blocked needs-review Needs maintainer review to resolve uncertain classification, scope, or changed evidence. priority: P3 Needs-info or parked size/XXXL 3000+ added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants