Free technical help for digital creators - music, video, art, photography, graphic & web design

Caching, streaming & buffering by Matt Ottewill & Alistair Banks

It is easy to become confused by the differences between Caching, Streaming and Buffering as they are all related processes for speeding up and/or improving the playback performances of digital systems. Essentially they are processes designed to ...
  1. increase the speed with which data can be accessed
  2. increase the speed with which data can be transferred over a network
  3. increase the speed with which data can be moved between components in a system
  4. Ensure uninterrupted playback of audio and video files etc.

What is caching?

A cache is a temporary storage location for some data or instructions that need to be accessed quickly and/or repeatedly. A cache's primary attribute is that it’s written to once, and read from many times. The term caching refers to the process of utilising a cache. The best way to explain a cache is to describe the various types ...

Types of cache

Disk cache If a computer system does not have enough RAM it may set aside a part of its hard disc drive to store data temporarily as an application is being used. Understandably this will significantly slow down performance.

Browser cache Internet browsers use hard disc space to store recently viewed web pages. When you hit your back button the pages are displayed instantly because the browser did not need to connect to the site and download the pages again.

Processor cache If a processor is being instructed by an application to undertake the same job repeatedly it may store often used instructions in memory attached to the processor (sometimes known as "backside cache"). This speeds things up.

What is buffering?

Buffers differ from caches in that once filled, data is usually only read back out once. A RAM buffer is a piece of RAM set aside for data waiting to be played back or burnt to disc. Think of it as a waiting room for data. The term buffering refers to the process of filling the buffer with data and then reading it out again at a steady pace.

Buffering is useful because bits may arrive erratically (over a network or from a drive etc), but must leave smoothly. So the bits are brought in as quickly as possible, and the output is delivered on time.

Ram buffers are most commonly associated with burning CD-Rs. Writing data to an optical disc (CD / DVD R / RW) requires the continual uninterrupted flow of data, normally from a hard disk drive. Because the speed which a hard disk drive performs can fluctuate (see fragmentation) the disc burning application will attempt to load data into a RAM buffer faster than it can write it to the disc, thus ensuring a consistent flow of data to the disc writer.

What is streaming?

The speed with which data (data rate) can be accessed over a network (such as the internet) is subject to factors (network bandwidth, contention, server hard disks etc) which can causes speed fluctuations.

But some processes require the real-time continual uninterrupted flow of data, including ...

  • Broadcasting real time audio over the internet (such as internet radio)
  • Broadcasting real time video over the internet (such as video conferencing)

Streaming is the name given to real time broadcasting of audio visual media over the internet. Streaming requires that the average data rate of the connection is equal to or greater than the data rate of an audio visual media file in order to ensure uninterrupted playback.

If the data rate of the connection falls that of the file being streamed then there will be an interruption in playback. When it resumes some of the "broadcast" will have been missed.

Fast start "streaming"

Fast start streaming (a QuickTime feature) involves a combination of buffering and streaming.

Whereas with buffering, an end-user had to wait for an entire audio visual file to download (or to cache to disk) before it could be played, now it will commence playback whilst it is still downloading. Typically only 10% of a file needs to have downloaded and buffered before playback starts. Streaming file formats include ...

  • Windows Media (wma, wmv, mpg etc)
  • Mpeg (MP3 audio, MPEG1 video, MPEG4 video etc)
  • QuickTime (.mov)
  • Flash (.swf)
  • MP3 (.mp3)
  • Shockwave Director (.dcr)
  • Shockwave Audio (.swa)
  • Real Audio

Because streaming media tend to be compressed, decompression and playback is usually enabled by a browser plug-in or media player utility.