Streaming and Digital Media

How Streaming and Digital Media Work

See how streaming services break video and music into small pieces, store them on nearby servers and adapt quality to your connection in real time.

On this page
  1. Streaming is delivery in small pieces
  2. Preparing the media
  3. What happens when you press play
  4. Where the files are kept
  5. Live versus on-demand
  6. Streaming versus downloading and owning
  7. What each part means for you

Streaming is delivery in small pieces

Streaming means you play media while it is still arriving, instead of downloading a whole file first. A film that would take a long time to fetch in one go can start within a few seconds, because your device only needs the first part to begin.

To make that possible, a service does not send one continuous stream like a radio broadcast. It cuts each video or song into short segments, often a few seconds long, and your device requests them one after another over ordinary web connections. The player stitches the segments together, so you see one smooth programme. Because each piece is a normal web request, the same internet infrastructure that serves web pages can serve video.

Preparing the media

Before anything reaches you, the service prepares each title. The original file is very large, so it is compressed with a codec, a method for shrinking audio or video by discarding detail people are unlikely to notice. Common video codecs include H.264, HEVC and AV1; common audio codecs include AAC and Opus. Newer codecs generally squeeze more quality into the same amount of data, but they need devices that can decode them.

The service then creates several versions of the same title at different quality levels, from a small, low-detail copy suitable for a weak connection to a large, sharp one. Each version is cut into the short segments described above. A text file, usually called a manifest or playlist, lists which segments exist and where to find them. Two widely used formats for this are HLS and MPEG-DASH.

What happens when you press play

Your app first fetches the manifest. It then picks a quality level, requests the first few segments and begins playback while it keeps fetching later ones. The segments waiting in memory are the buffer, a cushion that covers small hiccups; the reasons a stream stalls are covered in the article on why video buffers.

The player keeps measuring how quickly segments arrive. If they come fast and the buffer is healthy, it may move up to a sharper version. If they slow down, it drops to a smaller one rather than freezing. This is called adaptive bitrate streaming, and it is why a picture can look soft for a moment and then sharpen. The switch is possible because every version is split at matching points, so the player can change level between one segment and the next.

Where the files are kept

Serving every viewer from one central computer would be slow and fragile. Services typically copy popular titles to many servers in different places, often called a content delivery network. Your request is directed to a nearby copy, which shortens the journey and spreads the load. Some large services place servers inside internet providers’ own networks for the same reason.

Your own connection still matters. Data crosses your home network on the way to the screen, so a weak signal or a congested router can slow things even when the service is working well. A speed test gives a rough picture of what your connection can carry, and Wi-Fi speed in the house can differ a lot from the figure your provider advertises.

Live versus on-demand

On-demand streaming serves files that already exist, so the service can prepare them carefully in advance. Live streaming has less time. The video is captured, compressed and cut into segments within seconds, which is why live events often run noticeably behind what you might see on a broadcast or hear from a neighbour. Services can shorten this delay, but a shorter delay usually leaves less room to recover from network problems.

Music works the same way with much smaller files. A song is far lighter than a film, so audio usually starts almost at once and survives weaker connections. Quality choices there turn on bitrate and format, which the article on audio quality covers.

Streaming versus downloading and owning

Many apps also let you save a title for offline viewing. That is normally an encrypted copy that only the app can play, and it may expire. Why that is, and what it means for the idea of owning something digital, is the subject of digital rights management.

Behind the scenes, a service also records what you watch or listen to and uses it to suggest more, which is a separate system from delivery itself. How recommendation algorithms use that history is its own topic.

What each part means for you

  • Your internet speed limits the highest quality level your player can sustain.
  • Your screen and device limit what you can display. A phone and a large television may receive different versions of the same title.
  • The service decides which versions and codecs it offers, and for which devices.
  • Data use rises with quality. Higher resolution generally means more data per hour, so a monthly data cap can matter.

Most of the time all of this happens invisibly. When something goes wrong, the question is usually which link in the chain is the weakest: the service’s servers, the path across the internet, your home network or the device that plays the result.

Keep exploring

Guides from other topics

All topics →