Streaming technology has made listening to music or watching movies on the Internet as easy as turning on the radio or TV. Here’s how the technology works.
The first music and movie files you could find on the Internet were just short clips because you had to download the whole file before you could play it. Nowadays, however, you can start playing the file as soon as the first bytes begin to arrive… thanks to streaming.
This immediacy is possible because streaming does not send files on the Internet the same way as most other files are sent. It uses a different protocol.
User Database Protocol
A protocol is a set of rules defining how two computers connect with each other and how they send each other data.
Most data that is sent through the internet is first broken up into packets (small blocks of data). The packets are sent separately and are the rejoined at their destination so that the receiver gets the whole file.
The sending of most data on the Internet is governed by a set of rules called the Transmission Control Protocol (TCP). Streaming however uses the User Database Protocol (UDP).
These two protocols are quite different. The crucial difference is in how they check for errors.
If one packet gets damaged when downloading is being controlled by TCP, downloading will be suspended while that packet is resent. That way, once the download has been completed, you can be sure that you have the entire data file.
When you are streaming files, however, UDP allows packets to get lost now and then without interrupting the downloading. This is fine because, when an occasional packet is lost, you are unlikely to notice any interruption to the music or movie. But if everything froze very briefly while a lost packet was being resent, you probably would notice the interruption.
With streaming technology, you don’t have to wait for files to be downloaded entirely before you can begin listening to audio or watching a video. You can listen to a concert on the other side of the world in real time, make a video call or watch a movie just like on TV.
Listening to music
Streaming audio, or listening to music or speech on the Internet, is bringing joy to many. How audio streaming works is easy to understand.
When you click on a link to an audio file, your web browser will contact the relevant server on the Internet. The server will then send a metafile to your browser.
Metafile is a general term for a file format that can store multiple types of data.
The metafile will tell your browser where it can find the audio file you are looking for. This may be on the same or a different server. The metafile will also deliver instructions on the type of audio file that will be delivered and how it should be played. The file will tell the browser to launch the particular audio player needed to play the sound file.
The player that you need will be a plug-in, an app or mini-program designed to work with a particular browser such as Chrome, Internet Explorer or Firefox. Well-known plug-ins for browsers include Adobe Flash Player, QuickTime Player and Java.
If your browser does not have the particular plug-in needed to play the sound file you want to hear, you’ll have to download and install it before you can listen to the audio.
Once it’s ready to go, the plug-in will contact the audio server that is going to send the audio file and will tell it how fast your Internet connection is. The audio server will use this information to decide which version of the audio file it will begin sending.
If you have a fast connection, ie, you have ProstaStream plenty of bandwidth, the audio server can send you a high-quality sound file. However, if your connection is slow, it will send a lower-quality sound file.
Once it knows which version of the sound file to send, the server uses the UDP rules to send the audio in a series of packets.
A buffer is a part of a physical memory device where data is stored temporarily. For audio and video files, it is a section of your computer’s RAM (random access memory) where the data can go in and out quickly.
When the sound packets arrive at your computer, they are decompressed and decoded, and placed in the buffer in RAM. This buffer can hold a few seconds of sound.
Once the buffer is full, the audio player starts using your computer’s sound card to turn the data into music, voices and other sounds. As the audio is played, the data in the buffer empties while the audio server continues to refill the buffer by sending the rest of the sound file.
The flow of the audio data through the buffer can go on indefinitely. However, the flow can be interrupted occasionally when, for example, the buffer has not received enough data to replenish it.
This can happen if the speed of our connection starts to drop or Internet traffic suddenly becomes very heavy. The buffer can also end up empty if you are processing other files or otherwise using up a lot of your computer’s resources, while you are listening to music.
When the buffer empties, the audio will pause for a few seconds while the buffer is being refilled. Once the buffer is full again, playing will resume.
The effect of a pause on your listening pleasure will depend on the source of the sound file. If you are listening to music being broadcast in real-time, ie as a concert is actually taking place, you will miss a little bit of the music. But if the sound source is a pre-recorded concert, the music will resume from the point where it stopped.