Skip to content

Centralize dynamic-range-aware version selection (clients each reimplement DV/HDR preference) #697

Open

Description

@Quick104

Summary (enhancement / discussion — not a defect)

Each first-party client independently implements automatic version selection (which file to play when a title has multiple: 1080p / 2160p HDR10 / 2160p Dolby Vision / …). Until just now every client ranked by resolution only, so a Dolby-Vision-capable display could auto-pick a plain HDR10 file over the DV file of the same resolution. Apple has been fixed (Silo-Server/silo-apple 741f15a) and Android is filed (Silo-Server/silo-android#239), but the logic — and the dynamic-range/codec preference policy — now lives in triplicate across the clients and will drift.

This issue asks whether the server should offer dynamic-range-aware version guidance so the preference policy is defined once, with the clients contributing only their display capability.

Why the server is a natural home

  • The server already stores the signals: watch_progress.last_file_id, last_hdr, last_resolution, last_codec_video, last_edition_key (see internal/userdb/progress.go, written by persistProgress → UpdateProgressHints on every /playback/{id}/progress and stop). The memory works; what's missing is using those hints (plus the file inventory's DR/codec metadata) to recommend a default.
  • The DR/codec ranking policy (DV > HDR10+ > HDR10 > SDR, gated on capability, tie-broken deterministically) is device-agnostic except for one input the server lacks: whether the display can present each mode. Clients already advertise capability on the V3 start (client_capabilities, incl. Dolby Vision profiles — see ApplePlaybackV3Capabilities), so the server can receive it.

Possible shapes (for discussion, pick at most one)

  1. Server-recommended default file id on the watch/detail payload: given the profile's hints + the request's advertised display capability, return a recommended_file_id (or an ordered version list) the client uses when Version = Automatic. Clients stop ranking entirely.
  2. A DR-aware default only when the client omits file_id at /playback/start: today the native clients always send a resolved file_id, so the server's own default path is effectively unused. If clients deferred to the server (sending capability instead of a file id), the ranking would live in internal/playback once.
  3. Do nothing server-side; keep it a per-client concern and just track the two client fixes. Acceptable if the duplication is considered cheap — this issue then documents the decision.

Not a bug

last_file_id persistence is correct; this is only about centralizing the selection policy so DV/HDR preference doesn't have to be re-implemented and re-tested in every client.

References


🤖 Generated with Claude Code

Activity

  1. tomislav commented on Aug 20, 2026

    @tomislav
    Contributor

    #637 proposes a server-side answer to this: the server would rank complete playback routes across stored versions, with dynamic range, bitrate, audio, and the server bitrate limits feeding that ranking. It is closest to option 2 here, except that clients would still send file_id as the anchor and opt in through client_features. If #637 is accepted, the client-side ranking could go away and this issue could close with it.

  2. added
    triaged
    and removed
    triaged
    on Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions