160 likes | 284 Views
STREAMING STORED AUDIO AND VIDEO. Introduction to N etworks and Communication S hravan chouti. Topics discussed in this section:. What is streaming technology?. A technique for transferring data such that it can be processed as a steady and continuous stream
E N D
STREAMING STORED AUDIO AND VIDEO Introduction to Networks and Communication Shravanchouti
What is streaming technology? • A technique for transferring data such that it can be processed as a steady and continuous stream • client does not have to download the entire file to view it. Data Source Network The portion in the buffer The portion client is viewing
G E T : a u d i o / v i d e o f i l e 1 Using a web server
Using web server with metafile • Metafile: It contains information i.e. a URL and the type of file , so that media player can identify appropriate media. • Media player is directly connected to the web server and streamed over HTTP. • Web server stores two files: • Actual audio/video file. • Metafile. • Drawback: • Browser and media player use services of HTTP. • HTTP is designed to run over TCP. • This is appropriate to retrieve the metafile but not audio/video file because TCP retransmits a lost or damaged segment which is counter to the philosophy
Using a media server and RTSP Operation: HTTP GET Web Server Web Browser HTTP Response Setup Play Media Player Media Server Media Stream RTSP Pause Teardown
Using Media Server and RTSP • Why to use RTSP? To control the media i.e. playback of continuous media by pausing playback, repositioning , fast forwarding , rewinding and so on. • control protocol designed to add more functionalities to the streaming process. • RTSP allows a media player to control the transmission of media stream. • RTSP is an out-of-band protocol, similar to second connection in FTP. • RTSP messages can be sent over either TCP or UDP. • RTSP works in the conjunction with RTP to deliver streaming audio & video content • RTSP maintains a server state during transmission unlike HTTP
Example of RTSP session : C->S: SETUP rtsp://example.com/media.mp4/streamid=0 RTSP/1.0 CSeq: 3 Transport: RTP/AVP;unicast;client_port=8000-8001 S->C: RTSP/1.0 200 OK CSeq: 3 Transport: RTP/AVP;unicast;client_port=8000-8001;server_port=9000-9001 Session: 12345678 C->S: PLAY rtsp://example.com/media.mp4 RTSP/1.0 CSeq: 4 Range: npt=5-20 Session: 12345678 S->C: RTSP/1.0 200 OK CSeq: 4 Session: 12345678 RTP-Info: url=rtsp://example.com/media.mp4/streamid=0;seq=9810092;rtptime=3450012 C->S: PAUSE rtsp://example.com/media.mp4 RTSP/1.0 CSeq: 5 Session: 12345678 S->C: RTSP/1.0 200 OK CSeq: 5 Session: 12345678 C->S: TEARDOWN rtsp://example.com/media.mp4 RTSP/1.0 CSeq: 8 Session: 12345678A S->C: RTSP/1.0 200 OK CSeq: 8
References • www.cs.unibo.it/~ghini/didattica/sistmultimed/Streaming.pdf • www.ida.liu.se/~TDDD36/tddd36-streaming.pdf • James F. Kurose, Keith W. Ross. Computer Networking, 5thEdition, Addison Wesley Longman, Inc, 2003 • http://en.wikipedia.org/wiki/Real_Time_Streaming_Protocol