CIE AS & A Level Computer Science, section 2.1 (Networks including the internet)
What bit streaming is
Bit streaming sends data (usually audio or video) over a network as a continuous flow of bits, so playback can start before the whole file has been received.
The receiving device stores some data in a buffer before playing, so that short delays in the network do not interrupt the playback.
Real-time and on-demand
- Real-time (live) streaming: the event is captured, encoded and sent as it happens. Examples: a live sports broadcast or video call. There is a small delay, and it cannot be paused or replayed from the source.
- On-demand streaming: a pre-recorded file is stored on a server and sent when the user requests it. Examples: a film or a music track. The user can pause, skip and replay.
Bit rate and broadband speed
- The bit rate is the number of bits sent or played per second.
- If the broadband speed is lower than the bit rate needed, the buffer empties and playback pauses and stutters.
- A higher bit rate gives better quality but needs a faster connection.
| Problem | Cause |
|---|---|
| Buffering pauses | Connection speed below the required bit rate |
| Poor image quality | A low bit rate has been chosen to match a slow connection |
Why compression is used
Audio and video are usually compressed (lossy) before streaming, so the bit rate needed is lower and fewer bits must be sent.
Common mistake: saying on-demand streaming "downloads the whole file first". The user can play it while it is arriving. Also, a larger buffer reduces pauses but increases the delay before playback starts.
Exam tip: explain the relationship between bit rate, broadband speed and buffering. Give an example for each type of streaming (live event for real-time, film for on-demand).
Check yourself
Give an example of real-time streaming.
A live broadcast of a football match, or a video call.
What happens if the bit rate of a video is higher than the broadband speed?
The buffer runs empty and the video pauses or stutters.
Why is video compressed before being streamed?
It reduces the number of bits per second that must be sent.