Streaming a torrent while it downloads: cutting playback start from 41 s to 8 s
A developer building the self-hosted media center Torsher needed torrent videos to begin playing within 15 seconds on a typical home connection. The original Rust library's built-in streaming had a median start of 41 seconds with highly variable results, and seeking into undownloaded sections took about 43 seconds. Its stream window sent requests to peers without prioritizing the piece at the playback position. The developer replaced it with a Go service built on anacrolix/torrent, using its responsive reader to give urgent priority to pieces at the read position. The approach also downloads only a window ahead of the playhead, roughly three minutes of video, to avoid fetching entire large files for brief viewing.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in