EG-371 Multimedia Communication

Document Sample
EG-371 Multimedia Communication Powered By Docstoc
					      EG-371
   Multimedia
Communication
Communication Overview

    Roland Auckenthaler
Overview
   Introduction
   Communication Models
   Protocols and Standards
   Networks
   Information
Principles of Communication
   Communication is
            The transfer of information
   The transfer needs
             A medium with a channel
   Multimedia communication uses
                 Multiple channels
Media and Channels
   Medium: Air
       Channel: Sound Waves 20 Hz – 20 kHz
           Information: Speech, Music
   Medium: Electromagnetic Waves
       Channel: Several Frequency Bands
           Information: Modulated Signals (FM, GSM, CDMA, …)
   Medium: Copper Cable
       Channel: Ethernet
           Information: Digital Data (IP-Packets, Bits and Bytes)
Choice of Channel
   Environment
       Availability of channel and equipment
       Ability to use channel
       Economic considerations
   Type of Information
       Amount of information
       Type of interaction between users
Choice of Environment
   Fixed Line
       Copper Cable
       Glass Fiber
   Wire Less
       GSM, 3G, WiFi
       Broadcast FM, DAB, Digital TV (DVB)
Choice of Information
   Complexity of information
   More Information
       Requires bigger channels (bandwidth)
       More time to transmit

    Complexity

                                                        Video



                                  Image   High quality sound

                      Speech quality
                          sound
                  Text
                                                                Size of object
Models of Communication
   Models describe the process of communication
   Theoretical ideal case
       No errors
       (Simple) basic models
   Boundary conditions
       Errors and other side effects
       Sophisticated models
Models - Ideal Case
   User A: Sends Information to User B
   User B: Receives the full information without error
    or loss
                  Information                 Information




       User A                                User B
Models - Error Conditions
   User A: Sends Information to User B
   Medium: Loss of information due to interference
   User B: Receives only part of the information
                 Information               (£$%)£$%”%
                                                &




       User A                  Noise       User B
Models - Error Resilience
   Encoding and Decoding of Data


     User A                          User B


     Information                    Information




     Encoding                        Decoding

                       Channel
Models - Error Resilience
   Multiple stacked levels of (de-)encodings
           User A                             User B


          Information                        Information




      High-level encoding                High-level decoding


      Intermediate encoding             Intermediate decoding


      Low-level encoding                 Low-level decoding

                              Channel
Models - Multimedia
    Multiple protocol stacks depending on information
                          User A                                                     User B

                     Information                                                 Information




    High-level encoding       High-level encoding              High-level decoding        High-level decoding


Intermediate encoding        Intermediate encoding             Intermediate decoding     Intermediate decoding


    Low-level encoding       Low-level encoding                Low-level decoding        Low-level decoding


                  Media encoding                                                Media decoding

                                                     Channel
Modelling Communication
   Requires                          Solution
       Standards to make                 Protocols for merging
        medium useable by                  multiple channels
        multiple channels                 Protocols for encoding and
       Standards for encoding             decoding
        and decoding                      Definitions of information
       Standards for types of             types
        information                       Definitions of
       Standards for high level           communication
        communication types                architectures
Communication Protocols

   Communication needs a structure this is a
                    Protocol

   Provide framework for the communication
   Allow error control mechanisms to be used
   Monitor the communication
   Provide communication of all data types
Protocol Design
     Protocol design needs to consider
         Message format
         Error control
         Acknowledgements
         Time-outs and re-tries
         Sequence control
         Flow control
         Recovery
         Data transparency
Standards
   Communication and protocols are largely
    determined by
                 Standards

   Decided by expert groups, manufacturers,
    user groups, international committees etc.
   Standards simplify communication process
Standard Models
   Used to simplify the design of communication
    systems
   The Internet uses a four layer model
    (or five including the physical layer)
     Internet Engineering Task Force - IETF

   Open System Interconnect OSI
       Is a seven layer model
       International Standards Organisation - ISO
       International Telecommunications Union - ITU
Internet and OSI Models
       OSI          Internet
    Application

    Presentation    Application

      Session

     Transport      Transport

      Network        Network

     Data Link      Data Link

      Physical       Physical
Models - Packaging
   Data Packaging – Headers and Trailers

Application Layer                        A-Hd    File    A-Tr


Transport Layer                   T-Hd     Application Data      T-Tr


Network Layer              N-Hd             Transport Data              N-Tr


Data Link Layer     D-Hd                    Network Data                       D-Tr


Physical Layer                           Physical Layer Packet
Models - Internet Layers

Layers with different functionality and different protocols


Layer                     Function            Protocol
5: Application Layer      Web Browser         HTTP
4: Transport Layer        Data Packaging      TCP
3: Network Layer          Routing             IP
2: Data Link Layer        Bit Level           Ethernet
1: Physical Layer         Transmission        Frequency
Models – Layer Functions
   Physical and Data Link Layer
       Merging of Channels
           Multiplexing
       Encoding, Decoding
           Compression
           Error resilience
   Network and Transport Layer
       Network Architectures
           LAN, WAN
