-
Notifications
You must be signed in to change notification settings - Fork 6k
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
HLS - Control over initial variant selection during adaptive playbacks #1276
Comments
ExoPlayer currently selects the first variant listed in the master playlist. If I remember correctly, this is what Apple recommends/specifies as correct client behavior. If you want to start in the lowest quality, you should technically have your server generate the master playlist with the lowest quality listed first. The above aside, we do agree that it makes more sense for the client to make the initial variant selection locally, as opposed to the recommended behavior. We'll be moving HLS over to use FormatEvaluator in ExoPlayer V2, which will give more control over the initial selection (and over the adaptive algorithm in general). |
If I may ask, why does Exoplayer waits until the first segment completed until it determines the next segment quailty ? Is it possible that we can manage ExoPlayer to change the quality of a segment before it ends ? If so, would it be seamless transition ? Thanks ! |
I'm not sure what you mean when you refer to the seamlessness of the transition. The variant transitions are already (more or less) seamless. |
Leave alone for the seamless transition because it does work like you said. My problem is that my HLS segments are divided to 10 sec chunks and when I start a video it is always starts with the lowest quality possible, even if the network has great connectivity. Only after a segment is played, the next segment changed and starts with the right quality based on bandwidth. Why is that that I must wait for the first segment to end before that transition has invoked ? |
If you try and switch too soon then you have very little bandwidth data on which to reliably base the decision. Also, because HLS sucks, you also need to download overlapping chunks of media. This further increases the probability of a re-buffer should you switch too soon. You're better off just selecting the variant you want up front (e.g. based on whether there's a WiFi connection, or similar) than trying to switch up very quickly. This will be possible in 2.x. |
@ojw28 is there any guidance on when v2 may be available? Trying to decide if we should do something in the meantime. |
The answer depends on what level of risk you're comfortable with, and what it means for it to be available :). It's already available in experimental form here. We have some major changes coming next week, so I'd definitely hold off until then. Once those are pushed, probably toward the end of next week, we'll remove "experimental" from the branch name. It will still be a dev branch and not a release branch. Once that happens, you'll need to decide what level of risk you're comfortable with in terms of whether you want to start looking at it or wait a little longer. At Google, we've just started to transition the first of our internal apps over, if that helps you to assess. |
great, thanks for the detailed update @ojw28. Much appreciated. |
Maybe not best place, but didn't want to open separated issue for this. I am using Exo 2.2.0, and want to get list of available video variants from Playlist. The data is available within HlsMasterPlaylist class, but I am unable to get it without modifying the code. I am using SimpleExoPlayer with DefaultBandwithMeter and HlsMediaSource for adaptive playback. |
Please, do open a new issue. But please be clearer about what you need. For example, why ExoPlayer.getCurrentTrackGroups() does not provide the information you need. |
Hello @ojw28 , you have mentioned that in v2 of ExoPlayer it is possible to select the initial Track of the Hls Stream, can you give me more details on how to do that. |
@ram992, you can provide your own Can this issue be closed? It seems to me that #2353's commit fixes this. |
My requirement is to simply start from a bit higher bandwidth track. Can this be implemented without creating a custom track selector. And choosing that should not stop the player from auto adapting once the bandwidth meter has estimate. |
@AquilesCanta any info |
As I mention in my previous comment:
From what you mention, it should be enough. For general programming questions I'd suggest trying Stack Overflow. |
I use Exoplayer for playing multi bit rate HLS stream. How to start playing with the lowest possible quality segment in master .M3U8 file?
The text was updated successfully, but these errors were encountered: