Streaming Stored Audio & Video
Streaming Stored Audio & Video
Streaming stored media: r Audio/video file is stored in a server r Users request audio/video file on demand. r Audio/video is rendered within, say, 10 s after request. r Interactivity (pause, repositioning, etc.) is allowed. Media player:
m m m m
removes jitter decompresses error correction graphical user interface with controls for interactivity
stored in Web servers nave approach r browser requests file with HTTP request message r Web server sends file in HTTP response message r content-type header line indicates an audio/video encoding r browser launches media player, and passes file to media player r media player renders file
Major drawback: media player interacts with server through intermediary of a Web browser
Some concerns: r Media player communicates over HTTP, which is not designed with pause, ff, rwnd commands r May want to stream over UDP
one channel. r Control information (directory changes, file deletion, file renaming, etc.) is sent over a separate TCP connection. r The out-of-band and inband channels use different port numbers.
use different port numbers than the media stream, and are therefore sent out-ofband. r The media stream, whose packet structure is not defined by RTSP, is considered in-band.
r
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.
Web browser
Web server
r r
client
server
r r r
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 PAUSE request; server sends RTSP PAUSE response. Player sends RTSP TEARDOWN request; server sends RTSP TEARDOWN response.
RTSP session
r Each RTSP has a session
identifier, which is chosen by the server. r The client initiates the session with the SETUP request, and the server responds to the request with an identifier. r The client repeats the session identifier for each request, until the client closes the session with the TEARDOWN request.
TCP. Each RTSP message can be sent over a separate TCP connection.
segments of a given media messages makes little sense. stream. r But desirable to cache media m Proxy cache may start streams closer to client. serving a client from its r Much of HTTP/1.1 cache control local cache, and then have to has been adopted by RTSP. connect to origin server and fill missing material, m Cache control headers can be hopefully without put in RTSP SETUP requests introducing gaps at client. and responses: r When origin server is sending a If-modified-since: , stream through client, and Expires: , Via: , Cachestream passes through a proxy, Control: proxy can use TCP to obtain the stream; but proxy still sends RTSP control messages to origin server.