Merging of Channels
   In many networks one physical medium is
    used by more than one communication
    channel
       Different applications
       Different users
       Different data / media types
   This requires multiplexing allow using a
    single medium by more than one channel
Encoding and Decoding
   Error resilience and recovery
   Routing information
   Data packaging information
Data compression
   Data compression is reduction of unstructured
    redundancy
   Compression ratios depend on redundancy and scheme
   Two forms of compression

Lossless                         Lossy
   Where the original data is      Some redundant
    recoverable                      information is lost
   Used for text, programs,            JPEG images
    and similar data                    Fax documents
                                        Internet Audio
Network Architectures
   Cellular networks
       Now mainly digital - analogue being phased out
       Main systems GSM, 3G
       Data can be used
          GSM at 9600 bps
          GPRS, 3G higher rates

       New standards being approved to aggregate
        channels up to 130 kbps
Network Architectures
   PSTN
       The telephone system
          Designed for voice
          Data rate - up to 56 kbps

   ISDN
       The digital system
          Designed for Voice, data, fax etc.
          2x64k bps channels =128Kbps minimum
          Can be aggregated for higher rates
Networks - Internet
   Classified by size, technology and protocol

   Local Area Networks
       Small area, High speed ring or bus, IEEE 802.X
   Metropolitan Area Networks
       City wide, fibre network, high speed technology.
   Wide Area Networks
       Large area, slow speed sparsely connected, Internet,
        OSI
Local Area Networks
   Under the control of a single authority
       A company or university
   Typically a Ring, Star or Bus network
       Bus is most common with IEEE 802.3 being most
        common 10 Mbps protocol
   Standards from 10 Mbps to 1 Gbps
       100baseT is now popular
       Uses hub concentrators/repeaters
LAN standards
   Local area network standards are made and
    published by IEEE (US organisation)
   IEEE 802 series
   Examples:
       802.3 - Ethernet (CSMA/CD bus systems)
       802.5 - Token Ring
       802.11 - Wireless LAN
Information
   What is information?
   How is it
       derived?
       communicated?
       used?
   Any event produces information
        much of this is now stored as text, image, audio,
        video and in databases
Information
   Users of information often have many
    choices but some restrictions
       Bandwidth
       Access equipment
       Physical proximity
       Cost considerations etc.
   Is the information of the right type?
       Will it provide what is required?
Information Quality, Reliability
   A reliable communication implies reliable
    information but..
   Other factors influence its quality
       Timeliness of the delivered information
       Speed or frequency of the information provision
       Completeness of the information
       Selectivity of the information
       Relevance or specificity of the information
Information Structure
   Raw data contains information
       This information will contain structure
          If more data is available then more information can be
           extracted
          Some data may be of no use, e.g. blank video screen

   Some information structures are better related to
    one medium than others
   Information can usually be extracted to suit most
    media
      A video can be processed to give
          still images, audio extract, text synopsis
          All result in loss of information
Information Exchange
   Publishing
       Web pages, HTML, Web Applications
   Messaging
       E-mail, SMS, IM
   Session Based Streaming Information
       Voice/Video Communications
   Event Based Information
       Subscriptions and Notification
       Information Pushing
Encoded Information

Complexity
                                                         Video



                             Image        High quality sound

                 Speech quality
                     sound           Structured information
             Text
                                                                 Size of object
Information - Text
   Efficient storage and transmission
   Language specific
   ASCII
       8 bits per character
       Only applies to English (Roman) languages
       Other versions can be used for other symbol sets
   Unicode
       New encoding of text based on Unicode
       16-bit system that encompasses all language symbols
Information - Image
   Graphic Images
       Generally line drawings or graphic designs, based
        on objects
       WMF, FIG, PS
   Bit-mapped Images
       Generally pictures
       Different Standards, GIF, PNG, JPEG
   Both Image types have different storage and
    transmission requirements
Information - Audio
   Audio information has many different standards
   Some of the differences are due to differing
    requirements of systems
   CD – High Quality Audio
       44 100 Hz x 16 bit x 2 channels, about 1.4 Mbps
   Audio Compression
       MP3, Ogg-Vorbis, between 64 kbps and 160 kbps
   Mono speech – Telephone
       8000 Hz x 8 bit x 1 channel = 64 kbps
Information - Video
   The most complex of multimedia types
   Transmission and storage requirements determined by
        Frame rate        (15-30 is common)
        Size of display             (can be changed to suit transmission rate)
        Resolution used   (can be determined by display)
        Colour depth                (depends on requirements 8-24 bit)
   Typical figures
        Video conferencing quality
        15 fps, 160 x 120 pixel window, 16 colours
        = 15 x 160 x 120 x 4 = about 1Mbps
      EG-371
   Multimedia
