Repository navigation
Description
What happened
With an embedded PGS subtitle selected, the web player stalls on large remuxes that are not in the storage's local cache. Subtitle windows return 0 bytes after about 30 s, video either doesn't start or stutters, and no subtitles appear for minutes.
The library is on network storage: a FUSE mount of remote storage with a local read cache. On an uncached file, a small random read takes about a second or more, while sequential reads run at 25–55 MB/s.
I reproduced it 4 of 4 times, each on a different uncached remux, with the English PGS track selected before pressing play:
| # | File | Plan at start | Result |
|---|---|---|---|
| 1 | 1080p, 25 GB | direct play | Did not start. 4 windows: 0 bytes after about 30 s each. Replanned to a server remux after 20 s. Started with subtitles after 3 min 35 s. (log not included) |
| 2 | 1080p, 25 GB | direct play | Did not start. First media request: 512 bytes in 37 s. Replanned to a transcode after 20 s, which produced no manifest within 30 s. Stopped after 58 s. (log A) |
| 3 | 2160p HDR10, 45 GB | server remux | Stuttered. 4 windows: 0 bytes after about 30 s each. Remux response: 44 MB in 178 s (about 2 Mbit/s) while the storage cache for the file grew by about 4.8 GB. Stopped after 178 s. (log C) |
| 4 | 1080p, 20 GB | direct play | Stuttered. 5 windows: 0 bytes (the fifth ended when playback stopped). Media: 61 MB in 190 s (about 2.6 Mbit/s) while the cache grew by about 5.3 GB. Stopped after 3 min 23 s. (log C) |
Reproduction 4 started about 20 s after reproduction 3 stopped, on the same mount, and Silo's background read for reproduction 3 may still have been running. Its log has "warm skipped: all warm slots busy".
In reproduction 1 the player showed "Loading subtitles…" and then a reconnecting message. On one more uncached remux, with the subtitle turned on 8 s into playback, the windows also returned 0 bytes, and subtitles first appeared about 5 minutes later.
What still works: the Silo iPhone app (1.2.0) direct-played another uncached remux with its embedded English PGS track. All 57 media requests took under 1.8 s, the app made no subtitle request (per the server log), and subtitles showed.
Steps to reproduce
- Put a library on network storage where a random read of an uncached file takes about a second or more.
- Pick a large Blu-ray remux MKV (20–45 GB) with an embedded PGS track and complete Cues for it (the cue count equals the track's
NUMBER_OF_FRAMEStag; checked for reproduction 1). It must not be in the mount's local cache and must not have been played in Silo. - In the web app, select the PGS track before pressing play, then play from the start.
Expected behavior
Playback starts within a few seconds, as it does in the iPhone app for the same kind of file, and subtitles arrive while the window is being read. The web player's window fetcher is written for that: "Extraction streams progressively, so a healthy-but-slow ffmpeg keeps resetting the clock; only a genuinely hung one trips it." (web/src/player/utils/subtitleWindows.ts)
Silo version / commit
2222 · 0387303 (image ghcr.io/silo-server/silo-server:latest, all-in-one)
Deployment
Docker Compose
Area
Playback and transcoding
Clients affected
- Web UI
Client app and device
Web app in Google Chrome 157 on macOS (major version from the request User-Agent; macOS version unknown). iPhone app 1.2.0 for the comparison.
Media and playback details
MKV Blu-ray remuxes: H.264 1080p (1, 2, 4) and HEVC 2160p HDR10 (3), each with embedded PGS. The English track had 209 (1), 485 (3) and 304 (4) cues in the first 630 s (the 600 s window plus the 30 s lookback); not counted for 2. Plans at start: original_http direct play (1, 2, 4) and server_remux_progressive with decision_reason=audio_adaptation (3), all with quality_preference=auto.
Relevant logs
Raw server logs, filtered to the playback, subtitle, routing and demux lines for each file. Redactions are marked. Full logs, including reproduction 1, are available on request.
Log A, reproduction 2 (Debug). The last two lines are from when the warm finished, after playback had stopped:
time=2026-11-14T22:32:39.428+01:00 level=INFO msg="playback plan decided" component=playback request_id=25c7191f9969eccef75859cb outcome=plan decision_reason=validated_original_playback delivery=original_http play_method=direct requested_file_id=24805 effective_file_id=24805 dv_profile=0 dynamic_range=sdr target_resolution="" target_bitrate_kbps=0 quality_preference=auto bandwidth_estimate_kbps=201501 client_name="Silo Web" client_version=0.0.1
time=2026-11-14T22:32:39.436+01:00 level=INFO msg="apiv2 request" component=apiv2 request_id=25c7191f9969eccef75859cb api_major=2 operation_id=startPlayback method=POST path_pattern=/api/v2/playback/start status=201 status_class=2xx error_code=none auth_class=session duration_ms=16 body_bytes=6066 client_ip=[REDACTED: client IP] client_name="Silo Web" client_version=0.0.1 user_id=1
time=2026-11-14T22:32:39.507+01:00 level=INFO msg="subtitle stream requested" component=api file_id=24805 embedded_index=0 track_language=en track_codec=hdmv_pgs_subtitle track_probed_index=2 seek_seconds=0 duration_seconds=600
time=2026-11-14T22:32:59.555+01:00 level=DEBUG msg="playback route selected" component=noderouting workload=video_transcode shape=hls_video_api execution=api egress=api
time=2026-11-14T22:33:09.508+01:00 level=INFO msg="subtitle cache warm started" input="[REDACTED: media path]" track=0
time=2026-11-14T22:33:09.508+01:00 level=INFO msg="apiv2 request" component=apiv2 request_id=abe0cec633a0173c90431d43 api_major=2 operation_id=getPlaybackSubtitle method=GET path_pattern=/api/v2/stream/{session_id}/subtitles/{track} status=200 status_class=2xx error_code=none auth_class=session duration_ms=30001 body_bytes=0 client_ip=[REDACTED: client IP] user_id=1
time=2026-11-14T22:33:14.507+01:00 level=INFO msg="subtitle stream requested" component=api file_id=24805 embedded_index=0 track_language=en track_codec=hdmv_pgs_subtitle track_probed_index=2 seek_seconds=0 duration_seconds=600
time=2026-11-14T22:33:14.508+01:00 level=DEBUG msg="subtitle window demuxed from the source" component=playback file_id=24805 stream_index=2 reason="embeddedsub: packet read limit reached"
time=2026-11-14T22:33:16.626+01:00 level=INFO msg="direct stream ended" component=playback outcome=client_gone status=206 bytes_sent=512 range_requested=true range_start=0 had_if_match=false had_if_range=false conditional_result=none etag_fingerprint=b182a3cb92d79105
time=2026-11-14T22:33:16.627+01:00 level=INFO msg="apiv2 request" component=apiv2 request_id=8c555c94a119f132c9832783 api_major=2 operation_id=getPlaybackMedia method=GET path_pattern=/api/v2/stream/{session_id} status=206 status_class=2xx error_code=none auth_class=session duration_ms=37084 body_bytes=512 client_ip=[REDACTED: client IP] user_id=1
time=2026-11-14T22:33:29.692+01:00 level=INFO msg="playback transport startup timing" component=playback request_id=3f1395752e6a5c63b473c8a0 transport=local session=0e4ddf7d-f5af-42e4-b5c4-29cf2220abb0 attempts=1 total_ms=30136 outcome=readiness_failed
time=2026-11-14T22:33:29.692+01:00 level=WARN msg="playback route unavailable" component=noderouting workload=video_transcode outcome=route_capacity_unavailable reason=route_capacity_unavailable
time=2026-11-14T22:33:29.709+01:00 level=INFO msg="apiv2 request" component=apiv2 request_id=3f1395752e6a5c63b473c8a0 api_major=2 operation_id=replanPlayback method=POST path_pattern=/api/v2/playback/{session_id}/replan status=200 status_class=2xx error_code=none auth_class=session duration_ms=30181 body_bytes=1029 client_ip=[REDACTED: client IP] client_name="Silo Web" client_version=0.0.1 user_id=1
time=2026-11-14T22:33:37.808+01:00 level=DEBUG msg="subtitle stream extract finished" component=playback track=0 seek=0 elapsed_ms=23299 ffmpeg_err="signal: killed"
time=2026-11-14T22:33:37.808+01:00 level=INFO msg="apiv2 request" component=apiv2 request_id=5582e3ccfbb29210570ed831 api_major=2 operation_id=getPlaybackSubtitle method=GET path_pattern=/api/v2/stream/{session_id}/subtitles/{track} status=200 status_class=2xx error_code=none auth_class=session duration_ms=23302 body_bytes=0 client_ip=[REDACTED: client IP] user_id=1
time=2026-11-14T22:33:37.850+01:00 level=INFO msg="apiv2 request" component=apiv2 request_id=36cbfa778b725a465aefe519 api_major=2 operation_id=stopPlayback method=DELETE path_pattern=/api/v2/playback/{session_id} status=200 status_class=2xx error_code=none auth_class=session duration_ms=29 body_bytes=71 client_ip=[REDACTED: client IP] client_name="Silo Web" client_version=0.0.1 user_id=1
time=2026-11-14T22:34:39.510+01:00 level=INFO msg="embedded subtitle track demuxed from the source" component=playback file_id=24805 stream_index=2 reason="keptsub: the track is still being read"
time=2026-11-14T22:42:55.837+01:00 level=DEBUG msg="subtitle stream extract finished" component=playback track=0 seek=0 elapsed_ms=496326 ffmpeg_err=<nil>
time=2026-11-14T22:42:55.838+01:00 level=INFO msg="subtitle cache warm finished" input="[REDACTED: media path]" track=0 elapsed_ms=586330Log C, reproductions 3 and 4 (Debug). Selected lines, 15 of the 43 filtered lines: the plan, the first and last window responses, the warm lines, the main media responses and the stops. The other 28 are the 9 window requests, 4 more window responses (all 0 bytes), 2 start requests, 7 lines for early media requests, a second "still being read" line, 3 more "warm skipped" lines, and 2 remux routing lines. They are available on request.
time=2026-11-14T22:45:01.343+01:00 level=INFO msg="playback plan decided" component=playback request_id=07295cd7b161ea6ea3534477 outcome=plan decision_reason=audio_adaptation delivery=server_remux_progressive play_method=remux requested_file_id=30355 effective_file_id=30355 dv_profile=0 dynamic_range=hdr10 target_resolution="" target_bitrate_kbps=0 quality_preference=auto bandwidth_estimate_kbps=201501 client_name="Silo Web" client_version=0.0.1
time=2026-11-14T22:45:31.426+01:00 level=INFO msg="subtitle cache warm started" input="[REDACTED: media path]" track=0
time=2026-11-14T22:45:31.426+01:00 level=INFO msg="apiv2 request" component=apiv2 request_id=98457e72deec1a0fc735ceef api_major=2 operation_id=getPlaybackSubtitle method=GET path_pattern=/api/v2/stream/{session_id}/subtitles/{track} status=200 status_class=2xx error_code=none auth_class=session duration_ms=30009 body_bytes=0 client_ip=[REDACTED: client IP] user_id=1
time=2026-11-14T22:47:01.427+01:00 level=INFO msg="embedded subtitle track demuxed from the source" component=playback file_id=30355 stream_index=3 reason="keptsub: the track is still being read"
time=2026-11-14T22:47:36.420+01:00 level=INFO msg="apiv2 request" component=apiv2 request_id=68d0dbcfd48577ed7ea50570 api_major=2 operation_id=getPlaybackSubtitle method=GET path_pattern=/api/v2/stream/{session_id}/subtitles/{track} status=200 status_class=2xx error_code=none auth_class=session duration_ms=29998 body_bytes=0 client_ip=[REDACTED: client IP] user_id=1
time=2026-11-14T22:47:59.261+01:00 level=INFO msg="apiv2 request" component=apiv2 request_id=8e75f8baf996028df23b0c9f api_major=2 operation_id=getPlaybackMedia method=GET path_pattern=/api/v2/stream/{session_id} status=200 status_class=2xx error_code=none auth_class=session duration_ms=177830 body_bytes=44015297 client_ip=[REDACTED: client IP] user_id=1
time=2026-11-14T22:47:59.323+01:00 level=INFO msg="apiv2 request" component=apiv2 request_id=c8ccf175554b9472139892fe api_major=2 operation_id=stopPlayback method=DELETE path_pattern=/api/v2/playback/{session_id} status=200 status_class=2xx error_code=none auth_class=session duration_ms=38 body_bytes=136 client_ip=[REDACTED: client IP] client_name="Silo Web" client_version=0.0.1 user_id=1
time=2026-11-14T22:48:20.513+01:00 level=INFO msg="playback plan decided" component=playback request_id=a30229439943b8881e022a4d outcome=plan decision_reason=validated_original_playback delivery=original_http play_method=direct requested_file_id=26007 effective_file_id=26007 dv_profile=0 dynamic_range=sdr target_resolution="" target_bitrate_kbps=0 quality_preference=auto bandwidth_estimate_kbps=201501 client_name="Silo Web" client_version=0.0.1
time=2026-11-14T22:48:50.609+01:00 level=INFO msg="subtitle cache warm started" input="[REDACTED: media path]" track=0
time=2026-11-14T22:48:50.610+01:00 level=INFO msg="apiv2 request" component=apiv2 request_id=f5a7405ba1969bf57a5eefe2 api_major=2 operation_id=getPlaybackSubtitle method=GET path_pattern=/api/v2/stream/{session_id}/subtitles/{track} status=200 status_class=2xx error_code=none auth_class=session duration_ms=30001 body_bytes=0 client_ip=[REDACTED: client IP] user_id=1
time=2026-11-14T22:49:25.616+01:00 level=DEBUG msg="subtitle cache warm skipped: all warm slots busy" input="[REDACTED: media path]" track=0
time=2026-11-14T22:49:25.616+01:00 level=INFO msg="apiv2 request" component=apiv2 request_id=a1fd8de559f4543a7b729151 api_major=2 operation_id=getPlaybackSubtitle method=GET path_pattern=/api/v2/stream/{session_id}/subtitles/{track} status=200 status_class=2xx error_code=none auth_class=session duration_ms=30004 body_bytes=0 client_ip=[REDACTED: client IP] user_id=1
time=2026-11-14T22:51:43.377+01:00 level=INFO msg="apiv2 request" component=apiv2 request_id=366b5d0aa3ae320f74ff3bbd api_major=2 operation_id=getPlaybackSubtitle method=GET path_pattern=/api/v2/stream/{session_id}/subtitles/{track} status=200 status_class=2xx error_code=none auth_class=session duration_ms=7755 body_bytes=0 client_ip=[REDACTED: client IP] user_id=1
time=2026-11-14T22:51:43.442+01:00 level=INFO msg="apiv2 request" component=apiv2 request_id=07310e8d3b5accc3ec33331a api_major=2 operation_id=getPlaybackMedia method=GET path_pattern=/api/v2/stream/{session_id} status=206 status_class=2xx error_code=none auth_class=session duration_ms=190228 body_bytes=61014016 client_ip=[REDACTED: client IP] user_id=1
time=2026-11-14T22:51:43.448+01:00 level=INFO msg="apiv2 request" component=apiv2 request_id=9c5b11fcf925a3135343db66 api_major=2 operation_id=stopPlayback method=DELETE path_pattern=/api/v2/playback/{session_id} status=200 status_class=2xx error_code=none auth_class=session duration_ms=55 body_bytes=144 client_ip=[REDACTED: client IP] client_name="Silo Web" client_version=0.0.1 user_id=1Technical notes
Suspected cause, from reading the code at 0387303:
- The first window request goes through
serveWindowFromSource→keptsub.Store.sourceWindow: the index load (capped at 30 s), a start-time probe, thenembeddedsub.ReadPackets, which reads the window's packets through the index and returns nothing until all of them are read. The packet read has no deadline of its own, so on this storage the client's 30 s stall timeout fires first. Silo then starts a warm and answers 200 with no body, which matches the 30 s, 0-byte lines. - The index reads outlive the request. In log A the retry got
ErrReadBusy("packet read limit reached"), meaning the aborted read still held its slot. The warm reads the whole track through the index as a foreground flight that, perflight.go, "no longer stops when its callers go". In log A it gave way to the demux after the 90 sforegroundWaitand finished after 586 s. - While those reads ran, the other readers of the same file got far less than playback needs: the direct-play request, Silo's own server remux in reproduction 3, and the retry's ffmpeg demux (0 bytes in 23 s, until playback was stopped). Meanwhile the storage pulled several GB for the file. Why the transcode in reproduction 2 didn't start is unknown.
Outside Silo, on two other uncached files through the same mount: a script that reads one window the way embeddedsub does took 87.8 s and slowed a parallel sequential reader. Silo's own ffmpeg window demux, with no index reads on the file, sent its first bytes after 0.4 s and finished the window in 43.9 s. These are one run each, on different files.
Not verified: why other reads of the same file stall (it may be specific to the FUSE mount), a demux running alongside index reads under controlled conditions, and a build from before #3331 (merged 2026-11-01), which added the index read for windows.
No commit on main after 0387303 (checked 2026-11-14) touches internal/embeddedsub, internal/keptsub or the subtitle serving and window code. #1406 has the same client symptom with a different cause: ffmpeg reading past a sparse track's window.
AI harness
Claude Code (desktop app)
AI tool(s)
Claude Code
AI model(s)
claude-opus-5-5 (analysis, measurements, report); claude-sonnet-5-5 (review)
AI involvement
Fully AI-generated, human verified
Independent or adversarial review
Four reviewer agents on claude-sonnet-5-5 checked this report in three rounds. Rounds 1 and 2 checked the code claims against 0387303 and the cited PRs, policy and privacy against the issue form and CONTRIBUTING.md, and every number against the raw logs. They found an out-of-context quote, a wrong fallback timer, an overclaimed demux statement, an unproven regression claim, and causal wording stronger than the logs. Round 3 checked the shortened version against the longer one and the raw logs. It found that reproductions 3 and 4 overlapped, that the log C selection was unlabelled, that caveats had been dropped (unknown transcode cause, the stop ending the demux, the Cues condition, replans), and that the title stated a cause. All of these were corrected.
Confirmations
- I searched open and recently closed issues and pull requests, and this is not already reported
- I reproduced this myself on a real deployment
- Any logs provided are raw apart from marked redactions and are not AI-summarized; if none were available, I said so above
Activity
Quick104 commentedon Nov 15, 2026
🤖 AI agent claim. Claude Code (claude-opus-5-5) is working on a fix for this issue on behalf of @Quick104, who is assigned.
A pull request will link here when the fix is ready. If the work stops without a fix, the assignment and this comment are removed.
Planning to work on this, or have context to add? Reply here and mention @Quick104.
fix(playback): demux a subtitle window the file's index can't read in…