Streaming Media

By Samir Makwana Published Date
01 - Mar - 2007
| Last Updated
01 - Mar - 2007
Streaming Media

What exactly happens when you play multimedia in your browser?

The streaming experience has improved over the years as our Internet connections have gotten faster. Not everyone understands that streaming actually depends on technologies and protocols different from those used for viewing Web pages or for downloading files.

What Is Streaming?
Streaming refers to the technique of continuous and steady digital data (audio, video, or graphics) transfer as "packets" in real-time from a data server through the Internet to a user's computer. Media files can played in a browser using an embedded plugin or in a media player. The smoothness of the media stream depends upon the speed of the connection. Multiple versions in terms of quality (high, medium, or low) can be made available for different connection speeds. For slow connections, glitches in frames and delayed or no audio will occur.

A key factor is the compression method used for the media files so they can be streamed seamlessly. Due to compression, some data quality is compromised through perceptual encoding, that is, the audio/video is stripped down in such a way that the changes cannot be easily perceived. Usually, perceptual encoding refers to lossy audio encoding in which psycho-acoustics is used to determine what audio signals to encode and what to snip out.

Large media files are encoded using codecs to smaller sizes. Thus you have MOV, RM, etc.

RealNetworks, QuickTime, Windows Media and Macromedia Flash are the most common streaming technologies. Windows Media and RealNetworks are the most popular, and broadcasters assume that the player plugin is installed on the viewer's browser. QuickTime is installed on all Macs. Also, installation of Macromedia Flash is required in most cases.

Types of Streaming
Streaming technology thus encompasses media content, the streaming server, plugins, and encoding software. Streaming is of two types-progressive and real-time.  During progressive streaming, the media file can be viewed or listened to while the file is in being downloaded. In the case of data loss, re-transmission of lost packets is possible. Media files streamed using the progressive technique get saved on the viewer's hard drive, which raises the problem of re-distribution. HTTP streaming is a type of progressive streaming where the media file begins to play before it is entirely downloaded. In the case of HTTP streaming, a request for data remains open even after the data is received by the client, so that the server can respond at any time.

In real-time streaming, media content gets downloaded temporarily to the user's computer. Almost-live broadcast of content is possible. Content streamed real-time can adjust according to the user's connection capacity; if the connection is too slow, the transmission of data would break.

Media streams can also be distinguished as "on demand" or "live." The former are stored on servers for long periods of time, becoming available to be transmitted to the user upon request. Live streams are available only at a particular time-like the streaming of a live TV broadcast.

A streaming server software package, the Real Time Streaming Protocol (RTSP) to control the interaction, and a matching client is needed for real-time streaming.

Transmission Protocols
Internet Protocols play an important role in media file transmission. Transmission protocols such as Transmission Control Protocol (TCP), User Datagram Protocol (UDP), RTSP, and Real-time Transport Protocol (RTP) are used.

TCP is "reliable": data transmission happening via TCP is not blocked, and every bit is guaranteed to be transmitted. However, UDP is efficient since priority is given to continuous streaming of data rather than re-transmission of lost packets. The user can suffer streaming glitches, but by error-correction techniques, lost data can be recovered. UDP is widely used for real-time streaming of audio, video, and graphics files.

RTSP and RTP are widely used for real-time media delivery over the Internet. Through RSTP, the user can communicate with the streaming server; it is used for simple one-to-one streaming. The user also gets the preference of device control-for viewing any part of the stream. This protocol is a good performer for one-to-one viewing and larger audiences as well.

This protocol is usually used for streams via unicast (for transmission to a single client computer) or multicast (for transmission to multiple client computers) servers. Unicast is the term for when data is transferred from one point to another point, that is, one client and one server. Multicast is where data is transferred from one or more points to multiple points.

RTP is used for transmitting live streams to multiple users, but the users do not enjoy any sort of control like selective play of the media stream.

Legal issues revolve around users being able to record the streaming of copyrighted content. It is difficult to stop such recording. Broadcasters sometimes use encryption for media content to make it difficult to record content.

Parting Words
To try your hands at streaming your own media, thus getting a feel of what is involved, refer to the 30 Minutes Expert in our January 2007 issue. .

Samir MakwanaSamir Makwana