Communication
Communication Protocols
        Layer Protocols

    Roland Auckenthaler
Overview
   Layer Protocols
       Physical, Data Link
       Network
       Transport
       Application
Communication Protocol
Layer
   Application: Supporting network
    Applications
       HTTP, SMTP, SIP
                                      Application
   Transport: Host-host data
    transfer                          Transport
       TCP, UDP
   Network: Routing of datagrams      Network
       IP
   Data Link: Data transfer          Data Link
    between networks
                                       Physical
       Ethernet
   Physical: Bits “on the wire”
Physical/Data Link Layer

                                    Application
   Overview
       Data Link Layer Services    Transport
       Data Link Layer Protocols
                                     Network
         Ethernet

       Media Access, MAC           Data Link
       Addressing, ARP
                                     Physical
   Physical/Data Link Layer
      Two physically connected devices
          Host – Router, Router – Router, Host – Host
          Implemented in network adapters
      Data Unit: Frame
                        Data                            Data
           HA Data   Application                     Application
       HT HA Data    Transport                       Transport
  HN HT HA Data       Network        Data Link        Network
                     Data Link       Protocol        Data Link     HD HN HT HA Data
HD HN HT HA Data
                      Physical                        Physical
       Frame

                                   Network Adapter
Data Link Layer Services
   Framing, link access                  Flow control
       Encapsulate datagrams into            Pacing between sender and
        frames, adding header,                 receivers
        trailer                           Error detection
       Physical address using in             Errors caused by signal
        frame headers to identifier            attenuation, noise
        source destination –                  Receiver detects presence
        different from IP address              of errors
                                              Signalling of retransmission
   Reliable delivery                          on errors
    between two connected                 Error correction
    devices                                   Receiver identifies and
       Hardly used on low bit error           corrects bit error(s) without
        links                                  retransmission
Data Link Layer Protocols
   Three types of links
       Point-to-Point
           Single wire, e.g. PPP, SLIP
       Broadcast
           Shared wire or medium, e.g. Ethernet, Wavelan,
            802.11
       Switched
           e.g. Switched Ethernet, ATM
Media Access (MAC) or LAN
   Used to get frames from        Host
    one interface to another             AB-34-F3-09-D7-8A

                                                                     Router
       physically connected
                                                   BC-A4-D3-19-D7-8B
       Same network
   48 bit MAC address
       Burned in adapter
                                            LAN Network
       Administered by IEEE
       Manufacturer buys MAC
        address space
                                   4D-45-63-32-AB-CD
   Analogy                     Host             12-34-DF-A2-65-99
       MAC Address – Social                                    Host
        Security Number
                                       Adapter
                                       Node (Host, Router)
Ethernet Frame Structure

                   Destination Source
        Preamble                         Type          Data          CRC
                    Address Address


   Preamble                                Type
       Used to synchronise receiver            2 bytes, indicates the higher
        and sender clock rates                   layer protocol, mostly IP
       7 bytes with pattern 10101010       CRC
        followed by one byte with               Checked at receiver, frame is
        10101011                                 simply dropped on error
   Addresses                                   Channel sensing multiple
       6 bytes MAC, frame is received           access / Collision detection,
        by all adapters on a LAN and             CSMA/CD
        dropped if address does not
        match
         Minimum Header Size (without preamble and CRC) = 14 Bytes
Address Resolution - ARP
   A knows B’s IP address and wants to find out
    about MAC address of B
   A broadcasts ARP query packet, containing
    B’s IP address
       All nodes on LAN receive ARP query
   B receives ARP packet and replies to A with
    its MAC address
   A caches IP – MAC pairs for a specified
    duration – refresh necessary
Network Layer

   Overview
                                 Application
       Network Layer Services
       Routing                  Transport
       Internet Protocol – IP
                                  Network
         Addressing

         Protocol               Data Link
         Fragmentation
                                  Physical
Network Layer Services
   Path determination: Route    Transport packets from
    taken by packets from       sending to receiving hosts
    source to destination        Host           Host       Host
   Switching: Move packets
    from router’s input to                  LAN Network

    appropriate router output
   Call setup: Some network     Host                  Router
    architectures require
    router call setup along
    path before data flows              LAN Network



                                                           Host
Network Layer Architectures
   Virtual Circuits – Source to Destination Path
       Similar to telephone network
       Signalling protocols to setup VC (ATM, X.25, …)
       Not used in today’s internet
   Datagram Networks – The Internet
       No call setup
       No state about end-to-end connection
       Packets routed using destination host ID
Network Layer Architectures
   Internet                                 ATM
       Data exchange among                      Evolved from telephony
        computers                                Human Conversation
           Elastic service, not strict              Strict timing, reliability
            timing requirements                       requirements
       “Smart” end systems                          Need for guaranteed
           Computers                                 service
           Can adapt, perform                   “Dumb” end systems
            control, error recovery                  Telephones
           Simple inside network,                   Complexity inside
            complexity at “edge”                      networks
       Many link types
           Different characteristics
           Uniform service difficult
