Sie sind auf Seite 1von 22

Indian Institute of Technology Kharagpur

Streaming Multimedia
Applications

Prof. Indranil Sen Gupta


Dept. of Computer Science & Engg.
I.I.T. Kharagpur, INDIA

Lecture 36: Streaming multimedia


applications
On completion, the student will be able to:
1. Understand the basic requirements of multimedia
networking.
2. Understand how various types of streaming
multimedia applications work.
3. Explain how the real-time streaming protocol (RTSP)
works.

1
Multimedia Networking

Multimedia Applications?

• What are they?


¾An application that deals with one of
more of the following data types:
ƒ Text
ƒ Images
ƒ Audio
ƒ Video
• Most common scenario today:
¾Transmission, processing, and rendering
multimedia information over the network.

2
Some Example Applications

• Common multimedia applications on the


Internet:
¾Streaming stored audio and video.
¾Streaming live audio and video.
¾Real-time interactive audio and video.
• All the above have common characteristics:
¾Delay sensitivity.
ƒ End-to-end packet delay.
ƒ Delay jitter :: variability of packet delay within
the same packet stream.

¾Can tolerate packet losses.


ƒ Occasional packet losses cause minor
disturbances during playback.
• Requirement is just the reverse as
compared to normal data transmission.
¾Cannot tolerate losses.
¾Can tolerate delay variations.

3
Application QoS Categories

• Hard QoS:
¾The application may malfunction if the QoS
constraints cannot be met.
¾Typical examples:
ƒ Critical patient monitoring systems.
ƒ Missile control systems.
• Soft QoS:
¾Functionally application performs correctly.
¾Typical examples:
ƒ Most multimedia applications.

Streaming Stored Multimedia

• Basic concept:
¾The basic media file is stored at the source.
¾The file is transmitted to the client when
requested.
¾The client starts playing the media before
the whole of it is transferred.
ƒ Central concept to streaming.
¾Minimum continuous rate of transfer to be
maintained for jitter-free playback.

4
¾Client playing a part of the video, and sever
sending the later part, are carried out in
overlapped fashion.

Internet
Media

Client

• Typical client functionality:


¾Pause, fast forward, play, rewind, etc., just
like normal medial players.
¾An initial delay (5-10 sec) for the client to
get resynchronized with the origin server.

5
Streaming Live Multimedia

• Basic concept:
¾Multimedia content not stored anywhere a
priori.
ƒ Generated on the fly and broadcasted.
¾Typical examples:
ƒ Live news feed.
ƒ Live cricket match over the Internet.
¾Client usually has a playback buffer.
ƒ Content buffered during transmission.
ƒ Allows rewind (but no fast forward).

• Other constraints:
¾Depending on the latency of the path, the
live stream may play on the desktop after an
appreciable delay (10-20 sec).
¾Timing constraint for jitter-less playback is
still present.

6
Real-time Interactive Multimedia

• Basic concept:
¾Interactive in the sense that the content to
be transmitted is decided by the end parties
dynamically.
¾Typical examples:
ƒ IP telephony
ƒ Video conferencing
ƒ On-line games

¾End-to-end delay requirements are


important.
ƒ Includes application-level and also network
delays.
ƒ About 200 msec considered to be good enough
for audio.
ƒ Beyond 500 msec, audio may be unacceptable.

7
How Internet Handles Multimedia Today?

• Internet is driven by TCP/UDP/IP.


¾Multimedia transport takes place on top of
these only.
¾No guarantee on throughput, losses, etc.
• Internet multimedia applications use
application-level techniques to get the
best out of the underlying service.
• Next generation Internet can handle this
much better.

Streaming Multimedia

8
Multimedia on Internet

• The simple approach:


¾Multimedia object stored as a file on the
web server.
¾File transferred to client as HTTP object.
¾Client receives the whole file and stores it in
a buffer.
¾Client invokes the media player to play the
received file.
• Basically:
¾No streaming, no pipelining, long delay.

Web Web
Browser Server

Media Player
FILES

9
• The streaming approach:
¾Browser requests for a “metafile” from the
web server.
¾Browser launches the media player, and
passes the “metafile” to it.
¾The media player directly contacts the web
server using HTTP.
¾Server streams audio/video object in its
HTTP response to the media player.
¾Usually considered unsatisfactory:
ƒ Little control, non-interactive.

Web Web
Browser Server

Media Player

10
• Using a separate streaming server:
¾Provides the best performance.
¾This architecture can use non-HTTP (may
be proprietary) protocols between server
and media player.
¾Can also use UDP instead of TCP.
ƒ For better response.

Web Web
Browser Server

Streaming
Media Player
Server

11
Some Issues in Streaming

• Use of client buffering


¾Allows to compensate for network-added
delay and delay jitter.
• Whether to use TCP or UDP ….
¾TCP
ƒ Transfer rate fluctuates due to TCP congestion
control.
ƒ Better quality because no packets are lost.
ƒ More delay variations due to retransmission.

