What is a bit stream?
A bit stream is a continuous flow of bits over a communication path. This path can be within the computer itself, across computer networks from a source computer (usually some sort of server) to a destination computer. We will be focusing on network bit streams and two ways in which they can be handled.
Real time bit streaming
Real time bit streaming is where is data is retrieved live from the source as it is being created. Real time streaming cannot be paused or re-winded, as any data that is not immediately used (e.g. video data outputted to the screen) is discarded.
Low latency(delay) is prioritised over quality – packets that don’t arrive in time are discarded.
If the data cannot be reliably streamed at the current bit-rate(quality) then a lower bit-rate and quality will be used.
- Live sports television broadcasts
- Online Gaming
- Some financial data
- Some weather data
- Live streaming services (e.g. Twitch)
- Controlling UAVs and other autonomous devices.
On Demand bit streaming
On demand bit streaming is used to transmit data that has been pre-recorded. The player buffers (waits and saves up packets) until the data can be streamed in the bit-rate selected before starting playback
Data integrity is prioritised over latency.
If there is insufficient bandwidth to handle the bit stream then buffering will occur and the output will pause or drop frames until the bandwidth increases or a lower bit rate stream is selected.
- Movie playback
- Music streaming (not live radio)
- Video streaming sites such as YouTube
How It Works
How On Demand Bit Streaming Works
Step 1 – Connect to the server
Your computer connects you to the media server (whichever CDN server is best)
Step 2 – Choose appropriate video file
The Media Server tests your connection and chooses the appropriate video file from the selection it has available – this can include different formats, video resolution and video bitrate.
Step 3 – Start sending bits
The media server starts sending a stream of bits from the server to your computer
Step 4 – Fill the buffer to above the minimum mark
Your computer begins to fill it’s streaming buffer (usually stored in RAM) until amount of bits exceeds the minimum required amount.
Step 5 – Start playing the video
At this point the computer begins playing the video to the user, removing the played bits of data from the RAM as it does so.
Step 6 – If the high water mark is reached
If the buffer is filled up to above the high level then a control signal is sent to the media server asking it to pause sending data for a short while.
Step 7 – If the stream buffer is completely emptied
if the stream buffer empties the computer will pause the playback until the low level mark is reached again. If this keeps happening the computer will send a control signal asking for the media server to send a lower resolution/quality stream.