Network Layer - Internet


                          Network            Network
                          Data Link          Data Link
Application               Physical           Physical          Application
Transport                                                       Transport
 Network                        Network                         Network
              Network           Data Link
Data Link                                          Network      Data Link
              Data Link         Physical
                                                   Data Link
 Physical     Physical                             Physical     Physical

                          Internet Network

                                                               Data Packet
Network Layer - Routing

Determine a good path (sequence of routers with minimum
   cost) through the network from source to destination

                                                 5
Graph abstraction for                        B       C
  routing algorithms                 1                       1

     Graph nodes are routers                2
                                 A               2   3           F
     Graph edges are physical                           2
                                     4
      links                                      2
                                             D       E
       Link cost: delay, £,
         Congestion
                                         5
IP Addressing
                                  Host                       Host
   IP Address                        192.168.0.35              192.168.0.47
       Network part
                                                                               Host
           High order bits                Network                                192.168.1.147
       Host part
           Low order bits
                                                                               Network
   Network from an IP address            192.168.0.1
    perspective                                      Router     192.168.1.100
       Device interfaces with same      192.168.2.56

        network part of IP address                                               192.168.1.134
                                                                           Host
       Can physically reach each
        other without intervening a             Network
        router
                                              192.168.2.32                192.168.2.243
                                         Host                        Host
IP Network Addressing
 Class                              32 bit

    A     0  Network                         Host

          1.0.0.0 to 127.255.255.255


    B     10   Network                               Host

          128.0.0.0   to 191.255.255.255

    C     110   Network                                      Host

          192.0.0.0   to 223.255.255.255

    D     1110 Multicast Address
          224.0.0.0 to 239.255.255.255
  Network Layer – IP Protocol
IP version number      V     HL       ToS            Length            Total Datagram Length

Header Length          16 bit Identifier         Flags   FragOffset
                                                                       For fragmentation
Type of Service            TTL    UpperLayer Internet Checksum         And reassembly

                                 32 bit Source IP Address
Time To Live

Upper Layer Protocol         32 bit Destination IP Address
                                                                      Minimum Header Size
To deliver Data to
                                     Options (if any)                      20 Bytes


                                 Data (Variable Length)
                             Typically TCP or UDP Segment



                                            32 bit
IP Fragmentation
   Network links have maximum            Host
    transfer size (MTU)
       Largest link-level frame
       Different link types have
        different MTUs
   Large IP datagram divided                     Router
    (fragmented) within network
       One datagram becomes
        several datagrams
                                                            Router
       Reassembled only at final
        destination
       IP header bits used to identify
        and order related fragments                        reassembly
                                                 Host


                                                  IP Datagram
IP Fragmentation
  Length ID FragFlag Offset
                                        Data
  = 4000 = x  =0      =0

  One large datagram becomes several smaller datagrams

                  Length ID FragFlag Offset
                                                         Data
                  = 1500 = x  =0      =0

                  Length ID FragFlag Offset
                                                         Data
                  = 1500 = x  =0     = 1480

                  Length ID FragFlag Offset
                                                         Data
                  = 1040 = x  =0     = 2960
Transport Layer

   Overview
                                   Application
       Transport Layer Services
       Multiplexing               Transport
       UDP
                                    Network
       TCP
                                   Data Link

                                    Physical
Transport Layer
   Provide logical                     Transport Control Protocol
    communication between                TCP
    application processes
                                            Reliable
    running on different hosts
       Network Layer: data                 Unicast
        transfer between end                In-order
        systems                             Flow control
       Transport Layer: data               Connection based
        transfer between processes
        (Enhances network layer         User Datagram Protocol
        services)                        UDP
   Not available                           Unreliable
       Real-time                           Unicast and multicast
       Reliable multicast                  Unordered
       Bandwidth guarantees
                                            Best effort
Network Layer - Internet



Application                                               Application
Transport       Logical End to End Communication          Transport
 Network                                                   Network
                                Network
Data Link                       Data Link                 Data Link
              Routers           Physical
 Physical                                                  Physical
               Network                        Network
               Data Link                      Data Link
               Physical                       Physical
                           Internet Network
Transport Layer Multiplexing
   Accumulating data from                             32 bit
    multiple application
    processes                        Source    Port       Destination   Port
       Introduction of Headers    Transport   protocol specific headers
        used for de-multiplexing
   (De)multiplexing
       Based on sender and
        receiver port numbers
       Port numbers in each               Application         Data
        packet
       Specific port numbers
        allocated for specific
        applications
                                      TCP and UDP Packet format
