Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Streaming Video

Kalan MacRow
February 09, 2013

Streaming Video

An introduction to RTSP

Kalan MacRow

February 09, 2013
Tweet

More Decks by Kalan MacRow

Other Decks in Programming

Transcript

  1. STREAMING VIDEO An introduction to RTSP Kalan MacRow CPSC 317,

    Winter 2012 Department of Computer Science The University of British Columbia Streaming Video: An introduction to RTSP. Kalan MacRow Feb. 2013 1 Friday, 8 February, 13
  2. Hello Chrome, this is Firefox calling... http://www.youtube.com/watch?v=MsAWR_rJ5n8 Streaming Video: An

    introduction to RTSP. Kalan MacRow Feb. 2013 2 Friday, 8 February, 13
  3. WebRTC Firefox Nightly, Chrome Canary Streaming Video: An introduction to

    RTSP. Kalan MacRow Feb. 2013 function initiateCall(user) { navigator.mozGetUserMedia({video:true, audio:true}, function(stream) { document.getElementById("localvideo").mozSrcObject = stream; document.getElementById("localvideo").play(); document.getElementById("localvideo").muted = true; var pc = new mozRTCPeerConnection(); pc.addStream(stream); pc.onaddstream = function(obj) { document.getElementById("remotevideo").mozSrcObject = obj.stream; document.getElementById("remotevideo").play(); }; pc.createOffer(function(offer) { ... } } https://hacks.mozilla.org/2013/02/hello-chrome-its-firefox-calling/ 3 Friday, 8 February, 13
  4. STREAMING VIDEO • Netflix • Youtube, Vimeo, Hulu • Skype,

    G+ Hangouts, Chatroulette(!) • P2P apps in web browsers! Streaming Video: An introduction to RTSP. Kalan MacRow Feb. 2013 4 Friday, 8 February, 13
  5. STREAMING VIDEO • Increasingly important (Remote workers, global companies) •

    Increasingly feasible (Google fiber, 4G LTE) • Increasingly approachable (WebRTC, JavaScript and HTML5!) • Technical, and political challenges (Standardization, neutrality) Streaming Video: An introduction to RTSP. Kalan MacRow Feb. 2013 5 Friday, 8 February, 13
  6. PROTOCOLS • RTSP Real-time Streaming Protocol • HTTP Hypertext Transfer

    Protocol • MMS (proprietary) Microsoft Media Server • Skype (proprietary) Skype’s VoIP protocol • RTMP (proprietary) Real-time Messaging Protocol, Adobe Flash Streaming Video: An introduction to RTSP. Kalan MacRow Feb. 2013 6 Friday, 8 February, 13
  7. RTSP • IETF RFC 2326 (1998) • Control the delivery

    of data with real-time properties • Two channels: control and data • RTCP and (Secure) RTP • Lots of extensions Real-time Streaming Protocol Streaming Video: An introduction to RTSP. Kalan MacRow Feb. 2013 7 Friday, 8 February, 13
  8. RTSP Real-time Streaming Protocol Streaming Video: An introduction to RTSP.

    Kalan MacRow Feb. 2013 Client: SETUP movie.flv RTSP/1.0 CSeq: 1 Transport: RTP/UDP; client_port= 36000 Server: RTSP/1.0 200 OK CSeq: 1 Session: 19237 Client: PLAY movie.flv RTSP/1.0 CSeq: 2 Session: 19237 8 Friday, 8 February, 13
  9. • TCP control/command channel (RTCP) • UDP data channel (RTP)

    • What is UDP? Why use it? RTSP Real-time Streaming Protocol Streaming Video: An introduction to RTSP. Kalan MacRow Feb. 2013 9 Friday, 8 February, 13
  10. • TCP Connection state, in-order delivery, reliable, stream-oriented, flow-control, ACKs

    • UDP Connectionless, packets, no guarantees, no ACKs, less overhead • S(RTP) Tradeoff TCP’s guarantees for UDP’s higher throughput • Pump more data, faster! RTSP Real-time Streaming Protocol Streaming Video: An introduction to RTSP. Kalan MacRow Feb. 2013 10 Friday, 8 February, 13
  11. Streaming Video: An introduction to RTSP. Kalan MacRow Feb. 2013

    “Ten movies streaming across that, that Internet, and what happens to your own personal Internet?” “ [...] the Internet is not something that you just dump something on. It's not a big truck. It's a series of tubes. And if you don't understand, those tubes can be filled” QUOTES - US Senator Ted Stevens (Republican) 11 Friday, 8 February, 13