What is bitrate and bandwidth - devrath/MediaAlchemySuite GitHub Wiki

BitRate vs Bandwidth

  • Bitrate: The amount of data the player needs per second(e.g., 3 Mbps)
  • Bandwidth: The amount of data that the network can deliver to the player per second(e.g., 5 Mbps)

🎯 Why It Matters in Streaming

  • Smooth playback = Bitrate ≀ Bandwidth
  • Buffering or playback interruption = Bitrate > Bandwidth
  • Now, exoplayer uses adaptive bitrate to match the available bandwidth.

πŸ“Š Bitrate vs Bandwidth (Streaming Logic)

      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
      β”‚        Network Bandwidth      β”‚
      β”‚   (your connection speed)     β”‚
      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β”‚
                     β–Ό
      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
      β”‚  BandwidthMeter measures available β”‚
      β”‚  speed (e.g., 3.5 Mbps)            β”‚
      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β”‚
                     β–Ό
      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
      β”‚  ExoPlayer chooses a video bitrate variant   β”‚
      β”‚  ≀ bandwidth (e.g., 480p @ 2 Mbps)           β”‚
      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β”‚
                     β–Ό
      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
      β”‚   Smooth playback with no    β”‚
      β”‚      rebuffering             β”‚
      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“¦ Example

Resolution Bitrate (approx.)
240p 300 Kbps
360p 800 Kbps
480p 1.5 Mbps
720p 3 Mbps
1080p 5 Mbps
4K (2160p) 12–20 Mbps

🧠 Visual Analogy

  Bandwidth (Pipe)      Bitrate (Water Flow)

     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
     β”‚              β”‚       β”‚            β”‚
     β”‚   Internet   │──▢──▢ β”‚  Video     β”‚
     β”‚   Pipe       β”‚       β”‚  Stream    β”‚
     β”‚  (5 Mbps)    β”‚       β”‚ (3 Mbps)   β”‚
     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

βœ… Bitrate fits β†’ smooth flow!
❌ Bitrate > Bandwidth? Overflow & buffering!

πŸ““ Summary

Concept In Streaming
Bitrate How β€œheavy” the video is
Bandwidth How β€œfast” your internet is
Auto switching Adapts video to your network