Transport Layer - UDP
   “Best effort service”            Important for some
       Packets can be lost or        streaming multimedia
        delivered out of order        applications
                                         Error recovery on
   No connection setup                   application layer
       Therefore fast to setup          Rate sensitive
       No state management          Other usage
       Small packet header                  Domain Name Service
   Unicast and multicast                     (DNS)
                                             Simple Network
       One sender multiple                   Management Protocol
        receiver                              (SNMP)
Transport Layer - TCP
         Reliable service
             No packet loss
             In-order delivery
             Byte stream
               No message boundaries

         Connection based
             Handshake for connection setup
             Congestion and flow control
             Bi-directional data flow
         Unicast
             One sender and one receiver
   Transport Layer – TCP States
          TCP Client State Diagram                          TCP Server State Diagram

                   CLOSED                                            CLOSED      Server application
                                                    Receive ACK                  creates and listens on
Wait 30 seconds                Send SYN             Send Nothing                 socket

     TIME_WAIT               SYN_SENT                    LAST_ACK                LISTEN

Receive FIN                        Receive SYN & ACK                                 Receive SYN
                                                     Send FIN
Send ACK                           Send ACK                                          Send SYN & ACK

     FIN_WAIT_2             ESTABLISHED                CLOSE_WAIT             SYN_ACPD

 Receive ACK                   Send FIN                Receive FIN               Receive ACK
 Send nothing                                          Send ACK                  Send nothing
                  FIN_WAIT_1                                       ESTABLISHED
Transport Layer UDP and TCP
              32 bit                                    32 bit

  Source  Port               Port
                    Destination       Source   Port       Destination   Port
Length of Packet   Checksum Port             Sequence    Number
                                           Acknowledge          Number
                                     Length   and Flags Rcvr Accept Size
                                        Checksum           Ptr   Urgent Data
                                                    Options
         Application   Data


                                                Application     Data



    UDP Header Size: 8 Bytes         Minimum TCP Header Size: 24 Bytes
      EG-371
   Multimedia
Communication
Communication Protocols
     Application Layer

    Roland Auckenthaler
Overview
   Application Layer Protocols
       HTTP
       SMTP
       MIME
       SIP
Application Layer
   Overview
       Application Layer Services
         Models                     Application
         Protocol Consideration
                                     Transport
       Protocols
       Publishing                    Network
         HTTP
       Messaging                    Data Link
         SMTP, MIME
                                      Physical
       Session Signalling
         SIP, SIP Extensions
Application Layer
   Application
       Distributed Processes
       Exchange messages to implement the application
       Email, FTP, Web applications
   Application Layer Protocol
       Integral part of an application
       Interface between application modules
       Defines message exchange between modules
       Uses services provided by transport layer (UDP/TCP)
Application Models
   Client and Server
       Client: initiates communication with server
       Server: provides requested service to client
   Peer to Peer
       Each side is a client and a server
       Both sides can initiate communication
   Many to Many – Multicast / Broadcast
       One sender many receiver
       Also modelled by multiple peer to peer communications
Application Protocol Needs
   Data Loss
       Can application tolerate loss or require 100% reliable
        data?
       Audio streaming vs. FTP
   Timing
       Does the application need low delay to be effective?
       Voice communication
   Bandwidth
       What is the amount of data communicated?
       Is bandwidth required in short bursts or continuous rate?
Application Examples

Application    Protocol     Data Loss    Timing      Bandwidth

Email          SMTP (TCP)     None        None          Low

Web Publishing HTTP (TCP)     None         Low        Medium

Media          RTSP (TCP)      Yes        Bursts     Medium to
Streaming                                              High
Video          SIP/RTP         Yes      Continuous     High
Conferencing   (TCP/UDP)
Publishing - HTTP
   Client Application
       Browser
           Sends Requests
           Receives web objects
   Server Application                   PC running
       Web Server                     Explorer, Opera
           Receives Requests
           Sends Responses
   Protocol
       HTTP
           Non Persistent HTTP 1.0                           Server running
           Persistent HTTP 1.1                                  Apache
           Stateless
                                           MAC running
           Messages in ASCII Format
                                         Navigator, Mozilla
HTTP Messages
HTTP Request                         HTTP Response

                           Header                                Header
GET /directory/index.html HTTP/1.0   HTTP/1.0 200 OK
User-agent Mozilla/4.0               Date: Thu, 06 Aug 1998 12:00:15 GMT
Accept: test/html, image/jpeg        Server: Apache/1.3.0 (Unix)
Accept-language: en                  Content-Length: 1232
                                     Content-Type: text/html
CR-LF      CariageReturn-LineFeed    CR-LF       CariageReturn-LineFeed
                                     <HTML><HEAD> <TITLE>
                                     Document Title
                                     </TITLE> </HEAD>
                                     <BODY>
                                     The page .....
                                     </BODY></HTML>
                                                                   Data
Messaging – Email
   User Agent Application                    HTTP
       User Agent
       Compose, Send, Read
   Server Application
                                Mail Server with
       Mailbox                outgoing message
       Message Queue           queue and user
                                    mailbox
   Protocol
       Simple Mail Transfer
                                                   POP3
        Protocol (SMTP)
       Command-Response                              Mail Server with
                                      User Agents
                                                     outgoing message
                                                      queue and user
                                                          mailbox
     SMTP Messages
