2.1.9 Streaming Media and Network Performance
Streaming allows audio or video to begin playing while later data is still arriving. The quality of the experience depends on the relationship between the media bit rate, the available network throughput and the amount of data already held in a buffer.
This section compares on-demand and real-time streaming, explains how a media player manages incoming data, and shows why a broadband connection must deliver data quickly and consistently enough for the selected stream.
By the end of this section, you should be able to:
- explain what bit streaming means;
- distinguish on-demand streaming from real-time streaming;
- describe how a media server, network, buffer and player cooperate;
- explain the purpose of a playback buffer;
- relate media bit rate to available broadband speed and throughput;
- predict whether a buffer will fill, remain stable or drain;
- explain how compression and adaptive streaming affect quality and reliability.
What is bit streaming?
Audio and video are encoded into a sequence of bits. During streaming, this encoded data is delivered in small successive parts so that playback can begin before the whole media item has arrived.
Bit streaming: delivering encoded media progressively so that it can be played while further data continue to arrive.
Bit rate: the number of bits processed or transmitted each second.
Streaming compared with downloading first
| Feature | Streaming | Download before playback |
|---|---|---|
| When playback can begin | After enough initial data have arrived. | Normally after the complete file has been received. |
| Dependence during playback | Continues to depend on the network while later data arrive. | Can usually play locally after the download finishes. |
| Local storage | May keep only temporary buffered data. | Stores a complete copy of the file. |
| Typical advantage | Faster access to a long media item. | Later playback is not interrupted by changes in the connection. |
Common mistake
Streaming does not mean that no data are downloaded. Data still arrive at the device; the difference is that playback begins before the entire media item has been received.
On-demand and real-time streaming
| Comparison | On-demand streaming | Real-time streaming |
|---|---|---|
| When the media is produced | It has already been recorded and stored. | It is created while users are receiving it. |
| When playback begins | The user chooses a convenient time. | Playback follows the live event or transmission schedule. |
| Seeking and restarting | The service can normally support pause, rewind and later viewing. | Options may be limited because future content does not yet exist. |
| Example | A recorded language lesson selected from a library. | A live debate transmitted from a school auditorium. |
| Delivery challenge | Serve stored content efficiently to users who start at different times. | Distribute newly produced content to many users with low delay. |
Exam tip
Focus on when the content is produced. On-demand media already exists before the request; real-time media is being generated as it is delivered.
How a streamed item reaches the player
- The media is encoded and usually compressed into a suitable bit stream.
- A server sends successive parts of the stream across the network.
- The receiving device places incoming data into a temporary buffer.
- The player waits until a safe amount of data is available.
- The player removes data from the buffer at the media playback rate.
- New data continue to arrive while earlier data are being played.
Why compression matters
Compression reduces the number of bits needed to represent the media. A more compressed version generally needs a lower bit rate and is easier to deliver over a limited connection, but image or sound quality may be reduced.
Common mistake
Compression does not make the network faster. It reduces the amount of data that the network must deliver for each second of media.
Media bit rate and broadband performance
Two rates must be kept separate:
Available throughput: the actual rate at which useful stream data reach the device.
| Rate relationship | Effect on the buffer | Likely viewing experience |
|---|---|---|
| Incoming throughput is greater than playback bit rate | The buffer tends to fill. | Playback can build protection against short network slowdowns. |
| Incoming throughput is approximately equal to playback bit rate | The buffer remains broadly stable. | Playback may continue, but there is little spare capacity. |
| Incoming throughput is lower than playback bit rate | The buffer drains. | Playback eventually pauses unless quality is reduced or the connection improves. |
Advertised speed is not guaranteed stream throughput
A broadband package may advertise a maximum speed, but the stream receives the throughput available at that moment. Distance, congestion, WiFi conditions, other users, protocol overhead and provider limitations can all reduce the useful data rate.
For reliable playback, the available connection speed should normally be comfortably above the selected media bit rate. The difference provides headroom for normal variation.
Exam tip
Do not simply write βfaster broadband gives better streamingβ. Explain that a higher available throughput lets data enter the buffer at least as quickly as the player removes it.
Why a buffer is used
Network delivery is not perfectly even. A buffer stores some media data before they are required, allowing playback to continue during a short reduction in the incoming rate.
Buffer underflow: the buffer becomes empty before the next required data arrive.
Startup delay and resilience
Waiting for more data before playback begins increases the startup delay, but it also gives greater protection against brief network problems. Starting with very little buffered data feels faster initially but makes interruption more likely.
Control levels
| Buffer condition | Possible player response |
|---|---|
| Below a safe starting level | Delay or pause playback while more data arrive. |
| Near a lower control level | Request or prioritise further stream data. |
| Between control levels | Continue receiving and playing normally. |
| Near an upper control level | Temporarily slow or pause further input to avoid unnecessary filling. |
Common mistake
A buffer can absorb a short interruption, but it cannot compensate indefinitely when the average incoming rate remains below the playback bit rate.
Adaptive streaming and quality selection
Many services prepare several encoded versions of the same content. The player estimates current network conditions and selects a version with a suitable bit rate.
| Network condition | Possible response | Trade-off |
|---|---|---|
| Throughput rises and remains stable | Move to a higher-bit-rate version. | Improved picture or sound quality uses more data. |
| Throughput falls | Switch to a lower-bit-rate version. | Lower quality may prevent playback from stopping. |
| Connection changes repeatedly | Adjust cautiously to avoid constant quality changes. | Stability may be preferred over the highest possible quality. |
Exam tip
Link the full chain: more compression β fewer bits per second β lower required throughput β lower quality.
Interactive: Streaming Buffer Simulator
This simulator models the main idea of bit streaming. Choose a media type or adjust the rates, then watch the buffer fill and drain as data arrives and the media player consumes it.
Worked examples
Example 1: predicting the buffer direction
A lecture stream plays at 720 kbps. Useful stream data are currently arriving at 1.20 Mbps.
- Convert 1.20 Mbps to 1200 kbps.
- Net buffer change = 1200 β 720 = 480 kbps.
- Because the result is positive, the buffer tends to fill while these rates continue.
Example 2: calculating a short buffer change
An audio-visual stream arrives at 1.6 Mbps and plays at 0.8 Mbps for 3 seconds.
- Net rate = 1.6 β 0.8 = 0.8 Mbps.
- Net data added in 3 seconds = 0.8 Γ 3 = 2.4 megabits.
- Using 8 bits per byte, 2.4 megabits Γ· 8 = 0.3 megabytes.
Example 3: connection too slow
A high-quality stream requires 3.4 Mbps, but the current useful throughput is only 2.7 Mbps. The buffer loses data at 0.7 Mbps. The player may reduce quality to a lower-bit-rate version before the buffer empties.
Common calculation mistake
Keep units consistent before subtracting. Do not subtract a value in Mbps directly from a value in kbps.
Practice
Core understanding
- Explain what is meant by bit streaming.
- State two differences between on-demand and real-time streaming.
- Explain why streamed media are normally compressed.
- Describe the role of a playback buffer.
- Explain why a buffer cannot permanently solve an insufficient connection speed.
- Explain how adaptive streaming can reduce playback interruptions.
Rate reasoning
- A stream plays at 950 kbps and arrives at 1.4 Mbps. Calculate the net buffer change in kbps and state whether the buffer fills or drains.
- A stream plays at 2.2 Mbps while useful throughput falls to 1.7 Mbps. Explain the likely result if the condition continues.
- A stream arrives at 2.4 Mbps and plays at 1.2 Mbps for 5 seconds. Calculate the net amount added in megabits and megabytes.
- A user has a nominal 20 Mbps broadband connection but a high-quality stream still pauses. Give three reasons why the advertised figure may not equal the useful stream throughput.
Application scenario
A school broadcasts a live music performance. Many viewers join at the same time, and some use unstable mobile connections.
- Identify the streaming method.
- Explain why several encoded quality levels are useful.
- Explain how a buffer helps the viewers.
- Explain one reason the service should not choose the highest bit rate for every user.
Review
| Concept | Key idea |
|---|---|
| Bit streaming | Encoded media are delivered progressively while playback takes place. |
| On-demand | Stored media are played at a time selected by the user. |
| Real-time | Media are delivered as they are being produced. |
| Playback bit rate | The rate at which the player consumes stream data. |
| Available throughput | The useful rate at which stream data currently reach the device. |
| Buffer | Temporary storage that protects playback from short delivery variations. |
| Adaptive streaming | Changes the encoded version to match current network conditions. |
Quick self-check
- Can I distinguish on-demand from real-time streaming?
- Can I explain the separate roles of the server, buffer and player?
- Can I compare incoming throughput with playback bit rate?
- Can I predict when a buffer fills or drains?
- Can I link compression, bit rate, broadband speed and quality?