IT273 Multimedia System Application

Multimedia System ApplicationUnit 912 min read

Multimedia Networking & Streaming: Protocols, QoS, Delivery

Unit 9 of Multimedia System Application: Explores how multimedia data is transmitted over networks (TCP/UDP, RTSP, RTP), quality-of-service (QoS) techniques, streaming protocols (HTTP, HLS, DASH), and real-world applications like video conferencing, live sports streaming, and cloud gaming.

TAKEAWAYS:

  • Understand the OSI and TCP/IP models and how multimedia data traverses layers, especially transport (UDP vs. TCP) and application (RTSP, RTP).
  • Learn QoS mechanisms (bandwidth reservation, packet prioritization) to ensure smooth video/audio delivery in real-time systems like WhatsApp calls.
  • Compare streaming protocols (HTTP-based HLS/DASH vs. RTSP/RTP) and their use cases (YouTube vs. live TV broadcasts).
  • Analyze buffering, latency, and jitter in streaming and how they affect user experience (e.g., buffering in Daraz video ads).
  • Study adaptive bitrate streaming (ABR) and how platforms like Netflix dynamically adjust video quality based on network conditions.
  • Explore multicast vs. unicast delivery models and their impact on scalability (e.g., live sports vs. on-demand content).

1. Multimedia Networking Fundamentals

Multimedia data (video, audio, images) requires efficient network transmission due to its high bandwidth and real-time constraints. Unlike text or simple data, multimedia demands low latency, high throughput, and error resilience. Networks for multimedia use specialized protocols and quality-of-service (QoS) techniques to ensure smooth delivery.

1.1 Network Models for Multimedia

Multimedia data travels through layered network models:

  • OSI Model (7 layers): Used for theoretical understanding.
  • TCP/IP Model (4 layers): Practical for implementation.
flowchart TD
    A["Application"] --> B["Transport"]
    B --> C["Internet"]
    C --> D["Network Access"]
    subgraph OSI
        E["Application"] --> F["Presentation"]
        F --> G["Session"]
        G --> H["Transport"]
        H --> I["Network"]
        I --> J["Data Link"]
        J --> K["Physical"]
    end
    legend bottom-left
        "OSI Model (7 layers)"::OSI
        "TCP/IP Model (4 layers)"::TCP/IP

Key Layers for Multimedia:

  • Application Layer: Protocols like RTSP (Real-Time Streaming Protocol), RTP (Real-time Transport Protocol), and HTTP (Hypertext Transfer Protocol).
  • Transport Layer: UDP (User Datagram Protocol) for real-time (low latency) or TCP (Transmission Control Protocol) for reliability (e.g., file downloads).
  • Network Layer: IP (Internet Protocol) for addressing and routing.
  • Data Link Layer: Ethernet, Wi-Fi, or cellular networks (4G/5G) for physical transmission.

1.2 Why UDP Over TCP for Multimedia?

Feature TCP UDP
Connection Connection-oriented Connectionless
Reliability Guaranteed delivery No retransmission
Latency Higher (due to ACK/NACK) Lower (real-time friendly)
Use Case File downloads, emails Video calls, live streaming

Example: WhatsApp Voice Calls use UDP because even a slight delay in retransmission would disrupt the call. In contrast, downloading a PDF uses TCP because missing packets can be recovered.


2. Quality of Service (QoS) in Multimedia Networks

QoS ensures multimedia data meets performance requirements like bandwidth, delay, jitter, and packet loss. Without QoS, streaming suffers from buffering, choppy audio, or frozen video.

2.1 QoS Techniques

  1. Bandwidth Reservation: Allocates a fixed portion of network capacity for multimedia traffic (e.g., VoIP calls in offices).
  2. Packet Prioritization: Gives multimedia packets higher priority over non-critical data (e.g., video packets over email).
  3. Traffic Shaping: Smooths out bursty traffic to prevent congestion (used in ISPs like NTC).
  4. Error Correction: Uses forward error correction (FEC) or automatic repeat request (ARQ) to handle packet loss (e.g., in 4G video calls).

2.2 Metrics for QoS

Metric Definition Example Impact
Latency Time taken for a packet to travel from source to destination. High latency → delayed video calls.
Jitter Variation in packet arrival times. Causes audio/video desynchronization.
Bandwidth Amount of data transmitted per second (Mbps). Low bandwidth → buffering in YouTube.
Packet Loss Percentage of packets lost during transmission. High loss → pixelation in live streams.

Worked Example: Imagine a live cricket match stream on Daraz Sports. If the network has high jitter, the video may stutter because packets arrive at inconsistent intervals. To fix this, the stream uses buffering (temporarily storing packets) and adaptive bitrate streaming (ABR) to adjust quality dynamically.


3. Multimedia Streaming Protocols

Streaming delivers multimedia content continuously without requiring the entire file to be downloaded first. Key protocols include:

3.1 Real-Time Streaming Protocol (RTSP)

  • Used for live streaming (e.g., live TV, webinars).
  • Works with RTP (Real-time Transport Protocol) for data delivery.
  • Example: Ncell’s live sports streaming uses RTSP to broadcast matches in real-time.

3.2 HTTP Live Streaming (HLS)

  • Apple’s protocol for on-demand and live streaming.
  • Breaks video into small MP4 segments (e.g., 2-10 seconds each).
  • Uses HTTP (not RTSP), making it compatible with CDNs (Content Delivery Networks).
  • Example: YouTube and Netflix use HLS for adaptive bitrate streaming.