SMTP Command Flow Example                     SMTP Protocol Message format
                                              (different from SMTP commands)
Establish Connection
S:   220 dbar.org                             Message-ID: <12334>@host     Header
C:   HELO foo.org                             From: “User1” <userx@foo.org>
S:   250 Hello foo.org, pleased to meet you   To: “User2” <userc@dbar.org>
C:   MAIL FROM: “User1” <userx@foo.org >
S:   250 userx@y.foo.org ... Sender ok        Subject: This is a test
C:   RCPT TO: “User1” <userc@dbar.org >       MIME-Version: 1.0
S:   250 userc@dbar.org ... Recipient ok      Content-Length: 1232
C:   DATA                                     Content-Type: text/html
S:   354 Enter mail, end with "." on a line
     by itself                                CR-LF       CariageReturn-LineFeed
C:   This is the email text                   This is the email text
C:   .
S:   250 Message accepted for delivery
C:   QUIT
S:   221 dbar.org closing connection                                   Email body
Multmedia Extensions
   MIME: Multimedia mail extension
   Additional lines in message header declare MIME content type


                                   From: “User1” <userx@foo.org>Header
                                   To: “User2” <userc@dbar.org>
    MIME Version
                                   Subject: This is a test
                                   MIME-Version: 1.0
    Method to encode data          Content-Transfer-Encoding: base64
                                   Content-Length: 1232
                                   Content-Type: image/jpeg
    Multimedia data type/subtype   CR-LF       CariageReturn-LineFeed
                                   Base64 encoded data . . . .
    Encoded data
                                                           Email body
Messaging MIME Types
        Text
            text/plain, text/html
        Image
            image/jpeg, image/gif
        Audio
            audio/basic (8 bit u-law encoded)
            32kadpcm (32 kbps coding)
        Video
            video/mpeg, video/quicktime
        Application
            application/msword
Instant Messaging
   No “leading” standard protocol
       Application specific
       Yahoo, MSN, AOL, ….
   Used for instant communication with “online”
    partners
       Chat rooms
       Business communication between people on
        different buildings / continents
Session Signalling - SIP
   Session Initiation Protocol
       Session Signalling for multi media
       Voice or Video over IP
   Similar to HTTP
       Same message structure
       Transaction Based, Request + Response
   Endpoint is Client and Server – User Agent
   Different extensions for further enhancements
       Instant Messaging
       Event Notification
SIP Applications
   SIP for multimedia session signalling
   Additional protocols for media streaming
                                       Data
                  Signalling        Streaming


                     SIP               RTP

                 UDP / TCP             UDP
                               IP

                   Data Link / Physical Layer
SIP – Media Communication
   SIP Signalling
       Negotiate the media content and format
   Media Communication
       Audio and Video
           Real Time Protocol RTP
           Encapsulated the audio/video data in packets
       Proprietary Media Protocol
           Gaming: Position of players
       TCP or other transport protocols
SIP – Session Signalling


              Session Setup
                  INVITE
                  200 OK
                   ACK



           Media Communication
 User 1                          User 2

            Session Tear Down

                   BYE
                  200 OK
SIP – Session Setup
SIP Request                              SIP Response

                               Header                                    Header
                                         SIP/2.0 200 OK
INVITE sip:user2@somewhere.com SIP/2.0
                                         From: <sip:user1@foo.com:5061>;tag=121
From: <sip:user1@foo.com:5061>;tag=121
                                         To: <sip:user2@somewhere.com>; tag=321
To: <sip:user2@somewhere.com>
                                         Contact: <sip:user1@foo.com:5061>
Contact: <sip:user1@foo.com:5061>
                                         Content-Type: application/sdp
Content-Type: application/sdp
                                         Content-Length: 101
Content-Length: 132

CR-LF        CariageReturn-LineFeed      CR-LF         CariageReturn-LineFeed
v=0                                      v=0
o=carol 28972 28972 IN IP4 100.3.6.6     o=alice 2826 2826 IN IP4 somehere.com
s=-                                      s=
t=0 0                                    c=IN IP4 host.anywhere.com
c=IN IP4 192.0.2.4                       t=0 0
m=audio 0 RTP/AVP 0 3                    m=audio 49170 RTP/AVP 0
a=rtpmap:0 PCMU/8000
                                  Data   a=rtpmap:0 PCMU/8000
                                                                            Data
a=rtpmap:3 GSM/8000
SIP – Session TearDown
SIP Request                              SIP Response

                               Header                                    Header
                                         SIP/2.0 200 OK
BYE sip:user2@somewhere.com SIP/2.0
                                         From: <sip:user1@foo.com:5061>;tag=121
