Multimedia Networking Applications
Properties of Video:
- Compression: spatial (within frame) and temporal (between frames)
- Bit rate: CBR (Constant Bit Rate) vs VBR (Variable Bit Rate)
- Compression standards: MPEG-1/2/4, H.261/H.263/H.264, VP8/9
Properties of Audio:
- PCM: 64 kbps (8000 samples/s × 8 bits/sample)
- Compressed: GSM (13 kbps), G.729 (8 kbps), MP3, AAC
Types of Multimedia Network Applications:
| Application Type | Tolerance | Bandwidth | Real-time | Examples |
|---|---|---|---|---|
| Streaming stored | High delay, low jitter | VBR | No (startup delay OK) | YouTube, Netflix |
| Conversational voice | Low delay (<150ms), low jitter | CBR ~64kbps | Yes | VoIP (Skype) |
| Conversational video | Low delay, low jitter | VBR | Yes | Zoom, FaceTime |
| Streaming live | Moderate delay | VBR | Yes (near real-time) | Live streaming |
Streaming Stored Video
UDP Streaming:
- Video sent over UDP (could adapt rate)
- Problem: many firewalls block UDP; no congestion control (unfair to TCP)
HTTP Streaming:
- Video stored as file on HTTP server
- Client requests via HTTP GET (byte ranges)
- Simple but non-adaptive — cannot adapt to changing available bandwidth
DASH (Dynamic Adaptive Streaming over HTTP):
- Video encoded at multiple bit rates (e.g., 300 kbps, 1 Mbps, 3 Mbps)
- Video divided into chunks (a few seconds each)
- Manifest file: provides URL for each chunk version + bit rate
- Client adaptively requests chunks — selects highest bit rate that can be downloaded without rebuffering
- Works over standard HTTP infrastructure (CDN-friendly)
Voice-over-IP
Limitations of Best-Effort IP Service:
- Packet loss: up to 1-5% tolerable (lost speech can be interpolated)
- Delay: one-way < 150ms good; 150-400ms acceptable; >400ms poor
- Jitter: variable delays cause uneven packet spacing
Removing Jitter at the Receiver:
- Playout buffering: receiver buffers incoming packets before playing
- Fixed playout delay: start playback after a fixed delay; simple but wasteful
- Adaptive playout delay: estimate network delay and adjust playout point dynamically
- Algorithm: estimate average delay, set playout time = estimated delay + k × delay variation
Recovering from Packet Loss:
| Method | Description | Overhead |
|---|---|---|
| FEC (Forward Error Correction) | Send redundant info (e.g., XOR of n packets) | n-fold bandwidth increase |
| Interleaving | Reorder packets so loss affects isolated samples | Adds delay |
| Error concealment | Repeat / interpolate lost speech | Zero overhead |
Skype Case Study:
- Proprietary codec (SILK — 40 kbps)
- Adaptive to network conditions
- P2P architecture for signaling (supernodes)
- Relay calls through intermediate nodes for NAT traversal
Protocols for Real-Time Conversational Applications
RTP (Real-Time Transport Protocol)
Runs on top of UDP. Provides timestamp, sequence number, and payload type identification for real-time data.
RTP Header:
| Field | Size | Description |
|---|---|---|
| Version | 2 bits | Currently 2 |
| P (Padding) | 1 bit | Padding present |
| X (Extension) | 1 bit | Header extension present |
| CC (CSRC count) | 4 bits | Number of contributing sources |
| M (Marker) | 1 bit | Frame boundary marker |
| Payload type | 7 bits | Codec type (PCM, GSM, MPEG, H.264, etc.) |
| Sequence number | 16 bits | Detection of lost packets |
| Timestamp | 32 bits | Sampling instant of first byte |
| SSRC | 32 bits | Synchronization source identifier |
| CSRC | 0-15 × 32 bits | Contributing sources (for mixers) |
RTCP (RTP Control Protocol):
- Sender/receiver reports: packet counts, loss rates, jitter, round-trip time
- Used for quality monitoring and flow adaptation
SIP (Session Initiation Protocol)
Application-layer protocol for setting up, managing, and tearing down multimedia sessions.
SIP Architecture:
- User agents: endpoints (client + server)
- SIP registrar: maps SIP addresses (sip:user@domain) to IP addresses
- SIP proxy: forwards SIP messages; assists with routing
SIP Messages:
- INVITE: initiate a session (includes SDP — Session Description Protocol for codec negotiation)
- BYE: terminate a session
- ACK: confirm session establishment
- REGISTER: register current location
- Status codes similar to HTTP (200 OK, 404 Not Found, etc.)
SIP Call Setup (simplified):
- Alice’s UA sends INVITE to Bob through SIP proxies
- Bob’s phone rings; Bob accepts
- Bob’s UA sends 200 OK with SDP (Bob’s codecs)
- Alice’s UA sends ACK
- Media flows directly (RTP between the two endpoints, not through SIP)
SDP (Session Description Protocol): exchanged in SIP body; describes media type, codec, port, IP address for media.
Network Support for Multimedia
Dimensioning Best-Effort Networks
- Provision enough bandwidth so that congestion is rare
- Simple but costly; no QoS guarantees
Providing Multiple Classes of Service
Diffserv (Differentiated Services):
- Packets are marked at network edge with DS field (formerly ToS byte)
- Core routers use PHB (Per-Hop Behavior) to determine forwarding treatment
Diffserv PHBs:
| PHB | Codepoint | Behavior | Used For |
|---|---|---|---|
| Default | 000 000 | Best-effort | Regular traffic |
| EF (Expedited Forwarding) | 101 110 | Low loss, low delay, low jitter (priority queuing) | VoIP, premium traffic |
| AF (Assured Forwarding) | 001 xx0 - 100 xx0 | 4 classes × 3 drop precedences | Assured bandwidth |
| CS (Class Selector) | xxx 000 | Backward compatibility | Legacy |
AF provides assured forwarding: within each of 4 classes, packets with lower drop precedence are less likely to be dropped during congestion.
Per-Connection QoS Guarantees: Intserv and RSVP
Intserv (Integrated Services): fine-grained, per-flow QoS guarantees.
- Guaranteed service: firm delay bounds
- Controlled load: approximates lightly loaded network
RSVP (Resource Reservation Protocol): signaling protocol for Intserv.
- Receiver initiates reservation (multicast-friendly)
- Reserves resources along the path (routers maintain soft state)
- Scalability concern: per-flow state in every router
References
- Computer Networking: A Top-Down Approach, 7th Edition — Kurose & Ross, Pearson, 2017
- RFC 3550 — RTP/RTCP
- RFC 3261 — SIP
- RFC 2474 — Definition of DS Field
- RFC 2597 — Assured Forwarding PHB
- RFC 3246 — Expedited Forwarding PHB
- RFC 2205 — RSVP