IP_tec - iptel.org
Download
Report
Transcript IP_tec - iptel.org
H.323 and Real Time Streaming Protocol
Dorgham Sisalem
Mobile Integrated Services
FhG Fokus
1
H.323 Primer
2
H.323
• May 1995 - H.323 work started
• June 1996 - Decided by ITU-T
• Designed for exchanging multimedia over IP
networks (4 versions of H.323)
3
H.323 Components
•
•
•
•
Terminals
Gatekeepers
Gateways (H.323 to H.320/H.324/POTS)
MCUs
– Multipoint Controller (MC)
– Multipoint Processor (MP)
4
H.323 Gatekeeper
• Address Translation
– H.323 Alias to transport (IP) address based on terminal
registration
– “email-like” names possible
– “phone number like” names possible
• Admission control
– Permission to complete call
– Can apply bandwidth limits
– Method to control LAN traffic
5
H.323 Gatekeeper (cont.)
• Management of gateway
– Which gateway to choose (load balancing and cost
regulation)
• Call Signaling
– May route calls in order to provide supplementary services
or to provide Multipoint Controller functionality
• Call Management/Reporting/Logging
6
H.323 Gateway
• Provide world wide connectivity and interoperability
from LAN
– H.320, H.324, regular POTS telephones
• Map Call Signaling (Q.931 to H.225.0)
• Map Control (H.242/H.243 to H.245)
• Media Mapping (FEC, multiplex, rate matching,
audio transcoding)
7
H.323 MCU
• Media Distribution
– Unicast - send media to one
terminal (centralized in MP;
traditional model)
– Multicast - send to each
receiver directly
– Hybrid - some of each
ISDN (H.320)
Gateway)
MCU
• Manage Ad Hoc multipoint
calls
– Join, invite, control of
conference modes
• Multiprotocol via Gateways
8
H.323 protocol stack
Control
Data
Audio
Video
A/V Cntl Control
Gatekeeper
G.7xx H.26x
RTCP
H.225.0 H.245 T.120
RTP
TCP
Reg,
Adm,
Status
(RAS)
UDP
IP
9
H.323 protocol stack (cont.)
• H.323 - System Document
• H.225.0 - Call Signaling, Packetization
– Gatekeeper Registration, Admission, and Status (RAS)
• H.245 - Control (also used in H.324, H.310)
• T.120 - Data and Conference Control
10
H.323 example
A Call Setup Example
• a point to point call
• One Gatekeeper using the Direct Call Model
11
H.323 example (cont.)
GK
(1) ARQ
Can I call
“Bob”?
(3) ACF
Yes, use this
IP Address
Bill
(2a) GK resolves “Bob”
to IP address through H.323
registration or external
name service
(e.g. DNS, Database, etc..)
(2b) Admission Policy
Applied
PictureTel
Bob
12
H.323 example (cont.)
GK
(5) ARQ
May I answer?
(6) ACF
Yes
(4) SETUP (Create)
(7) ALERTING
PictureTel
(8) CONNECT (User answers)
Bill
Bob
13
H.323 example (cont.)
PictureTel
(9) H.245 connection established
Bill
- Capability Exchange
Bob
- Open Logical
Channels (audio, video)
14
Multimedia Streaming
Based on slides from Vishal Misra,
15
Streaming Stored
Audio & Video
Streaming stored media:
• Audio/video file is stored in a
server
• Users request audio/video file on
demand.
• Audio/video is rendered within,
say, 10 s after request.
• Interactivity (pause, repositioning, etc.) is allowed.
Media player:
–
–
–
–
removes jitter
decompresses
error correction
graphical user interface
with controls for
interactivity
• Plug-ins may be used to
imbed the media player
into the browser
window.
16
Streaming from Web server (1)
• Audio and video files stored in
Web servers
naïve approach
• browser requests file with HTTP
request message
• Web server sends file in HTTP
response message
• content-type header line indicates
an audio/video encoding
• browser launches media player,
and passes file to media player
• media player renders file
• Major drawback: media player
interacts with server through
intermediary of a Web browser
17
Streaming from Web server (2)
Alternative: set up connection
between server and player
• Web browser requests and
receives a meta file
(a file describing the object)
instead of receiving the file
itself;
• Content-type header
indicates specific
audio/video application
• Browser launches media
player and passes it the
meta file
• Player sets up a TCP
connection with server and
sends HTTP request.
Some concerns:
• Media player communicates
over HTTP, which is not
designed with pause, fast
forward, rewind commands
• May want to stream over
UDP
18
Streaming from a streaming
server
• This architecture allows for non-HTTP protocol
between server and media player
• Can also use UDP instead of TCP.
19
Real Time Streaming Protocol:
Why not HTTP
• Designers of HTTP had fixed media in mind:
HTML, images, applets, etc.
• HTTP does not target stored continuous media
(i.e., audio, video, SMIL presentations, etc.)
20
Options when using a streaming
server
• Send at constant rate over UDP. To mitigate the effects of jitter, buffer and
delay playback for 1-10 s. Transmit rate = d, the encoded rate. Fill rate x(t)
equals d except when there is loss.
• Use TCP, and send at maximum possible rate under TCP; TCP
retransmits when error is encountered; x(t) now fluctuates, and can
become much larger than d. Player can use a much larger buffer to
smooth delivery rate of TCP.
21
Streaming: The RealAudio Way
• .ram files describe the location of the file
rtsp://bazzooka.de/videos/NationalhymneVideo.rm
use RTSP for streaming the file
http://bazzooka.de/videos/NationalhymneVideo.rm
use RTSP over HTTP for streaming the media
• .rm, .ra files describe the content of the file
– Which bandwidth, compression, timinglines ....
22
Meta file example (SDP)
v=0
o=- 2890844526 2890842807 IN IP4 192.16.24.202
s=RTSP Session
m=audio 0 RTP/AVP 0
a=control:rtsp://audio.example.com/twister/audio.en
m=video 0 RTP/AVP 31
a=control:rtsp://video.example.com/twister/video
23
Real Time Streaming Protocol
RTSP (RFC 2326)
• Client-server application layer protocol.
• acts as a « network remote control »
• supports the following operations:
– retrieval of a media from a server
– invitation of a media server to a conference
– recording of a conference
What it doesn’t do:
• does not define how audio/video is encapsulated for streaming over
network
• does not restrict how streamed media is transported; it can be
transported over UDP or TCP
• does not specify how the media player buffers audio/video
RealNetworks
• Server and player use RTSP to send control info to each other
24
RTSP: out of band control
• A file is transferred over one channel.
– The RTSP control messages use different port numbers than the
media stream, and are therefore sent out-of-band.
• Interleaved:
– If the RTSP messages were to use the same port numbers as the
media stream, then RTSP messages would be said to be
“interleaved” with the media stream.
• What is this good for?
25
RTSP generalities
• Protocol design
–
–
–
–
text-based protocol
transport protocol independant
supports any session description (sdp, xml, etc.)
similar design as HTTP with differences yet!
• client server and server client requests
• server maintains a « session state »
• data carried out-of-band
– works either with unicast or multicast
26
RTSP messages
• a request (client server or server client)
method to apply
URL
RTSP version
PLAY rtsp://video.example.com/twister/video RTSP/1.0
seq# for request/response pair
CSeq: 2
Session: 23456789
session identifier
play starting at that offset for an
Range: smpte=0:10:00-
• and its response
version status code
undefined duration
reason phrase
RTSP/1.0 200 OK
CSeq: 2
seq# for request/response pair
Session: 23456789
session identifier
Range: smpte=0:10:00-0:20:00
RTP-Info: url=rtsp://video.example.com/twister/video;
seq=12312232;rtptime=78712811
28
RTSP methods
• major methods
– SETUP:
– PLAY:
– PAUSE:
– TEARDOWN:
server allocates resources for a
stream and starts an RTSP session
starts data tx on a stream
temporarily halts a stream
free resources of the stream, no
RTSP session on server any more
• additional methods
–
–
–
–
–
–
OPTIONS:
get available methods
ANNOUNCE: change description of media object
DESCRIBE:
get low level descr. of media object
RECORD:
server starts recording a stream
REDIRECT:
redirect client to new server
SET_PARAMETER:
device or encoding control
29
RTSP initiates and controls
delivery
•
HTTP GET
web
server
presentation description (sdp)
W
client
C
SETUP
PLAY
RTP audio/video
RTCP
TEARDOWN
media
servers
A&V
Client obtains a description of the
multimedia presentation, which can
consist of several media streams..
• The browser invokes media player
(helper application) based on the content
type of the presentation description.
• Presentation description includes
references to media streams, using the
URL method rtsp://
• Player sends RTSP SETUP request;
server sends RTSP SETUP response.
• Player sends RTSP PLAY request;
server sends RTSP PLAY response.
• Media server pumps media stream.
• Player sends RTSP TEARDOWN request;
server sends RTSP TEARDOWN response
30
Example: media on demand,
unicast
• Scenario…
C
client
W
A
V
media descr.
web server
audio
server
video
server
step 1: get description (in SDP format)
step 2: open streams with RTSP
step 3: play
step 4: teardown
31
RTSP session
• Each RTSP has a session
identifier, which is chosen by the
server.
• The client initiates the session
with the SETUP request, and the
server responds to the request
with an identifier.
• The client repeats the session
identifier for each request, until
the client closes the session with
the TEARDOWN request.
• RTSP port number is 554.
• RTSP can be sent over UDP or
TCP. Each RTSP message can
be sent over a separate TCP
connection.
32
RTSP: streaming caching
• Caching of RTSP response messages makes little sense.
• But desirable to cache media streams closer to client.
• Much of HTTP/1.1 cache control has been adopted by
RTSP.
– Cache control headers can be put in RTSP SETUP
requests and responses:
• If-modified-since: , Expires: , Via: , Cache-Control:
33
RTSP: streaming caching
• Proxy cache may hold only segments of a given media
stream.
– Proxy cache may start serving a client from its local
cache, and then have to connect to origin server and fill
missing material, hopefully without introducing gaps at
client.
34