From: <sip:user1@foo.com:5061>;tag=121
                                         To: <sip:user2@somewhere.com>; tag=321
To: <sip:user2@somewhere.com>
                                         Contact: <sip:user1@foo.com:5061>
Contact: <sip:user1@foo.com:5061>
                                         Content-Length: 0
Content-Length: 0


CR-LF        CariageReturn-LineFeed      CR-LF         CariageReturn-LineFeed
SIP Extension - Messaging
                                   SIP Request
   Instant Messaging
       Session based              MESSAGE sip:user2@somewhere.com SIP/2.0
                                   From: <sip:user1@foo.com:5061>
         E.g. Chat
                                   To: <sip:user2@somewhere.com>
                                   Contact: <sip:user1@foo.com:5061>
       One Off Message            Content-Type: text/plain
                                   Content-Length: 12             Header
         E.g. Advertise, alarms   CR-LF         CariageReturn-LineFeed
   Multimedia Content             Hello World
                                                                   Data
       MIME                       SIP Response
       Text                       SIP/2.0 200 OK
                                   From: <sip:user1@foo.com:5061>
       Images                     To: <sip:user2@somewhere.com>

        File
                                   Contact: <sip:user1@foo.com:5061>
                                  Content-Length: 0                Header
                                   CR-LF         CariageReturn-LineFeed
SIP Extension – Event
   Event Notification
       Subscription to an event
       Notification when event occurs
   Event type - content can be anything
       Text
           Football scores
       Images
           Advertisement
       MIME
SIP Extension - Event



                Event Subscription – SUBSCRIBE


            Event – NOTIFY (England vs. Germany 1:0)
 User1                                                     User2
            Event – NOTIFY (England vs. Germany 1:1)


         Event Un-subscription – SUBSCRIBE (Unsubscribe)
       EG-371
    Multimedia
 Communication
    Media Communication
Media Streaming Protocols

     Roland Auckenthaler
Overview
   Media Streaming
       HTTP
       RTSP
       RTP/RTCP
   Data Profiles
       Audio: PCM, GSM
       Video: MPEG
HTTP Streaming
   Audio/Video Files stored in             Alternative
    Web Servers                                 Connection between Media
       Web Browser request file                 Player and Server
        with HTTP                               Using TCP connection with
       Web Server sends file in                 server
        HTTP response
           Content-Type signals the              Web
            encoding format                      Browser             Web
       Web Browser starts Media                                    Server
        Player                                                       With
       Disadvantage                              Media           Audio Data
           Media Player interacts via            Player
            Web Browser
                                                  Client            Server
Real Time Streaming
Protocol - RTSP
   HTTP                                RTSP does not
       Designers had fixed media
        in mind                             Define how audio/video
           Images, Text                     format for streaming
       Does not target continuous          Restrict how streamed
        media                                media is transported
           Audio, Video                      TCP vs. UDP?
   RTSP                                    Specify how players
       Client Server Application            buffer media
        Layer Protocol
       User Control                    RealNetworks
           Play, Stop, Forward,            Use RTSP to send control
            Rewind, Pause
                                             info to each other
    RTSP – Control and Delivery
   Client retrieves description of                   HTTP GET
    media presentation                 Web                                  Web
                                      Browser   Presentation Description   Server
       Media Stream URL
   Browser start Media Player
                                                        SETUP
   Player sends RTSP SETUP
                                                         PLAY
   Player send RTSP PLAY
   Media Server pushes Media         Media                                Media
                                                    Media Stream
    stream                            Player                               Server
                                                        PAUSE
   Player sends RTSP PAUSE
                                                      TEARDOWN
       Server pauses media stream
   Player sends RTSP TEARDOWN
       Server closes media stream
                                       Client                              Server
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
   Client repeats the session identifier for each
    request until the client closes the session
    with the TEARDOWN request
   RTSP can be sent over UDP or TCP
Real Time Protocol - RTP
   RTP specifies structure for
    packets carrying audio or            Internet Phone Application
    video data
   RTP packets provide                 Signalling
                                                             Data
                                                          Streaming
       Payload type identification
       Packet sequence number             SIP               RTP
       Timestamp
       Synchronisation Sources         UDP / TCP            UDP
   RTP uses UDP Transport                           IP
   RTP runs in end systems              Data Link / Physical Layer
       End to end communication
           Probably via some proxies
RTP - Streams
   RTP allows each source it own independent stream
    of RTP packets
       Example 1: Video conference between two participants can
        lead to four RTP streams
         Two for audio (one in each direction)
         Two for video (one in each direction)
         Possible Disadvantage: Synchronisation of streams
        Example 2: MPEG bundles audio and video
         Two MPEG/RTP streams (one in each direction)
       Example 3: Many to many Session
         One multicast sessions for all participants for sending RTP
           using different source identifiers
         Central media mixer
RTP – Packet Format
                                       32 bit

