How Streaming Media Works

  • Published on
    31-Jan-2016

  • View
    102

  • Download
    0

DESCRIPTION

How Streaming Media Works. Bilguun Ginjbaatar IT 665 Nov 14, 2006. Outline. Introduction: Whats Streaming? Source Material for Streaming Streaming Technology Streaming Servers Media Players Streaming Audio Streaming Video Bandwidth How Does Edinboro University broadcast? Protocols. - PowerPoint PPT Presentation

Transcript

<ul><li><p>How Streaming Media WorksBilguun GinjbaatarIT 665Nov 14, 2006</p></li><li><p>OutlineIntroduction: Whats Streaming?Source Material for StreamingStreaming TechnologyStreaming ServersMedia PlayersStreaming AudioStreaming VideoBandwidthHow Does Edinboro University broadcast?Protocols</p></li><li><p>Playing compressed video or sound in real time as it is downloaded over the internet</p></li><li><p>Streaming AudioCapture Audio Source -Microphone -CDOptimizing the Audio Source-Use sound editor3.Encoding the streaming audio clip-choose streaming format-choose one or several streaming bandwidth4.Deliver the streaming audio clip-broadcast is available through website-If combined with another streaming clip, create SMIL file.</p></li><li><p>Streaming Audio Bit RatesInternet Radio=56 Kbps, Talk show=32 Kbps, Stereo &amp; CD Quality=256 Kbps</p></li><li><p>Applications</p></li><li><p>Streaming Bandwidth and StorageUsual Video window size: 320 x 240Streaming Media Storage SizeMegabytesGigabytesTerabytes</p><p>Whats the Storage Size for 1 hour of video, encoded at 300kb/s?</p></li><li><p>Streaming Video (Webcast)</p></li><li><p>How does EUP broadcast the Commencement Ceremony?Firewirehttp://147.64.32.6Windows 2003 Serverhttp://147.64.32.8: Port 1185Ross HallWindows Media Encoder64Kbps256 Kbps</p></li><li><p>ProtocolsUser Datagram Protocol (UDP)Real-Time Streaming Protocol(RTSP)Real Data Transport (RDT)Real-time Transport Protocol (RTP)Real-Time Transfer Control Protocol(RTCP)Resource ReSerVation Protocol (RSVP)</p></li><li><p>UDPSends media as series of small packetsProvides connectionless &amp; best-effort message serviceSimple &amp; efficientPackets are liable to be lost or corruptedClient may use Error Correction to recover data or Drop Out</p></li><li><p>RTSPDeveloped in 1998 as RFC-2326Allows client remotely control: play, pause, nextClients: RealPlayer, VideoLAN, MPlayer, Windows MP, QuicktimeSession ID is used to keep trackNo permanent TCP connection neededRTSP requests based on HTTPDESCRIBE: includes rtsp://SETUP: request specifies how a single media stream must be transported PLAY: request will cause one or all media streams to be played RECORD: used to send a stream to the server for storage TEARDWON: used to terminate the session </p></li><li><p>RDTReal Data Transport proprietary transport protocol for audio/videoDeveloped by RealNetworks in 1990s.Tolerant to loss.Works in companion with RTSP.Uses ports: 16384 32767</p></li><li><p>RTPReal-time Transport ProtocolProvides end-to-end delivery interactive audio/video over the internet.Can be used for VOIP applications: Skype, VoipCheap1996: RFC 1889 =&gt; 2003: RFC 3550Does not have standard TCP or UDP port to communicateUDP connections are done only via an 2n port.2n+1 port is used for RTCP communications.</p></li><li><p>RTP PacketReal-time Transport Protocol</p></li><li><p>RTCPSister protocol of Real-time Transport Protocol (RTP)Defined in RFC 3550Partners with RTP in delivery of multimedia dataDOES NOT transport any data itselfMonitors participating packets in steaming multimedia session.Sends control packet to get feedback on QoSGathers stat info on: bytes sent, bytes received, lost packets, jitter, roundtrip delayTypes of RTCP:Sender Report PacketReceiver Report PacketSource Description RTCP packetGoodbye RTCP packetSRTCP (Secure) is used for encryption, authentication, and integrity</p></li><li><p>RSVPTransport Layer protocol designed to reserve resources across the InternetDescribed in RFC 3936 (Oct 2004)Can be used by HOSTS or ROUTERSDelivers specific QoS for data streamsRSVP is not a routing a protocol, but works with other routing procols.Notice: RSVP is rarely deployed by tele-com networks todayTraffice Engineering RSVP (RSVP-TE) is available now.RSVP requests resources for simplex flows: a traffic stream in only one direction from sender to one or more receivers. </p></li><li><p>ConclusionStreaming is used widely everywhereTo stream a media you will need: camera, firewire, encoder, server, and a high speed internet connectionMedia Players: Adobe Flash Player, Windows Media Player.How Streaming Audio &amp; Video works.Streaming Bit Rates differ: higher the bit rate the better quality.The Protocols used: User Datagram Protocol (UDP)Real-Time Streaming Protocol (RTSP)Real Data Transport (RDT)Real-time Transport Protocol (RTP)Real-Time Transfer Control Protocol (RTCP)Resource ReSerVation Protocol (RSVP)</p></li><li><p>Reference</p><p>www.google.comwww.microsoft.comwww.realnetworks.comwww.RealNetworks.comwww.ShoutCast.comwww.StreamCast.comwww.wikipedia.org</p><p>Streaming bandwidth and storageStreaming media storage size (in the common file system measurements megabytes, gigabytes, terabytes, and so on) is calculated from streaming bandwidth and length of the media with the following formula (for a single user and file):storage size (in megabytes) = length (in seconds) bit rate (in kbit/s) / 8,388.608 (since 1 megabyte = 8 * 1,048,576 bits = 8,388.608 kilobits)Real world example:One hour of video encoded at 300 kbit/s (this is a typical broadband video for 2005 and it's usually encoded in a 320240 pixels window size) will be:(3,600 s 300 kbit/s) / 8,388.608 = 128.7 MB of storage if the file is stored on a server for on-demand streaming. If this stream is viewed by 1,000 people, you would need300 kbit/s 1,000 = 300,000 kbit/s = 300 Mbit/s of bandwidthUser Datagram Protocol Transport-layer protocol (Layer 4) Connectionless service: provides application programs with ability to send and receive messages Allows multiple, application programs on a single machine to communicate concurrently Same best-effort semantics as IP Message can be delayed, lost, or duplicated Messages can arrive out of order Application accepts full responsibility for errors If UDP CHECKSUM field contains zeroes, receiver does not verify the checksum Summary User Datagram Protocol (UDP) provides connectionless, best-effort message service UDP message encapsulated in IP datagram for delivery IP identifies destination computer; UDP identifies application on the destination computer UDP uses abstraction known as protocol port numbers The Real Time Streaming Protocol (RTSP), developed by the IETF and published in 1998 as RFC 2326, is a protocol for use in streaming media systems which allows a client to remotely control a streaming media server, issuing VCR-like commands such as "play" and "pause", and allowing time-based access to files on a server.Some RTSP servers use RTP as the transport protocol for the actual audio/video data. Many RTSP servers use RealNetworks's proprietary RDT as the transport protocol.</p><p>RTSP commandsRTSP requests are based on HTTP requests. While HTTP is stateless, RTSP is a stateful protocol. A session ID is used to keep track of sessions when needed. This way, no permanent TCP connection is needed. RTSP messages are sent from client to server, although some exceptions exist where the server will send to the client. Below are the basic RTSP requests. A number of typical HTTP requests, like an OPTION request, are also frequently used.DESCRIBEA DESCRIBE request includes an RTSP URL (rtsp://...), and the type of reply data that can be handled.The reply includes the presentation description, typically in SDP format. Among other things, the presentation description lists the media streams controlled with the aggregate URL. In the typical case, there is one media stream for audio and one for video.SETUPA SETUP request specifies how a single media stream must be transported. This must be done before a PLAY request is sent.The request contains the media stream URL and a transport specifier. This specifier typically includes a local port for receiving RTP data (audio or video), and another for RTCP data (meta information).The server reply usually confirms the chosen parameters, and fills in the missing parts, such as the server's chosen ports. Each media stream must be configured using SETUP before an aggregate play request may be sentPLAYA PLAY request will cause one or all media streams to be played. Play requests can be stacked by sending multiple PLAY requests.The URL may be the aggregate URL (to play all media streams), or a single media stream URL (to play only that stream). A range can be specified. If no range is specified, the stream is played from the beginning and plays to the end, or, if the stream is paused, it is resumed at the point it was paused.PAUSEA PAUSE request temporarily halts one or all media streams, so it can later be resumed with a PLAY request.The request contains an aggregate or media stream URL. When to pause can be specified with a range parameter. The range parameter can be left out to pause immediately.RECORDThe RECORD request can be used to send a stream to the server for storage.TEARDOWNA TEARDOWN request is used to terminate the session. It stops all media streams and frees all session related data on the server.Although there are no standards assigned, RTP is generally configured to use ports 16384-32767.RTP can carry any data with real-time characteristics, such as interactive audio and video. The Real-time Transport Protocol (or RTP) defines a standardized packet format for delivering audio and video over the Internet. It was developed by the Audio-Video Transport Working Group of the IETF and first published in 1996 as RFC 1889 which was obsoleted in 2003 by RFC 3550.</p><p>RTP does not have a standard TCP or UDP port that it communicates on. The only standard that it obeys is that UDP communications are done via an even port and the next higher odd port is used for RTP Control Protocol (RTCP) communications. </p><p>Although there are no standards assigned, RTP is generally configured to use ports 16384-32767.RTP can carry any data with real-time characteristics, such as interactive audio and video. </p><p>A RTP packet consists of a RTP header, followed by the data to send. In the RTP specification this data is referred to as the payload. The header is transmitted in network byte order, just like the IP header. Figure 5.1 shows the RTP header format. </p><p>The first two bits of the header contain the version number. The current version of the protocol is `two'. Next, there is the padding bit. If this bit is set, the packet contains some padding bytes which are not part of the payload. The last padding byte then contains the number of padding bytes. For example, padding may be necessary for some encryption algorithms which need the payload to be aligned on a multiple byte boundary. The marker bit can be used by an application to indicate a talkspurt for example Next, there is the payload type. This defines the type of data the packet contains, so it defines the way in which the application will interpret the payload. The sequence number can be used by an application to place received packets in the correct order. The numbering starts at a random value for security reasons The timestamp contains the synchronisation information for a stream of packets The synchronisation source (SSRC) identifier is the identification number of the sender of the packet. If an application wishes to send different media at the same time, for example audio and video, there have to be separate RTP sessions for each of the media. </p><p>Next, there are possibly a number of contributing source (CSRC) identifiers. For example, if at some point different audio streams have to be mixed together, the original SSRC identifiers can be put here. The SSRC identifier of this packet then becomes the identifier of the source which forwards the mixed packet. </p><p>Finally, the header can contain extra information through the use of an extension header. The RTP specification only defines the extension mechanism, not the possible extensions. This is left to the application. RTCP stands for Real-time Transport Control Protocol The Resource ReSerVation Protocol (RSVP), described in RFC 2205, is a transport layer protocol designed to reserve resources across a network for an integrated services Internet. RSVP provides receiver-initiated setup of resource reservations for multicast or unicast data flows with scaling and robustness.</p><p>RSVP defines how applications place reservations and how they can relinquish the reserved resources once the need for them has ended. RSVP operation will generally result in resources being reserved in each node along a path. The Resource ReSerVation Protocol (RSVP), described in RFC 2205, is a transport layer protocol designed to reserve resources across a network for an integrated services Internet. RSVP provides receiver-initiated setup of resource reservations for multicast or unicast data flows with scaling and robustness.</p><p>RSVP defines how applications place reservations and how they can relinquish the reserved resources once the need for them has ended. RSVP operation will generally result in resources being reserved in each node along a path. </p></li></ul>