Repository navigation
fix(playback): tone-map Dolby Vision Profile 5 through RPU-aware executors - #2267
Conversation
…utors Profile 5 and compatibility id 0 sources were refused with hdr_transcode_unsupported on every client that cannot play Dolby Vision, although the bundled FFmpeg converts them correctly once the RPU is applied. They now resolve to a dolby_vision source kind that only executors able to apply the RPU advertise: software tonemapx, QSV tonemap_opencl and NVENC tonemap_cuda, each run with apply_dovi=1. VAAPI and VideoToolbox keep refusing these sources. The new kind is smoke-tested only on those executors and does not count toward a complete probe inventory, so builds that refuse apply_dovi keep their cached capabilities. Compatibility id 0 on profiles other than 5 also requires decoded frames to carry Dolby Vision metadata. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…led DV probes The download_artifacts tone-map CHECK constraint only listed the five original source kinds, so a tone-mapped download of a Dolby Vision Profile 5 file failed at insert. Widen it online and add a migrations test that the constraint covers every source kind. A Dolby Vision smoke that fails for a reason other than FFmpeg refusing apply_dovi no longer caches the kind as unsupported for good; it is retried after five minutes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to The change adds Dolby Vision tone mapping only on executors that can apply the RPU, and it preserves standard HDR capabilities when the optional smoke test is unsettled. No actionable merge-blocking risk is evident from the supplied review. Pre-merge checks |
|
A Dolby Vision smoke that hit its own command deadline was treated as a transient probe failure, so the whole probe errored and the standard kinds that had already passed were discarded. Classify any failure of the optional Dolby Vision smoke first while the probe still has time, so it is retried after five minutes like other unsettled failures. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Problem
Closes #1999
Related issue: #704
Validation tasks: none
Dolby Vision Profile 5 files can't be converted for screens without Dolby Vision. A web viewer who plays one gets "This HDR format can't be converted", even though the bundled FFmpeg on the server and its transcode nodes can tone-map it. Titles that also have an SDR version silently play that version instead. Single-file titles don't play at all. The same happens to Dolby Vision files on other profiles whose base layer reports compatibility ID 0.
Silo refuses these sources before asking any executor (
hdr_transcode_unsupported), because their base layer only looks right after the Dolby Vision RPU reshapes it; tone-mapped as plain PQ it comes out green and magenta. This change adds adolby_visiontone-map source kind for them and runs it only on executors that apply the RPU.Approach
tonemap.ResolveSourceclassifies Profile 5 with an RPU asdolby_vision. Compatibility ID 0 on another profile qualifies only when the stream is tagged PQ, and the node's preflight then requires the decoded frames to carry the PQ transfer and Dolby Vision metadata. An untagged ID 0 base can be plain SDR, and one such file rendered blown out through the RPU path, so those stay refused and keep falling back to an SDR version.tonemapx, QSVtonemap_opencl, and NVENCtonemap_cudarun the kind withapply_dovi=1. VAAPItonemap_vaapiand VideoToolbox can't apply the RPU, so they don't advertise it, and a pool of only those executors still answershdr_transcode_unsupported. A recipe that pairs the kind with a filter that can't apply the RPU is rejected before FFmpeg starts.apply_dovikeeps its other kinds cached instead of re-probing every 15 seconds. Any other failure of that smoke, such as a busy device, caches the result for the usual 15-second retry. The probe time budgets grow by one smoke command per device on those executors.dolby_visionto thedownload_artifactstone-map CHECK constraint, so tone-mapped downloads of these files can be queued. A migrations test now checks that the constraint covers every source kind.ResolveSourceand the advertised capabilities, so they change together.source_kindsandtone_map_source_kindare free-form strings in the node protocol and/api/v2, so the new value needs no contract or client change. A node that doesn't advertisedolby_vision(VAAPI, VideoToolbox, or a node on an older build) is never planned for these sources.Validation
gofmt,go vet,make lint-changed,make verify-playback-fixtures,make verify-apiv2-contract,make verify-local-paths, andmake verify-case-collisionspass.make test-gopasses exceptTestRunStatsWithRealFFmpegandTestRunSheetsOpenGOPHEVCWithRealFFmpegininternal/mediasample, which fail the same way onorigin/mainwith the FFmpeg 6.1 installed locally. Web checks weren't run; the diff has no web changes.apply_dovioption in each filter graph and its refusal for VAAPI, probe smoke kinds, refused and transient smoke failures, the raised probe budgets, the preflight frame checks, and the constraint's coverage of every source kind. The download-artifact round trip now runs for every kind and is listed inscripts/ci/db-contracts.txt; it needs a migrated database, so it wasn't run locally.hdr_transcode_unsupportedor switched to their SDR version. After, Profile 5 and PQ-tagged ID 0 titles play tone-mapped with correct colour on QSV and on the CPU in both browsers. The untagged ID 0 title plays its SDR version as before. HDR10, HDR10+, HLG, AV1, VP9, and Dolby Vision 7, 8.1, and 8.4 results didn't change.dolby_visionkind, and a node encoded it withtonemap_openclandapply_dovi=1. That insert hits the old constraint without the migration.dolby_visionfortonemap_cuda, and Silo's NVENC graph on a 4K Profile 5 clip matches the software output; the oldapply_dovi=0graph gives the green and magenta picture.Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/issue-1999/
Risks
The migration replaces the
download_artifactstone-map CHECK constraint in one transaction. The validating scan runs under that statement's lock, which blocks writes to the table for its duration; the table holds one row per prepared download variant. Down restores the old list asNOT VALIDso rows that frozedolby_visiondon't block a rollback.Executors that apply the RPU now accept sources they used to refuse. A file tagged PQ with compatibility ID 0 whose base isn't actually PQ would pass both the stream check and the frame check and play with wrong colour; none of the test library's files does this.
Profile 5 isn't preflighted. If an executor's decoder couldn't parse a file's RPU, the RPU filters would quietly tone-map the base as plain PQ. Software, VAAPI-to-QSV, and CUDA decode all attached the RPU on the test files; preflighting every Profile 5 start would add its sampling cost to each first play.
Capability probes on QSV, NVENC, and software take one more smoke command, so a cold probe can take a few seconds longer. The API's probe budgets were raised to match.
Related problems found while testing are filed separately: #2265 (a stopped transcode can keep running on the node), #2266 (preflight rejections show a retryable generic error), #2268 and #2269 (pre-existing tone-map issues found in review).
Checklist
AI Disclosure
claude-opus-5-5,claude-sonnet-5-5(review subagents)gpt-6.1-sol(xhigh) reviewed82e14d5fcin the background and found nothing new; it independently reproduced the Dolby Vision smoke-timeout case a review bot reported, which6e718b185fixes. Before opening, a multi-agent review (finders, verifiers, and a sweep onclaude-opus-5-5andclaude-sonnet-5-5) found the download-artifact constraint gap, a Dolby Vision probe failure cached permanently, a migration that held its lock through validation and a Down that would wedge rows, an untagged compatibility ID 0 base rendering wrong, and stale docs; all are fixed here. Pre-existing issues it found are filed separately.🤖 Generated with Claude Code