Skip to content

fix(playback): omit tone-map evidence from HLS remux - #760

Open
Quick104 wants to merge 1 commit into
mainfrom
codex/fix-safari-dv-remux-tonemap-evidence
Open

fix(playback): omit tone-map evidence from HLS remux#760
Quick104 wants to merge 1 commit into
mainfrom
codex/fix-safari-dv-remux-tonemap-evidence

Conversation

@Quick104

@Quick104 Quick104 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Problem

Related issue: #758

Native Safari correctly selected an HLS remux for Dolby Vision Profile 8 MKV files, but transport startup copied Dolby Vision tone-map evidence into a copy-video recipe with no tone-map mode. The strict recipe validator then rejected the transport as incomplete tone-map recipe before FFmpeg could create a manifest.

Approach

  • Attach Dolby Vision tone-map evidence only when the selected local or remote transport has a tone-map mode.
  • Keep the validator's fail-closed behavior for genuinely incomplete tone-map recipes.
  • Cover local options, the remote-node request shape, and the full native start-to-manifest path.
  • Record the playback fix in the feature changelog.

Validation

$ go test ./internal/api/handlers -count=1
ok  github.com/Silo-Server/silo-server/internal/api/handlers  133.674s

$ go test ./internal/playback ./internal/transcodenode -count=1
ok  github.com/Silo-Server/silo-server/internal/playback       7.405s
ok  github.com/Silo-Server/silo-server/internal/transcodenode  2.766s

$ go build ./...
PASS

$ go vet ./internal/api/handlers ./internal/playback ./internal/transcodenode
PASS

$ golangci-lint run --new-from-merge-base=origin/main ./...
0 issues.

$ make verify-playback-fixtures
playback fixtures are current

$ make verify-local-paths
PASS

$ gofmt -l .
<no output>

$ git diff origin/main...HEAD --check
<no output>

The end-to-end regression sends a native playback start request for a synthetic 4K Dolby Vision Profile 8 MKV. It verifies that the server selects server_remux_hls, launches copy-video HLS with the dvh1 sample entry, returns a playable plan, and serves an #EXTM3U manifest.

A real Safari run against the reporter's private media was not performed. The issue reporter is being asked to verify the fix against the two affected files.

Risks

No API, schema, migration, or client contract changes. The remaining risk is limited to behavior not represented by the synthetic Dolby Vision fixture or local/remote transport regressions.

AI Disclosure

  • Tool(s): OpenAI Codex
  • Model(s): GPT-5
  • Involvement: AI-assisted
  • Adversarial review: Traced the failure from native playback planning through both transport builders and the strict tone-map validator. Reviewed the final diff for local/remote parity, confirmed that genuine tone-map recipes still carry the evidence, kept the validator unchanged, and exercised the complete start-to-manifest boundary. No unresolved findings remain; real Safari/private-media verification is explicitly left to the reporter.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.

Summary by CodeRabbit

  • New Features

    • Added Safari HLS remux support for Dolby Vision content.
    • Dolby Vision playback can now select an HLS remux plan and serve the manifest successfully.
  • Bug Fixes

    • Improved remux validation by excluding tone-map-only Dolby Vision metadata while retaining safeguards for genuine HDR-to-SDR conversions.
  • Documentation

    • Added a changelog entry describing Safari Dolby Vision remux support.

@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a72d4cbe-2518-40b8-89f0-4a28ad7addad

📥 Commits

Reviewing files that changed from the base of the PR and between e085bb1 and dbcd2be.

📒 Files selected for processing (3)
  • docs/feature-changelog.md
  • internal/api/handlers/playback_v3.go
  • internal/api/handlers/playback_v3_test.go

Included review availability: 1 review is currently available. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.


📝 Walkthrough

Walkthrough

Playback handling now copies Dolby Vision metadata only for tone-mapped requests. Regression tests cover local and remote remux transport. An end-to-end test verifies Safari HLS remux planning and manifest serving.

Changes

Dolby Vision remux playback

Layer / File(s) Summary
Conditional Dolby Vision metadata transport
internal/api/handlers/playback_v3.go, internal/api/handlers/playback_v3_test.go
Local and remote transport options omit tone-map-only Dolby Vision metadata. Regression tests validate both paths.
Safari HLS remux playback flow
internal/api/handlers/playback_v3_test.go, docs/feature-changelog.md
Safari playback selects an HLS remux plan and serves its manifest. The changelog records the behavior and validation rules.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to dbcd2

The change narrowly adjusts Dolby Vision evidence handling for HLS remux playback, with validation covering local and remote transport behavior and the native start-to-manifest path. No actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: neurekadev

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 2 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: omitting tone-map evidence from HLS remux playback.
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.
Full details: Docstring Coverage

Explanation

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

✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-safari-dv-remux-tonemap-evidence

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

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.

1 participant