Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ways to tune adaptive switching for HLS? #2477

Closed
DavidMihola opened this issue Feb 20, 2017 · 4 comments
Closed

Ways to tune adaptive switching for HLS? #2477

DavidMihola opened this issue Feb 20, 2017 · 4 comments
Assignees

Comments

@DavidMihola
Copy link

After migrating our app from ExoPlayer 1 to ExoPlayer 2 it seems that the adaptive switching behavior when playing HLS streams is slightly different now. Particularly, it seems that switching up to a better stream quality now takes noticably longer that before. (Did ExoPlayer 1 switch up mid-chunk when possible?)

Are there any ways to influence the adaptive switching behavior for HLS streams in ExoPlayer 2?

@AquilesCanta
Copy link
Contributor

Did ExoPlayer 1 switch up mid-chunk when possible?

Yes, but that aspect has not changed. That is, neither version can cancel a chunk download to start downloading a different variant, though we might do something about this in the future.

takes noticably longer that before

Something that might be worth checking is whether your streams contain multiple audio renditions. Ideally, please send a stream that reproduces the longer preparation time to dev.exoplayer@gmail.com, so I can run a few experiments. If you want to run some yourself, metrics will be welcome.

Are there any ways to influence the adaptive switching behavior for HLS streams in ExoPlayer 2?

To customize this, you can inject your own TrackSelection.Factory in the DefaultTrackSelector. There is useful information about this in #676 and related issues. Finally, the trackselection package is the best place to go. I will track hls adaptation related enhancements with this issue.

@james12695
Copy link

james12695 commented Aug 25, 2017

@AquilesCanta I've tried the ExoPlayer demo app with the following test content for adaptive switching experiment:

  1. VOD with 30s segment, init with 360p and defer to switching up indefinitely due to zero bufferedDurationUs
  2. VOD with 10s segment, init with 360p and switch to 720p in few seconds
  3. LIVE with 3s segment, bufferedDurationUs is about 5 seconds in average and less than min value result in defering switching up indefinitely

As for the defer switching policy in AdaptiveTrackSelection,
do you have any suggestions for dealing with different segment length ?
Or should I need to override AdaptiveTrackSelection to customize updateSelectedTrack policy for quick fix? Thanks

p.s. I've sent the test content url into dev.exoplayer's mail

@ojw28
Copy link
Contributor

ojw28 commented Aug 31, 2017

  • Why would you have 30 second segments? That's way longer than is recommended, and feels like it would be a bad choice for pretty much any possible scenario. I think Apple now recommend a 6s segment duration (having previously recommended 10s). In short, I don't think this is a case we need to worry about, since streaming providers really shouldn't be using segment durations anywhere near this long.
  • We do need to fix (3), which is tracked by Fix adaptive switching for live playbacks close to the live edge #3017.

@ojw28
Copy link
Contributor

ojw28 commented Nov 1, 2017

(3) is now fixed in dev-v2. Marking as closed since (1) isn't a sensible use case (I don't think?) and (2) sounds like it's working correctly.

@ojw28 ojw28 closed this as completed Nov 1, 2017
@google google locked and limited conversation to collaborators Mar 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants