google / google/ExoPlayer

Updating the master HLS playlist to only contain a single variant shows significant performance improvements

Open
#7,817 4 comments 0 reactions 1 assignee Claimed by @marcbaechinger View on GitHub
question
Dominant language
Java
Stars
21.9k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

### [REQUIRED] Searched documentation and issues
I was reading [this blog post](https://medium.com/google-exoplayer/hls-playback-in-exoplayer-a33959a47be7), but it doesn't directly assess the implications of having only one variant on the HLS playlist.

### [REQUIRED] Question
We recently experimented limiting the number of variants in the master HLS playlist and found perf (loading time) improvements. We would typically have 4-7 variants per video (360, 240, 480, 640, 720, 960, 1280), and when we started limiting the list to just one (either 360, 480, 640) we saw a huge (100s of ms) improvement in time between `prepare`-ing the video URI, to the first frame rendered/played.

Why does supplying a single variant instead of the whole master HLS playlist improve load times? I imagine there's a lot of work being done under-the-hood of Exoplayer in how it chooses a variant to play from the HLS playlist, but am having trouble pin-pointing where in the Exoplayer source this overhead exists. I would greatly appreciate any link to the source or a description of what's going on under-the-hood that could cause this overhead.

### A full bug report captured from the device
N/A

### Link to test content
N/A

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.