Bug: Asset player stalls without buffering when seeking to end of clip #143
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Stitching workaround deployed in
a86c1c7and verified live against the affected asset.Root cause
RustFS returns empty bodies for ranged GETs whose START offset is past ~5.9 MB on single-file proxy MP4s. Confirmed via direct S3 SigV4 probe against
broadcastmgmt.cloud/dragonmam:bytes=0-bytes=5800000-5900000(50%)bytes=8179166-8279166(70%)bytes=11674000-11684522(EOF)CopyObjectthen re-read same offsetsSo: storage holds the bytes, full GETs read them, but ranged GETs starting past the threshold silently return empty bodies with otherwise-correct 206 headers. Browser sees a partial-content response that contains nothing and stalls.
Fix (this commit)
services/mam-api/src/routes/assets.js → GET /:id/video:bytes=0-GET (always works).bytes=N-Mwhose end is belowRUSTFS_RANGE_SAFE_START(default 5_500_000) → direct ranged GET, RustFS handles fine.start, stop atend. Browser sees a normal 206 + Content-Range; mam-api stays memory-flat; extra RustFS→mam-api bandwidth = (end+1 - requested_size) per seek.Cache-Control: no-storeso the browser doesn't poison its cache and re-stall on the next seek.Live verification (post-deploy)
All previously-stalled offsets now return correct byte counts.
Follow-up (v1.2.1)
Filed as separate work: switch the proxy worker to emit HLS (fmp4 segments) so every object stays well below the broken threshold and we stop paying the streaming-from-0 bandwidth tax on every seek. Helpers (
segmentToHls,uploadDirectoryToS3) staged in this commit for the follow-up. A RustFS upstream bug report should also be opened with this evidence.