3.3 Dynamic Adaptive Streaming over HTTP (DASH)

  • ISO/IEC standard for adaptive bitrate streaming.
  • Similar to HLS but more flexible (supports multiple codecs).
  • Example: Netflix uses DASH to switch between 720p, 1080p, and 4K based on network speed.

3.4 Comparison Table

Protocol Type Delivery Model Use Case Example Platforms
RTSP Live Unicast/Multicast Live TV, webinars Ncell Live Sports
HLS Live/On-demand Unicast YouTube, Netflix (mobile) YouTube, iTunes
DASH On-demand Unicast Netflix, Amazon Prime Netflix, Disney+
RTP Real-time Unicast/Multicast VoIP, video calls WhatsApp, Zoom

Visual: How HLS works (segments + adaptive bitrate):

flowchart TD
    A["Content Server"] -->|"MP4 Segments"| B["CDN (e.g., Akamai)"]
    B --> C["User Device"]
    C --> D["Player (e.g., Safari, Netflix App)"]
    D --> E["Adaptive Bitrate Switching"]
    legend bottom-left
        "MP4 Segments"::B
        "Adaptive Bitrate"::E

4. Adaptive Bitrate Streaming (ABR)

ABR dynamically adjusts video quality based on network conditions to avoid buffering. It works by:

  1. Probing network conditions (bandwidth, latency).
  2. Switching between bitrate levels (e.g., 1080p → 720p if network slows down).
  3. Buffering strategically to prevent interruptions.

Example: Watching a Netflix movie on a slow 3G connection. Netflix detects low bandwidth and switches from 4K to 1080p, then to 720p if needed, ensuring smooth playback without buffering.

4.1 ABR Algorithms

Algorithm Description Example Platforms
BBA (Bitrate-Based Adaptation) Switches based on buffer occupancy. YouTube
PBA (Predictive Bitrate Adaptation) Predicts future bandwidth using machine learning. Netflix
Reactive ABR Adjusts based on past buffer events (e.g., stalls). Amazon Prime Video

5. Multicast vs. Unicast in Multimedia

Feature Unicast Multicast
Delivery One-to-one (each packet sent individually). One-to-many (single packet sent to multiple receivers).
Bandwidth High (scalability issues). Low (efficient for large audiences).
Use Case On-demand content (Netflix). Live TV, IPTV (e.g., Ncell TV).
Protocol TCP/UDP. IGMP (Internet Group Management Protocol).

Real-World Example:

  • Unicast: Watching a Daraz video ad on your phone. The server sends the video directly to you.
  • Multicast: Watching a live election broadcast on Ncell TV. The same stream is sent to millions of viewers simultaneously, saving bandwidth.

6. Multimedia Networking Challenges

Challenge Cause Solution
Buffering Low bandwidth or high latency. ABR, CDN caching.
Packet Loss Network congestion or poor Wi-Fi. Error correction (FEC), retransmission.
Jitter Variable delay in packets. Buffering, QoS policies.
Scalability High demand (e.g., live concert streaming). Multicast, CDNs.
Security Piracy, DDoS attacks. DRM (Digital Rights Management), encryption.

Example: During the COVID-19 lockdown, Pathao’s live classes faced buffering due to high demand. They used CDNs (Cloudflare) to distribute content globally, reducing latency for students across Nepal.


7. Real-World Applications

In the Real World

  1. WhatsApp Calls (UDP + RTP)

    • Uses UDP for real-time voice/video calls with RTP for packet sequencing.
    • QoS: Prioritizes voice packets over messages to reduce latency.
  2. Netflix (DASH + ABR)

    • Uses DASH to stream movies in adaptive bitrate.
    • CDN: Netflix’s global servers ensure low latency worldwide.
  3. Ncell Live Sports (RTSP + Multicast)

    • Broadcasts matches using RTSP for live streaming.
    • Multicast reduces bandwidth usage for thousands of viewers.
  4. Kathmandu Traffic Simulation (Network Routing)

    • Imagine Pathao’s ride-hailing app as a network:
      • Riders = End users (devices).
      • Drivers = Servers routing requests.
      • Traffic jams = Network congestion.
      • Optimization = QoS policies to reduce delays (e.g., prioritizing emergency rides).

8. Exam Tip

  • Focus on protocol comparisons: Know when to use RTSP vs. HLS vs. DASH (live vs. on-demand, unicast vs. multicast).
  • QoS is key: Explain how latency, jitter, and bandwidth affect streaming quality. Mention ABR as a solution.
  • Real-world mapping: Relate concepts to Nepali apps (e.g., Khalti’s payment processing uses TCP for reliability; Ncell’s live TV uses RTSP).
  • Diagrams: Always draw OSI/TCP/IP models, HLS segment flow, and ABR bitrate switching in exams.
  • Worked examples: Practice calculating buffer size or bitrate adjustments for a given scenario (e.g., "A user switches from 3G to 4G; how does Netflix adjust?").

Common Exam Questions:

  1. Compare TCP and UDP in multimedia streaming. Which is used in WhatsApp calls and why?
  2. Explain adaptive bitrate streaming with an example from Netflix.
  3. How does multicast reduce bandwidth usage in live TV broadcasts?
  4. Draw the OSI model and label the layers involved in RTSP streaming.
  5. A user reports buffering on Daraz’s live class. Suggest two QoS techniques to improve it.

Based on the TU BITM syllabus for Multimedia System Application (IT273), unit 9.

Discussion

Loading…