Search code examples
exoplayermpeg-dashbuffering

How does ExoPlayer determine its buffering speed?


I am trying to simulate a fleet of ExoPlayer-based video players streaming MPEG-DASH streams from the same set of servers, for a performance study. I am familiar with how the DefaultLoadControl works (and this video helped a lot), but I have no idea about the size of the chunks requested from the server while buffering. Does ExoPlayer immediately try to get minBufferMs bytes in one HTTP request at startup, for example? Or does it send several smaller requests? What algorithm (or series of algorithms) determines at what speed the buffer is filled? Is it the same behavior during normal playback? After a seekTo()?

Also, what are the variables this buffering rate depends on? Does ExoPlayer use information from the MPD manifest for example?

What class should I investigate in order to understand more?

Thank you very much!


Solution

  • The video file is broken up into segments at the server side and the player requests the next segment from the appropriate resolution/bitrate stream depending on its capabilities and on the network conditions, or more accurately, generally on how it perceives the network based on how much it has buffered etc.

    The size of the segment is predetermined on the server side, rather than the player requesting smaller or larger segments. The choice of segment length for content is a mixture of Art and Science - in very simple terms shorter segments allow better latency and flexibility and longer segments are more efficient and may allow better quality. There is a good overview here at the time of writing:

    For your question about the class to investigate, in ExoPlayer you probably want to look at the TrackSelector: