Guides · Architecture
Why YouTube downloads are slow, and how asking in 10 MB pieces fixed it.
A real debugging story: a 1440p video stuck at 200 KB/s on a fast line. Why long single requests get throttled and how parallel 10 MB requests reached 3 to 4.
Key takeaways
- On the same connection, one long YouTube request crawled at about 200 KB/s while several short requests reached 3 to 4.4 MB/s.
- The cause is throttling of long single requests, not your internet.
- Capping each request at about 10 MB, and running several in parallel, restores full speed.
- Format choice matters too: a plain HTTPS file is faster than an HLS playlist.
The symptom
While building TurboGet, the first real-world bug report on YouTube was blunt: a long 1440p video was stuck at 0.0%. The partial file was 0 bytes, and the app had no timeout, so it waited forever.
Retrying without the browser's login cookies made the same video download, but only at about 200 KB/s on a connection that could do far more. That combination of "works, but weirdly slowly" is the signature of throttling.
What was going on
YouTube serves video over plain HTTPS from its CDN. When a client asks for a very large range in one request, the server can deliver it slowly. When the client asks for smaller pieces, the server serves them at full speed.
The tool I was using for extraction, yt-dlp, has an option for downloading fragments concurrently, but that option applies to fragmented streams like HLS, not to a plain HTTPS format. So even though the video was available as a single file, it was fetched as one long, throttled request.
The fix: split the job
The design that worked separates two jobs:
- Find the streams.
yt-dlpstill does what it is good at: working out which video stream and which audio stream to fetch, and returning their real URLs. - Download them with a proper engine. TurboGet's own multi-connection engine downloads both streams in parallel, over several connections, with every request capped at 10 MB.
Then ffmpeg joins the video and audio without re-encoding, so there is no quality loss and no long conversion step.
On the same video and the same line, the speed went from about 200 KB/s to 3 to 4.4 MB/s. Pause and resume work exactly as they do for any other file, because it is the same engine.
Two more problems found along the way
A 403 with logged-in cookies
Links obtained with the browser's cookies can be refused with an HTTP 403. TurboGet now retries automatically with fresh links obtained without cookies, which works for most public videos.
The wrong "best" format
Asking for "best quality up to 1440p" quietly selected format 623, which turned out to be an HLS playlist rather than a direct HTTPS file. HLS is slower here. Sorting formats to prefer HTTPS first, then H.264 up to 1080p, fixed both the speed and playability on every player.
A rule of thumb for any throttled download
- If a huge single request is slow but small requests are fast, split the transfer into smaller ranges.
- Run several of them in parallel, but not so many that the server answers 429 or 503.
- Prefer a plain HTTPS file over a playlist when both exist.
- Add a "no progress" timeout. A download that makes no progress for two minutes should stop with an explanation, not sit at 0% forever.
For the general mechanics, see how download managers work and why downloads are slow.
A note on legality
Whether you may download a particular video depends on its licence, the site's terms and your local law. Download what you own, what is freely licensed or what the rightsholder permits.
Frequently asked questions
Why is my YouTube download slow when my internet is fast?
Often because a single long request is being throttled by the server. Fetching the same video in smaller pieces over several connections can restore the speed.
Does using more connections always help?
Only when the limit is per connection. If your line is full or the server rejects many connections, extra ones do not help and may cause errors.
Is this specific to YouTube?
Many CDNs apply different limits to long requests, but the exact behaviour varies by site and can change. Measure rather than assume.
Read the full TurboGet build story, including the YouTube fix and the bugs along the way.
Read the case study