V   P X      CC    M          PT                       Sequence Number
                                    Timestamp
                    Synchronisation Source (SSRC) Identifier
                     Contributing Source (CSRC) Identifiers



                                   Payload   Data




   Compact (non ASCII) format to save bandwidth
   Minimum RTP Header Size: 12 Bytes
       Contributing Source Identifiers are optional
RTP – Example
   Voice Stream: 64 kbps PCM (U-Law) over RTP
       Application records and encodes data in 20ms chunks
         160 bytes per chunk and 50 chunks per second

       Layer Protocol Overhead 54 Bytes
         RTP = 12 Bytes, UDP = 8 Bytes, IP = 20 Bytes,
          Ethernet = 14 Bytes
         Total Transmission 214 Bytes per chunk
         approx. 90 kbps

         Packaging overhead about 25%

       Overhead reduction through longer chunks (i.e. 50 ms)
         More overall delay in data streaming
RTP – Quality of Service
   Packet Loss – Out of Order Packets
       UDP segment is encapsulated in IP datagram
       Datagram may overflow a router queue
         TCP could eliminate loss but retransmission delay and
          congestion control limit transmission rate
       Redundant packets can help
       Packet recovery through interpolation
   End-to-End Delay
   Delay Jitter
RTP – Packet Loss
   Forward error correction
       For every group of n chunks create a redundant chunk by
        exclusive or-ing the n original chunks
       Send out n+1 chunks, increasing the bandwidth by factor 1/n
       Reconstruction of original n chunks if there is at most one lost
        chunk from the n+1 chunks
       Playout delay needs to be fixed to the time to receiver all n+1
        packets
       Trade-off between bandwidth waste and playout delay
   Reproduction of lost chunks
       Interpolation
       Use of smart audio/video processing and redundancy in signals
        to restore lost parts
RTP – Delay
      Data                                                    Data
             Encoding   Transmission   Buffering   Decoding
    Recoding                                                Rendering

   Total end to end delay good case 120ms
       Recording and rendering each about 20ms – 50ms
         Sound Card , Operating System
       Encoding, one chunk (e.g. 20ms)
         Certain codec require the whole chunk to be available
          before encoding starts
       Transmission 0 to 200ms
         LAN closer to 0, WAN closer to 200ms and more
       Receiver buffering, e.g. 3 chunks – 60ms
       Decoding approx. 0 ms
   Acceptable for voice communication about 200ms
RTP – Jitter
   Packet do not arrive in equal intervals
        Jitter due to network routing
   Streaming media need continuous stream of data
        Buffering to reduce Jitter
        timestamps

                          Network
Ideal:      Sender                       Receiver


Real:       Sender                        Buffer    Receiver
RTP – Quality of Service
   RTP does not provide
       Mechanism to ensure timely delivery
       Other quality of service guarantees (e.g. bandwidth)
   RTP encapsulation is only seen at the end systems
       Not seen by intermediate routers
       Routers do not ensure that RTP packets arrive in a timely
        manner
   To provide QoS to application the internet must
    provide mechanisms such as RSVP
       Reservation of network resources
Real Time Control Protocol
   RTCP works in conjunction with RTP
   Participants in RTP sessions periodically transmit RTCP packets
   RTCP packet are sender and/or receiver reports containing
    statistics such as
       Number of packets sent
       Number of packets lost
       Inter-arrival jitter
   Application can use RTCP information for
       Performance control
       Diagnostics
       Change of transmission format (codec) based on feedback
RTCP – Reports and Packets
   Receiver Report Packets               Source Description
       Fraction of packets lost           Packets
       Last sequence number                  Email address of sender
       Average inter-arrival jitter          Sender’s name
   Sender Report Packets                     SSRC of associated RTP
                                               stream
       SSRC of the RTP streams
                                              Packets provide mapping
       Current time
                                               between SSRC and
       Number of packets sent                 user/host name
       Number of bytes sent
RTCP - Synchronisation
   RTCP can be used to synchronize different media streams
    within a RTP session
   Example video conferencing with separate streams for audio
    and video
       Timestamps in the RTP packets are tied to the video and audio
        sampling clocks
       Not tied to the wall-clock time (the real time)
   Each RTCP sender report packet contains for the most
    recently generated RTP packet
       Timestamp of the RTP packet
       Wall-clock time when the packet was created
       Thus association of sampling clocks to real clock
       Receivers can synchronise different sampling clocks
RTCP – Bandwidth Scaling
   RTCP attempts to limit its traffic to 5% of the
    session bandwidth
   Example: Sender with 2 Mbps video stream
       RTCP attempts to limits its traffic to 100 kbps
       75% to receivers (receiver reports)
         Equally shared among receivers
       25% to senders (sender reports)
   Participant (sender or receiver) determines RTCP
    packet transmission period dynamically by
       Calculating the average RTCP packet size
       Dividing average RTCP packet size by its allocated rate

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:0
posted:5/21/2013
language:Unknown
pages:111