Skip to content

Handle source_unreadable and sync the v2 contract fixtures #449

Open

Description

@Rhainland

Problem

Silo-Server/silo-server#1810 (fixing Silo-Server/silo-server#1791) makes the server record when ffprobe rejects a file, and starting such a file now answers outcome: adaptation_unavailable with terminal.reason: source_unreadable, retryable: false, and the message "The source file could not be read; it appears to be empty or damaged." Before, the same files answered source_metadata_incomplete with retryable: true, which the web app showed as "This file hasn't finished scanning". silo-android does not list source_unreadable among the server terminal reasons it recognises (SAFE_SERVER_TERMINAL_REASONS in android-shared/.../player/video/VideoPlaybackStartResult.kt), so it is not treated as a known reason yet.

Silo-Server/silo-server#1809 (#1790) and #1810 also change the v2 contract (new response media types; an optional unreadable field on EpisodeFile), so the vendored v2 fixtures need a sync once both merge.

Proposed change

After both server PRs merge:

  1. Sync the v2 fixtures (scripts/sync-apiv2-fixtures.sh against silo-server main, or make apiv2-fixtures-sync from silo-server).
  2. Treat source_unreadable as a final error: show the server's message (or "This file can't be played. It appears to be empty or damaged."), no retry, no "still scanning" wording. Keep source_metadata_incomplete as it is.
  3. Optionally, show a "Damaged file" marker on episodes whose files all have unreadable: true in v2 episode lists, as the web does.

Whether to claim m2ts (Blu-ray transport streams, newly cataloged by #1809) or report .webm as its own container is being checked separately; it depends on what the native player can play.

References

AI Disclosure

  • Harness: Claude Code (running in T3 Code)
  • Tool(s): Claude Code (Bash, Read, sub-agents, browser automation through the T3 Code preview), GitHub CLI, Docker, FFmpeg
  • Model(s): claude-opus-5-5
  • Involvement: Fully AI-generated, human verified
  • Adversarial review: n/a

Activity

  1. Rhainland commented on Oct 2, 2026

    @Rhainland
    ContributorAuthor

    Finding that changes this issue's scope: silo-android claims m2ts and mts today (media3OriginalVideoContainers in PlaybackContainerPolicy.kt, used for the top-level containers, original_http.containers and the download capabilities), but Media3 1.11's TsExtractor only handles 188-byte transport-stream packets. Blu-ray/AVCHD .m2ts/.mts files use 192-byte packets, so Media3 should fail to recognise them (found from the extractor code; not yet confirmed on a device).

    Until now this didn't matter because the server never cataloged .m2ts. Once Silo-Server/silo-server#1809 merges, the planner will offer those files to Android as direct play: playback would fail to start and recover only through a failure_recovery replan to an HLS remux, and offline downloads would fetch the raw .m2ts and fail with no server to fall back to.

    Proposed addition to this issue: remove m2ts and mts from the claimed containers (keep ts/mpegts), so the server remuxes those files (a cheap codec copy), and add them back only if a Media3 release supports 192-byte packets and a device test confirms it. Ideally this lands before or with #1809.

    webm is fine to keep: Media3's MatroskaExtractor handles it.

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