¾UDP
ƒ Server sends data at rate appropriate for client.
Does not depend on network congestion.
ƒ Send rate = encoding rate = constant rate
ƒ Short playout delay (2-5 seconds) to compensate
for network delay jitter.

12
• Variability in client rates
¾How to handle variations in client receive
rate capabilities?
ƒ 33 Kbps dialup
ƒ 2 Mbps leased line
ƒ 100 Mbps Ethernet
¾Common solution:
ƒ Server stores multiple copies of the content (say,
video), that have been encoded at different rates.

Real Time Streaming Protocol

• RTSP
¾Gives user much better control over
streaming media.
• RTSP is …..
¾A client-server application-layer protocol.
¾Provides control to the user:
ƒ Pause, play, rewind, forward, repositioning, etc.

13
• What RTSP is not ….
¾Does not specify how the media is encoded
and compressed.
¾Does not restrict the transport layer
protocol.
ƒ Can be TCP or UDP.
¾Details about client-side buffering is also
not specified.

How RTSP works?

• Like the FTP protocol, RTSP also uses


“out-of-band” control.
¾RTSP control messages uses different port
number than the media stream.
ƒ Port 554.
¾The media stream is considered “in-band”.

14
• Typical scenario:
¾The “metafile” is first sent to the web
browser over HTTP.
¾The browser launches media player.
¾The media player sets up an RTSP control
connection, and a data connection to the
streaming server.
• Two servers:
¾A web server
¾A streaming server

A Typical Metafile
<title>Trailer</title>
<session>
<group language=en>
<switch>
<track type=audio
e="PCMU/8000/1"
src = "rtsp://stream.com/trailer/audio.en/lofi">
<track type=audio
e="DVI4/16000/2" pt="90 DVI4/8000/1"
src="rtsp://stream.com/trailer/audio.en/hifi">
</switch>
<track type="video/jpeg"
src="rtsp://stream.com/trailer/video.en">
</group>
</session>

15
RTSP Operation

HTTP GET
Web Web
Browser Server
Presentation description
SETUP

PLAY

SERVER
CLIENT

Media Media Stream Media


Player Server
PAUSE

TEARDOWN

RTSP Exchange Example


C: SETUP rtsp://stream.com/trailer/audio RTSP/1.0
Transport: rtp/udp; compression; port=3056; mode=PLAY

S: RTSP/1.0 200 OK
Session 4231

C: PLAY rtsp://stream.com/traileer/audio.en/lofi RTSP/1.0


Session: 4231
Range: npt=0-

C: PAUSE rtsp://stream.com/trailer/audio.en/lofi RTSP/1.0


Session: 4231
Range: npt=37

16
C: TEARDOWN rtsp://stream.com/trailer/audio.en/lofi RTSP/1.0
Session: 4231

S: RTSP/1.0 200 OK

17
SOLUTIONS TO QUIZ
QUESTIONS ON
LECTURE 35

Quiz Solutions on Lecture 35

1. How is E-business different from E-


commerce?

E-commerce is the process of buying,


selling products or services over the
network.

E-business also includes the following:


ƒ servicing customers
ƒ collaborating with business partners
ƒ carrying out transactions electronically
within an organization.

18
Quiz Solutions on Lecture 35

2. What is M-commerce? Why is it considered


to be important in modern day scenario?

E-commerce used in a wireless mobile


environment is called M-commerce. This has
become very important now-a-days with the
proliferations of mobile phones and other
gadgets, and their increasing use to carry
out transactions.

Quiz Solutions on Lecture 35

3. What benefits can E-commerce provide to


consumers?

E-commerce allows consumers to:


¾ Do shopping 24 hours a day from any
geographic location.
¾ Exercise a wide variety of choices.
¾ Make quick product and price
comparisons.
¾ Have virtual auctions where permissible.

19
Quiz Solutions on Lecture 35

4. What are the requirements of a good


electronic payment system?

The desirable properties of a good electronic


payment system are:
ƒ It should be widely accepted.
ƒ It should be convenient to use.
ƒ It should be very hard to tamper with.
ƒ It should be based on well-established
security principles.

Quiz Solutions on Lecture 35

5. What are “card not present” transactions?


How are they handled in Internet shopping?

They are transactions where the merchant do


not physically check or verify the credit card.
These types of transactions are carried out
in Internet shopping.

For security, online verification is carried out


to the extent possible, usually by a third
party.

20
QUIZ QUESTIONS ON
LECTURE 36

Quiz Questions on Lecture 36

1. What is a multimedia application?


2. What are the factors that affect the quality of
streaming multimedia contents?
3. What is streaming stored multimedia?
4. What is streaming live multimedia?
5. What is real-time interactive multimedia?
6. What is the purpose of the streaming server
in the Internet scenario?
7. Explain the role of metafile in the context of
multimedia streaming over Internet.

21
Quiz Questions on Lecture 36

8. What is RTSP?
9. What are the different steps that are
followed by the RTSP protocol for playing
multimedia content on a client machine?

22

Das könnte Ihnen auch gefallen