Module – 5
MULTIMEDIA NETWORKING
Multimedia Networking Applications
A multimedia network application can be defined as any application that employs audio or Video.
Properties of Video
1) High Bit Rate
• Video distributed over the Internet use
• 100 kbps for low-quality video conferencing.
• 3 Mbps for streaming high-definition (HD) movies.
• The higher the bit-rate,
• Better the image quality and
• Better the overall user viewing experience.
• A video can be compressed, thereby trading off video-quality with bit-rate.
• A video is a sequence of images, displayed at a constant rate.
• An uncompressed digital image consists of an array of pixels.
• Each pixel is encoded into a number of bits to represent luminance and color.
• There are two types of redundancy in video:
An image that consists of mostly white space has a high degree of redundancy. These images can be efficiently compressed
without sacrificing image quality.
2) Temporal Redundancy
Temporal redundancy reflects repetition from image to subsequent image. For example: If image & subsequent image are
same, re-encoding of subsequent image can be avoided.
Properties of Audio
• PCM (Pulse Code Modulation) is a technique used to change an analog signal to digital data (digitization).
• PCM consists of 1) Encoder at the sender and 2) Decoder at the receiver.
PCM Encoder
• Digital audio has lower bandwidth requirements than video.
• Consider how analog audio is converted to a digital-signal:
• The analog audio-signal is sampled at some fixed rate. This operation is referred to as sampling.
• For example: 8000 samples per second.
• The value of each sample is an arbitrary real number.
Each sample is then rounded to one of a finite number of values. This process is called quantization. The number of such finite
values is called as quantization-values. The number of quantization-values is typically a power of 2. For ex: 256(28 )
quantization-values. Each of the quantization-values is
Dept. of ISE, RNSIT
represented by a fixed number of bits. Bit representations of all values are then concatenated to form digital representation of the
signal. This process is called encoding.
PCM Decoder
For playback through audio speakers, the digital-signal can be converted back to an analog signal. This process is called decoding.
The sound quality may be noticeably degraded.
The decoded signal can better approximate the original analog-signal by increasing
i) Sampling rate and
ii) Number ofquantization-values, Thus,
there is a trade-off between
Quality of the decoded signal and
Bit-rate & storage requirements of the digital-signal.
Types of Multimedia Network Applications
Three broad categories of multimedia applications:
1) Streaming stored audio/video
2) Conversational voice/video-over-IP and
3) Streaming live audio/video.
Streaming Stored Audio & Video
• The underlying medium is prerecorded video. For example: a movie.
• These prerecorded videos are placed on servers.
• The users send requests to the servers to view the videos on-demand. Nowadays, many
Internet companies provide streaming video. For example: YouTube.
• Three key distinguishing features of streaming stored video:
• The client begins video playout within few seconds after it begins receiving the video from the server.
• At the same time,
i) The client will be playing out from one location in the video.
ii) The client will be receiving later parts of the video from the server.
This technique avoids having to download the entire video-file before playout begins.
The media is pre-recorded, so the user may pause, reposition or fast-forward through video content. The response time should be
less than a few seconds. Once playout of the video begins, it should proceed according to the original timing of the recording.
The data must be received from the server in time for its playout at the client. Otherwise, users experience video-frame skipping
(or freezing).
Conversational Voice- and Video-over-IP
Real-time conversational voice over the Internet is often referred to as Internet telephony. It is also commonly called Voice-over-
IP (VoIP). Conversational video includes the video of the participants as wellastheir voices. Most oftoday’s voice applications
allow usersto createconferences withthree or more Participants. Most Internet companies provide voice application.
For example: Skype & Google Talk.
Two parameters are particularly important for voice applications:
1) Timing considerations and
2) Tolerance of data loss
Dept. of ISE, RNSIT
Timing considerations are important because voice applications are highly delay-sensitive. Loss- tolerant means Occasional
loss only causes occasional glitches in audio playback & these losses can be partially/fully hidden.
Streaming Live Audio & Video
These applications are similar to broadcast radio, except that transmission takes place over Internet. These applications allow a user
to receive a live radio transmitted from any corner of the world.
For example: live cricket commentary. Today, thousands of radio stations around the world are broadcasting content
over the Internet.
Streaming Stored Video
• Prerecorded videos are placed on servers.
• Users send requests to these servers to view the videos on-demand.
• The media is pre-recorded, so the user may pause, reposition or fast-forward through video content.
Three categories of applications:
1) UDP streaming
2) HTTP streaming and
3) Adaptive HTTP streaming.
A main characteristic of video-streaming is the extensive use of client-side buffering. Two advantages of client-side buffering:
1) Client-side buffering can mitigate effects of varying end-to-end delays
2) This can mitigate effects of varying amounts of available bandwidth b/w server & client.
UDP Streaming
• Theserver transmits videoata rate thatmatches theclient‟s videoconsumption rate.
• The server transmits the video-chunks over UDP at a steady rate.
• UDP does not employ a congestion-control mechanism.
• Therefore, theservercanpushpacketsintothenetworkatthe videoconsumption rate.
• Typically,UDPstreaming usesasmallclient-side buffer.(RTP Real-Time TransportProtocol).
• Using RTP, the server encapsulates the video-chunks within transport packets.
• The client & server also maintain a control-connection over which the client sends commands (such as pause, resume
and reposition).
• The RTSP (Real-Time Streaming Protocol) is a popular open protocol for a controlconnection.
• Disadvantages:
1) UDP streaming can fail to provide continuous playout of varying amount of available bandwidth
2) Costly & Complex
A media control server (RTSP) is required
→ to process client-to-server interactivity requests and
→ to track client-state for each ongoing client-session.
Dept. of ISE, RNSIT
This increases the overall cost and complexity of deploying a large-scale application. Many firewalls are configured to block UDP
traffic. This prevents the users behind the firewalls from receiving the video.
HTTP Streaming
The video is stored in an HTTP server as an ordinary file with a specific URL. it works as folows:
1) When a user wants to see the video, the client
→ establishes a TCP connection with the server and
→ issues an HTTP GET request for that URL.
2) Then, the server responds with the video file, within an HTTP response message.
3) On client side, the bytes are collected in a client application buffer.
4) Once no. of bytes in this buffer exceeds a specific threshold, the client begins playback.
• Advantages:
1) Not Costly & Complex
Streaming over HTTP avoids the need for a media control server (RTSP). This reduces the cost of deploying a large-
scale application.
2) No Firewall Problem
The use of HTTP over TCP also allows the video to traverse firewalls and NATs more easily.
3) Prefetching Video
The client downloads the video at a rate higher than the consumption rate. This prefetched video is stored in the client
application buffer. Most of Video-streaming applications use HTTP streaming. For example: YouTube.
DASH
The video is encoded into several different versions. Each version has a different bit-rate and a different
quality level.
Two main tasks:
1) The clientdynamically requests video-chunks from the different versions: low & high.
i) When the available bandwidth is high, the client selects chunks from a highrate version. For ex: Fiber
connections can receive a high-quality version.
ii) When the available bandwidth is low, the client naturally selects from a low-rate version. For ex: 3G
connections can receive a low-quality version.
2) The client adapts to the available bandwidth if end-to-end bandwidth changes during session. This feature is particularly
important for mobile-users. The mobile-users see their bandwidth fluctuate as they move with respect to base-
stations.
HTTP server stores following files:
1) Each video version with a different URL.
2) Manifest file provides a URL for each version along with its bit-rate.
• Here is how it works:
1) First, the client requests the manifest file and learns about the various versions.
2) Then,theclientselects onechunkatatimebyspecifyingURLandbyterangeinanHTTP GET request message.
Dept. of ISE, RNSIT
3) While downloading chunks, the client
→ measures the received bandwidth and
→ runs a rate determination-algorithm.
i) If measured-bandwidth is high, client will choose chunk from high-rate version.
ii) Ifmeasured-bandwidth is low, clientwillchoosechunkfrom low-rateversion
4) Therefore, DASH allows the clientto freely switch amongdifferentquality-levels.
Content Distribution
Networks Motivation for
CDN
The streaming video service can be provided is as follows:
1) Build a single massive data-center.
2) Store all videos in the data-center and
3) Stream the videos directly from the data-center to clients worldwide. Three major
problems with the above approach:
1) More Delay
If links provides a throughput lesser than consumption-rate, the end-to-end throughput will also be below the
consumption-rate. This results in freezing delays for the user.
2) Network Bandwidth is wasted A popular video may be sent many times over the same links.
3) SinglePointof Failure: Ifthe data-centergoes down,it cannot distribute any videostreams.
CDN Types
A
CDN → Manages servers in multiple geographically distributed locations
→ Stores copies of the videos in its servers, and
→ Attempts to direct each user-request to a CDN that provides the best user experience.
The CDN may be a private CDN or a third-party CDN.
A private CDN is owned by the content provider itself. For example: Google‟s CDN
distributes YouTube videos
A third-party CDN distributes content on behalf of multiple content providers CDNs.
CDN Operation
When a browser wants to retrieve a specific video, the CDN intercepts the request.
• Then, the CDN
1) Determines a suitable server-cluster for the client and
2) Redirects the client’s request to the desired server.
Most CDNs take advantage of DNS to intercept and redirect requests.
• CDN operation is illustrated in Figure 5.2.
Dept. of ISE, RNSIT
Voice-over-IP
Real-time voice over the Internet is often referred to as Internet telephony. It is also
commonly called Voice-over-IP (VoIP).
Limitations of the Best-Effort IP Service
The Internet‟s network-layer protocol IP provides best-effort service.
The IP makes best effort to move each datagram from source to destination. But IP does not
guarantee deliver of the packet to the destination.
Three main challenges to the design of real-time applications:
1) Packet-loss
2) Packet delay and
3) Packet jitter.
Packet Loss
By default, most existing VoIP applications run over UDP. The UDP segment is
encapsulated in an IP datagram. The datagram passes through router buffers in the path
from sender to receiver Problem:
Thereispossibilitythatoneormorebuffersare full. Inthiscase,thearrivingIP datagrammay be discarded.
Possible solution:
Loss can be eliminated by sending the packets over TCP rather than over UDP. However, retransmissions are
unacceptable for real-time applications „.‟ they increase delay. Packet-loss results in a reduction of sender‟s
transmission rate, Leading to buffer starvation.
End-to-End Delay
End-to-end delay is the sum of following delays:
1) Transmission, processing, and queuing delays in routers.
Dept. of ISE, RNSIT
2) Propagation delays in links and
3) Processing delays in end-systems. For
VoIPapplication,
→ Delays smaller than 150 msecs are not perceived by a human listener.
→ Delays between 150 and 400 msecs can be acceptable but are not ideal and
→ Delays exceeding 400 msecs can seriously hinder the interactivity in voice conversations.
Typically, the receiving-side will discard any packets that are delayed more than certain threshold. . For example: more
than 400 msecs.
Packet Jitter
Jitter refers to varying queuing delays that a packet experiences in the network‟s routers. If the receiver
→ ignores the presence of jitter and
→ plays out audio-chunks, then the resulting audio-quality can easily become unintelligible. • Jitter can often be removed
by using sequence numbers, timestamps, and a playout delay
Removing Jitter at the Receiver for Audio
For VoIP application, receiver must provide periodic playout of voice-chunks in presence of random jitter. This is typically done
by combining the following 2 mechanisms:
1) Prepending each Chunk with a Timestamp. The sender attaches each chunk with the time at which
the chunk was generated.
2) Delaying Playout of Chunks at the Receiver
The playout delay of the received chunks must be long. So, the most of the packets are received before their
scheduled playout times. This playout delay can either be
→ fixed throughout the duration of the session or
→ vary adaptively during the session- lifetime.
Recovering from Packet Loss
Loss recovery schemes attempt to preserve acceptable audio-quality in the presence of Packet-loss. Here, packet-loss is defined
in a 2 broad sense:
i) A packet is lost if the packet never arrives at the receiver or
ii) A packet is lost if the packet arrives after its scheduled playout time. VoIP
applications often use loss anticipation schemes.
Here, we consider 2 types of loss anticipation schemes:
1) Forward error correction (FEC) and
2) Interleaving.
FEC
• Thebasic idea ofFEC:Redundant information isadded totheoriginalpacketstream.
• The redundant information can be used to reconstruct approximations of some of the lost packets.
Two FEC mechanisms:
1) Block Coding
Dept. of ISE, RNSIT
Aredundantencodedchunkissentafterevery nchunk. Theredundantchunkisobtainedby exclusive OR-ing the n
original chunks. If anyone packet in a group is lost, the receiver can fully reconstruct the lost-packet.
Disadvantages:
If 2 or more packets in a group are lost, receiver cannot reconstruct the lost packets.
2) Increases the playout delay. This is because
→ receiver must wait to receive entire group of packets before it can begin playout.
→ A Lower Resolution Redundant Information
→ A lower-resolution audio-stream is sent as the redundant information. For
example: The sender creates nominal audio-stream and corresponding low-resolution, low-
bit-rate audio-stream. The low-bit-rate stream is referred to as the redundant-stream. The
sender constructs the nth packet by
→ taking the nth chunk from the nominal stream and
→ appending the nth chunk to the (n–1)st chunk from the redundant-stream.
Advantage:
Whenever there is packet-loss, receiver can hide the loss by playing out low-bit rate chunk.
Protocols for Real-Time Conversational Applications
• Real-time applications are very popular. For ex: VoIP and video conferencing.
• Two standards bodies are working for real-time applications: 1) IETF and 2) ITU
• Both standards (IETF & ITU) are enjoying widespread implementation in industry products.
RTP
RTP can be used for transporting common formats such as
→ MP3 for sound and
→ MPEG for video
It can also be used for transporting proprietary sound and video formats. Today, RTP enjoys
widespread implementation in many products and research prototypes. It is also complementary
to other important real-time interactive protocols, such as SIP.
RTP Basics
RTP runs on top of UDP.
The RTP packet is composed of i) RTP header & ii) audio chunk The header
includes
i) Type of audio encoding
ii) Sequence number and
iii) Timestamp.
• The application appends each chunk of the audio-data with an RTP header.
• Here is how it works:
1) At sender-side:
i) A media chunk is encapsulated within an RTP packet.
ii) Then, the packet is encapsulated within a UDP segment.
Dept. of ISE, RNSIT
iii) Finally, the UDP segment is handed over to IP.
2) At receiving-side:
i) The RTP packet is extracted from the UDP segment.
ii) Then, the media chunk is extracted from the RTP packet.
iii) Finally, the media chunkispassed to the media-player fordecodingandrendering
If an application uses RTP then the application easily interoperates with other multimedia application. For example: If 2 different
companies use RTP in their VoIP product, then users will be able to communicate.
SIP
SIP (Session Initiation Protocol) is an open and lightweight protocol. Main functions of
SIP:
1) It provides mechanisms for establishing calls b/w a caller and a callee over an IP network.
2) It allows the caller to notify the callee that it wants to start a call.
3) It allows the participants to agree on media encodings.
4) It also allows participants to end calls.
5) It provides mechanisms for the caller to determine the current IP address of the callee.
6) It provides mechanisms for call management, such as
→ adding new media streams during the call.
→ changing the encoding during the call
→ inviting new participants during the call,
→ call transfer and → call holding.
Setting up a Call to a Known IP Address
SIP call-establishment process is illustrated in Figure 5.7.
Fig 5.7 SIP call establishment when Alice knows Bob‟s IP address
Dept. of ISE, RNSIT
Consider an example: Alice wants to call Bob. Alice‟s & Bob‟s PCs are both equipped with SIP-based software for making and
receiving phone calls. The following events occur:
1) An SIP session begins when Alice sends Bob an INVITE message. This INVITE message is sent over UDP to the
well-known port 5060 for SIP.
The INVITE message includes
i) An identifier for Bob (bob@[Link])
ii) An indication of Alice‟s current IP address
iii) Anindication thatAlice desires to receive audio, which is encodedin format AVP 0.
2) Then, Bob sends an SIP response message (which resembles an HTTP response message). The response message is sent
over UDP to the wellknown port 5060 for SIP. The response message includes
i) 200 OK
ii) An indication of Bob‟s current IP address
iii) An indication that Bob desires to receive audio, which is encoded in formaAVP 3.
3) Then, Alice sends Bob an SIP acknowledgment message.
4) Finally, Bob and Alice can talk.
Three key characteristics of SIP:
1) SIP is an out-of-band protocol. The SIP message & the media-data use different sockets for sending and
receiving.
2) The SIP messages are ASCII-readable and resemble HTTP messages.
3) SIP requires all messages to be acknowledged, so it can run over UDP or TCP.
Dept. of ISE, RNSIT