Unit 7
Multimedia Networking
Compiled by: Krishna Bhandari
www.genuinenotes.com
Multimedia applications
•Multimedia is content that uses a combination of different content forms such as
text, audio, images, animations, video and interactive content.
•In recent years, there has been an explosive growth of new applications on the
Internet like streaming video, IP telephony, teleconferencing, interactive games,
distance learning, and so on.
• Those multimedia networking applications are referred as continuous-media
applications and require services different from those for traditional applications
like e-mail, Web, remote login, etc.
• They are also different from download and then play applications. Especially, the
new applications require high quality on the communication latency and the latency
variation(delay-sensitive) but may not require high quality on the error rate (loss-
tolerant).
• One key issue for supporting new multimedia networking applications is how to get
the high quality for the communication latency on the best effort Internet which
provides no latency guarantee.
•Another key issue is how to improve the Internet architecture to provide support for
the service required by multimedia applications.www.genuinenotes.com
• Audio, video processing
• Education and training
• Multimedia analysis and Internet
• Artificial Intelligence
• Virtual reality and 3-D imaging
• Wireless, Mobile Computing
• Animation and Graphics
• Visual Communication
www.genuinenotes.com
Classes of multimedia application
• Streaming stored audio\video
• Streaming live audio\video
• Real-time interactive audio\video
Streaming stored audio\video
Applications have the following key features:
➢ Stored media: the contents has been prerecorded and is stored at the server. So, a
user may pause, rewind, or fast-forward the multimedia contents. The response
time to the above actions should be in the order of 1-10 seconds.
➢ Streaming: a user starts playout a few seconds after it begins receiving
the file from the server. So, a user plays out the audio/video from one location
in the file while it is receiving later parts of the file from the server. This
technique is called streaming and avoids having download the entire file before
starting playout.
➢ Continuous playout: once playout begins, it should proceed based on the
original timing of the recording. This requires high quality on the end-to-end
delay.www.genuinenotes.com
Streaming live audio\video
➢Applications are similar to traditional radio and television, except that
audio/video contents are transmitted on the Internet. In these applications, many
clients may receive the same program.
➢A key issue here is how to deliver the program efficiently to multiple clients on
the Internet. IP multicasting technologies play a key role for this.
➢ Similar to streaming stored audio and video applications, applications here
require continuous playout and high quality on the end-to-end delay.
Real-time interactive audio\video
➢Applications allow users using audio/video to communicate with each other in
real time.
➢ Real-time interactive audio on the Internet applications are IP telephony, video conference, distributed interactive worlds.
➢Applications in this category require very high quality on the end-to-end delay,
usually a fraction of one second.
www.genuinenotes.com
Server for stored streaming audio\video
• In these applications, clients request audio/video data stored at servers. Upon
client's request, servers send the data into a socket connection for transmission.
• Both TCP and UDP socket connections have been used in practice. The data are
segmented and the segments are encapsulated with special headers appropriate
for audio/video traffic.
• The real time protocol(RTP) is a public-domain standard for encapsulating such
segments.
•Audio/video streaming applications usually provide user interactivity which
requires a protocol for client/server interaction. The real time streaming protocol
(RTSP) is a public-domain protocol for this purpose.
• Clients often request data through a Web browser. A separate helper application
(called media player) is required for playing out the audio/video.
www.genuinenotes.com
Multimedia for web server
➢ The stored audio/video files can be delivered by a Web server or by audio/video
streaming server. When an audio file is delivered by a Web server, the file is
treated as an ordinary object in the server's file system, like HTML and JEPG
files.
➢ To get the file, a client establishes a TCP connection with the server and sends an
HTTP request for the object. On receiving the request, the Web server
encapsulates the audio file in an HTTP response message and sends the message
back to the TCP connection.
➢ It is more complicated for the video case because usually the sounds (audio) and
images are stored in two different files. In this case, a client sends two HTTP
requests over two separate TCP connections and the server sends two responses,
one for sounds and the other for images, to the client in parallel. It is up to the
client to synchronize the two streams.
www.genuinenotes.com
Fig: Multimedia web server
www.genuinenotes.com
Multimedia for streaming server
➢Audio/video files can be delivered by a streaming server to a media player.
➢ Streaming servers include those marketed by RealNetworks and Microsoft,
and those of public-domain servers.
➢With a streaming server, audio/video files can be transmitted over UDP which
has much smaller end to end delay than TCP.
➢ RTSP is a protocol which allows a media player to control the transmission of
a media stream.
➢ The control actions include pause/resume, repositioning of playback, fast-
forward, and rewind.
➢ RTSP messages use a different port number from that used in the media stream
and can be transmitted on UDP or TCP.
www.genuinenotes.com
Fig: Multimedia streaming server
www.genuinenotes.com
Real-time protocol (RTP)
• Real-Time Transport Protocol (RTP) is an Internet Protocol standard that
specifies the way programs manage the real-time transmission of multimedia
data over unicast or multicast network services.
• In comparison to TCP (Transmission Control Protocol) which favors data
integrity rather than delivery speed, RTP favors rapid delivery and has
mechanisms to compensate for any minor loss of data integrity.
• RTP defines the standardized packet format for delivering audio and video over
IP networks and used in conjunction with Real-Time Transport Control
Protocol (RTCP) to ensure that multiple streams of media can be synchronized
and Quality of Service (QoS) can be maintained.
• The most important recent application of RTP is the introduction of VoIP (Voice
over Internet Protocol) systems which are becoming very popular as
alternatives to regular telephony circuits.
www.genuinenotes.com
RTP components include:
• a sequence number, which is used to detect lost packets;
• payload identification, which describes the specific media encoding so that it
can be changed if it has to adapt to a variation in bandwidth;
• frame indication, which marks the beginning and end of each frame;
• source identification, which identifies the originator of the frame; and
• Intra-media synchronization, which uses timestamps to detect different delay
jitter within a single stream and compensate for it.
www.genuinenotes.com
RTP Packet Format
• Usually, the media data is encapsulated in RTP packets which are encapsulated in
UDP segments.
• Version: (2 bits) Indicates the version of the protocol. Current version is 2.
• P (Padding): (1 bit) Used to indicate if there are extra padding bytes at the end of
the RTP packet. A padding might be used to fill up a block of certain size, for
example as required by an encryption algorithm. The last byte of the padding
contains the number of padding bytes that were added (including itself).
• X (Extension): (1 bit) Indicates presence of an Extension header between standard
header and payload data. This is application or profile specificwww.genuinenotes.com
• CC (CSRC count): (4 bits) Contains the number of CSRC identifiers that follow
the fixed header.
• M (Marker): (1 bit) Used at the application level and defined by a profile. If it is
set, it means that the current data has some special relevance for the application.
• PT (Payload type): (7 bits) Indicates the format of the payload and determines its
interpretation by the application. This is specified by an RTP profile.
• Sequence number: (16 bits) The sequence number is incremented by one for each
RTP data packet sent and is to be used by the receiver to detect packet loss and to
restore packet sequence.
• Timestamp: (32 bits) Used to enable the receiver to play back the received
samples at appropriate intervals. When several media streams are present, the
timestamps are independent in each stream, and may not be relied upon for media
synchronization.
• SSRC: (32 bits) Synchronization source identifier uniquely identifies the source of
a stream.
• CSRC: (32 bits each) Contributing source IDs enumerate contributing sources to a
stream which has been generated from multiple sources.www.genuinenotes.com
RTSP(Real-Time Streaming Protocol )
• The Real-Time Streaming Protocol (RTSP) is an application-level protocol for
control over the delivery of data with real-time properties.
• RTSP provides an extensible framework to enable controlled, on-demand
delivery of real-time data, such as multimedia data.
• The stream controlled by RTSP may use Real-Time Transport Protocol (RTP),
but RTSP and the underlying protocol used to carry the media stream will not
have any dependence over each other.
• Three of the required RTSP methods are SETUP, PLAY and TEARDOWN.
• These three methods are necessary and sufficient for a client from initiation of
multimedia data streaming to termination of the streaming session.
•A client issues a SETUP request to initiate a server to start a new streaming
session, and then issues a PLAY request to initiate streaming of multimedia
data, and finally issues a TEARDOWN request to close the streaming session.
www.genuinenotes.com
RTSP client server interaction
• The sequence of requests and responses, and the corresponding RTSP methods
involved in a typical RTSP session, where an RTSP proxy is in between the path of
the RTSP server and the RTSP client,
www.genuinenotes.com
Real Time Traffic
• Real Time Network traffic also known as data traffic refers to the amount of data
moving across a network at a given point of time.
• Network data is mostly encapsulated in network packets, which provide the load
in the network.
• Network traffic is the main component for network traffic measurement, network
traffic control and simulation.
• The proper organization of network traffic helps in ensuring the quality of service
in a given network.
www.genuinenotes.com
Loss Recovery Schemes in Real Time Traffic (RTP Protocol):
A packet is lost either if it never arrives at the receiver or if it arrives after itsscheduled playout time. Retransmitting lost packets may not be feasible in a real-time conversational application. Indeed, retransmitting a packet that has missedits playout deadline serves absolutely no purpose. And retransmitting a packetthat overflowed a router queue cannot normally be accomplished quicklyenough. Because of these considerations, real time multimedia applications oftenuse some type of loss anticipation scheme. Two types of loss anticipationschemes are:
Forward error correction (FEC)
Interleaving
Forward Error Correction (FEC):
The basic idea of FEC is to add redundant information to the original packetstream. For the cost of marginally increasing the transmission rate, the redundantinformation can be used to reconstruct approximations or exact versions of someof the lost packets. There are two simple FEC mechanisms.
The first mechanism sends a redundant encoded chunk after every n chunks. Theredundant chunk is obtained by exclusive OR-ing the n original chunks. In thismanner, if any one packet of the group of n + 1 packets is lost, the receiver canfully reconstruct the lost packet. But if two or more packets in a group are lost,the receiver cannot reconstruct the lost packets.
www.genuinenotes.com
The second FEC mechanism is to send a lower-resolution stream as the redundant
information. For example, the sender might create a nominal stream and a
corresponding low-resolution, low-bit rate stream. The low-bit rate stream is
referred to as the redundant stream.
As shown in Figure below, the sender constructs the nth packet by taking the nth
chunk from the nominal stream and appending to it the (n – 1)st chunk from the
redundant stream.
In this manner, whenever there is nonconsecutive packet loss, the receiver can
conceal the loss by playing out the low-bit rate encoded chunk that arrives with
the subsequent packet. Of course, low-bit rate chunks give lower quality than the
nominal chunks. However, a stream of mostly high-quality chunks, occasional
low-quality chunks, and no missing chunks gives good overall quality.
www.genuinenotes.com
Fig: Forward Error correction using redundant stream
www.genuinenotes.com
Interleaving:
As an alternative to redundant transmission, a VoIP application can send interleaved audio. As shown in Figure below, the sender re-sequences units of data before transmission, so that originally adjacent units are separated by a certain distance in the transmitted stream. Interleaving can reduce the effect of packet losses.
If, for example, units are 5 ms in length and chunks are 20 ms (that is, four units per chunk), then the first chunk could contain units 1, 5, 9, and 13; the second chunk could contain units 2, 6, 10, and 14; and so on. Figure below shows that the loss of a single packet from an interleaved stream results in multiple small gaps in the reconstructed stream, as opposed to the single large gap that would occur in a non-interleaved stream. Interleaving can significantly improve the perceived quality of data stream. It also has low overhead. The obvious disadvantage of interleaving is that it increases latency. This limits its use for conversational applications such as VoIP, although it can perform well for streaming stored audio. A major advantage of interleaving is that it does not increase the bandwidth requirements of a stream.
www.genuinenotes.com
Fig: Interleaving the stream to reduce the effect of packet loss
www.genuinenotes.com
Jitter
• Jitter is defined as a variation in the delay of received packets.
• The sending side transmits packets in a continuous stream and spaces them
evenly apart. Because of network congestion, improper queuing, or configuration
errors, the delay between packets can vary instead of remaining constant, as
shown in the figure.
• This variation causes problems for audio playback at the receiving end. Playback
may experience gaps while waiting for the arrival of variable delayed packets.
www.genuinenotes.com
Delay
• The delay of a network specifies how long it takes for a bit of data to travel
across the network from one node or endpoint to another. It is typically measured
in multiples or fractions of seconds.
• Delay may differ slightly, depending on the location of the specific pair of
communicating nodes.
• Types of Delay
➢ Processing delay – time routers take to process the packet header
➢ Queuing delay – time the packet spends in routing queues
➢ Transmission delay – time it takes to push the packet's bits onto the link
➢ Propagation delay – time for a signal to reach its destination
www.genuinenotes.com
Playback Buffer
• It has been observed that available bandwidth fluctuates with time, if buffering is
not used.
• Playback disruption would occur, if the instantaneous available bandwidth is
lower than the media rate, in order to reduce the number of playback disruptions,
clients would need a buffer .
• Generally all the clients of streaming media typically employ a buffer of 5 to 15
seconds of buffering capacity, with such buffering, a client can pre fetch the data
that is not immediately needed when the available bandwidth is above the media
rate and then the client drains the buffer when the available bandwidth is below
the media rate.
•A video packet that arrives beyond its payout time is useless and can be regarded
as lost. Hence in order to provide continuous playback, a buffer at receiver/client
has been introduced before decoding, it is called playback buffer, and the major
aim of introducing the playback buffer is to smoother the bit rate variations
www.genuinenotes.com
Content Distribution Network
• A content distribution network—also known as a content delivery network—is
a system of distributed servers (network) that deliver pages and other Web
content to a user, based on the geographic locations of the user, the origin of the
webpage and the content delivery server.
• This service is effective in speeding the delivery of content of websites with
high traffic and websites that have global reach. The closer the CDN server is
to the user geographically, the faster the content will be delivered to the user.
• The primary technique that a content distribution network (CDN) uses to speed
the delivery of web content to end users is edge caching, which entails storing
replicas of static text, image, audio, and video content in multiple servers
around
the "edges" of the internet, so that user requests can be served by a nearby edge
server rather than by a far-off origin server.
• To also accelerate the delivery of dynamically generated web content that's
difficult or impossible to cache, an advanced content distribution network uses
a range of techniques such as: route optimization, TCP connection
optimization, and pre-fetching.www.genuinenotes.com
Working of CDN: Finding base server
• Servers nearest to the website visitor respond to the request. The content
delivery network copies the pages of a website to a network of servers that are
dispersed at geographically different locations, caching the contents of the page.
• When a user requests a webpage that is part of a content delivery network, the
CDN will redirect the request from the originating site's server to a server in the
CDN that is closest to the user and deliver the cached content.
• CDNs will also communicate with the originating server to deliver any content
that has not been previously cached.
Advantages:
• Improving website load times
• Reducing bandwidth costs
• Increasing content availability and reachability
• Improving website security
www.genuinenotes.com
CDNs typically adopt one of two different server placement philosophies:
Enter Deep: One philosophy, is to enter deep into the access networks of Internet
Service Providers, by deploying server clusters in access ISPs all over the world.
The goal is to get close to end users, thereby improving user-perceived delay and
throughput by decreasing the number of links and routers between the end user and
the CDN cluster from which it receives content. Because of this highly distributed
design, the task of maintaining and managing the clusters becomes challenging.
Bring Home: A second design philosophy is to bring the ISPs home by building
large clusters at a smaller number of key locations and connecting these clusters
using a private high-speed network. Instead of getting inside the access ISPs, these
CDNs typically place each cluster at a location that is simultaneously near the
PoPs (Point of Presence) ISPs. Compared with the enter-deep design philosophy,
the bring-home design typically results in lower maintenance and management
overhead, possibly at the expense of higher delay and lower throughput to end
users.
www.genuinenotes.com
www.genuinenotes.com