sciandu
Computer science

Computer science

Streaming & bandwidth

Why a video starts instantly even though it is huge, and why it sometimes stutters anyway.

What you need first

A movie is several gigabytes in size. Yet it starts on your phone after a few seconds. How can that be, when even a small download often takes longer? The trick is called streaming, and whether it works well depends on a single number: your bandwidth.

Chunks instead of the whole file

With a download, you wait until the complete file has arrived. With streaming, your device asks the server only for the next small chunk of the video, plays it, and meanwhile already loads the one after that. So you watch the beginning while the rest is still on its way. If you skip ahead, your device simply requests the chunks from that point on, and the chunks you skipped are never loaded.

Bandwidth: data per second

Bandwidth is the amount of data that can reach you per second, for example 5 megabytes per second. Picture it as a water pipe: a thick pipe lets a lot through, a thin one very little. The data sizes you already know help here: a piece of music needs about 1 megabyte per minute, an HD video more like 50. So video is roughly 50 times thirstier than music. Careful when you compare this with adverts: internet providers quote megabits per second, and 8 megabits are only 1 megabyte. So a 40 megabit per second line delivers exactly the 5 megabytes per second from our example.

Storage scale
UnitByte
Bit
B
KB
MB
GB
TB

1 Byte is roughly: one letter

1 Byte = 8 Bit
Try it: compare how much a photo, a song and one minute of HD video weigh, and think about how long they take to fit through your pipe.

The buffer, and why it stutters

Your device always loads a few chunks in advance and keeps them in a reserve called the buffer. As long as chunks arrive faster than you watch them, the buffer stays filled and everything runs smoothly. But if the video needs more data per second than your bandwidth delivers, the buffer shrinks until it is empty: the video stops and reloads. Many apps then automatically switch to a lower quality that needs less data per second.

Exercises

0 of 6 solved

Time to try it yourself. You can't break anything, every attempt counts.

What does streaming do differently from a download?

Your bandwidth delivers 5 megabytes per second. How many megabytes arrive in 10 seconds?

A song is 4 megabytes, your bandwidth delivers 2 megabytes per second. How many seconds does it take until the song is fully loaded?

Your bandwidth is too small for the video. Put the events in the right order.

  1. 1The buffer shrinks
  2. 2The video stops and reloads
  3. 3The video needs more data per second than the bandwidth delivers
  4. 4The buffer is empty

A video stops in the middle and shows a loading icon. What most likely happened?

Bandwidth is the amount of data that can reach you per .